@font-face {
  font-family: Poppins;
  src: url("/assets/poppins-regular.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

:root {
  --ground: #43265b;
  --ink: #f7f2f8;
  --accent: #ddcfe6;
  --detail: #7a598c;
  --button-surface: #ddcfe6;
  font-family: Poppins, "Avenir Next", sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  color: var(--ink);
  background-color: var(--ground);
  transition: background-color 1100ms ease, color 850ms ease;
  -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }
button, a { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
a { color: inherit; text-decoration: none; }
button { color: inherit; font: inherit; }
svg { display: block; }
::selection { background: var(--ink); color: var(--ground); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; }

.page {
  width: min(100%, 1640px);
  min-height: 100vh;
  min-height: 100svh;
  margin-inline: auto;
  padding: clamp(30px, 5.5vh, 70px) clamp(28px, 6.1vw, 110px) clamp(14px, 2.9vh, 38px);
  display: grid;
  grid-template-columns: minmax(0, .94fr) minmax(0, 1.06fr);
  grid-template-rows: auto 1fr auto;
  grid-template-areas: "brand photo" "intro photo" "footer footer";
  column-gap: clamp(32px, 6vw, 120px);
}
.masthead { grid-area: brand; position: relative; }
.wordmark { display: block; width: clamp(132px, 13vw, 186px); height: auto; }
@supports (mask-image: url("/assets/crochias.svg")) {
  .masthead::before {
    content: "";
    display: block;
    position: absolute;
    left: 0;
    top: 0;
    width: clamp(132px, 13vw, 186px);
    aspect-ratio: 1510 / 396;
    background: currentColor;
    mask: url("/assets/crochias.svg") center / contain no-repeat;
  }
  .wordmark { opacity: 0; }
}
.intro { grid-area: intro; align-self: center; padding: 48px 0 60px; }
h1 {
  margin: 0 0 clamp(20px, 2.6vh, 32px) -.055em;
  font-size: clamp(4.4rem, 8.3vw, 6rem);
  font-weight: 400;
  line-height: .99;
  letter-spacing: -.04em;
}
h1 span { color: var(--accent); transition: color 850ms ease; }
.intro p { margin: 0; font-size: clamp(15px, 1.15vw, 19px); line-height: 1.65; }
.instagram {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 49px;
  margin-top: clamp(22px, 4vh, 44px);
  padding: 12px 21px;
  border: 1px solid transparent;
  border-radius: 3px;
  background: var(--button-surface);
  color: var(--ground);
  font-size: 14px;
  transition: color 850ms ease, background-color 850ms ease, border-color .2s;
}
.instagram svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.65; }
.instagram:hover { border-color: currentColor; }
.exhibit {
  grid-area: photo;
  align-self: center;
  justify-self: center;
  width: min(100%, 65vh, 640px);
  margin: 14px 0 30px;
}
.aperture {
  position: relative;
  isolation: isolate;
  padding: 0 9px 9px 0;
}
.aperture::before, .photographs { border-radius: 48% 48% 2px 2px / 37% 37% 2px 2px; }
.aperture::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 9px 0 0 9px;
  background-color: var(--accent);
  transition: background-color 850ms ease;
}
.photographs { position: relative; overflow: hidden; aspect-ratio: 1.04; background: #f2e7f4; }
.product {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  visibility: hidden;
}
.product.is-previous, .product.is-shown { visibility: visible; opacity: 1; }
.product.is-shown { z-index: 1; transition: opacity 550ms ease; }
figcaption { padding-top: 12px; font-size: 12px; line-height: 1.6; }
.footer {
  grid-area: footer;
  min-height: 67px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px 24px;
  border-top: 1px solid var(--detail);
  transition: border-color 850ms ease;
}
.palette-controls, .swatches, .motion, .email { display: flex; align-items: center; }
.swatches { gap: 1px; }
.swatch, .motion {
  width: 33px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 2px;
  cursor: pointer;
  background: transparent;
}
.swatch { --chip-size: 16px; display: grid; place-items: center; }
.swatch::before {
  content: "";
  width: var(--chip-size);
  height: var(--chip-size);
  border-radius: 50%;
  background: linear-gradient(118deg, var(--thread-one) 50%, var(--thread-two) 50%);
  border: 1px solid #ffffff78;
  box-sizing: border-box;
}
.swatch[aria-pressed="true"]::before { outline: 1px solid currentColor; outline-offset: 3px; }
.swatch:hover::before { outline: 1px solid currentColor; outline-offset: 2px; }
.swatch:focus-visible, .motion:focus-visible { outline-offset: -2px; }
.motion { justify-content: center; margin-inline: 5px 2px; }
.motion svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.play-icon, .motion.is-paused .pause-icon { display: none; }
.motion.is-paused .play-icon { display: block; }
.palette-name, .email { font-size: 13px; line-height: 1.5; }
.palette-name { white-space: nowrap; }
.email { margin-left: auto; min-height: 44px; gap: 8px; }
.email:hover { text-decoration: underline; text-underline-offset: 4px; }
.email svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.5; }

@media (max-width: 740px) {
  .page {
    max-width: 540px;
    padding: 23px 24px 12px;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto 1fr auto;
    grid-template-areas: "brand" "photo" "intro" "footer";
    row-gap: 0;
  }
  .wordmark, .masthead::before { width: 118px; }
  .exhibit { width: min(100%, 350px); margin: clamp(24px, 4vh, 40px) 0 0; }
  .aperture { padding: 0 6px 6px 0; }
  .aperture::before { inset: 6px 0 0 6px; }
  .photographs { aspect-ratio: 1.24; }
  figcaption { font-size: 11px; padding-top: 6px; }
  .intro { align-self: center; padding: 29px 0 31px; }
  h1 { margin: 0 0 9px -.045em; font-size: clamp(2.75rem, 10.6vw, 3.5rem); line-height: 1.15; }
  h1 br { display: none; }
  .intro p { font-size: 14px; }
  .instagram { min-height: 45px; margin-top: 16px; padding: 9px 16px; font-size: 13px; }
  .footer { align-self: end; flex-wrap: wrap; padding-top: 8px; gap: 0 15px; }
  .palette-controls { flex-wrap: wrap; }
  .swatch { width: 29px; }
  .email { margin-left: 0; min-height: 35px; }
  .palette-name, .email { font-size: 12px; }
}
@media (max-width: 345px) {
  .page { padding-inline: 18px; }
  .swatch { width: 25px; }
  .motion { margin-inline: 0; width: 25px; }
  .palette-name { font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before { transition-duration: 0s !important; }
}
