/*
  Fonts are bundled with the site instead of fetched from Google at runtime.
  This keeps typography identical on Vercel preview and custom domains, even
  when a visitor's network or privacy filter blocks Google Fonts.
*/
@font-face {
  font-family: "Cormorant Garamond";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("fonts/cormorant-garamond-latin.woff2") format("woff2");
}

@font-face {
  font-family: "Cormorant Garamond";
  font-style: italic;
  font-weight: 400 500;
  font-display: swap;
  src: url("fonts/cormorant-garamond-italic-latin.woff2") format("woff2");
}

@font-face {
  font-family: "Italiana";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/italiana-latin.woff2") format("woff2");
}

:root {
  --ink: #1a1814;
  --cream: #f7f2ea;
  --blush: #d4a59a;
  --olive: #6b7355;
  --olive-deep: #4a5240;
  --gold: #c4a46a;
  --content-max: 26rem;
  --page-pad: 1.35rem;
  --ease-elegant: cubic-bezier(0.22, 0.61, 0.36, 1);
  --font-display: "Cormorant Garamond", Georgia, serif;
  --font-hero: "Italiana", "Cormorant Garamond", Georgia, serif;
}

/* ---------- Light theme (default) ---------- */
:root,
[data-theme="light"] {
  color-scheme: light;

  --page-bg: linear-gradient(
    180deg,
    #fbf7f0 0%,
    #f8f2e9 22%,
    #f4ede2 48%,
    #efe7da 72%,
    #e8dfd0 88%,
    #e2d8c6 100%
  );

  /* Mirrors the top of --page-bg, which is what sits behind the loader, so
     the dissolve reads as focus rather than a change of colour */
  --loader-bg: linear-gradient(180deg, #fbf7f0 0%, #f8f2e9 100%);

  --wash-gold: rgba(196, 164, 106, 0.16);
  --wash-blush: rgba(212, 165, 154, 0.16);
  --wash-olive: rgba(107, 115, 85, 0.1);
  --veil: rgba(150, 128, 92, 0.12);

  --hero-logo-filter: brightness(0.82) saturate(1.12);
  --hero-title: #45402f;
  --hero-eyebrow: rgba(107, 115, 85, 0.9);

  --text-strong: var(--ink);
  --text-soft: rgba(26, 24, 20, 0.72);
  --eyebrow-color: var(--olive);

  --btn-fg: var(--olive-deep);
  --btn-border: rgba(74, 82, 64, 0.45);
  --btn-bg: rgba(255, 255, 255, 0.45);
  --btn-bg-hover: rgba(107, 115, 85, 0.12);
  --btn-border-hover: var(--olive-deep);

  --card-border: rgba(74, 82, 64, 0.18);
  --card-bg: rgba(255, 255, 255, 0.28);
  --scroll-cue: rgba(74, 82, 64, 0.72);

  /* Flip clock: the two faces are lit slightly differently so the hinge reads */
  --flip-face-top: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.46) 0%,
    rgba(255, 255, 255, 0.24) 100%
  );
  --flip-face-bottom: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.16) 0%,
    rgba(255, 255, 255, 0.32) 100%
  );
  --flip-seam: rgba(74, 82, 64, 0.16);
  --flip-shade: linear-gradient(180deg, rgba(60, 54, 40, 0.02), rgba(60, 54, 40, 0.24));

  --invite-title: var(--ink);
  --invite-script: rgba(150, 104, 92, 0.92);

  --toggle-bg: rgba(247, 242, 234, 0.82);
  --toggle-fg: #3a352c;
  --toggle-border: rgba(74, 82, 64, 0.28);

  --viewer-bg: rgba(18, 16, 12, 0.94);
  --viewer-fg: #f5efe4;

  --watermark-filter: none;

  /* Butterfly, "simple" style */
  --bfly-simple-wing-a: rgba(212, 165, 154, 0.75);
  --bfly-simple-wing-b: rgba(107, 115, 85, 0.58);
  --bfly-simple-stroke: #c4a46a;
  --bfly-simple-body: #4a5240;

  /* Butterfly, "detailed" style */
  --bfly-wing-light: #e9c9b4;
  --bfly-wing-a: #bd786a;
  --bfly-wing-b: #887a50;
  --bfly-wing-dark: #3d3527;
  --bfly-stroke: #493d2b;
  --bfly-vein: rgba(57, 43, 31, 0.64);
  --bfly-eye-spot: #d8bd83;
  --bfly-speck: #efe0b9;
  --bfly-body-light: #8f8064;
  --bfly-body: #494333;
  --bfly-body-dark: #24231d;
}

/* ---------- Dark theme ---------- */
[data-theme="dark"] {
  color-scheme: dark;

  --page-bg: linear-gradient(
    180deg,
    #0a0a0a 0%,
    #100f0d 22%,
    #16140f 48%,
    #1d1a14 72%,
    #241f18 88%,
    #2b251c 100%
  );

  --loader-bg: linear-gradient(180deg, #0a0a0a 0%, #100f0d 100%);

  --wash-gold: rgba(196, 164, 106, 0.14);
  --wash-blush: rgba(212, 165, 154, 0.12);
  --wash-olive: rgba(107, 115, 85, 0.14);
  --veil: rgba(196, 164, 106, 0.07);

  --hero-logo-filter: none;
  --hero-title: #f5efe4;
  --hero-eyebrow: rgba(196, 164, 106, 0.9);

  --text-strong: #f3ecdf;
  --text-soft: rgba(243, 236, 223, 0.68);
  --eyebrow-color: rgba(196, 164, 106, 0.9);

  --btn-fg: rgba(243, 236, 223, 0.9);
  --btn-border: rgba(196, 164, 106, 0.45);
  --btn-bg: rgba(255, 255, 255, 0.04);
  --btn-bg-hover: rgba(196, 164, 106, 0.14);
  --btn-border-hover: var(--gold);

  --card-border: rgba(196, 164, 106, 0.22);
  --card-bg: rgba(255, 255, 255, 0.04);
  --scroll-cue: rgba(245, 239, 228, 0.62);

  /* Flip clock: the two faces are lit slightly differently so the hinge reads */
  --flip-face-top: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.11) 0%,
    rgba(255, 255, 255, 0.05) 100%
  );
  --flip-face-bottom: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.03) 0%,
    rgba(255, 255, 255, 0.08) 100%
  );
  --flip-seam: rgba(0, 0, 0, 0.42);
  --flip-shade: linear-gradient(180deg, rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.5));

  --invite-title: #f5efe4;
  --invite-script: rgba(212, 165, 154, 0.85);

  --toggle-bg: rgba(28, 26, 22, 0.72);
  --toggle-fg: #f0e8da;
  --toggle-border: rgba(196, 164, 106, 0.38);

  --viewer-bg: rgba(8, 7, 6, 0.96);
  --viewer-fg: #f5efe4;

  --watermark-filter: invert(1);

  /* Butterfly, "simple" style */
  --bfly-simple-wing-a: rgba(226, 186, 175, 0.8);
  --bfly-simple-wing-b: rgba(140, 150, 116, 0.6);
  --bfly-simple-stroke: #d8b87c;
  --bfly-simple-body: #cbbf9f;

  /* Butterfly, "detailed" style */
  --bfly-wing-light: #f0d2be;
  --bfly-wing-a: #c98273;
  --bfly-wing-b: #9b8b5a;
  --bfly-wing-dark: #493e2c;
  --bfly-stroke: #d2b579;
  --bfly-vein: rgba(47, 35, 25, 0.72);
  --bfly-eye-spot: #e1c78c;
  --bfly-speck: #f6e9c7;
  --bfly-body-light: #c0ad82;
  --bfly-body: #6f654c;
  --bfly-body-dark: #302d24;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  min-height: 100%;
  background: var(--page-bg) no-repeat;
}

body {
  margin: 0;
  min-height: 100svh;
  color: var(--text-strong);
  font-family: var(--font-display);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
  user-select: none;
  -webkit-user-drag: none;
}

.shell {
  width: 100%;
  margin: 0 auto;
  /* clip, not hidden: hidden on one axis forces the other axis to `auto`,
     which turns .shell into a second vertical scroll container and leaves iOS
     guessing which scroller a swipe drives. clip contains the glows
     horizontally without ever creating a scroller. */
  overflow-x: clip;
}

.section {
  position: relative;
  width: 100%;
  background: transparent;
}

/* ---------- Loader ---------- */
/* Only rendered while html.is-loading or html.is-revealed is set, both of
   which are added by script. No JS means no loader, never a blank page. */
.loader {
  position: fixed;
  inset: 0;
  z-index: 400;
  display: none;
  place-items: center;
  background: var(--loader-bg) no-repeat;
  transition: opacity 0.9s var(--ease-elegant);
  /* The overlay swallows the gesture itself instead of locking the document
     scroller. Toggling overflow:hidden on html/body made iOS tear down and
     re-establish the scroller at reveal, which ate the first swipe. */
  touch-action: none;
  overscroll-behavior: contain;
}

html.is-loading .loader {
  display: grid;
  opacity: 1;
}

/* Kept in the render tree so the backdrop can dissolve rather than cut */
html.is-revealed .loader {
  display: grid;
  opacity: 0;
  pointer-events: none;
}

html.is-loading .theme-toggle,
html.is-loading .watermark {
  opacity: 0;
  pointer-events: none;
}

/* The butterfly flies above the loader and stays above it as it fades,
   so the handoff to the scroll flight is unbroken */
html.is-loading .butterfly,
html.is-revealed .butterfly {
  z-index: 420;
}

.loader__inner {
  display: grid;
  justify-items: center;
  gap: 1.5rem;
  padding: 0 var(--page-pad);
  text-align: center;
}

.loader__line {
  margin: 0;
  font-family: var(--font-hero);
  font-size: clamp(1.4rem, 5.5vw, 2.1rem);
  font-weight: 400;
  letter-spacing: 0.02em;
  line-height: 1.25;
  color: var(--invite-script);
  opacity: 0;
  animation: loader-rise 1s var(--ease-elegant) 0.3s forwards;
}

.loader__track {
  width: clamp(88px, 32vw, 148px);
  height: 1px;
  overflow: hidden;
  background: var(--card-border);
  opacity: 0;
  animation: loader-rise 0.8s var(--ease-elegant) 0.6s forwards;
}

.loader__fill {
  display: block;
  width: 8%;
  height: 100%;
  background: linear-gradient(90deg, transparent, var(--gold));
  transition: width 0.7s var(--ease-elegant);
}

@keyframes loader-rise {
  from {
    opacity: 0;
    transform: translateY(9px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---------- Theme toggle ---------- */
.theme-toggle {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 200;
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border-radius: 50%;
  border: 1px solid var(--toggle-border);
  background: var(--toggle-bg);
  color: var(--toggle-fg);
  cursor: pointer;
  transition:
    background 0.4s var(--ease-elegant),
    border-color 0.4s var(--ease-elegant),
    color 0.4s var(--ease-elegant),
    opacity 0.8s var(--ease-elegant),
    transform 0.4s var(--ease-elegant);
}

.theme-toggle:hover,
.theme-toggle:focus-visible {
  transform: scale(1.06);
  outline: none;
}

.theme-toggle svg {
  width: 1.05rem;
  height: 1.05rem;
}

.theme-toggle__moon {
  display: none;
}

[data-theme="dark"] .theme-toggle__sun {
  display: none;
}

[data-theme="dark"] .theme-toggle__moon {
  display: block;
}

/* ---------- Designer watermark ---------- */
/* Sits below the viewer (300) and loader (400) so neither is obscured */
.watermark {
  position: fixed;
  right: max(0.9rem, env(safe-area-inset-right));
  bottom: max(0.9rem, env(safe-area-inset-bottom));
  z-index: 150;
  display: block;
  width: clamp(44px, 11.25vw, 62px);
  opacity: 0.5;
  transition:
    opacity 0.8s var(--ease-elegant),
    transform 0.4s var(--ease-elegant);
}

.watermark img {
  width: 100%;
  /* The source art is solid black, so dark mode needs it flipped to read */
  filter: var(--watermark-filter);
}

.watermark:hover,
.watermark:focus-visible {
  opacity: 0.9;
  transform: scale(1.04);
  outline: none;
}

/* ---------- Reveal ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 1.1s var(--ease-elegant),
    transform 1.1s var(--ease-elegant);
}

[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Escape hatch for when scripting never got far enough to reveal anything */
html.no-reveal [data-reveal] {
  opacity: 1;
  transform: none;
}

.looks li:nth-child(1)[data-reveal] { transition-delay: 0s; }
.looks li:nth-child(2)[data-reveal] { transition-delay: 0.05s; }
.looks li:nth-child(3)[data-reveal] { transition-delay: 0.1s; }
.looks li:nth-child(4)[data-reveal] { transition-delay: 0.15s; }

.section-title {
  margin: 0;
  font-size: clamp(1.55rem, 4.4vw, 2.4rem);
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-strong);
}

/* ---------- Hero ---------- */
.hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 5rem var(--page-pad) 5.5rem;
  overflow: hidden;
}

.hero__glow {
  position: absolute;
  width: min(120vw, 46rem);
  aspect-ratio: 1;
  border-radius: 50%;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -58%);
  background: radial-gradient(circle, var(--wash-gold), transparent 66%);
  pointer-events: none;
}

.hero__inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin: auto 0;
}

.hero__logo {
  width: min(72vw, 20rem);
  height: auto;
  filter: var(--hero-logo-filter);
  opacity: 0;
  transform: scale(0.94);
  transition:
    opacity 1.6s var(--ease-elegant),
    transform 2s var(--ease-elegant),
    filter 0.5s var(--ease-elegant);
}

.hero.is-visible .hero__logo {
  opacity: 1;
  transform: scale(1);
}

.hero__copy {
  margin-top: 2.25rem;
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 1.2s var(--ease-elegant) 0.45s,
    transform 1.2s var(--ease-elegant) 0.45s;
}

.hero.is-visible .hero__copy {
  opacity: 1;
  transform: translateY(0);
}

.hero__title {
  /* Italiana is a quiet editorial serif — forced break after the comma keeps
     the two halves of the line balanced under the monogram */
  margin: 0 auto;
  max-width: 22ch;
  font-family: var(--font-hero);
  font-size: clamp(1.55rem, 4.6vw, 2.45rem);
  font-weight: 400;
  letter-spacing: 0.02em;
  line-height: 1.28;
  color: var(--hero-title);
}

/* ---------- Scroll cue ---------- */
.scroll-cue {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
  color: var(--scroll-cue);
  transform: translateX(-50%);
  opacity: 0.9;
  transition: opacity 0.5s var(--ease-elegant);
  pointer-events: none;
}

.scroll-cue.is-hidden {
  opacity: 0;
}

.scroll-cue__line {
  display: block;
  width: 1px;
  height: 1.4rem;
  background: currentColor;
  opacity: 0.75;
}

.scroll-cue__chevron {
  width: 1.15rem;
  height: 1.15rem;
  animation: cueBob 2.4s var(--ease-elegant) infinite;
}

@keyframes cueBob {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(6px);
  }
}

/* ---------- Countdown ---------- */
.countdown {
  /* One half-turn; a full flip is two of these, and must finish inside the
     one-second tick. Kept in sync with FLIP_MS in script.js */
  --flip-half: 0.23s;
  /* Vertical correction so a digit's ink centre lands on the seam (see
     .countdown__value). Measured against the lining figures of this font. */
  --flip-num-shift: -0.122em;
  padding: 3.5rem 0 2.25rem;
}

.countdown__inner {
  width: min(100%, calc(var(--content-max) + 4.5rem));
  margin: 0 auto;
  padding-inline: var(--page-pad);
  text-align: center;
}

.countdown__eyebrow {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--eyebrow-color);
}

.countdown__clock {
  margin: 1.35rem 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
}

.countdown__group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
}

.countdown__digits {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 0.2rem;
}

/* A split-flap card: two static halves show the value at rest, and two hinged
   leaves rotate over them during a change. The leaf halves are the only moving
   parts, so a flip is two rotations sharing one hinge at the card's midline. */
.countdown__digit {
  /* Halves are measured from this box, so the seam lands exactly at 50% */
  position: relative;
  width: clamp(24px, 6.2vw, 44px);
  height: clamp(38px, 10vw, 64px);
  border-radius: 9px;
  /* No overflow clipping: it would flatten the rotating leaves */
  perspective: 260px;
  font-size: clamp(1.2rem, 3.8vw, 2.3rem);
  font-weight: 600;
  line-height: 1;
  /* Lining figures so every digit is the same height and sits on one baseline.
     Without this the font's default oldstyle figures (6/8 rise, 3/5/7/9 drop)
     each meet the seam at a different point. */
  font-variant-numeric: lining-nums tabular-nums;
  font-feature-settings: "lnum" 1, "tnum" 1;
  color: var(--text-strong);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.08);
}

.countdown__half,
.countdown__leaf {
  position: absolute;
  left: 0;
  right: 0;
  height: 50%;
  overflow: hidden;
  border: 1px solid var(--card-border);
  backface-visibility: hidden;
}

.countdown__half--top,
.countdown__leaf--top {
  top: 0;
  border-bottom: none;
  border-radius: 9px 9px 0 0;
  background: var(--flip-face-top);
}

.countdown__half--bottom,
.countdown__leaf--bottom {
  bottom: 0;
  border-top: none;
  border-radius: 0 0 9px 9px;
  background: var(--flip-face-bottom);
}

/* Hairline seam so the card reads as two leaves even while it sits still */
.countdown__half--top {
  border-bottom: 1px solid var(--flip-seam);
}

/* Each half crops a full-height number, so the two halves together read as one
   digit and the seam cuts through its middle */
.countdown__value {
  position: absolute;
  left: 0;
  right: 0;
  height: 200%;
  display: flex;
  align-items: center;
  justify-content: center;
  /* Flex-centering aligns the line box, but the glyph's ink centre sits a little
     off it because of the font's half-leading. This nudge drops the ink centre
     onto the seam so both halves show an equal slice of every digit. */
  transform: translateY(var(--flip-num-shift));
}

.countdown__half--top .countdown__value,
.countdown__leaf--top .countdown__value {
  top: 0;
}

.countdown__half--bottom .countdown__value,
.countdown__leaf--bottom .countdown__value {
  bottom: 0;
}

.countdown__leaf {
  z-index: 4;
  /* Hidden at rest; the statics already show the value */
  visibility: hidden;
}

.countdown__leaf--top {
  transform-origin: center bottom;
}

.countdown__leaf--bottom {
  transform-origin: center top;
  transform: rotateX(90deg);
}

/* Shading that deepens as a leaf turns edge-on, so the fold catches light */
.countdown__leaf::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--flip-shade);
  opacity: 0;
}

.countdown__digit.is-flipping .countdown__leaf {
  visibility: visible;
}

/* The falling leaf covers the first half of the flip, the rising leaf the
   second, so the two rotations meet edge-on at the hinge */
.countdown__digit.is-flipping .countdown__leaf--top {
  animation: countdownFlipTop var(--flip-half) ease-in both;
}

.countdown__digit.is-flipping .countdown__leaf--bottom {
  animation: countdownFlipBottom var(--flip-half) ease-out var(--flip-half) both;
}

.countdown__digit.is-flipping .countdown__leaf--top::after {
  animation: countdownShadeIn var(--flip-half) ease-in both;
}

.countdown__digit.is-flipping .countdown__leaf--bottom::after {
  animation: countdownShadeOut var(--flip-half) ease-out var(--flip-half) both;
}

.countdown__unit {
  margin: 0;
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--eyebrow-color);
}

.countdown__sep {
  margin: -1.15rem 0.02rem 0;
  font-size: clamp(1rem, 2.9vw, 1.55rem);
  line-height: 1;
  color: var(--invite-script);
  opacity: 0.85;
}

.countdown__tagline {
  margin: 1.35rem 0 0;
  /* Italiana has no bold cut, so Cormorant at 600 carries the weight here */
  font-family: var(--font-display);
  font-size: clamp(1.05rem, 3.2vw, 1.45rem);
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-strong);
}

@keyframes countdownFlipTop {
  from {
    transform: rotateX(0deg);
  }
  to {
    transform: rotateX(-90deg);
  }
}

@keyframes countdownFlipBottom {
  from {
    transform: rotateX(90deg);
  }
  to {
    transform: rotateX(0deg);
  }
}

@keyframes countdownShadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes countdownShadeOut {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

/* ---------- Wardrobe ---------- */
.wardrobe {
  padding: 4rem 0;
  background:
    radial-gradient(50% 26% at 18% 42%, var(--wash-blush), transparent 70%),
    radial-gradient(45% 24% at 86% 68%, var(--wash-olive), transparent 70%);
}

.wardrobe__inner {
  position: relative;
  width: min(100%, calc(var(--content-max) + 4.5rem));
  margin: 0 auto;
  padding-inline: var(--page-pad);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.wardrobe__header {
  width: 100%;
  padding: 0 0 0.75rem;
  text-align: center;
}

.wardrobe__intro {
  margin: 0.95rem auto 0;
  max-width: 36ch;
  font-size: 1.05rem;
  line-height: 1.55;
  color: var(--text-soft);
}

/* ---------- Looks ---------- */
.looks {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.looks li {
  margin: 0;
  padding: 0;
}

.looks__subhead {
  width: 100%;
  margin: 2.75rem 0 0;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--card-border);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--eyebrow-color);
}

.look {
  margin: 0;
  padding: 0;
  width: 100%;
}

.look--full {
  margin-top: 2rem;
}

/* ---------- Compact celebration rows ---------- */
.row {
  appearance: none;
  display: flex;
  align-items: center;
  gap: 0.9rem;
  width: 100%;
  margin: 0;
  padding: 0.55rem 0.85rem 0.55rem 0.55rem;
  border: 1px solid var(--card-border);
  border-radius: 10px;
  background: var(--card-bg);
  text-align: left;
  font-family: var(--font-display);
  color: var(--text-strong);
  cursor: pointer;
  transition:
    border-color 0.3s var(--ease-elegant),
    background 0.3s var(--ease-elegant);
}

.row:hover,
.row:focus-visible {
  border-color: var(--btn-border-hover);
  background: var(--btn-bg-hover);
  outline: none;
}

.row__thumb {
  flex: 0 0 auto;
  width: 68px;
  height: 121px;
  object-fit: cover;
  border-radius: 6px;
}

.row__text {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
  flex: 1 1 auto;
}

.row__name {
  font-size: 1.2rem;
  font-weight: 600;
  line-height: 1.25;
  color: var(--text-strong);
}

.row__meta {
  font-size: 0.98rem;
  line-height: 1.3;
  color: var(--text-soft);
}

.row__date {
  margin-top: 0.1rem;
  font-size: 0.88rem;
  line-height: 1.3;
  letter-spacing: 0.04em;
  color: var(--eyebrow-color);
}

.row__action {
  flex: 0 0 auto;
  align-self: center;
  padding: 0.4rem 0.7rem;
  border: 1px solid var(--btn-border);
  border-radius: 999px;
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--btn-fg);
}

.look__label {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  margin-bottom: 0.9rem;
}

.look__text {
  min-width: 0;
}

.look__name {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: 0.01em;
  color: var(--text-strong);
}

.look__meta {
  margin: 0.3rem 0 0;
  font-size: 1rem;
  line-height: 1.35;
  color: var(--text-soft);
}

.look__frame {
  appearance: none;
  display: block;
  width: 100%;
  margin: 0;
  padding: 0.45rem;
  border: 1px solid var(--card-border);
  border-radius: 10px;
  background: var(--card-bg);
  cursor: zoom-in;
  transition:
    border-color 0.35s var(--ease-elegant),
    background 0.35s var(--ease-elegant),
    transform 0.35s var(--ease-elegant);
}

.look__frame:hover,
.look__frame:focus-visible {
  border-color: var(--btn-border-hover);
  outline: none;
}

.look__frame img {
  width: 100%;
  height: auto;
  border-radius: 6px;
}

.download-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  margin: 1.5rem auto 0;
  padding: 0.95rem 1.5rem;
  width: 100%;
  max-width: 320px;
  min-height: 52px;
  border: 1px solid var(--btn-border);
  color: var(--btn-fg);
  text-decoration: none;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.85rem;
  font-weight: 500;
  font-family: var(--font-display);
  background: var(--btn-bg);
  transition:
    background 0.35s var(--ease-elegant),
    border-color 0.35s var(--ease-elegant),
    color 0.35s var(--ease-elegant);
}

.download-btn:hover,
.download-btn:focus-visible {
  background: var(--btn-bg-hover);
  border-color: var(--btn-border-hover);
  outline: none;
}

.download-btn__icon {
  font-size: 1.05rem;
  line-height: 1;
}

.looks + .download-btn {
  margin-top: 2.5rem;
}

/* ---------- Viewer gallery ---------- */
.viewer {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 0.5rem;
  padding: max(0.75rem, env(safe-area-inset-top)) 0.75rem
    max(0.75rem, env(safe-area-inset-bottom));
  background: var(--viewer-bg);
  color: var(--viewer-fg);
  overscroll-behavior: contain;
  /* pinch-zoom stays (guests zoom into poster text), but single-finger pan is
     disallowed so the page behind can't scroll — no document lock needed. */
  touch-action: pinch-zoom;
}

.viewer[hidden] {
  display: none;
}

.viewer__bar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.15rem 0.15rem 0;
}

.viewer__titles {
  min-width: 0;
}

.viewer__name {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1.25;
  color: var(--viewer-fg);
}

.viewer__meta {
  margin: 0.2rem 0 0;
  font-size: 0.95rem;
  line-height: 1.3;
  color: rgba(245, 239, 228, 0.72);
}

.viewer__close {
  flex: 0 0 auto;
  min-width: 44px;
  min-height: 44px;
  padding: 0.55rem 0.95rem;
  border: 1px solid rgba(245, 239, 228, 0.35);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--viewer-fg);
  font-family: var(--font-display);
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.3s var(--ease-elegant);
}

.viewer__close:hover,
.viewer__close:focus-visible {
  background: rgba(255, 255, 255, 0.18);
  outline: none;
}

.viewer__stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  /* Was pan-y, which now that the body isn't locked would scroll the page
     behind the viewer. pinch-zoom keeps zoom; horizontal swipe nav is read by
     JS regardless of touch-action. */
  touch-action: pinch-zoom;
}

.viewer__img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 4px;
  opacity: 1;
  transition: opacity 0.25s var(--ease-elegant);
}

.viewer__img.is-swapping {
  opacity: 0;
}

.viewer__nav {
  position: absolute;
  top: 50%;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 1px solid rgba(245, 239, 228, 0.32);
  border-radius: 50%;
  background: rgba(20, 18, 15, 0.55);
  color: var(--viewer-fg);
  cursor: pointer;
  transform: translateY(-50%);
  transition:
    background 0.3s var(--ease-elegant),
    border-color 0.3s var(--ease-elegant);
}

.viewer__nav:hover,
.viewer__nav:focus-visible {
  background: rgba(40, 36, 30, 0.85);
  border-color: rgba(245, 239, 228, 0.6);
  outline: none;
}

.viewer__nav svg {
  width: 1.35rem;
  height: 1.35rem;
}

.viewer__nav--prev {
  left: 0.15rem;
}

.viewer__nav--next {
  right: 0.15rem;
}

.viewer__footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding-bottom: 0.15rem;
  text-align: center;
}

.viewer__count {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--viewer-fg);
}

.viewer__hint {
  margin: 0;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(245, 239, 228, 0.55);
}

/* ---------- Invite ---------- */
.invite {
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 4rem var(--page-pad);
  overflow: hidden;
  background: linear-gradient(180deg, transparent 0%, var(--veil) 55%, var(--veil) 100%);
}

.invite__glow {
  position: absolute;
  width: min(70vw, 26rem);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, var(--wash-gold), transparent 68%);
  top: 22%;
  left: 50%;
  transform: translateX(-50%);
  pointer-events: none;
}

.invite__card {
  position: relative;
  z-index: 1;
  text-align: center;
  width: min(100%, 36rem);
  max-width: 36rem;
  padding: 0 0.5rem;
}

.invite__title {
  /* Stacked as two fixed lines on every viewport: "Invitation" then
     "Coming Soon" — so the break never lands mid-phrase on narrow screens */
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35em;
  margin: 0;
  font-size: clamp(1.35rem, 4vw, 1.85rem);
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--invite-title);
}

.invite__line {
  display: block;
  /* Pull the last letter back so wide tracking doesn't optically drift right */
  padding-right: 0.22em;
  white-space: nowrap;
}

/* Drawn rather than an emoji so it takes the theme's rose instead of rendering
   as a white heart that disappears against the light background */
.invite__heart {
  display: inline-block;
  width: 0.7em;
  height: 0.7em;
  margin-left: 0.1em;
  vertical-align: baseline;
  fill: var(--invite-script);
}

/* ---------- Butterfly ---------- */
.butterfly {
  position: fixed;
  top: 0;
  left: 0;
  width: clamp(40px, 4vw, 56px);
  height: clamp(40px, 4vw, 56px);
  z-index: 100;
  pointer-events: none;
  will-change: transform;
  /* Hidden until scripting has placed it, otherwise the inline SVG paints in
     the top-left corner for a frame — or forever, with scripting off */
  opacity: 0;
  transition: opacity 0.7s var(--ease-elegant);
}

/* Only the artwork named by data-butterfly on the container is drawn */
.butterfly[data-butterfly="simple"] .butterfly__art--detailed,
.butterfly[data-butterfly="detailed"] .butterfly__art--simple {
  display: none;
}

/* The flat artwork wants one soft shadow; the shaded one needs a tight
   contact shadow as well, or it reads as a sticker */
.butterfly[data-butterfly="simple"] {
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.2));
}

.butterfly[data-butterfly="detailed"] {
  filter:
    drop-shadow(0 1px 1px rgba(0, 0, 0, 0.28))
    drop-shadow(0 3px 5px rgba(0, 0, 0, 0.16));
}

/* The flat wings are semi-transparent already, so they sit lower */
.butterfly[data-butterfly="simple"].is-ready {
  opacity: 0.88;
}

.butterfly[data-butterfly="detailed"].is-ready {
  opacity: 0.96;
}

.butterfly svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.butterfly .wing-detail {
  opacity: 0.92;
}

.butterfly .wing-left,
.butterfly .wing-right {
  transform-origin: center center;
  transform-box: fill-box;
  animation: flap 0.42s ease-in-out infinite alternate;
}

.butterfly .wing-right {
  animation-delay: -0.08s;
}

.butterfly.is-scrolling-up .wing-left,
.butterfly.is-scrolling-up .wing-right {
  animation-duration: 0.32s;
}

/* Slower beat while it settles over the loader, so arriving reads as a
   landing rather than a stop */
.butterfly.is-hovering .wing-left,
.butterfly.is-hovering .wing-right {
  animation-duration: 0.58s;
}

@keyframes flap {
  from {
    transform: scaleX(1) rotate(0deg);
  }
  to {
    transform: scaleX(0.72) rotate(-4deg);
  }
}

/* ---------- Breakpoints ---------- */
@media (min-width: 640px) {
  :root {
    --page-pad: 2rem;
    --content-max: 28rem;
  }

  .countdown__inner {
    width: min(100%, calc(var(--content-max) + 6rem));
  }

  .wardrobe {
    padding: 5rem 0;
  }

  .looks {
    gap: 1rem;
  }

  .row {
    gap: 1.1rem;
    padding: 0.7rem 1rem 0.7rem 0.7rem;
  }

  .row__thumb {
    width: 78px;
    height: 139px;
  }
}

@media (min-width: 768px) {
  :root {
    --page-pad: 2.5rem;
    --content-max: 30rem;
  }

  .theme-toggle {
    top: 1.5rem;
    right: 1.5rem;
    width: 2.75rem;
    height: 2.75rem;
  }

  .hero__logo {
    width: min(52vw, 24rem);
  }

  .hero__copy {
    margin-top: 2.75rem;
  }

  .wardrobe__inner {
    width: min(100%, calc(var(--content-max) + 7rem));
  }

  .countdown__clock {
    gap: 0.45rem;
  }

  .countdown__digits {
    gap: 0.28rem;
  }

  .countdown__digit {
    width: clamp(30px, 4.2vw, 48px);
    height: clamp(46px, 6vw, 68px);
  }

  .countdown__sep {
    margin-top: -1.2rem;
  }

  .look__name {
    font-size: 1.5rem;
  }

  .row__name {
    font-size: 1.3rem;
  }

  /* Nav sits beside the poster instead of over it */
  .viewer {
    padding-inline: 1.5rem;
  }

  .viewer__stage {
    padding-inline: 4.5rem;
  }

  .viewer__nav {
    width: 54px;
    height: 54px;
  }

  .viewer__nav--prev {
    left: 0.5rem;
  }

  .viewer__nav--next {
    right: 0.5rem;
  }

  .viewer__name {
    font-size: 1.35rem;
  }

  .download-btn {
    max-width: 340px;
  }

  .invite {
    padding: 5rem var(--page-pad);
  }
}

@media (min-width: 1024px) {
  :root {
    --page-pad: 3rem;
    --content-max: 32rem;
  }

  .hero__logo {
    width: min(42vw, 26rem);
  }

  .wardrobe {
    padding: 6rem 0;
  }

  .wardrobe__header {
    padding-bottom: 1rem;
  }

  .invite__card {
    width: min(100%, 40rem);
  }
}

@media (min-width: 1280px) {
  :root {
    --content-max: 34rem;
  }

  .wardrobe__inner {
    width: min(100%, calc(var(--content-max) + 9rem));
  }
}

@media (max-height: 560px) and (min-aspect-ratio: 1/1) {
  .hero__logo {
    width: min(34vw, 15rem);
  }

  .hero__copy {
    margin-top: 1.5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  [data-reveal],
  .hero__logo,
  .hero__copy,
  .viewer__img {
    transition: none !important;
  }

  .scroll-cue__chevron,
  .butterfly .wing-left,
  .butterfly .wing-right {
    animation: none !important;
  }

  /* The value still updates every second, it just swaps instead of turning */
  .countdown__leaf,
  .countdown__leaf::after {
    animation: none !important;
  }

  .countdown__digit.is-flipping .countdown__leaf {
    visibility: hidden;
  }

  .butterfly {
    display: none;
  }

  /* The loader still gates the page, it just holds still and leaves faster */
  .loader {
    transition-duration: 0.25s;
  }

  .loader__line,
  .loader__track {
    opacity: 1;
    animation: none !important;
  }
}
