/* ==========================================================================
   DESIGN TOKENS: edit colours, fonts and timings here
   ========================================================================== */
:root {
  /* Background colour journey (top → bottom) */
  --bg-terracotta: #9A4B2E;
  --bg-rust:       #A55A36;
  --bg-camel:      #C49A6C;
  --bg-sand:       #D6BE98;
  --bg-stone:      #E7DCC8;
  --bg-olive:      #A39D74;
  --bg-khaki:      #B8B18C;
  --bg-deep:       #8E432A;

  /* Text */
  --ink-brown: #6B4A2B;   /* on pale stone */
  --ink-dark:  #45301A;   /* on camel / olive / khaki */
  --ink-light: #F7EAD5;   /* on terracotta */

  /* Accents */
  --gold:   #C9A24A;
  --gold-hi:#F6E3A2;
  --brass:  #A67C35;
  --teal:   #3E7C7B;
  --navy:   #1F2F4A;

  /* Type */
  --font-body:  'Cormorant Garamond', 'Gilda Display', Georgia, serif;
  --font-caps:  'Cormorant SC', 'Marcellus', Georgia, serif;
  --track-caps: 0.22em;
  --measure:    32ch;

  /* Motion (seconds) */
  --t-fast: .35s;
  --t-med:  .8s;
  --t-slow: 1.4s;
  --ease-soft: cubic-bezier(.22,.8,.24,1);

  --ink: var(--ink-brown);
}

/* ==========================================================================
   BASE
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--bg-terracotta); }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-style: italic;
  font-size: clamp(1.15rem, 1.05rem + .5vw, 1.35rem);
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg-terracotta); /* fixed .bg-stack paints the colour journey above this */
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body.locked { overflow: hidden; height: 100svh; }
img { display: block; max-width: 100%; }
main { position: relative; z-index: 1; }
p { margin: 0; }
a { color: inherit; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Background stack: crossfaded colour layers, paper grain on top */
.bg-stack { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
.bg { position: absolute; inset: 0; opacity: 0; will-change: opacity; }
.bg[data-key="terracotta"] { background: var(--bg-terracotta); opacity: 1; }
.bg[data-key="rust"]  { background: var(--bg-rust); }
.bg[data-key="camel"] { background: var(--bg-camel); }
.bg[data-key="sand"]  { background: var(--bg-sand); }
.bg[data-key="stone"] { background: var(--bg-stone); }
.bg[data-key="olive"] { background: var(--bg-olive); }
.bg[data-key="khaki"] { background: var(--bg-khaki); }
.bg[data-key="deep"]  { background: var(--bg-deep); }
.grain {
  position: absolute; inset: 0; opacity: .5; mix-blend-mode: multiply;
  background-image:
    radial-gradient(ellipse at 30% 20%, rgba(255,255,255,.18), transparent 60%),
    radial-gradient(ellipse at 80% 90%, rgba(60,30,10,.16), transparent 55%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.75' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .45 0 0 0 0 .38 0 0 0 0 .3 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ==========================================================================
   SECTIONS + COLLAGE LAYERS
   ========================================================================== */
.section {
  position: relative;
  min-height: 100svh;
  padding: clamp(5.5rem, 14vh, 9rem) 16px;
  display: grid;
  place-items: center;
  overflow: hidden;
  overflow: clip;
  color: var(--ink);
}
.section[data-ink="light"] { --ink: var(--ink-light); }
.section[data-bg="camel"], .section[data-bg="olive"], .section[data-bg="khaki"] { --ink: var(--ink-dark); }
.section[data-bg="sand"] { --ink: #57391F; }

.collage { position: absolute; inset: 0; pointer-events: none; z-index: 1; }
.piece { position: absolute; margin: 0; z-index: 2; will-change: transform; }
.piece--back { z-index: 0; opacity: .92; }
.piece--front { z-index: 6; }
.piece .px, .piece .amb { position: relative; will-change: transform; }
.piece .layer { width: 100%; height: auto; user-select: none; -webkit-user-drag: none; }
.piece .layer + .layer, .piece .stack > * + * { position: absolute; inset: 0; }
.piece .stack { position: relative; }
.piece .flip { transform: scaleX(-1); }

/* Edge pieces: width in --w, and --peek = how far off the edge (-.5 = half hidden).
   Inside .content they anchor to the text column, so they stay in the margins. */
.edge-l, .edge-r { width: var(--w); }
.edge-l { left: calc(var(--w) * var(--peek, -.5)); }
.edge-r { right: calc(var(--w) * var(--peek, -.5)); }
.content .piece { z-index: -1; }
.names-wrap { position: relative; align-self: stretch; display: flex; justify-content: center; }

/* Horizon scenes sit in their own band below the words */
.scene {
  position: relative; z-index: 1; flex: none;
  width: 100vw; max-width: none; margin-inline: calc(50% - 50vw);
  margin-top: clamp(2.5rem, 7vh, 5rem);
  aspect-ratio: 1200 / 640;
}
.scene--coast { aspect-ratio: 1200 / 600; }
@media (min-width: 700px) {
  .scene { aspect-ratio: 1200 / 500; }
  .scene--coast { aspect-ratio: 1200 / 460; }
}


/* ---------- Paper sheet (header + footer): cream paper the cut-outs sit on */
.paper-sheet {
  --ink: var(--ink-brown);
  background-color: #F3E6CC;
  background-image:
    radial-gradient(ellipse at 50% 28%, rgba(255,252,240,.55), transparent 62%),
    radial-gradient(ellipse at 0% 100%, rgba(150,100,50,.14), transparent 55%),
    radial-gradient(ellipse at 100% 0%, rgba(150,100,50,.10), transparent 50%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .45 0 0 0 0 .35 0 0 0 0 .22 0 0 0 .22 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.paper-sheet .family-amp, .paper-sheet .joiner { color: var(--brass); }
.paper-sheet .piece .layer { filter: drop-shadow(0 3px 4px rgba(70,40,15,.18)); }
/* torn top edge where the footer paper meets the section above */
.paper-torn {
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='20' preserveAspectRatio='none'%3E%3Cpath d='M0 20 L0.0 7.6 L3.9 11.2 L7.3 9.9 L12.5 4.6 L18.6 4.4 L24.2 4.8 L27.7 8.7 L35.7 5.4 L40.0 10.9 L48.7 10.3 L54.1 14.7 L57.4 13.4 L62.1 5.6 L65.8 7.4 L73.7 6.0 L80.2 11.0 L85.4 10.0 L88.8 4.7 L93.0 11.5 L98.6 7.5 L105.1 9.0 L109.9 12.7 L117.1 6.7 L123.6 9.8 L131.8 12.0 L136.5 14.8 L140.3 8.6 L147.8 5.7 L153.7 4.4 L160.7 12.4 L167.2 13.6 L172.1 11.6 L178.6 10.4 L184.4 13.2 L193.0 9.2 L200.0 4.7 L207.2 11.1 L216.2 13.0 L220.9 8.2 L227.9 4.2 L233.7 5.8 L237.4 4.6 L245.0 5.4 L249.5 8.3 L257.7 4.9 L263.4 10.0 L271.7 13.0 L279.9 7.1 L285.4 7.9 L293.7 14.5 L297.6 5.9 L302.0 6.6 L307.9 10.5 L312.5 4.0 L318.0 8.1 L324.4 14.5 L331.5 9.7 L338.2 11.4 L341.5 13.9 L349.2 13.6 L357.0 8.3 L362.4 5.1 L369.2 4.7 L372.6 6.3 L376.6 7.7 L379.9 4.0 L383.8 5.1 L389.0 4.3 L397.2 10.8 L400.0 7.6 L400 20Z'/%3E%3C/svg%3E") top left / 400px 20px repeat-x, linear-gradient(#000, #000) 0 19px / 100% calc(100% - 19px) no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='20' preserveAspectRatio='none'%3E%3Cpath d='M0 20 L0.0 7.6 L3.9 11.2 L7.3 9.9 L12.5 4.6 L18.6 4.4 L24.2 4.8 L27.7 8.7 L35.7 5.4 L40.0 10.9 L48.7 10.3 L54.1 14.7 L57.4 13.4 L62.1 5.6 L65.8 7.4 L73.7 6.0 L80.2 11.0 L85.4 10.0 L88.8 4.7 L93.0 11.5 L98.6 7.5 L105.1 9.0 L109.9 12.7 L117.1 6.7 L123.6 9.8 L131.8 12.0 L136.5 14.8 L140.3 8.6 L147.8 5.7 L153.7 4.4 L160.7 12.4 L167.2 13.6 L172.1 11.6 L178.6 10.4 L184.4 13.2 L193.0 9.2 L200.0 4.7 L207.2 11.1 L216.2 13.0 L220.9 8.2 L227.9 4.2 L233.7 5.8 L237.4 4.6 L245.0 5.4 L249.5 8.3 L257.7 4.9 L263.4 10.0 L271.7 13.0 L279.9 7.1 L285.4 7.9 L293.7 14.5 L297.6 5.9 L302.0 6.6 L307.9 10.5 L312.5 4.0 L318.0 8.1 L324.4 14.5 L331.5 9.7 L338.2 11.4 L341.5 13.9 L349.2 13.6 L357.0 8.3 L362.4 5.1 L369.2 4.7 L372.6 6.3 L376.6 7.7 L379.9 4.0 L383.8 5.1 L389.0 4.3 L397.2 10.8 L400.0 7.6 L400 20Z'/%3E%3C/svg%3E") top left / 400px 20px repeat-x, linear-gradient(#000, #000) 0 19px / 100% calc(100% - 19px) no-repeat;
}

/* ---------- Sequinned sea band (one seamless strip, repeats sideways) */
.section { --sea-h: clamp(62px, 17vw, 150px); }
.sea-band {
  position: absolute; left: 0; right: 0; bottom: 0; height: var(--sea-h); z-index: 6; pointer-events: none;
  background: url("../assets/collage/sea-band.webp") repeat-x left bottom / auto 100%;
}
.scene .sea-band { left: 0; right: 0; }

/* ---------- Header pieces (sizes scale with the screen) */
.hero-sun   { --w: clamp(170px, 46vw, 400px); width: var(--w); left: calc(var(--w) * -.36); top: calc(var(--w) * -.3); }
.hero-flock { width: clamp(120px, 34vw, 330px); right: 2%; top: 1.2%; }
.hero-planet { top: 8.6rem; }
.hero-star  { top: 12.5rem; }
/* First page fits one screen: words in the middle, a slim olive-and-sea footer pinned to the bottom */
.section.hero { min-height: 100svh; min-height: 100dvh; }
.hero-content { flex: 1 0 auto; justify-content: center; }
.scene--hero { aspect-ratio: auto; height: calc(var(--sea-h) + clamp(84px, 22vw, 200px)); margin-top: .8rem; }
.scene--hero .sea-band { height: var(--sea-h); }
.hero-temple { --w: clamp(130px, 36vw, 340px); width: var(--w); left: calc(50% - var(--w) / 2); bottom: calc(var(--sea-h) * .5); }
.hero-branch { z-index: 7; }
.hero-branch--l  { width: clamp(66px, 18vw, 170px); left: -5%;  bottom: calc(var(--sea-h) * .45); }
.hero-branch--r  { width: clamp(66px, 18vw, 170px); right: -5%; bottom: calc(var(--sea-h) * .45); }
.hero-branch--l2 { width: clamp(50px, 13vw, 120px); left: 11%;  bottom: calc(var(--sea-h) * -.35); }
.hero-branch--r2 { width: clamp(50px, 13vw, 120px); right: 11%; bottom: calc(var(--sea-h) * -.35); }
.hero-fish { width: clamp(58px, 15vw, 140px); right: 13%; bottom: calc(var(--sea-h) * .7); }
}

/* Moving highlight that makes sequins / gold leaf glint (follows cursor or phone tilt) */
.glint {
  position: absolute; inset: 0; overflow: hidden; pointer-events: none;
  -webkit-mask: var(--mask) center / 100% 100% no-repeat;
          mask: var(--mask) center / 100% 100% no-repeat;
}
.glint > i {
  position: absolute; left: -50%; top: -50%; width: 200%; height: 200%;
  background: radial-gradient(circle at 50% 50%, rgba(255,246,214,.5) 0%, rgba(255,226,160,.16) 8%, transparent 17%);
  will-change: transform;
}

/* Ambient life (CSS so it stays cheap) */
@keyframes spin    { to { transform: rotate(360deg); } }
@keyframes bob     { 0%,100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-5%) rotate(-2deg); } }
@keyframes sway    { 0%,100% { transform: rotate(-2.2deg); } 50% { transform: rotate(2.2deg); } }
@keyframes twinkle { 0%,100% { transform: scale(1) rotate(0); opacity: 1; } 45% { transform: scale(.72) rotate(18deg); opacity: .55; } 55% { transform: scale(1.12) rotate(22deg); opacity: 1; } }
@keyframes drift   { 0%,100% { transform: translate(0,0) rotate(0); } 50% { transform: translate(4%, -6%) rotate(8deg); } }
.amb-spin    { animation: spin 140s linear infinite; }
.amb-bob     { animation: bob 7s ease-in-out infinite; }
.amb-sway    { animation: sway 6.5s ease-in-out infinite; transform-origin: 8% 90%; }
.amb-twinkle { animation: twinkle 3.6s ease-in-out infinite; }
.amb-drift   { animation: drift 9s ease-in-out infinite; }

/* ==========================================================================
   TYPOGRAPHY
   ========================================================================== */
.content {
  position: relative; z-index: 5;
  width: 100%; max-width: 34rem;
  text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 1.1rem;
}
.content > p, .body { max-width: var(--measure); }
.kicker {
  font-family: var(--font-caps); font-style: normal; font-weight: 500;
  font-size: .8rem; letter-spacing: .32em; text-transform: uppercase; opacity: .85;
}
.title {
  margin: 0; font-family: var(--font-caps); font-style: normal; font-weight: 500;
  font-size: clamp(2.1rem, 1.5rem + 3vw, 3.4rem); line-height: 1.05;
  letter-spacing: var(--track-caps); text-transform: uppercase;
  padding-left: var(--track-caps); /* optically centre tracked caps */
}
.title--xl { font-size: clamp(2.4rem, 1.6rem + 4vw, 4rem); }
.script { font-size: 1.25em; line-height: 1.35; }
.script.small { font-size: 1.05em; }
.label {
  display: block; font-family: var(--font-caps); font-style: normal; font-size: .72rem;
  letter-spacing: .3em; text-transform: uppercase; opacity: .8; margin-bottom: .25rem;
}

/* Hero */
.hero, .wedding {
  display: flex; flex-direction: column; align-items: center;
  min-height: auto; padding-bottom: 0;
}
.hero { padding-top: max(4svh, 1.5rem); }
.hero-content { gap: .9rem; }
/* Two families side by side, joined by an ampersand */
.parents {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  gap: clamp(.5rem, 2.5vw, 1.4rem); width: 100%; max-width: 36rem;
  font-size: clamp(1.02rem, .9rem + .7vw, 1.4rem); line-height: 1.3;
}
.family { display: flex; flex-direction: column; min-width: 0; }
.family:first-child { text-align: right; align-items: flex-end; }
.family:last-child { text-align: left; align-items: flex-start; }
.family-amp { font-size: 1.6em; line-height: 1; color: var(--gold-hi); }
/* Each full name on its own line, "and" between; size scales with the screen */
.names {
  margin: .8rem 0 0; display: flex; flex-direction: column; align-items: center;
  gap: .3rem; font-weight: 400;
  font-size: clamp(1.05rem, 5.4vw, 3.2rem);
}
.name {
  font-family: var(--font-caps); font-style: normal; font-weight: 500;
  /* each name stays on one line: size scales with the screen */
  font-size: inherit; line-height: 1.15; white-space: nowrap;
  letter-spacing: .12em; padding-left: .12em; text-transform: uppercase;
}
.pill.hero-rsvp { margin-top: 1.1rem; border: 1px solid var(--brass); --pill-bg: linear-gradient(135deg, #E9CF8A, #C9A24A 55%, #B08A3A); color: #4A3016; font-weight: 600; font-style: normal; font-family: var(--font-caps); letter-spacing: .3em; padding-inline: 2.8rem; box-shadow: 0 4px 10px rgba(110,70,20,.22), inset 0 1px 0 rgba(255,245,210,.6); }
.joiner { font-size: 1.15em; line-height: 1; color: var(--gold-hi); }

/* Monogram */
.monogram { width: clamp(110px, 32vw, 160px); aspect-ratio: 1; }
.monogram svg { width: 100%; height: 100%; overflow: visible; }
.monogram .mono-rays { transform-origin: 100px 100px; animation: spin 90s linear infinite; }
.monogram .mono-moon { animation: bob 7s ease-in-out infinite; transform-origin: 163px 160px; transform-box: view-box; }
.monogram .mono-glow { animation: glow 2.6s ease-in-out infinite; }
@keyframes glow { 0%,100% { opacity: .35; transform: scale(.96); } 50% { opacity: .9; transform: scale(1.05); } }
.monogram text { font-family: var(--font-caps); font-style: normal; }
.monogram--footer { width: clamp(90px, 26vw, 120px); }

/* Countdown */
.big-date { font-family: var(--font-caps); font-style: normal; font-size: clamp(1.4rem, 1rem + 2vw, 2rem); letter-spacing: .2em; }
.countdown { display: flex; gap: clamp(.6rem, 3vw, 1.6rem); justify-content: center; margin: .8rem 0; }
.unit { display: flex; flex-direction: column; align-items: center; min-width: 3.8rem; }
.num {
  position: relative; display: inline-flex; overflow: hidden;
  font-size: clamp(2.4rem, 1.6rem + 4vw, 3.6rem); line-height: 1.05; font-weight: 400;
  font-variant-numeric: lining-nums tabular-nums;
}
.num .d { display: inline-block; position: relative; overflow: hidden; }
.num .d > span { display: block; }
.num .d > span + span { position: absolute; inset: 0; }
.unit .lbl { font-family: var(--font-caps); font-style: normal; font-size: .68rem; letter-spacing: .28em; text-transform: uppercase; opacity: .85; padding-left: .28em; }
.unit + .unit { border-left: 1px solid color-mix(in srgb, var(--ink) 30%, transparent); padding-left: clamp(.6rem, 3vw, 1.6rem); }

/* Details */
.details { display: flex; flex-direction: column; gap: .2rem; }
.detail-date { font-family: var(--font-caps); font-style: normal; letter-spacing: .14em; font-size: 1.05rem; }
.dress { display: flex; flex-direction: column; align-items: center; }
.note-text { font-size: 1.3em; line-height: 1.55; max-width: 28ch; }
.signature { font-family: var(--font-caps); font-style: normal; font-size: 1.6rem; letter-spacing: .18em; }

/* Pills */
.pill {
  --pill-bg: color-mix(in srgb, var(--ink) 16%, transparent);
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: .75rem 1.9rem; border-radius: 999px;
  background: var(--pill-bg);
  border: 1px solid color-mix(in srgb, var(--ink) 28%, transparent);
  color: inherit; font: inherit; font-style: italic; font-size: .92rem;
  letter-spacing: .2em; text-transform: uppercase; text-decoration: none;
  cursor: pointer; overflow: hidden; isolation: isolate;
  -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
  transition: transform var(--t-fast) var(--ease-soft), background var(--t-fast);
  -webkit-tap-highlight-color: transparent;
}
.pill::after {
  content: ''; position: absolute; inset: -2px; z-index: -1;
  background: linear-gradient(105deg, transparent 30%, rgba(246,227,162,.75) 48%, rgba(255,255,255,.9) 50%, rgba(246,227,162,.75) 52%, transparent 70%);
  transform: translateX(-120%); transition: transform 0s;
}
.pill:hover::after, .pill:focus-visible::after, .pill.shimmer::after { transform: translateX(120%); transition: transform 1.1s var(--ease-soft); }
.pill:active { transform: scale(.97); }
.pill:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.pill--solid { --pill-bg: color-mix(in srgb, var(--ink) 26%, transparent); margin-top: .6rem; }

/* Timeline (beaded thread) */
.timeline { position: relative; width: 100%; max-width: 26rem; margin-top: 1.5rem; text-align: left; }
.thread { position: absolute; left: 18px; top: 8px; bottom: 8px; width: 12px; margin-left: -6px; }
.thread-mask, .thread-inner { position: absolute; inset: 0; overflow: hidden; }
.thread-inner {
  background:
    linear-gradient(var(--brass), var(--brass)) center / 1.5px 100% no-repeat,
    radial-gradient(circle at 50% 50%, var(--gold-hi) 0 1.4px, var(--gold) 2px, #7E5E1F 3.6px, transparent 4px) center top / 12px 11px repeat-y;
}
.day { position: relative; padding-left: 52px; margin-bottom: 2rem; }
.day-name { font-family: var(--font-caps); font-style: normal; letter-spacing: .24em; font-size: .85rem; text-transform: uppercase; margin-bottom: .8rem; opacity: .85; }
.event { position: relative; margin-bottom: 1.4rem; }
.event::before {
  content: ''; position: absolute; left: -41px; top: .45em; width: 16px; height: 16px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff 0 8%, var(--gold-hi) 18%, var(--gold) 50%, #7E5E1F 100%);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--bg-stone) 85%, transparent), 0 2px 4px rgba(60,30,10,.35);
  transform: scale(var(--dot, 1));
}
.event-time { font-family: var(--font-caps); font-style: normal; font-size: .95rem; letter-spacing: .12em; }
.event-title { font-size: 1.35rem; line-height: 1.2; }
.event-text { opacity: .8; font-size: .95em; }

/* Travel + hotels */
.blocks, .hotels { display: flex; flex-direction: column; gap: 1.8rem; width: 100%; align-items: center; }
.block h3, .hotel h3 { margin: 0 0 .35rem; font-family: var(--font-caps); font-style: normal; font-weight: 500; font-size: 1.05rem; letter-spacing: .24em; text-transform: uppercase; }
.block p { max-width: var(--measure); margin: 0 auto; }
.hotel {
  width: 100%; max-width: 22rem; padding: 1.6rem 1.2rem;
  display: flex; flex-direction: column; align-items: center; gap: .4rem;
  border-radius: 200px 200px 14px 14px;      /* arched, like a doorway */
  background: color-mix(in srgb, #fff 16%, transparent);
  border: 1px solid color-mix(in srgb, var(--ink) 18%, transparent);
}
.hotel .pill { margin-top: .6rem; font-size: .8rem; padding: .6rem 1.4rem; min-height: 44px; }
/* Discover Athens: tab bar + place cards */
.section.guide { grid-template-columns: minmax(0, 1fr); }
.guide-content { max-width: 60rem; min-width: 0; }
.guide-tabs, .guide-panels { min-width: 0; align-self: stretch; }
.guide-tabs {
  display: flex; gap: .4rem; width: calc(100% + 32px); margin: .6rem -16px 0; padding: .3rem 16px .6rem;
  overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.guide-tabs::-webkit-scrollbar { display: none; }
.guide-tabs [role="tab"] {
  flex: 0 0 auto; scroll-snap-align: center; display: flex; flex-direction: column; align-items: center; gap: .3rem;
  min-width: 5.6rem; padding: .7rem .8rem .6rem; border-radius: 16px; cursor: pointer;
  border: 1px solid color-mix(in srgb, var(--ink) 18%, transparent);
  background: color-mix(in srgb, #fff 12%, transparent); color: inherit;
  font-family: var(--font-caps); font-size: .7rem; letter-spacing: .16em; text-transform: uppercase;
  transition: background var(--t-fast), color var(--t-fast), transform var(--t-fast);
  -webkit-tap-highlight-color: transparent;
}
.guide-tabs [role="tab"][aria-selected="true"] { background: var(--ink); color: #F3E6CC; border-color: var(--ink); }
.guide-tabs [role="tab"]:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.guide-tabs [role="tab"]:active { transform: scale(.97); }
@media (min-width: 760px) { .guide-tabs { justify-content: center; width: 100%; margin-inline: 0; padding-inline: 0; } }
.ico { width: 1.15em; height: 1.15em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.tab-ico { width: 1.6rem; height: 1.6rem; }
.guide-panels { width: 100%; text-align: left; }
.guide-panel[hidden] { display: none; }
.guide-intro { max-width: 36rem; margin: .4rem auto 1.2rem; text-align: center; opacity: .9; }
.guide-group {
  margin: 1.6rem 0 .8rem; text-align: center; font-family: var(--font-caps); font-style: normal; font-weight: 500;
  font-size: .9rem; letter-spacing: .3em; text-transform: uppercase;
  display: flex; align-items: center; gap: .8rem;
}
.guide-group::before, .guide-group::after { content: ''; flex: 1; height: 1px; background: color-mix(in srgb, var(--ink) 30%, transparent); }
.spots { display: grid; grid-template-columns: 1fr; gap: .8rem; margin-top: .8rem; }
@media (min-width: 760px) { .spots { grid-template-columns: 1fr 1fr; } }
.spot {
  display: grid; grid-template-columns: auto 1fr; gap: .85rem; align-items: start; min-width: 0;
  padding: 1rem 1rem 1.05rem; border-radius: 18px;
  background: color-mix(in srgb, #fff 16%, transparent);
  border: 1px solid color-mix(in srgb, var(--ink) 16%, transparent);
}
.spot-badge {
  width: 2.7rem; height: 2.7rem; border-radius: 50%; display: grid; place-items: center; color: #5A3B14;
  background: radial-gradient(circle at 35% 30%, #F6E3A2, #C9A24A 60%, #9C7A2E);
  box-shadow: inset 0 1px 0 rgba(255,245,210,.7), 0 2px 5px rgba(60,40,10,.25);
}
.spot-badge .ico { width: 1.35rem; height: 1.35rem; }
.spot-body { min-width: 0; display: flex; flex-direction: column; gap: .3rem; }
.spot h4 { margin: 0; font-family: var(--font-caps); font-style: normal; font-weight: 600; font-size: 1.02rem; letter-spacing: .08em; line-height: 1.25; }
.spot-meta { font-family: var(--font-caps); font-style: normal; font-size: .68rem; letter-spacing: .2em; text-transform: uppercase; opacity: .75; }
.spot-text { font-size: .98rem; line-height: 1.45; }
.spot-address { opacity: .8; font-size: .92rem; }
.spot-must, .spot-tip { display: flex; gap: .45rem; align-items: flex-start; font-size: .95rem; line-height: 1.4; }
.spot-must { padding: .45rem .7rem; border-radius: 12px; background: color-mix(in srgb, #F6E3A2 45%, transparent); }
.spot-must b { font-family: var(--font-caps); font-style: normal; font-weight: 600; font-size: .7rem; letter-spacing: .18em; text-transform: uppercase; margin-right: .25rem; }
.spot-must .ico, .spot-tip .ico { margin-top: .15rem; color: #8A6524; }
.spot-links { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .35rem; }
.spot-links a {
  display: inline-flex; align-items: center; gap: .35rem; min-height: 36px; padding: .3rem .75rem; border-radius: 999px;
  font-family: var(--font-caps); font-style: normal; font-size: .72rem; letter-spacing: .14em; text-decoration: none;
  border: 1px solid color-mix(in srgb, var(--ink) 25%, transparent); background: color-mix(in srgb, #fff 14%, transparent);
}
.spot-links a:hover { background: color-mix(in srgb, #fff 30%, transparent); }
.spot-links a:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.panel-in .spot { animation: spotIn .5s var(--ease-soft) both; animation-delay: calc(min(var(--i), 8) * 45ms); }
@keyframes spotIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.code-value { font-family: var(--font-caps); font-style: normal; font-size: 1.4rem; letter-spacing: .2em; }

/* RSVP form */
.rsvp-form { width: 100%; max-width: 24rem; display: flex; flex-direction: column; gap: 1.2rem; text-align: left; margin-top: .6rem; }
.field { display: flex; flex-direction: column; gap: .35rem; }
.field > span, .choice legend { font-family: var(--font-caps); font-style: normal; font-size: .74rem; letter-spacing: .26em; text-transform: uppercase; }
.field input, .field select, .field textarea {
  font: inherit; font-size: 1.1rem; color: inherit; width: 100%;
  padding: .7rem 1rem; border-radius: 14px;
  background: color-mix(in srgb, #fff 22%, transparent);
  border: 1px solid color-mix(in srgb, var(--ink) 25%, transparent);
  -webkit-appearance: none; appearance: none;
}
.field select { background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%); background-position: calc(100% - 20px) 55%, calc(100% - 14px) 55%; background-size: 6px 6px; background-repeat: no-repeat; }
.field input::placeholder, .field textarea::placeholder { color: inherit; opacity: .5; }
.field input:focus, .field select:focus, .field textarea:focus, .choice label:focus-within { outline: 2px solid var(--gold); outline-offset: 2px; }
.choice { border: 0; padding: 0; margin: 0; min-width: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.choice legend { padding: 0; margin-bottom: .5rem; }
.choice label { position: relative; flex: 1 1 9rem; }
.choice input { position: absolute; opacity: 0; }
.choice label span {
  display: block; text-align: center; padding: .65rem .8rem; border-radius: 999px; font-size: .98rem;
  border: 1px solid color-mix(in srgb, var(--ink) 25%, transparent);
  background: color-mix(in srgb, #fff 12%, transparent);
  transition: background var(--t-fast), color var(--t-fast);
}
.choice input:checked + span { background: var(--ink); color: var(--bg-khaki); }
.rsvp-form .pill { align-self: center; }
.choice legend small { display: block; margin-top: .3rem; font-family: var(--font-body); font-style: italic; font-size: .95rem; letter-spacing: 0; text-transform: none; opacity: .8; }
.choice--3 label { flex: 1 1 6.5rem; }
div.rsvp-step { display: flex; flex-direction: column; gap: 1.2rem; }
.rsvp-step[hidden] { display: none !important; }
.step-in { animation: stepIn .55s var(--ease-soft); }
@keyframes stepIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.form-status { text-align: center; min-height: 1.5em; font-size: 1.05rem; }

/* FAQ accordion */
.accordion { width: 100%; max-width: 28rem; text-align: left; }
.qa { border-top: 1px solid color-mix(in srgb, var(--ink) 25%, transparent); }
.qa:last-child { border-bottom: 1px solid color-mix(in srgb, var(--ink) 25%, transparent); }
.qa button {
  all: unset; box-sizing: border-box; width: 100%; padding: 1.1rem .2rem; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  font-size: 1.2rem; line-height: 1.3;
}
.qa button:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.qa .plus { flex: none; width: 14px; height: 14px; position: relative; transition: transform var(--t-med) var(--ease-soft); }
.qa .plus::before, .qa .plus::after { content: ''; position: absolute; inset: 6px 0; background: currentColor; }
.qa .plus::after { transform: rotate(90deg); }
.qa[data-open] .plus { transform: rotate(135deg); }
.qa .a { display: grid; grid-template-rows: 0fr; transition: grid-template-rows var(--t-med) var(--ease-soft); }
.qa[data-open] .a { grid-template-rows: 1fr; }
.qa .a > div { overflow: hidden; }
.qa .a p { padding: 0 .2rem 1.2rem; opacity: .9; }

/* Footer: paper sheet, moon + flock in the sky, olive branches rising from the sea */
.footer { min-height: 92svh; padding-top: clamp(9rem, 22vh, 12rem); padding-bottom: calc(var(--sea-h) + clamp(9rem, 26vw, 14rem)); align-content: start; }
.footer-moon  { width: clamp(78px, 21vw, 170px); left: 7%; top: 5%; }
.footer-flock { width: clamp(140px, 40vw, 380px); right: 3%; top: 5%; }
.footer-olive { z-index: 7; }
.footer-olive--l  { width: clamp(100px, 26vw, 230px); left: -7%;  bottom: calc(var(--sea-h) * .55); }
.footer-olive--r  { width: clamp(100px, 26vw, 230px); right: -7%; bottom: calc(var(--sea-h) * .55); }
.footer-olive--l2 { width: clamp(74px, 18vw, 170px);  left: 15%;  bottom: calc(var(--sea-h) * -.45); }
.footer-olive--r2 { width: clamp(74px, 18vw, 170px);  right: 15%; bottom: calc(var(--sea-h) * -.45); }
/* mosaic olive trees: flat edge sits on the screen edge, so they sway from that corner */
.tree-l .amb-sway { transform-origin: 0% 100%; }
.tree-r .amb-sway { transform-origin: 100% 100%; }
.footer-line { font-family: var(--font-caps); font-style: normal; font-size: clamp(1.5rem, 1.1rem + 2.6vw, 2.4rem); letter-spacing: .18em; text-transform: uppercase; padding-left: .18em; text-wrap: balance; }

/* Divider band that unrolls */
.band { position: relative; z-index: 7; height: 44px; margin: -22px 0; }
.band-mask { position: absolute; inset: 0; overflow: hidden; }
.band-inner {
  position: absolute; inset: 0;
  background: url('../assets/collage/band.svg') left center / auto 100% repeat-x;
  filter: drop-shadow(0 3px 3px rgba(40,20,8,.3));
}
.band-roll {
  position: absolute; top: -5px; bottom: -5px; left: 0; width: 18px; margin-left: -9px; border-radius: 9px;
  background: linear-gradient(90deg, #8b7350, #efe1c1 45%, #c9b48e 60%, #6e5838);
  box-shadow: 2px 3px 6px rgba(40,20,8,.35);
}

/* ==========================================================================
   OPENING: loader + envelope
   ========================================================================== */
.opening {
  position: fixed; inset: 0; z-index: 100; display: grid; place-items: center;
  background: var(--bg-terracotta); color: var(--ink-light);
}
.opening::before { content: ''; position: absolute; inset: 0; background: inherit; }
.opening .grain-local { position: absolute; inset: 0; }
.loader { position: relative; display: flex; flex-direction: column; align-items: center; gap: 1.2rem; }
.monogram--loader { width: clamp(140px, 44vw, 200px); }
.loader-text { font-size: 1rem; letter-spacing: .12em; opacity: .75; }

.envelope {
  position: absolute; width: min(84vw, 380px); aspect-ratio: 1.45;
  perspective: 1200px;
}
.envelope[hidden] { display: none; }
.env-back, .env-front, .env-flap, .env-card { position: absolute; inset: 0; }
.env-back { background: #E9D9BC; border-radius: 6px; box-shadow: 0 24px 50px rgba(40,15,5,.45); }
.env-card {
  inset: 6% 7%; background: #F7EEDD; border-radius: 4px;
  display: grid; place-items: center; color: var(--ink-brown);
  font-family: var(--font-caps); font-style: normal; letter-spacing: .2em; font-size: 1.1rem;
}
.env-front {
  background:
    linear-gradient(to top right, #DECBA9 49.6%, transparent 50%) left / 50.5% 100% no-repeat,
    linear-gradient(to top left, #E2D0AF 49.6%, transparent 50%) right / 50.5% 100% no-repeat,
    linear-gradient(to top, #D8C3A0 0, #D8C3A0 100%) bottom / 100% 0 no-repeat;
  clip-path: polygon(0 0, 50% 58%, 100% 0, 100% 100%, 0 100%);
  background-color: #E4D3B3;
  border-radius: 6px;
}
.env-flap {
  bottom: auto; height: 62%;
  background: #EADBBF;
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  transform-origin: 50% 0; transform: rotateX(0deg);
  filter: drop-shadow(0 4px 4px rgba(60,30,10,.25));
  backface-visibility: hidden;
}
.env-back, .env-front, .env-flap {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 .4 0 0 0 0 .3 0 0 0 0 .2 0 0 0 .18 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.seal {
  position: absolute; left: 50%; top: 62%; width: 92px; height: 92px; margin: -46px 0 0 -46px;
  border: 0; padding: 0; background: none; cursor: pointer; z-index: 3;
  filter: drop-shadow(0 6px 8px rgba(40,10,5,.45));
  -webkit-tap-highlight-color: transparent;
}
.seal svg { width: 100%; height: 100%; }
.seal:focus-visible { outline: 2px solid var(--gold-hi); outline-offset: 6px; border-radius: 50%; }
.seal-text { font-family: var(--font-caps); font-size: 30px; fill: #E7A07F; letter-spacing: 1px; opacity: .9; }
.tap-hint {
  position: absolute; left: 0; right: 0; top: calc(100% + 1.6rem); text-align: center;
  font-size: 1.15rem; letter-spacing: .06em; animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse { 0%,100% { opacity: .5; } 50% { opacity: 1; } }

/* ==========================================================================
   FLOATING UI
   ========================================================================== */
.sky { position: fixed; inset: 0; z-index: 4; /* above collage, below words */ pointer-events: none; overflow: hidden; }
.bird { position: absolute; left: 0; top: 0; width: 34px; opacity: .95; }
.bird img { width: 100%; display: block; filter: drop-shadow(0 3px 3px rgba(40,20,5,.25)); }
.bird-inner { animation: glide 1.6s ease-in-out infinite alternate; transform-origin: 60% 50%; }
@keyframes glide { from { transform: rotate(-5deg) scaleY(1); } to { transform: rotate(4deg) scaleY(.88); } }

.music, .lang {
  position: fixed; z-index: 50; bottom: max(16px, env(safe-area-inset-bottom));
}
.music {
  right: calc(16px + env(safe-area-inset-right, 0px)); width: 46px; height: 46px; border-radius: 50%; padding: 0; cursor: pointer;
  border: 1px solid rgba(246,227,162,.5); color: var(--gold-hi);
  background: rgba(70,35,18,.45); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  display: grid; place-items: center;
}
.music[hidden] { display: none; }
.bars { display: flex; gap: 3px; align-items: flex-end; height: 16px; }
.bars i { width: 2px; height: 30%; background: currentColor; border-radius: 1px; transition: height .3s; }
.music[aria-pressed="true"] .bars i { animation: eq 1s ease-in-out infinite alternate; }
.music[aria-pressed="true"] .bars i:nth-child(2) { animation-delay: -.3s; }
.music[aria-pressed="true"] .bars i:nth-child(3) { animation-delay: -.6s; }
.music[aria-pressed="true"] .bars i:nth-child(4) { animation-delay: -.15s; }
@keyframes eq { from { height: 20%; } to { height: 100%; } }
.lang { left: calc(16px + env(safe-area-inset-left, 0px)); display: flex; gap: .2rem; padding: .25rem; border-radius: 999px; background: rgba(70,35,18,.45); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.lang[hidden] { display: none; }
.lang button { all: unset; cursor: pointer; padding: .4rem .7rem; border-radius: 999px; color: var(--gold-hi); font-family: var(--font-caps); letter-spacing: .15em; font-size: .8rem; }
.lang button[aria-current="true"] { background: rgba(246,227,162,.2); }

.confetti { position: fixed; inset: 0; z-index: 90; pointer-events: none; }
.confetti i {
  position: absolute; left: 0; top: 0; width: 14px; height: 14px;
  background: radial-gradient(circle at 35% 30%, #fff 0 10%, var(--gold-hi) 25%, var(--gold) 60%, #7E5E1F);
  clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
}

/* ==========================================================================
   INITIAL STATES (only when JS animations run)
   ========================================================================== */
.js-anim .reveal-fade, .js-anim .reveal-lines { opacity: 0; }
.js-anim .reveal-letters { visibility: hidden; }
.char { display: inline-block; will-change: transform, opacity; }
.word { display: inline-block; white-space: nowrap; }
.w-line { display: inline-block; will-change: transform, opacity; }

/* ==========================================================================
   REDUCED MOTION: calm, static
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .sky, .band-roll { display: none; }
  .glint > i { opacity: .35; }
}

@media (min-width: 900px) {
  .section { padding-left: 32px; padding-right: 32px; }
  .names-wrap .edge-l, .names-wrap .edge-r { --peek: -1.08 !important; }
  .hero-content { max-width: 52rem; }
}

/* sections with a mosaic olive tree in a bottom corner: room so the tree never sits behind words */
.section.has-tree { padding-bottom: calc(clamp(120px, 34vw, 300px) * 1.5 + 1.5rem); }

/* desktop: keep the whole first page within one screen */
@media (min-width: 700px) {
  .section.hero { padding-top: 1.5rem; }
  .hero-content { gap: .6rem; }
  .monogram--hero { width: clamp(96px, 12vh, 130px); }
  .hero .names { font-size: clamp(1.6rem, 4.6vh, 2.6rem); margin-top: .3rem; }
  .hero .pill.hero-rsvp { margin-top: .5rem; }
  .scene--hero { margin-top: .3rem; height: calc(var(--sea-h) + 110px); }
  .hero-temple { --w: clamp(180px, 19vw, 250px); }
  .section.hero { --sea-h: clamp(62px, 9vw, 120px); }
  .hero-fish { right: 20%; }
}
