/* =====================================================================
   Thabang & Njele — Champagne Neutrals
   Layout: a single letterpress card resting on warm linen; each icon
   opens its own "page", with a frosted return bar and a section strip.
   Deliberately single-theme (a printed invitation), so colours are fixed.
   ===================================================================== */
:root {
  --ivory:      #FBF7F0;
  --paper:      #FFFDF9;
  --linen:      #F4ECDF;
  --cream:      #EFE4D2;
  --champagne:  #E5D3B5;
  --beige:      #D6C0A0;
  --gold:       #B8975A;
  --gold-deep:  #8C6D3D;
  --gold-soft:  #DCC491;
  --ink:        #45372B;
  --mocha:      #76604D;
  --night:      #261D15;
  --line:       rgba(140, 109, 61, .30);
  --line-soft:  rgba(140, 109, 61, .16);

  --shadow:    0 1px 2px rgba(69, 55, 43, .05), 0 18px 40px -18px rgba(69, 55, 43, .30);
  --shadow-sm: 0 1px 2px rgba(69, 55, 43, .05), 0 8px 22px -14px rgba(69, 55, 43, .28);

  --f-script: "Pinyon Script", "Snell Roundhand", "Apple Chancery", "Brush Script MT", cursive;
  --f-serif:  "Cormorant Garamond", Cormorant, Garamond, "Times New Roman", serif;
  --f-sans:   "Jost", "Avenir Next", "Segoe UI", Helvetica, Arial, sans-serif;

  --ease: cubic-bezier(.22, .7, .2, 1);
  --gutter-l: max(16px, env(safe-area-inset-left, 0px));
  --gutter-r: max(16px, env(safe-area-inset-right, 0px));
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100%;
  background-color: var(--ivory);
  background-image:
    radial-gradient(90% 60% at 50% 0%, #FFFDF8 0%, rgba(255, 253, 248, 0) 70%),
    radial-gradient(70% 50% at 100% 100%, rgba(229, 211, 181, .35) 0%, rgba(229, 211, 181, 0) 70%);
  background-attachment: fixed;
  color: var(--ink);
  font-family: var(--f-serif);
  font-size: 1.16rem;
  font-weight: 500;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body.no-scroll { overflow: hidden; }
body::before {            /* paints the phone's status-bar band */
  content: ""; position: fixed; inset: 0 0 auto; z-index: 32;
  height: env(safe-area-inset-top, 0px); background: var(--ivory);
}
img { max-width: 100%; display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { text-wrap: balance; }
svg { overflow: visible; }

.grain {
  position: fixed; inset: 0; z-index: 70; pointer-events: none; opacity: .07;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .3  0 0 0 0 .22  0 0 0 0 .14  0 0 0 .9 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
#sparkle { position: fixed; inset: 0; z-index: 60; pointer-events: none; }

/* ---------- shared type ---------- */
.eyebrow {
  margin: 0;
  font-family: var(--f-sans); font-weight: 500;
  font-size: .68rem; letter-spacing: .26em; text-transform: uppercase;
  color: var(--gold-deep);
}
.script { font-family: var(--f-script); font-weight: 400; }
.foil {
  background: linear-gradient(105deg, #7A5D31 0%, #94763F 22%, #BC9D60 38%, #D6BC84 46%, #A4844B 56%, #7A5D31 76%, #94763F 100%);
  background-size: 260% 100%;
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
  animation: foil 9s ease-in-out infinite alternate;
}
@keyframes foil { from { background-position: 0% 50%; } to { background-position: 100% 50%; } }

.ph {
  display: inline-block;
  font-family: var(--f-sans); font-size: .72em; font-weight: 500; font-style: normal;
  letter-spacing: .06em; line-height: 1.5;
  color: var(--gold-deep);
  background: rgba(255, 253, 249, .7);
  border: 1px dashed var(--gold);
  border-radius: 4px;
  padding: .12em .55em;
  vertical-align: middle;
}

.ornament { display: block; width: 132px; height: 12px; color: var(--gold); margin-inline: auto; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .6em;
  min-height: 48px; padding: .8rem 1.5rem;
  border-radius: 999px; border: 1px solid var(--gold);
  font-family: var(--f-sans); font-size: .72rem; font-weight: 500;
  letter-spacing: .18em; text-transform: uppercase; text-decoration: none;
  cursor: pointer; background: transparent; color: var(--gold-deep);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), background-color .3s;
  -webkit-tap-highlight-color: transparent;
}
.btn svg { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.btn:hover { transform: translateY(-2px); background-color: rgba(229, 211, 181, .35); }
.btn:active { transform: scale(.97); }
.btn--gold {
  border-color: transparent; color: #FFFDF8;
  background: linear-gradient(135deg, #B08F55 0%, #8C6D3D 55%, #A9884E 100%);
  box-shadow: 0 10px 22px -12px rgba(140, 109, 61, .85), inset 0 1px 0 rgba(255, 255, 255, .25);
}
.btn--gold:hover { background-color: transparent; box-shadow: 0 14px 26px -12px rgba(140, 109, 61, .9), inset 0 1px 0 rgba(255, 255, 255, .25); }
.btn--sm { min-height: 40px; padding: .55rem 1rem; font-size: .64rem; letter-spacing: .14em; }
.btn[aria-disabled="true"] { opacity: .5; pointer-events: none; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }

.link-btn {
  background: none; border: 0; padding: .4rem; cursor: pointer;
  font-family: var(--f-sans); font-size: .66rem; letter-spacing: .2em; text-transform: uppercase;
  color: var(--mocha); text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 4px;
}

/* =====================================================================
   1. ENVELOPE STAGE
   ===================================================================== */
.stage {
  position: fixed; inset: 0; z-index: 40;
  display: grid; place-items: center; overflow: hidden;
  padding-block: max(24px, env(safe-area-inset-top, 0px)) max(24px, env(safe-area-inset-bottom, 0px));
  padding-left: var(--gutter-l); padding-right: var(--gutter-r);
  background:
    radial-gradient(110% 70% at 50% 40%, #FFFCF6 0%, rgba(255, 252, 246, 0) 62%),
    linear-gradient(180deg, var(--linen) 0%, var(--cream) 100%);
  transition: opacity 1s var(--ease), filter 1s var(--ease), transform 1.1s var(--ease);
}
.stage.is-leaving { opacity: 0; filter: blur(8px); transform: scale(1.04); pointer-events: none; }
.stage__inner { display: flex; flex-direction: column; align-items: center; gap: clamp(14px, 3vh, 26px); text-align: center; width: 100%; }
.stage__eyebrow, .stage__names, .stage__hint { animation: rise 1.2s var(--ease) both; }
.stage__names { animation-delay: .15s, 0s; }
.stage__names {
  margin: 0; padding: .1em .25em;
  font-family: var(--f-script); font-size: clamp(2.7rem, 11vw, 4.4rem); line-height: 1.1;
  animation: rise 1.2s var(--ease) .15s both, foil 9s ease-in-out infinite alternate;
}
.stage__date {
  margin: -6px 0 0;
  font-family: var(--f-sans); font-size: .68rem; font-weight: 500; letter-spacing: .26em; text-transform: uppercase; white-space: pre;
  color: var(--mocha);
  animation: rise 1.2s var(--ease) .25s both;
}
.stage__hint {
  margin: 0; display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--f-sans); font-size: .68rem; letter-spacing: .24em; text-transform: uppercase; color: var(--mocha);
  animation-delay: .6s;
}
.stage__dot { width: 6px; height: 6px; border-radius: 50%; background: var(--gold); animation: breathe 2.2s ease-in-out infinite; }
.is-opening .stage__hint, .is-opening .stage__eyebrow, .is-opening .stage__date { opacity: 0; transition: opacity .4s; }

.envelope {
  position: relative; display: block;
  width: min(84vw, 440px); aspect-ratio: 10 / 7;
  margin-top: clamp(56px, 13vh, 120px);
  padding: 0; border: 0; background: none; cursor: pointer;
  filter: drop-shadow(0 22px 26px rgba(69, 55, 43, .20)) drop-shadow(0 2px 3px rgba(69, 55, 43, .12));
  animation: rise 1.2s var(--ease) .3s both, float 6s ease-in-out 1.5s infinite;
  -webkit-tap-highlight-color: transparent;
}
.envelope:focus-visible { outline-offset: 10px; }
.env-back {
  position: absolute; inset: 0; z-index: 0; border-radius: 5px;
  background:
    repeating-linear-gradient(45deg, rgba(255, 248, 232, .35) 0 1px, transparent 1px 9px),
    repeating-linear-gradient(-45deg, rgba(255, 248, 232, .35) 0 1px, transparent 1px 9px),
    linear-gradient(180deg, #D9C29C, #CDB28A);
}
.env-letter {
  position: absolute; left: 7%; right: 7%; top: 5%; height: 90%; z-index: 2;
  display: flex; flex-direction: column; align-items: center; gap: 6%;
  padding-top: 9%;
  background: linear-gradient(180deg, #FFFEFB, #FBF5EA);
  border-radius: 3px;
  box-shadow: 0 1px 3px rgba(69, 55, 43, .12);
  transition: transform 1.4s cubic-bezier(.3, .1, .2, 1);
}
.env-letter::before { content: ""; position: absolute; inset: 7px; border: 1px solid var(--line); border-radius: 2px; }
.env-letter__mono { font-family: var(--f-script); font-size: clamp(1.9rem, 8vw, 2.8rem); line-height: 1; color: var(--gold-deep); }
.env-letter__rule { width: 34%; height: 1px; background: var(--line); }
.env-letter__text { font-family: var(--f-sans); font-size: clamp(.5rem, 2vw, .64rem); letter-spacing: .3em; text-transform: uppercase; color: var(--mocha); }
.env-pocket { position: absolute; inset: 0; z-index: 3; width: 100%; height: 100%; border-radius: 5px; }
.env-flap {
  position: absolute; left: 0; right: 0; top: 0; height: 58.6%; z-index: 4;
  transform-origin: 50% 0;
  transform: perspective(1100px) rotateX(0deg);
  transition: transform 1.05s cubic-bezier(.55, .05, .25, 1);
}
.env-flap svg { display: block; width: 100%; height: 100%; }
.env-flap__front { filter: drop-shadow(0 1.5px 1.5px rgba(69, 55, 43, .18)); }
.env-flap__liner { opacity: 0; }
.is-opening .env-flap { transform: perspective(1100px) rotateX(180deg); transition-delay: .35s; }
.flap-turned .env-flap { z-index: 1; }
.flap-turned .env-flap__front { opacity: 0; }
.flap-turned .env-flap__liner { opacity: 1; }
.is-rising .env-letter { transform: translateY(-64%); }

.seal {
  position: absolute; left: 50%; top: 55%; z-index: 5;
  width: clamp(58px, 18%, 80px); aspect-ratio: 1;
  transform: translate(-50%, -50%);
  filter: drop-shadow(0 3px 4px rgba(69, 55, 43, .3));
}
.seal svg { width: 100%; height: 100%; display: block; }
.seal::after {
  content: ""; position: absolute; inset: -9px; border-radius: 50%;
  border: 1px solid var(--gold);
  animation: ring 2.4s ease-out 1.6s infinite;
  opacity: 0;
}
.seal__text { font-family: "Pinyon Script", cursive; font-size: 30px; fill: #7A5C2C; }
.seal__text--light { fill: #F7E8C4; opacity: .55; }
.is-opening .seal { animation: sealOff .75s var(--ease) forwards; }
.is-opening .seal::after { display: none; }
.envelope:hover .seal { transform: translate(-50%, -50%) scale(1.05); transition: transform .3s var(--ease); }

@keyframes float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -6px; } }
@keyframes ring { 0% { transform: scale(.85); opacity: .75; } 100% { transform: scale(1.45); opacity: 0; } }
@keyframes breathe { 0%, 100% { opacity: .35; transform: scale(.8); } 50% { opacity: 1; transform: scale(1.15); } }
@keyframes sealOff {
  0%   { transform: translate(-50%, -50%) scale(1); opacity: 1; }
  30%  { transform: translate(-50%, -50%) scale(1.14); opacity: 1; }
  100% { transform: translate(-50%, 10%) scale(.55) rotate(-24deg); opacity: 0; }
}
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

/* =====================================================================
   2. APP SHELL
   ===================================================================== */
.app { position: relative; z-index: 1; min-height: 100vh; }
.app.is-entering { animation: appIn 1.1s var(--ease) both; }
@keyframes appIn { from { opacity: 0; } to { opacity: 1; } }

.topbar {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 30;
  background: rgba(251, 247, 240, .97);
  -webkit-backdrop-filter: blur(14px) saturate(1.1); backdrop-filter: blur(14px) saturate(1.1);
  border-bottom: 1px solid var(--line-soft);
}
.topbar__row {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px;
  max-width: 1100px; margin: 0 auto;
  padding-block: 10px 6px; padding-left: var(--gutter-l); padding-right: var(--gutter-r);
}
.back-btn, .topbar__rsvp {
  display: inline-flex; align-items: center; gap: 4px;
  min-height: 38px; padding: .35rem .9rem .35rem .6rem;
  border: 1px solid var(--line); border-radius: 999px;
  font-family: var(--f-sans); font-size: .64rem; font-weight: 500; letter-spacing: .16em; text-transform: uppercase;
  text-decoration: none; color: var(--gold-deep);
  justify-self: start; transition: background-color .3s;
}
.back-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.back-btn:hover, .topbar__rsvp:hover { background: rgba(229, 211, 181, .4); }
.topbar__rsvp { justify-self: end; padding: .35rem .95rem; background: var(--gold-deep); border-color: var(--gold-deep); color: #FFFDF8; }
.topbar__rsvp:hover { background: #7A5E33; }
.topbar__mono { font-family: var(--f-script); font-size: 1.75rem; line-height: 1; color: var(--gold-deep); text-decoration: none; padding: 0 .2em; }

.chips {
  display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none;
  max-width: 1100px; margin: 0 auto;
  padding-block: 4px 10px; padding-left: var(--gutter-l); padding-right: var(--gutter-r);
  scroll-snap-type: x proximity;
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; scroll-snap-align: center;
  display: inline-flex; align-items: center; gap: 7px;
  padding: .42rem .85rem; border-radius: 999px; border: 1px solid transparent;
  font-family: var(--f-sans); font-size: .64rem; font-weight: 500; letter-spacing: .14em; text-transform: uppercase;
  color: var(--mocha); text-decoration: none; white-space: nowrap;
  transition: background-color .3s, border-color .3s, color .3s;
}
.chip svg { width: 16px; height: 16px; }
.chip:hover { color: var(--ink); }
.chip[aria-current="page"] { background: rgba(229, 211, 181, .55); border-color: var(--gold-soft); color: var(--ink); }
@media (min-width: 1000px) { .chips { justify-content: center; } }

.ico { fill: none; stroke: currentColor; stroke-width: 1.25; stroke-linecap: round; stroke-linejoin: round; }

/* views */
.view {
  padding-block: clamp(28px, 6vw, 64px) calc(56px + env(safe-area-inset-bottom, 0px));
  padding-left: var(--gutter-l); padding-right: var(--gutter-r);
}
.view.is-active .rise { animation: rise 1s var(--ease) both; animation-delay: var(--d, 0s); }

/* =====================================================================
   3. HOME — THE INVITATION CARD
   ===================================================================== */
.home { max-width: 35rem; margin: 0 auto; display: flex; flex-direction: column; align-items: center; gap: clamp(24px, 5vw, 40px); }
.invite {
  position: relative; width: 100%;
  background: linear-gradient(180deg, #FFFEFB 0%, #FBF5EA 100%);
  padding: clamp(10px, 2.6vw, 16px);
  border-radius: 3px;
  box-shadow: var(--shadow);
}
.invite__inner {
  position: relative;
  border: 1px solid var(--line);
  padding: clamp(34px, 8vw, 58px) clamp(16px, 5vw, 44px) clamp(30px, 7vw, 50px);
  display: flex; flex-direction: column; align-items: center; gap: clamp(14px, 3vw, 20px);
  text-align: center;
}
.invite__inner::before { content: ""; position: absolute; inset: 5px; border: 1px solid var(--line-soft); pointer-events: none; }
.corner { position: absolute; width: 34px; height: 34px; color: var(--gold); }
.corner--tl { top: 9px; left: 9px; }
.corner--tr { top: 9px; right: 9px; transform: scaleX(-1); }
.corner--bl { bottom: 9px; left: 9px; transform: scaleY(-1); }
.corner--br { bottom: 9px; right: 9px; transform: scale(-1, -1); }

.mono-ring {
  width: 64px; height: 64px; border-radius: 50%;
  display: grid; place-items: center;
  border: 1px solid var(--gold-soft);
  box-shadow: inset 0 0 0 4px var(--paper), inset 0 0 0 5px var(--line);
  font-family: var(--f-script); font-size: 1.55rem; color: var(--gold-deep); line-height: 1;
}
.names {
  margin: 0; display: flex; flex-direction: column; align-items: center;
  font-family: var(--f-script); font-weight: 400;
  font-size: clamp(2.05rem, 8.6vw, 3.5rem); line-height: 1.12;
  outline: none;
}
.names > span { padding: .06em .3em; }
.names__amp { font-family: var(--f-serif); font-style: italic; font-weight: 400; font-size: .62em; color: var(--gold); padding: 0; }

.arch {
  position: relative; margin: 0;
  width: min(76%, 300px); aspect-ratio: 4 / 5;
  border-radius: 1000px 1000px 4px 4px;
  padding: 7px;
  border: 1px solid var(--gold-soft);
}
.arch img {
  width: 100%; height: 100%; object-fit: cover; object-position: 50% 60%;
  border-radius: 1000px 1000px 2px 2px;
}
.invite__guest { margin: 0 0 .4rem; font-family: var(--f-script, 'Pinyon Script', cursive); font-size: clamp(1.6rem, 6vw, 2rem); color: var(--gold); }
.invite__line { margin: 0; font-style: italic; font-size: clamp(1.1rem, 4vw, 1.3rem); color: var(--mocha); max-width: 22rem; }

.triad {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  gap: clamp(10px, 3vw, 18px); width: 100%; max-width: 22rem;
}
.triad__side {
  padding-block: 8px; border-block: 1px solid var(--line);
  font-family: var(--f-sans); font-size: .64rem; font-weight: 500; letter-spacing: .22em; text-transform: uppercase; color: var(--ink);
}
.triad__num { font-family: var(--f-serif); font-weight: 400; font-size: clamp(2.8rem, 12vw, 3.6rem); line-height: 1; color: var(--gold-deep); font-variant-numeric: lining-nums; }
.invite__time { margin: -4px 0 0; font-family: var(--f-sans); font-size: .7rem; letter-spacing: .22em; text-transform: uppercase; color: var(--mocha); }
.invite__city { margin: 0; font-size: 1.15rem; letter-spacing: .04em; }

.countdown { display: flex; gap: clamp(10px, 3vw, 18px); justify-content: center; font-variant-numeric: tabular-nums; }
.countdown__unit { display: flex; flex-direction: column; align-items: center; min-width: 3.2rem; }
.countdown__num { font-size: clamp(1.6rem, 6vw, 2rem); font-weight: 500; line-height: 1.1; color: var(--ink); }
.countdown__lbl { font-family: var(--f-sans); font-size: .56rem; letter-spacing: .22em; text-transform: uppercase; color: var(--mocha); }
.countdown__today { font-family: var(--f-script); font-size: 2rem; color: var(--gold-deep); }

.verse { margin: 4px 0 0; max-width: 24rem; }
.verse p { margin: 0; font-style: italic; font-size: clamp(1.08rem, 3.8vw, 1.25rem); line-height: 1.5; color: var(--ink); }
.verse em { font-family: var(--f-script); font-style: normal; font-size: 1.5em; color: var(--gold-deep); padding-inline: .05em; }
.verse cite { display: block; margin-top: 6px; font-style: normal; font-family: var(--f-sans); font-size: .62rem; letter-spacing: .24em; text-transform: uppercase; color: var(--gold-deep); }

.home__prompt { display: flex; align-items: center; gap: 14px; width: 100%; max-width: 30rem; margin: 0; }
.home__prompt::before, .home__prompt::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.icons { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px 6px; width: 100%; max-width: 34rem; }
.icon-btn {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  text-decoration: none; text-align: center; color: var(--ink);
  -webkit-tap-highlight-color: transparent;
}
.icon-btn__ring {
  position: relative; width: clamp(58px, 16.5vw, 76px); aspect-ratio: 1; border-radius: 50%;
  display: grid; place-items: center; color: var(--gold-deep);
  background: radial-gradient(circle at 35% 28%, #FFFEFA 0%, var(--cream) 100%);
  border: 1px solid var(--gold-soft);
  box-shadow: 0 10px 20px -12px rgba(69, 55, 43, .45), inset 0 0 0 4px rgba(255, 253, 249, .9), inset 0 0 0 5px var(--line-soft);
  transition: transform .45s var(--ease), box-shadow .45s var(--ease), background .45s;
}
.icon-btn__ring::after {
  content: ""; position: absolute; inset: -5px; border-radius: 50%;
  border: 1px solid var(--gold); opacity: 0; transform: scale(.9);
  transition: opacity .45s, transform .45s var(--ease);
}
.icon-btn__ring svg { width: 44%; height: 44%; }
.icon-btn__label { font-family: var(--f-sans); font-weight: 500; font-size: clamp(.56rem, 2.3vw, .68rem); letter-spacing: .14em; text-transform: uppercase; line-height: 1.4; color: var(--mocha); }
.icon-btn:hover .icon-btn__ring, .icon-btn:focus-visible .icon-btn__ring {
  transform: translateY(-4px);
  background: radial-gradient(circle at 35% 28%, #FFFBF1 0%, var(--champagne) 100%);
  box-shadow: 0 16px 26px -14px rgba(69, 55, 43, .55), inset 0 0 0 4px rgba(255, 253, 249, .9), inset 0 0 0 5px var(--line);
}
.icon-btn:hover .icon-btn__ring::after, .icon-btn:focus-visible .icon-btn__ring::after { opacity: .7; transform: scale(1); }
.icon-btn:focus-visible { outline: none; }
.icon-btn:active .icon-btn__ring { transform: scale(.94); }

.foot { display: flex; flex-direction: column; align-items: center; gap: 4px; padding-top: 8px; text-align: center; }
.foot__script { font-family: var(--f-script); font-size: 1.9rem; line-height: 1.1; color: var(--gold-deep); }
.foot__names { font-family: var(--f-sans); font-size: .66rem; letter-spacing: .26em; text-transform: uppercase; color: var(--mocha); margin-bottom: 8px; }

/* =====================================================================
   4. SECTION PAGES
   ===================================================================== */
.page-head { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; max-width: 40rem; margin: 0 auto clamp(30px, 6vw, 52px); }
.page-head__icon {
  width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center;
  color: var(--gold-deep); border: 1px solid var(--gold-soft);
  box-shadow: inset 0 0 0 4px var(--ivory), inset 0 0 0 5px var(--line-soft);
}
.page-head__icon svg { width: 24px; height: 24px; }
.page-title {
  margin: 0; padding: 0 .2em;
  font-family: var(--f-script); font-weight: 400;
  font-size: clamp(2.8rem, 11vw, 4.4rem); line-height: 1.1; color: var(--ink);
  outline: none;
}
.page-body { max-width: 62rem; margin: 0 auto; }

.paper {
  position: relative; background: var(--paper);
  border: 1px solid var(--line-soft); border-radius: 4px;
  padding: clamp(22px, 5vw, 36px);
  box-shadow: var(--shadow-sm);
}
.paper--framed::before { content: ""; position: absolute; inset: 6px; border: 1px solid var(--line-soft); border-radius: 2px; pointer-events: none; }
.card-title { margin: 0; font-family: var(--f-serif); font-weight: 500; font-size: clamp(1.45rem, 5vw, 1.75rem); line-height: 1.25; color: var(--ink); }
.muted { color: var(--mocha); }
.prose { max-width: 36rem; }
.prose p { margin: 0 0 1em; }
.lead { font-size: clamp(1.15rem, 4vw, 1.3rem); }

/* pager */
.pager {
  max-width: 44rem; margin: clamp(44px, 8vw, 80px) auto 0;
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
}
.pager__home { grid-column: 1 / -1; justify-self: center; }
.pager__link {
  display: flex; flex-direction: column; gap: 2px; padding: 14px 16px;
  border-top: 1px solid var(--line); text-decoration: none;
  transition: background-color .3s;
}
.pager__link:hover { background: rgba(229, 211, 181, .25); }
.pager__link--next { text-align: right; }
.pager__dir { font-family: var(--f-sans); font-size: .6rem; letter-spacing: .24em; text-transform: uppercase; color: var(--gold-deep); }
.pager__name { font-size: 1.25rem; color: var(--ink); }

/* ---------- formal invitation ---------- */
.formal { max-width: 34rem; margin: 0 auto; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 16px; padding-block: clamp(36px, 8vw, 60px); }
.formal .names { font-size: clamp(2rem, 8vw, 3.2rem); }
.formal__line { margin: 0; font-style: italic; font-size: clamp(1.1rem, 4vw, 1.3rem); color: var(--mocha); max-width: 24rem; }
.formal__date { margin: 0; font-size: clamp(1.25rem, 4.5vw, 1.5rem); font-weight: 600; letter-spacing: .02em; }
.formal__meta { margin: 0; font-family: var(--f-sans); font-size: .7rem; letter-spacing: .2em; text-transform: uppercase; color: var(--ink); line-height: 2; }
.formal__venue { margin: 0; }
.formal__venue strong { display: block; font-weight: 600; font-size: 1.2rem; }
.formal__rsvp { margin: 6px 0 0; font-style: italic; color: var(--mocha); }

/* ---------- story ---------- */
.story { display: grid; gap: clamp(32px, 6vw, 64px); align-items: center; }
@media (min-width: 840px) { .story { grid-template-columns: 1fr 1.15fr; } }
.story__photos { position: relative; width: min(100%, 380px); margin: 0 auto; padding-bottom: 16%; }
.story__photos .arch { width: 84%; }
.oval {
  position: absolute; right: 0; bottom: 0; margin: 0;
  width: 46%; aspect-ratio: 3 / 4; border-radius: 50%; overflow: hidden;
  border: 6px solid var(--ivory); box-shadow: var(--shadow);
}
.oval img { width: 100%; height: 100%; object-fit: cover; object-position: 46% 34%; }
.story__text { min-width: 0; }
.story__text p { margin: 0 0 1.1em; font-size: clamp(1.15rem, 4vw, 1.32rem); line-height: 1.7; max-width: 34rem; }
.dropcap::first-letter {
  float: left; font-family: var(--f-script); font-size: 4.4em; line-height: .78;
  padding: .1em .14em 0 0; color: var(--gold-deep);
}
.story__quote {
  margin: .2em 0 .7em !important; text-align: center;
  font-family: var(--f-script); font-size: clamp(2.1rem, 7.5vw, 2.9rem) !important; line-height: 1.15 !important; color: var(--gold-deep);
}
.story__wide {
  position: relative; margin: clamp(36px, 7vw, 72px) auto 0; overflow: hidden; border-radius: 3px;
  width: 100%; max-width: 34rem; box-shadow: var(--shadow);
}
.story__wide img { width: 100%; height: auto; transform: scale(1.04); transition: transform 6s var(--ease); }
.view.is-active .story__wide img { transform: scale(1); }
.story__wide figcaption {
  position: absolute; inset: auto 0 0; padding: 40px 16px 18px; text-align: center;
  background: linear-gradient(180deg, rgba(38, 29, 21, 0), rgba(38, 29, 21, .45));
  color: #FBF7F0; font-family: var(--f-script); font-size: clamp(1.6rem, 6vw, 2.4rem); line-height: 1.2;
}

/* ---------- details ---------- */
.details { display: grid; gap: clamp(26px, 5vw, 40px); max-width: 46rem; margin: 0 auto; }
.details > .info { justify-self: center; width: min(100%, 24rem); }
.date-block { display: grid; justify-items: center; gap: 2px; text-align: center; }
.date-block__side { font-family: var(--f-sans); font-size: .7rem; font-weight: 500; letter-spacing: .3em; text-transform: uppercase; color: var(--ink); }
.date-block__num { font-weight: 300; font-size: clamp(5rem, 24vw, 8rem); line-height: .95; padding: 0 .1em; font-variant-numeric: lining-nums; }
.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.timeline li {
  display: grid; grid-template-columns: minmax(5.5rem, auto) 1fr; gap: 6px 18px; align-items: baseline;
  padding: 18px 4px; border-bottom: 1px solid var(--line-soft);
}
.timeline li:first-child { border-top: 1px solid var(--line-soft); }
.timeline__time { font-size: 1.45rem; font-weight: 500; color: var(--gold-deep); font-variant-numeric: lining-nums; }
.timeline__name { font-family: var(--f-sans); font-size: .74rem; font-weight: 500; letter-spacing: .2em; text-transform: uppercase; }
.timeline__place { grid-column: 2; margin-top: -2px; color: var(--mocha); }
.info-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); }
.info { display: flex; flex-direction: column; gap: 6px; text-align: center; align-items: center; }
.info__value { font-size: 1.3rem; font-weight: 500; }
.info--wide { grid-column: 1 / -1; }
.info__sub { margin-top: 8px; font-family: var(--f-script); font-size: 1.6rem; line-height: 1.1; color: var(--gold-deep); }
.swatches { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 10px; width: 100%; max-width: 22rem; margin-top: 6px; }
@media (min-width: 520px) { .swatches { grid-template-columns: repeat(6, minmax(0, 1fr)); max-width: 30rem; } }
.swatch { display: flex; flex-direction: column; align-items: center; gap: 6px; font-family: var(--f-sans); font-size: .54rem; letter-spacing: .14em; text-transform: uppercase; color: var(--mocha); }
.swatch i { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); box-shadow: inset 0 0 0 3px rgba(255, 255, 255, .45); }

/* ---------- venue ---------- */
.venues { display: grid; gap: 22px; max-width: 46rem; margin: 0 auto; }
.venue { display: grid; gap: 16px; text-align: center; justify-items: center; }
.venue__address { margin: 0; font-size: 1.2rem; white-space: pre-line; }
.map-frame { position: relative; width: 100%; max-width: 100%; aspect-ratio: 4 / 3; border: 1px solid var(--line); border-radius: 4px; overflow: hidden; background: var(--cream); }
@media (min-width: 700px) { .map-frame { aspect-ratio: 16 / 9; } }
.map-frame iframe {
  position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block;
  filter: sepia(.28) saturate(.85) contrast(.96);
  opacity: 0; transition: opacity .8s var(--ease);
}
.map-frame iframe.is-loaded { opacity: 1; }
.map-card {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  padding: 16px; text-align: center; text-decoration: none; color: var(--ink);
  background:
    linear-gradient(118deg, transparent 0 44%, rgba(255, 253, 249, .85) 44% 46.5%, transparent 46.5%),
    linear-gradient(28deg, transparent 0 63%, rgba(255, 253, 249, .75) 63% 65%, transparent 65%),
    linear-gradient(164deg, transparent 0 28%, rgba(255, 253, 249, .65) 28% 29.5%, transparent 29.5%),
    repeating-linear-gradient(0deg, rgba(140, 109, 61, .07) 0 1px, transparent 1px 26px),
    repeating-linear-gradient(90deg, rgba(140, 109, 61, .07) 0 1px, transparent 1px 26px),
    radial-gradient(circle at 50% 42%, #F8F1E4 0%, var(--champagne) 100%);
}
.map-card__pin { position: relative; width: 46px; height: 46px; color: var(--gold-deep); filter: drop-shadow(0 6px 6px rgba(69, 55, 43, .25)); animation: pinBob 2.6s ease-in-out infinite; }
.map-card__pin svg { width: 100%; height: 100%; }
.map-card__name { margin-top: 6px; font-size: 1.35rem; font-weight: 600; line-height: 1.2; }
.map-card__city { font-family: var(--f-sans); font-size: .62rem; font-weight: 500; letter-spacing: .26em; text-transform: uppercase; color: var(--mocha); }
.map-card__cta {
  margin-top: 10px; padding: .5rem 1rem; border-radius: 999px;
  background: rgba(255, 253, 249, .9); border: 1px solid var(--gold-soft);
  font-family: var(--f-sans); font-size: .62rem; font-weight: 500; letter-spacing: .18em; text-transform: uppercase; color: var(--gold-deep);
  transition: background-color .3s;
}
.map-card:hover .map-card__cta { background: var(--paper); }
@keyframes pinBob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }

/* ---------- rsvp ---------- */
.rsvp { max-width: 44rem; margin: 0 auto; display: grid; gap: 24px; text-align: center; justify-items: center; }
.rsvp__by { display: grid; gap: 4px; }
.rsvp__date { font-size: clamp(1.6rem, 6vw, 2.1rem); font-weight: 500; color: var(--gold-deep); }
.form-frame { width: 100%; border: 1px solid var(--line); border-radius: 4px; overflow: hidden; background: #fff; box-shadow: var(--shadow-sm); }
.form-frame iframe { display: block; width: 100%; height: 1150px; border: 0; }
.fine { font-size: .98rem; color: var(--mocha); margin: 0; max-width: 32rem; }

/* ---------- dress code ---------- */
.dress { max-width: 36rem; margin: 0 auto; display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; padding-block: clamp(34px, 7vw, 54px); }
.dress__code { margin: 0; font-size: clamp(1.7rem, 6.5vw, 2.3rem); font-weight: 500; line-height: 1.2; }
.dress .prose { margin: 0; }
.dress .swatches { margin-top: 10px; }
.dress .swatch i { width: 46px; height: 46px; }

/* ---------- registry & contact ---------- */
.grid-cards { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr)); max-width: 54rem; margin: 0 auto; }
.grid-cards > * { min-width: 0; }
.registry-intro { max-width: 34rem; margin: 0 auto clamp(26px, 5vw, 40px); text-align: center; }
.registry-item { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.registry-item p { margin: 0; }
.registry-details { max-width: 34rem; margin: 22px auto 0; text-align: center; white-space: pre-line; }
.contact { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.contact__line {
  display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: center;
  font-size: 1.15rem; user-select: all; -webkit-user-select: all; overflow-wrap: anywhere;
}
.copy-btn {
  display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid var(--line); background: transparent; cursor: pointer; color: var(--gold-deep);
  user-select: none; -webkit-user-select: none;
}
.copy-btn svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }

/* =====================================================================
   5. LIGHTBOX & TOAST
   ===================================================================== */
.toast {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); z-index: 95;
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  background: var(--ink); color: var(--ivory);
  font-family: var(--f-sans); font-size: .7rem; letter-spacing: .18em; text-transform: uppercase;
  padding: .75rem 1.3rem; border-radius: 999px; box-shadow: var(--shadow);
  transition: opacity .3s, transform .3s var(--ease);
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; animation-delay: 0s !important; transition-duration: .15s !important; transition-delay: 0s !important; }
}


/* ---------------- personal invite gate & RSVP reply ---------------- */
.gate { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 24px var(--gutter-r) 24px var(--gutter-l); background: var(--ivory); }
.gate__card { max-width: 24rem; text-align: center; display: grid; gap: 1rem; justify-items: center; }
.gate__title { margin: 0; font-family: var(--f-serif); font-weight: 400; font-size: clamp(1.6rem, 6vw, 2.1rem); color: var(--ink); }
.gate__text { margin: 0; color: var(--mocha); font-style: italic; }
.rsvp-reply { display: grid; gap: .9rem; justify-items: center; text-align: center; margin: 1.4rem 0; padding: 1.4rem 1rem; border: 1px solid var(--line-soft); border-radius: 16px; background: var(--paper); }
.rsvp-reply__who { margin: 0; font-family: var(--f-script); font-size: 1.8rem; color: var(--gold-deep); }
.rsvp-reply__done { margin: 0; color: var(--mocha); font-style: italic; }
.rsvp-reply__count { display: grid; gap: .3rem; font-family: var(--f-sans); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--mocha); }
.rsvp-reply__count select { font: inherit; letter-spacing: 0; text-transform: none; font-size: 1rem; padding: .55rem .8rem; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); }
.rsvp-reply .actions { display: flex; flex-wrap: wrap; gap: .7rem; justify-content: center; }
.rsvp-reply .btn[disabled] { opacity: .55; pointer-events: none; }
.rsvp-reply__msg { margin: 0; }
