/* ============================================================
   BASE — shared structure for all directions. Themes override
   the CSS custom properties + add signature flourishes.
   ============================================================ */
:root {
  --maxw: 60rem;
  --gutter: clamp(1.25rem, 5vw, 3rem);
  --section-y: clamp(4.5rem, 9vh, 7rem);
  --section-y-snug: clamp(2.75rem, 6vh, 4.25rem);
  --radius: 2px;
  /* themeable — defaults get overridden per direction */
  --bg: #efe9dd; --surface: #f6f1e7; --ink: #2c2620; --muted: #6b6154;
  --accent: #bf6b4b; --accent-2: #9ca986; --leather: #c39a6b; --line: rgba(44,38,32,.16);
  --font-display: Georgia, serif; --font-body: system-ui, sans-serif; --font-mono: ui-monospace, monospace;
  --hero-overlay: linear-gradient(180deg, rgba(0,0,0,.12), rgba(0,0,0,.42));
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font-body);
  font-size: clamp(1rem, 0.55rem + 0.9vw, 1.15rem);
  line-height: 1.65; -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 400; line-height: 1.08; margin: 0; }
p { margin: 0 0 1em; }
:where(a, button, input, select, textarea, summary, [tabindex]:not([tabindex="-1"])):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}
.radio:has(input:focus-visible), .chip:has(input:focus-visible) {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.wrap {
  width: 100%;
  max-width: calc(var(--maxw) + var(--gutter) + var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
  position: relative;
  z-index: 1;
}
.section { padding-block: var(--section-y); position: relative; overflow: clip; }
.section--snug { padding-block: var(--section-y-snug); }

/* ---------- Floral decoration layer ---------- */
.floral { position: absolute; z-index: 0; pointer-events: none; color: var(--accent-2); width: clamp(52px, 8vw, 116px); opacity: .5; }
.floral .fl { width: 100%; height: auto; display: block; }
.floral--tl { top: 1.4rem; left: clamp(-.5rem, 1.5vw, 2rem); }
.floral--tr { top: 1.4rem; right: clamp(-.5rem, 1.5vw, 2rem); transform: scaleX(-1); }
.floral--bl { bottom: 1.4rem; left: clamp(-.5rem, 1.5vw, 2rem); }
.floral--br { bottom: 1.4rem; right: clamp(-.5rem, 1.5vw, 2rem); transform: scaleX(-1); }
.floral--mid-r { top: 40%; right: clamp(-1rem, 0vw, 1rem); }
.floral--accent { color: var(--accent); }
.floral--big { width: clamp(80px, 13vw, 200px); opacity: .42; }
.floral--hero { color: rgba(255,255,255,.82); opacity: .8; width: clamp(60px, 9vw, 130px); z-index: 2; }
/* watercolor "line+wash" focal florals — own colors, larger, sit above bg */
.floral--focal { width: clamp(115px, 19vw, 240px); opacity: .95; z-index: 2; transform: none; filter: drop-shadow(0 6px 22px rgba(0,0,0,.28)); }
@media (max-width: 700px) { .floral--hide-sm { display: none; } .floral { width: clamp(44px, 16vw, 80px); } }

.eyebrow {
  font-family: var(--font-mono, var(--font-body));
  text-transform: uppercase; letter-spacing: .28em; font-size: .72rem;
  color: var(--muted); margin: 0 0 1.4rem;
}
.section-title { font-size: clamp(1.8rem, 1rem + 3vw, 3rem); margin-bottom: 1.5rem; }
.center { text-align: center; }
.lede { font-size: 1.15rem; color: var(--muted); max-width: 34rem; }

/* ---------- Entry splash ---------- */
#splash {
  position: fixed; inset: 0; z-index: 100; display: grid; place-items: center;
  background: var(--bg); text-align: center; padding: 2rem; overflow: hidden;
  transition: opacity 1s ease, visibility 1s;
}
#splash.hidden { opacity: 0; visibility: hidden; }

/* cinematic firelight spotlight: a warm pool on the letter, dark falloff */
.splash-glow {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(44% 50% at 50% 47%, rgba(227,162,90,.30), rgba(227,162,90,.05) 50%, transparent 68%),
    radial-gradient(150% 120% at 50% 46%, transparent 34%, rgba(14,9,5,.5) 78%, rgba(10,6,3,.82) 100%);
}
.splash-glow::after {  /* faint drifting ember embers-glow at the base */
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(60% 40% at 50% 96%, rgba(227,140,60,.1), transparent 70%);
}

/* ============================================================
   Envelope splash — "Тебе письмо"
   A sealed letter resting in firelight; click breaks the wax
   and swings the flap open (patterned liner + monogram reveal).
   ============================================================ */
.envelope-stage {
  position: relative; z-index: 1;
  display: grid; justify-items: center; gap: clamp(1.3rem, 3.5vw, 2.2rem);
  width: min(90vw, 38rem); perspective: 1700px;
}
.env-eyebrow {
  font-family: var(--font-mono, var(--font-body));
  text-transform: uppercase; letter-spacing: .5em; font-size: .72rem;
  margin: 0 0 0 .5em; opacity: 0; transform: translateY(10px);
  animation: env-fade-in 1s ease .2s forwards;
}
.env-hint {
  font-family: var(--font-body); font-style: italic; font-size: 1.05rem;
  margin: 0; opacity: 0;
  animation: env-fade-in 1s ease .7s forwards, env-breathe 3.6s ease-in-out 1.7s infinite;
}
@keyframes env-fade-in { to { opacity: 1; transform: none; } }
@keyframes env-breathe { 0%,100% { opacity: .74; } 50% { opacity: 1; } }

.envelope {
  position: relative; width: 100%; aspect-ratio: 7 / 4.6;
  border: 0; padding: 0; background: none; cursor: pointer; color: inherit;
  transform-style: preserve-3d; -webkit-tap-highlight-color: transparent;
  opacity: 0; animation: env-drop 1.1s cubic-bezier(.2,.75,.25,1) .3s forwards;
  transition: transform .8s cubic-bezier(.4,0,.2,1);
}
@keyframes env-drop {
  from { opacity: 0; transform: translateY(-22px) rotateX(12deg); }
  to   { opacity: 1; transform: none; }
}
.envelope > span { position: absolute; }
.envelope:hover { transform: translateY(-4px); }
.envelope:focus-visible { outline: none; }
.envelope:focus-visible .env-back {
  box-shadow: inset 0 0 0 2px rgba(255,244,224,.55), 0 0 44px rgba(227,162,90,.38), 0 40px 80px rgba(0,0,0,.62);
}

/* fine paper grain shared by the paper faces */
.env-back::after, .env-pocket::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
  background-image:
    repeating-linear-gradient(94deg, rgba(120,96,56,.05) 0 1px, transparent 1px 3px),
    radial-gradient(rgba(90,68,38,.06) .5px, transparent 1px);
  background-size: auto, 4px 4px; opacity: .7;
}

/* back wall — the letter revealed when the flap opens */
.env-back {
  inset: 0; border-radius: 4px; overflow: hidden;
  background:
    radial-gradient(120% 80% at 50% 0%, rgba(227,162,90,.18), transparent 55%),
    linear-gradient(165deg, var(--paper) 0%, var(--paper-2) 100%);
  box-shadow: 0 40px 80px rgba(0,0,0,.6), 0 0 70px rgba(227,162,90,.14),
              inset 0 1px 0 rgba(255,255,255,.4), inset 0 0 0 1px rgba(120,90,50,.12),
              inset 0 26px 30px -20px rgba(90,64,34,.5);   /* soft shade under the fold */
}
/* layered pressed-flower bouquet revealed as the flap lifts */
.env-bouquet {
  position: absolute; left: 50%; bottom: 52%; width: 58%; height: 52%;
  transform: translateX(-50%) translateY(16px) scale(.88);
  transform-origin: 50% 100%; opacity: 0;
  transition: opacity .62s ease .35s, transform .9s cubic-bezier(.2,.95,.25,1.1) .35s;
}
.env-stem { position: absolute; left: 50%; bottom: 0; width: auto; max-height: 100%; filter: drop-shadow(0 6px 10px rgba(0,0,0,.28)); }
.env-stem--hydrangea { height: 92%; transform: translateX(-54%) rotate(-8deg); }
.env-stem--fern { height: 64%; transform: translateX(-94%) rotate(-24deg); }
.env-stem--eucalyptus { height: 84%; transform: translateX(-15%) rotate(18deg); }
.env-stem--tulips { height: 66%; transform: translateX(-35%) rotate(8deg); }
#splash.opening .env-bouquet { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }

/* front pocket carrying the address */
.env-pocket {
  top: 43%; left: 0; right: 0; bottom: 0; border-radius: 0 0 4px 4px; overflow: hidden;
  transform: translateZ(2px);
  padding: clamp(1rem,3vw,1.5rem) clamp(1.3rem,5vw,2.2rem) clamp(1.5rem,5vw,2.4rem);
  display: flex; flex-direction: column; justify-content: flex-end; text-align: left;
  clip-path: polygon(0 12%, 50% 0, 100% 12%, 100% 100%, 0 100%);
  background: linear-gradient(172deg, var(--paper), var(--paper-2) 92%);
  box-shadow: 0 -1px 0 rgba(255,255,255,.4), 0 -14px 24px rgba(0,0,0,.12);
}
.env-pocket::before {  /* soft light along the pocket seam */
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 15%; z-index: 2;
  background: linear-gradient(180deg, rgba(255,255,255,.3), transparent);
  clip-path: polygon(0 90%, 50% 0, 100% 90%, 100% 100%, 0 100%);
}
.env-address { position: relative; z-index: 3; display: grid; gap: clamp(.5rem,2vw,.9rem); }
.env-row { display: grid; gap: .2rem; }
.env-label {
  font-family: 'Tenor Sans', var(--font-body); color: #8a6f49;
  text-transform: uppercase; letter-spacing: .34em; font-size: .64rem;
}
.env-hand {
  font-family: 'Marck Script', cursive;
  font-weight: 400; font-synthesis: none; -webkit-font-smoothing: antialiased;
  color: #5d4328; line-height: .94; letter-spacing: 0; word-spacing: -.12em;
  text-rendering: geometricPrecision;
  font-size: clamp(2.15rem, 1rem + 4.6vw, 3.35rem);
}
.env-to { font-size: clamp(1.7rem, .9rem + 3.2vw, 2.5rem); }

/* real postage — the heart stamp carries its own postmark marks */
.env-stamp {
  position: absolute; top: 5.5%; right: 5.5%; width: 14%; height: auto; z-index: 6;
  transform: translateZ(6px) rotate(4deg);
  filter: sepia(.35) contrast(1.03) drop-shadow(0 3px 6px rgba(0,0,0,.42));
  transition: opacity .45s ease, transform .55s ease;
}

/* the opening flap — two-sided: paper outside, patterned liner inside */
.env-flap {
  top: 0; left: 0; right: 0; height: 46%; transform-origin: 50% 0;
  transform: translateZ(3px); z-index: 3; will-change: transform;
  transition: transform .95s cubic-bezier(.32,.04,.18,1), filter .7s ease;
}
.env-flap-face, .env-liner {
  position: absolute; inset: 0; border-radius: 4px 4px 0 0; backface-visibility: hidden;
  clip-path: polygon(0 0, 100% 0, 50% 100%);
}
.env-flap-face {
  background: linear-gradient(196deg, var(--paper-2) 24%, var(--paper-3));
  box-shadow: 0 8px 16px rgba(0,0,0,.2);
}
.env-flap-face::after {  /* crisp fold edge highlight */
  content: ""; position: absolute; inset: 0; clip-path: polygon(0 0, 100% 0, 50% 100%);
  background: linear-gradient(196deg, rgba(255,255,255,.28) 0 2px, transparent 6%, transparent 62%, rgba(120,90,50,.16));
}
.env-liner {
  transform: rotateX(180deg);  /* faces the viewer once the flap is flipped open */
  background:
    radial-gradient(rgba(227,162,90,.42) 1px, transparent 1.7px) 0 0 / 14px 14px,
    linear-gradient(160deg, var(--liner), #29321f);
  box-shadow: inset 0 0 40px rgba(0,0,0,.35);
}

/* wax seal at the flap tip — the couple's real gold-embossed seal */
.env-seal {
  position: absolute; top: 43%; left: 50%; width: clamp(3.6rem, 16%, 5rem); height: auto; z-index: 4;
  transform: translate(-50%,-50%) translateZ(4px);
  filter: drop-shadow(0 6px 13px rgba(0,0,0,.55));
  transition: opacity .35s ease, transform .4s cubic-bezier(.5,-.5,.75,.4);
}

/* --- opening sequence (driven by #splash.opening) --- */
#splash.opening .envelope { transform: translateY(-2%) scale(1.02) rotateX(2deg); transition-delay: .55s; }
#splash.opening .env-flap { transform: translateZ(3px) rotateX(-172deg); filter: brightness(.94); transition-delay: .2s; }
#splash.opening .env-seal { animation: seal-break .5s cubic-bezier(.4,0,.25,1) forwards; }
#splash.opening .env-stamp { opacity: 0; transform: translateZ(4px) translateY(-8px) rotate(-4deg); }
#splash.opening .env-eyebrow,
#splash.opening .env-hint { opacity: 0; transition: opacity .35s ease; animation: none; }

/* the wax seal presses, tips, and lifts off as it breaks */
@keyframes seal-break {
  0%   { transform: translate(-50%,-50%) translateZ(4px) scale(1) rotate(0deg); opacity: 1; }
  22%  { transform: translate(-50%,-46%) translateZ(4px) scale(.9) rotate(-3deg); opacity: 1; }
  100% { transform: translate(-50%,-112%) translateZ(4px) scale(1.14) rotate(-28deg); opacity: 0; }
}

/* fleeting inside joke: "ЭНВЕЛОУП" yeets toward the viewer as the seal breaks */
.env-yeet {
  position: absolute; left: 50%; top: 46%; z-index: 20; pointer-events: none;
  transform: translate(-50%,-50%) scale(.4); opacity: 0;
  font-family: var(--font-mono, monospace); font-weight: 700; white-space: nowrap;
  text-transform: uppercase; letter-spacing: .22em; font-size: 1.15rem;
  color: var(--accent); text-shadow: 0 0 22px rgba(227,162,90,.7);
}
#splash.opening .env-yeet { animation: env-yeet .78s ease-out .75s; }
@keyframes env-yeet {
  0%   { opacity: 0; transform: translate(-50%,-50%) scale(.55); filter: blur(1px); }
  28%  { opacity: .78; filter: blur(0); }
  100% { opacity: 0; transform: translate(-50%,-54%) scale(2.15); filter: blur(.6px); }
}

@media (prefers-reduced-motion: reduce) {
  .env-eyebrow, .env-hint, .envelope { animation: none; opacity: 1; transform: none; }
  .envelope, .env-flap, .env-seal, .env-stamp, .env-bouquet { transition: none; }
  .envelope:hover { transform: none; }
  #splash.opening .env-yeet { animation: none; }
}
.skip-link {
  position: fixed;
  left: var(--gutter);
  top: .75rem;
  z-index: 130;
  transform: translateY(-150%);
  padding: .65rem 1rem;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-decoration: none;
  box-shadow: 0 8px 24px rgba(0,0,0,.24);
}
.skip-link:focus-visible { transform: translateY(0); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .6rem; justify-content: center;
  font-family: var(--font-body); font-size: 1rem; letter-spacing: .02em;
  padding: .95rem 2rem; border: 1px solid var(--ink); border-radius: 100px;
  background: var(--ink); color: var(--bg); cursor: pointer; text-decoration: none;
  transition: transform .25s ease, background .25s ease, color .25s ease; min-height: 48px;
}
.btn:hover { transform: translateY(-2px); }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-accent { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: 100svh; display: grid; align-items: end; color: #fff; overflow: hidden; }
.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 28%; }
.hero::after { content: ""; position: absolute; inset: 0; background: var(--hero-overlay); }
.hero-inner { position: relative; z-index: 2; padding-bottom: clamp(3rem, 8vw, 6rem); width: 100%; }
.hero-names { font-family: var(--font-display); font-size: clamp(3rem, 1rem + 13vw, 8rem); line-height: .95; text-shadow: 0 2px 30px rgba(0,0,0,.35); }
.hero-sub { font-family: var(--font-mono, var(--font-body)); letter-spacing: .25em; text-transform: uppercase; font-size: clamp(.8rem, .6rem + .5vw, 1rem); margin-top: 1rem; }
.hero-tag { margin-top: 1.2rem; max-width: 30rem; font-size: 1.1rem; opacity: .95; }
.scroll-cue { position: absolute; bottom: 1.4rem; left: 50%; transform: translateX(-50%); z-index: 2; color: #fff; font-size: 1.5rem; animation: bob 2s ease-in-out infinite; }
@keyframes bob { 0%,100% { transform: translate(-50%,0);} 50% { transform: translate(-50%,8px);} }

/* ---------- Countdown ---------- */
.countdown { display: flex; gap: clamp(.8rem, 3vw, 2.5rem); justify-content: center; flex-wrap: wrap; }
.cd-unit { text-align: center; min-width: 3.5rem; }
.cd-num { font-family: var(--font-display); font-size: clamp(2.2rem, 1rem + 5vw, 4rem); line-height: 1; }
.cd-label { font-family: var(--font-mono, var(--font-body)); text-transform: uppercase; letter-spacing: .18em; font-size: .68rem; color: var(--muted); margin-top: .5rem; }

/* ---------- Generic media + cards ---------- */
.media-frame { overflow: hidden; border-radius: var(--radius); }
.media-frame img { width: 100%; height: 100%; object-fit: cover; }
.greeting-photo { aspect-ratio: 4 / 3; }
.greeting-photo img { object-position: 50% 52%; }
.two-col { display: grid; gap: clamp(1.5rem, 4vw, 3rem); grid-template-columns: 1fr; align-items: center; }
@media (min-width: 800px) { .two-col { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) {
  #splash { padding-inline: 1rem; }
  .hero-img { object-position: 18% 50%; }
  .greeting-photo { aspect-ratio: 1 / 1; }
  .greeting-photo img { object-position: 50% 48%; }
}

/* ---------- Location and stay ---------- */
.location-stay .map-frame {
  width: 100%;
  max-width: 38rem;
  margin: 1rem 0;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface);
}
.location-address { color: var(--muted); }
.map-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin: 1rem 0; }
.location-stay .map-frame picture {
  display: block;
  height: 100%;
}
.location-stay .map-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 49%;
}
.location-stay .lodging-block {
  margin-top: clamp(3rem, 8vw, 5rem);
  padding-top: clamp(2.5rem, 6vw, 4rem);
  border-top: 1px solid var(--line);
}

.timeline { border-bottom: 1px solid var(--line); }
.tl-item {
  display: grid;
  grid-template-columns: clamp(8.5rem, 17vw, 12rem) minmax(0, 1fr);
  align-items: center;
  padding: 1.2rem 0;
  border-top: 1px solid var(--line);
}
.tl-time { font-family: var(--font-mono, var(--font-display)); font-size: clamp(1.35rem, 1rem + 1.6vw, 1.7rem); text-align: center; color: var(--accent); white-space: nowrap; }
.tl-title { font-family: var(--font-display); text-align: center; padding-inline: 1rem; font-size: 1.15rem; }

.palette { display: flex; justify-content: center; gap: .6rem; flex-wrap: wrap; width: min(100%, 38rem); margin: 1.5rem auto 0; }
.swatch { flex: 0 0 3rem; width: 3rem; height: 3rem; border-radius: 50%; border: 1px solid var(--line); box-shadow: inset 0 1px 6px rgba(255,255,255,.24), 0 5px 10px rgba(0,0,0,.28); }

.cards { display: grid; gap: 1.25rem; grid-template-columns: 1fr; }
@media (min-width: 720px) { .cards { grid-template-columns: 1fr 1fr; } }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.6rem; }
.card h3, .card h4 { font-size: 1.4rem; margin-bottom: .4rem; }
.card .dates { font-family: var(--font-mono, var(--font-body)); font-size: .85rem; color: var(--muted); letter-spacing: .05em; }
.places { margin-top: 1rem; font-size: .95rem; }
.places b { color: var(--accent); font-size: 1.15rem; font-family: var(--font-display); }
.places .bar { height: 6px; border-radius: 100px; background: var(--line); margin-top: .5rem; overflow: hidden; }
.places .bar > span { display: block; height: 100%; background: var(--accent-2); transition: width .35s ease; }

/* ---------- Form ---------- */
form { max-width: 34rem; margin-inline: auto; }
fieldset { border: none; padding: 0; margin: 0 0 1.6rem; }
legend { font-family: var(--font-display); font-size: 1.2rem; margin-bottom: .8rem; padding: 0; }
label { display: block; font-size: .95rem; margin-bottom: .4rem; }
.field { margin-bottom: 1.3rem; }
input[type=text], input[type=tel], textarea, select {
  width: 100%; padding: .85rem 1rem; font: inherit; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
}
textarea { min-height: 4.5rem; resize: vertical; }
.radios { display: grid; gap: .6rem; }
.radio {
  display: flex; align-items: center; gap: .7rem; padding: .85rem 1rem;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); cursor: pointer;
}
.radio input { accent-color: var(--accent); width: 1.15rem; height: 1.15rem; }
.chips { display: flex; gap: .5rem; flex-wrap: wrap; }
.chip { padding: .5rem .9rem; border: 1px solid var(--line); border-radius: 100px; background: var(--surface); cursor: pointer; font-size: .9rem; }
.chip input { display: none; }
.chip:has(input:checked) { background: var(--accent); color: #fff; border-color: var(--accent); }
.hidden-block { display: none; }
.hidden-block.show { display: block; animation: fadein .5s ease; }
@keyframes fadein { from { opacity: 0; transform: translateY(8px);} to { opacity: 1; transform: none;} }
.hint { font-size: .85rem; color: var(--muted); margin-top: .35rem; }

/* ---------- Contacts ---------- */
.contact-card { position: relative; text-align: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 2rem 2rem 3.25rem; max-width: 30rem; margin-inline: auto; }
.contact-card a { color: var(--accent); text-decoration: none; }

/* ---------- Cats easter egg ---------- */
.paw-stamp {
  position: absolute; right: -.6rem; bottom: -.6rem;
  width: 44px; height: 44px; display: grid; place-items: center;
  border: 1px dashed currentColor; border-radius: 50%;
  background: rgba(227,162,90,.07); color: var(--accent);
  box-shadow: inset 0 0 0 2px rgba(227,162,90,.08);
  font-size: 1.35rem; opacity: .65; cursor: pointer; transform: rotate(-9deg);
}
.paw-stamp:hover, .paw-stamp:focus-visible { background: rgba(227,162,90,.12); opacity: .86; }
.paw-stamp.is-discovered { animation: paw-nudge .7s ease-out 1; }
@keyframes paw-nudge { 45% { transform: rotate(2deg) translateY(-2px); } }
.egg-modal { position: fixed; inset: 0; z-index: 200; display: none; place-items: center; background: rgba(0,0,0,.7); padding: 1.5rem; }
.egg-modal.open { display: grid; }
.egg-modal figure {
  position: relative; margin: 0; width: min(30rem, calc(100vw - 3rem), 63.31vh);
  background: var(--surface); padding: 1rem; border-radius: var(--radius);
}
.egg-modal picture { display: block; width: 100%; aspect-ratio: 974 / 1200; }
.egg-modal img { display: block; width: 100%; height: 100%; max-height: 78vh; object-fit: contain; }
.egg-modal-close {
  position: absolute; top: .4rem; right: .4rem; z-index: 2;
  min-width: 44px; min-height: 44px; padding: 0;
  display: grid; place-items: center;
  background: #241b14; border: 1px solid var(--accent); border-radius: 50%; color: var(--ink);
  box-shadow: 0 4px 14px rgba(0,0,0,.55), inset 0 1px 0 rgba(255,255,255,.12);
  font: inherit; font-size: 1.45rem; line-height: 1; cursor: pointer;
}
.egg-modal-close:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.egg-modal figcaption { text-align: center; margin-top: .7rem; font-family: var(--font-display); }

/* ---------- Signature hooks (off by default; themes opt in) ---------- */
.grain { display: none; position: fixed; inset: 0; z-index: 80; pointer-events: none; mix-blend-mode: multiply; opacity: .05; }
.hero-datestamp { display: none; }
.handwriting { font-style: italic; }
.divider { height: 1px; background: var(--line); border: 0; max-width: var(--maxw); margin: clamp(.25rem, 1.5vh, 1rem) auto; }

/* ---------- Reveal-on-scroll ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .8s ease, transform .8s ease; }
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; scroll-behavior: auto !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
  .paw-stamp.is-discovered { animation: none; }
}

@media (max-width: 700px) {
  :root {
    --section-y: clamp(3.25rem, 12vw, 4.75rem);
    --section-y-snug: clamp(2.5rem, 10vw, 3.75rem);
  }
}

/* ---------- Dress code ---------- */
#dresscode .wrap { max-width: calc(74rem + var(--gutter) + var(--gutter)); }
.dresscode-lineups {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin-top: clamp(2.5rem, 6vw, 4.25rem);
}
.outfit-row {
  --outfit-glow: var(--accent);
  --outfit-shadow-bottom: clamp(4.5rem, 7vw, 5rem);
  display: flex;
  align-items: flex-end;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  padding: clamp(3rem, 5vw, 3.5rem) clamp(3.5rem, 6vw, 4rem) var(--outfit-shadow-bottom);
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-inline: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
  background:
    radial-gradient(ellipse 48% 6% at 50% calc(100% - var(--outfit-shadow-bottom)), rgba(0,0,0,.52), rgba(0,0,0,.2) 52%, transparent 100%),
    radial-gradient(ellipse 72% 88% at 50% 100%, color-mix(in srgb, var(--outfit-glow) 13%, transparent), transparent 70%),
    linear-gradient(to bottom, transparent 14%, color-mix(in srgb, var(--surface) 26%, transparent));
  box-shadow: inset 0 1px 0 var(--line), inset 0 -1px 0 var(--line);
}
.outfit-row--male { --outfit-glow: var(--accent-2); }
.outfit-row::before,
.outfit-row::after {
  content: "";
  flex: 1 0 clamp(.25rem, 2vw, 1rem);
}
.outfit-row img {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  width: auto;
  max-width: none;
  height: clamp(220px, 34vw, 340px);
  object-fit: contain;
  filter: drop-shadow(0 12px 18px rgba(0,0,0,.45));
}
.outfit-row img + img { margin-inline-start: clamp(-1rem, -1.2vw, -.45rem); }
.outfit-row::-webkit-scrollbar { height: 5px; }
.outfit-row::-webkit-scrollbar-thumb { background: var(--line); border-radius: 999px; }
.outfit-row::-webkit-scrollbar-track { background: transparent; }
.dresscode-note {
  max-width: 44rem;
  margin: clamp(2.75rem, 6vw, 4.5rem) auto;
  color: var(--muted);
  font-family: var(--font-body);
  font-size: clamp(1rem, .95rem + .35vw, 1.2rem);
  text-align: center;
}
