/* Housewarming invitation: "The Bowl and the Door" */
:root {
  --dusk: #14152B;
  --ink: #1E1B2E;
  --ridge: #2A2C4A;
  --lamp: #F4B860;
  --ember: #E07A3F;
  --brass: #C9A15B;
  --cream: #F7EEDD;
  --smoke: #A8A3B8;
  --sage: #9DB89A;
  --unlit: #3A3650;
  --hand: "Caveat", "Segoe Print", "Bradley Hand", "Comic Sans MS", cursive;
  --paper: #F6ECD8;
  --paper-ink: #2B2340;
  --serif: "Fraunces", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --gutter: 16px;
  --ease: cubic-bezier(.37, 0, .63, 1); /* sine.inOut */
  --out: cubic-bezier(.22, .61, .36, 1);
  color-scheme: dark;
}
:root:not([data-theme="light"]) { color-scheme: dark; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; background: var(--dusk); }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--dusk);
  color: var(--cream);
  font: 400 16.5px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}
body.locked { overflow: hidden; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--lamp); text-underline-offset: 3px; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; touch-action: manipulation; }
:focus-visible { outline: 2px solid var(--lamp); outline-offset: 3px; border-radius: 6px; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
[hidden] { display: none !important; }

/* ---------- Backdrop ---------- */
/* The Thimphu valley at dusk: sky gradient with an ember horizon, far/mid
   pine ridges (SVG, scene.js), drifting mist; stars, city lights and the near
   ridge are on the #scene canvas. Ridge heights are fractions of the height,
   so the gradient stops below line up with them. */
.sky {
  position: fixed; left: 0; top: 0; width: 100%; z-index: 0; pointer-events: none; overflow: hidden;
  height: 100vh; height: 100lvh;
  background:
    radial-gradient(70% 22% at 50% 63%, rgba(232, 120, 62, .55), transparent 70%),
    radial-gradient(120% 40% at 50% 64%, rgba(170, 74, 82, .35), transparent 70%),
    linear-gradient(180deg, #07081a 0%, #0e1030 22%, #1a1a44 40%, #33285a 52%, #6b3a5c 59%, #b45a45 64%, #d9834a 66.5%, #5a3050 70%, #1c1832 80%, #0c0b1a 100%);
}
.sky-warm {
  position: absolute; inset: 0; opacity: 0;
  background: radial-gradient(80% 45% at 50% 42%, rgba(255, 170, 90, .28), transparent 70%);
  transition: opacity 1.2s var(--ease);
}
body.opening .sky-warm { opacity: 1; }
body.entered .sky-warm { opacity: .35; }
body.receded .sky-warm { opacity: 0; }
.sky .vl { position: absolute; left: 0; top: 0; width: 100%; height: 100%; display: block; }
.sky .mist {
  position: absolute; left: -50%; width: 200%; top: 64%; height: 14.2%; opacity: .55;
  background:
    radial-gradient(30% 50% at 20% 50%, rgba(150, 120, 170, .35), transparent 70%),
    radial-gradient(25% 40% at 55% 60%, rgba(190, 130, 150, .30), transparent 70%),
    radial-gradient(30% 45% at 85% 45%, rgba(150, 120, 170, .32), transparent 70%);
  animation: drift 38s linear infinite alternate;
}
@keyframes drift { to { transform: translateX(18%); } }
.scene {
  position: fixed; left: 0; top: 0; z-index: 1; pointer-events: none;
  width: 100%; height: 100vh; height: 100lvh;
}
/* Scrim: dims the valley behind the page so body text keeps AA contrast.
   Darkest across the ember horizon (the brightest band of the sky). */
.scrim {
  position: fixed; left: 0; top: 0; width: 100%; z-index: 0; pointer-events: none;
  height: 100vh; height: 100lvh; opacity: 0;
  background: linear-gradient(180deg, rgba(10, 9, 24, .5) 0%, rgba(10, 9, 24, .58) 40%, rgba(10, 9, 24, .74) 58%, rgba(10, 9, 24, .76) 70%, rgba(10, 9, 24, .6) 100%);
  transition: opacity 1.4s var(--ease);
}
body.entered .scrim { opacity: 1; }
body.receded .scrim { opacity: 1; background-color: rgba(10, 9, 24, .12); }
/* The zoom through the window also flies the camera into the valley. */
body.locked .sky, body.locked .scene { will-change: transform; }
body.zooming .sky, body.zooming .scene {
  transform-origin: var(--zx, 50%) var(--zy, 42%);
  transform: scale(3.4);
  transition: transform 1.25s cubic-bezier(.6, 0, .85, .35);
}
body.zooming.quick .sky, body.zooming.quick .scene { transition-duration: .8s; }

/* ---------- Sound button ---------- */
.sound-btn {
  position: fixed; z-index: 30;
  top: calc(env(safe-area-inset-top, 0px) + 10px); left: calc(env(safe-area-inset-left, 0px) + 10px);
  width: 44px; height: 44px; padding: 0; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(20, 21, 43, .55); border: 1px solid rgba(201, 161, 91, .45);
  color: var(--brass);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  transition: border-color .3s, color .3s, background .3s;
}
.sound-btn .ico { width: 20px; height: 20px; grid-area: 1 / 1; }
.sound-btn .ico-off { display: none; }
.sound-btn[aria-pressed="false"] .ico-on { display: none; }
.sound-btn[aria-pressed="false"] .ico-off { display: block; }
.sound-btn[aria-pressed="false"] { color: var(--smoke); border-color: rgba(168, 163, 184, .35); }
.sound-ring { position: absolute; inset: -1px; border-radius: 50%; border: 1px solid var(--lamp); opacity: 0; }
body.playing .sound-btn[aria-pressed="true"] .sound-ring { animation: breathe 4.2s var(--ease) infinite; }
.sound-label {
  position: absolute; left: 52px; top: 50%; transform: translateY(-50%);
  white-space: nowrap; font-size: 13px; color: var(--smoke); pointer-events: none;
  transition: opacity .4s;
}
body.entered .sound-label { opacity: 0; }
@keyframes breathe { 0%, 100% { opacity: 0; transform: scale(1); } 50% { opacity: .55; transform: scale(1.18); } }

/* ---------- Threshold ---------- */
.threshold {
  position: fixed; inset: 0; z-index: 20; overflow: hidden;
  height: 100vh; height: 100dvh;
  display: flex; align-items: stretch; justify-content: center;
  padding: calc(env(safe-area-inset-top, 0px) + 60px) var(--gutter) calc(env(safe-area-inset-bottom, 0px) + 28px);
  text-align: center;
  transition: opacity .9s var(--ease);
}
.threshold[data-state="ready"] { cursor: pointer; }
.threshold.leaving { opacity: 0; pointer-events: none; }
.skip-intro {
  position: absolute; top: calc(env(safe-area-inset-top, 0px) + 10px); right: calc(env(safe-area-inset-right, 0px) + 10px);
  min-height: 44px; padding: 0 14px; background: none; border: 0;
  color: var(--smoke); font-size: 14px; text-decoration: underline; text-underline-offset: 4px;
  text-decoration-color: rgba(168, 163, 184, .4);
}
.threshold[data-state="notfound"] .skip-intro,
.threshold[data-state="error"] .skip-intro { display: none; }
.threshold-inner { position: relative; display: flex; flex-direction: column; align-items: center; width: 100%; max-width: 440px; }
/* name + date high, window above the horizon, the prompt low */
.threshold-inner::before { content: ""; flex: 0 1 clamp(0px, 3.5vh, 44px); }
.th-name {
  margin: 0 0 4px; min-height: 1.15em;
  font: 400 clamp(40px, 13vw, 64px)/1.1 var(--serif); font-style: italic;
  font-variation-settings: "opsz" 144, "SOFT" 100;
  color: var(--lamp); overflow-wrap: anywhere;
  text-shadow: 0 0 24px rgba(244, 184, 96, .35);
  opacity: 0; transform: translateY(8px);
  transition: opacity 1.2s var(--out), transform 1.2s var(--out);
}
.th-name.in { opacity: 1; transform: none; }
.th-when {
  margin: 6px 0 0; min-height: 1.5em; max-width: 34em;
  font-size: 12.5px; line-height: 1.6; letter-spacing: .14em; text-transform: uppercase; color: #d6cee2;
  text-wrap: balance;
  opacity: 0; transform: translateY(6px);
  transition: opacity 1.2s var(--out) .25s, transform 1.2s var(--out) .25s;
}
.th-when .dot { color: var(--brass); margin: 0 .2em; }
.th-when .when-row { display: block; }
.th-when .when-row + .when-row { color: var(--smoke); }
.th-when .wseg, .when-chip .wseg { white-space: nowrap; }
@media (max-width: 360px) { .th-when { font-size: 11.5px; letter-spacing: .1em; } }
.th-when.in { opacity: .92; transform: none; }
.threshold[data-state="notfound"] .th-when, .threshold[data-state="error"] .th-when { display: none; }

/* The carved window. Everything is sized from --ww (window width); the
   window is 300 x 340 in its own drawing units. */
.portal {
  --ww: min(68vw, 40vh, 330px);
  position: relative; flex: none;
  width: var(--ww); height: calc(var(--ww) * 1.1333);
  margin: calc(var(--ww) * .17) 0 calc(var(--ww) * .19);
}
@supports (height: 1dvh) { .portal { --ww: min(68vw, 40dvh, 330px); } }
.cam {
  position: absolute; inset: 0;
  transform-origin: 50% 41%;
  transition: transform 1.25s cubic-bezier(.6, 0, .85, .35);
  will-change: transform;
}
.threshold.zoom .cam { transform: scale(3.4); }
.threshold.quick .cam { transition-duration: .8s; }

.stone {
  position: absolute; left: -12%; top: -11%; width: 124%; height: 123%; opacity: .9;
  -webkit-mask-image: radial-gradient(closest-side, #000 74%, transparent 100%);
  mask-image: radial-gradient(closest-side, #000 74%, transparent 100%);
}
.stone svg { display: block; width: 100%; height: 100%; }
.stone::before, .stone::after { content: ""; position: absolute; inset: 0; transition: opacity 1s var(--ease); }
.stone::before { background: radial-gradient(50% 45% at 50% 48%, rgba(10, 10, 25, 0), rgba(10, 10, 25, .35)); }
.stone::after { background: radial-gradient(50% 45% at 50% 48%, rgba(255, 170, 90, .38), rgba(40, 20, 20, .15)); opacity: 0; }
.threshold.open .stone::before { opacity: 0; }
.threshold.open .stone::after { opacity: 1; }

.halo {
  position: absolute; left: 50%; top: 47%; width: 196%; height: 0; padding-top: 196%;
  margin: -98% 0 0 -98%; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255, 190, 110, .42), rgba(244, 150, 80, .16) 45%, transparent 72%);
  opacity: .25; transform: scale(.55);
  transition: opacity 1s ease, transform 1.4s cubic-bezier(.2, .7, .2, 1);
  animation: halo-breathe 5s ease-in-out infinite;
}
@keyframes halo-breathe { 50% { opacity: .36; } }
.threshold.open .halo { animation: none; opacity: 1; transform: scale(1.25); }
.beam {
  position: absolute; left: -46%; top: 88%; width: 192%; height: 126%; opacity: 0;
  background: radial-gradient(42% 90% at 50% 0, rgba(255, 190, 110, .34), rgba(255, 150, 80, .1) 55%, transparent 80%);
  transition: opacity 1s ease .25s;
}
.threshold.open .beam { opacity: 1; }
.win-shadow {
  position: absolute; left: 2%; right: 2%; top: 10%; bottom: -8%;
  background: radial-gradient(closest-side, rgba(0, 0, 0, .6), transparent);
}

.rabsel {
  position: absolute; inset: 0; display: block; width: 100%; height: 100%;
  padding: 0; margin: 0; border: 0; border-radius: 0; background: none;
}
.rabsel:disabled { cursor: progress; }
.threshold[data-state="ready"] .rabsel { cursor: pointer; }
.rabsel > span { position: absolute; display: block; }
.rabsel .frame, .rabsel .glass { inset: 0; }
.rabsel .frame svg, .rabsel .glass svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.rabsel .frame-lit { opacity: 0; transition: opacity 1s ease .15s; }
.threshold.open .frame-lit { opacity: 1; }
.rabsel .glass .pane { opacity: .93; transition: opacity .8s ease .15s; }
.threshold.open .glass .pane { opacity: .5; }

/* The room. Spans all three bays; seen dimly through the side glass, and
   directly (no glass, no glazing bars) through the centre once the shutters open. */
.interior {
  left: 7.33%; top: 14.7%; width: 85.34%; height: 54.4%; overflow: hidden;
  background: radial-gradient(60% 70% at 50% 40%, #ffd9a0, #f4a85a 40%, #b8542a 80%, #5a2216);
  opacity: .16; transition: opacity .7s ease .1s;
}
.threshold.open .interior { opacity: 1; }
.interior .bk {
  position: absolute; display: block; height: 0; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255, 240, 200, .95), rgba(255, 200, 120, .35) 60%, transparent);
  animation: bk-float 6s ease-in-out infinite alternate;
}
@keyframes bk-float { to { transform: translateY(-6px); } }
.interior .string { position: absolute; left: 0; top: 0; width: 100%; height: 100%; }
.interior .people { position: absolute; left: 0; bottom: 0; width: 100%; height: 62%; }
/* depth of the open centre bay: the wall's thickness shading the opening's edges */
.jamb {
  left: 36.67%; width: 26.67%; top: 13.5%; height: 55.3%; opacity: 0;
  box-shadow: inset 7px 0 9px -3px rgba(60, 22, 8, .75), inset -7px 0 9px -3px rgba(60, 22, 8, .75), inset 0 9px 10px -4px rgba(60, 22, 8, .7);
  transition: opacity .7s ease .2s;
}
.threshold.open .jamb { opacity: 1; }
/* lamplight spilling over the sill below the open centre */
.spill {
  left: 26%; width: 48%; top: 66%; height: 16%; opacity: 0;
  background: radial-gradient(50% 60% at 50% 20%, rgba(255, 200, 120, .45), transparent 75%);
  transition: opacity .9s ease .3s;
}
.threshold.open .spill { opacity: 1; }

.shutter {
  top: 15.3%; height: 52.9%; width: 13.4%;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, .25), transparent 25%, transparent 75%, rgba(0, 0, 0, .3)),
    repeating-linear-gradient(90deg, rgba(255, 220, 160, .05) 0 1px, transparent 1px 3px),
    linear-gradient(180deg, #a06a34, #7d4f24 60%, #5e391a);
  box-shadow: inset 0 0 0 2px #3b2210, inset 0 0 0 4px #b98149;
  transition: transform 1.15s cubic-bezier(.5, 0, .2, 1) .12s;
}
.shutter::before, .shutter::after {
  content: ""; position: absolute; left: 18%; right: 18%; border-radius: 2px;
  background: linear-gradient(180deg, #6d4320, #8e5a2a);
  box-shadow: inset 1px 1px 0 rgba(0, 0, 0, .45), inset -1px -1px 0 rgba(255, 210, 150, .25);
}
.shutter::before { top: 9%; height: 38%; }
.shutter::after { bottom: 9%; height: 38%; }
.shutter i {
  position: absolute; top: 50%; width: calc(var(--ww) * .034); height: calc(var(--ww) * .034);
  margin-top: calc(var(--ww) * -.017); transform: rotate(45deg); z-index: 1;
  background: linear-gradient(135deg, #e9bd7c, #8a5a2a); box-shadow: 0 0 0 2px #4a2a12;
}
.shutter.l i { right: 3px; }
.shutter.r i { left: 3px; }
/* unlit wood: a shade layer that fades out (no animated filter) */
.shutter b { position: absolute; inset: 0; z-index: 2; background: #000; opacity: .4; transition: opacity 1s ease .15s; }
.threshold.open .shutter b { opacity: .05; }
.shutter.l { left: 36.7%; transform-origin: 0 50%; transform: perspective(500px) rotateY(0); }
.shutter.r { left: 50.1%; transform-origin: 100% 50%; transform: perspective(500px) rotateY(0); }
.threshold.open .shutter.l { transform: perspective(500px) rotateY(-112deg); }
.threshold.open .shutter.r { transform: perspective(500px) rotateY(112deg); }
.threshold.quick .shutter { transition-duration: .7s; transition-delay: 0s; }
.crack {
  left: 49.7%; top: 16%; width: .9%; height: 51%;
  background: linear-gradient(180deg, transparent, #ffcf8a 20%, #ffb062 80%, transparent);
  box-shadow: 0 0 8px 2px rgba(255, 170, 90, .6);
  animation: crack-flick 3.2s ease-in-out infinite;
}
@keyframes crack-flick { 0%, 100% { opacity: .85; } 40% { opacity: .6; } 55% { opacity: 1; } }
.threshold.open .crack { opacity: 0; animation: none; transition: opacity .4s; }

/* prompt under the window, low on the screen */
.th-hint {
  margin: auto 0 0; min-height: 1.6em; font-size: 13px; letter-spacing: .3em; text-transform: uppercase;
  color: var(--smoke); transition: opacity .5s;
  text-shadow: 0 0 10px rgba(7, 7, 15, .95), 0 0 22px rgba(7, 7, 15, .8);
}
.th-hint::before {
  content: ""; display: block; width: 1px; height: 24px; margin: 0 auto 10px;
  background: linear-gradient(transparent, var(--lamp)); opacity: 0; transition: opacity .6s;
}
.threshold[data-state="ready"] .th-hint { color: var(--cream); animation: hint-pulse 2.6s ease-in-out infinite; }
.threshold[data-state="ready"] .th-hint::before { opacity: 1; }
@keyframes hint-pulse { 50% { opacity: .55; } }

.threshold.open .th-hint { opacity: 0; animation: none; transition-duration: .3s; }
.threshold.open .th-name, .threshold.open .th-when { opacity: 0; transition: opacity .6s ease .6s; }
.threshold.quick.open .th-name, .threshold.quick.open .th-when { transition-delay: .2s; }

/* warm flood: the screen fills with lamplight, then fades into the page */
.th-flood {
  position: absolute; inset: 0; z-index: 5; pointer-events: none; opacity: 0;
  background: radial-gradient(60% 45% at 50% 42%, #fff1d6, #ffc879 45%, #f09a54);
  transition: opacity .55s ease;
}
.threshold.flood .th-flood { opacity: 1; }
.threshold.quick .th-flood { transition-duration: .4s; }

.th-message { max-width: 340px; margin-top: 14px; }
.th-message p { font: 400 21px/1.45 var(--serif); font-variation-settings: "opsz" 40, "SOFT" 100; margin: 0 0 18px; }
.threshold[data-state="notfound"] .portal,
.threshold[data-state="error"] .portal { opacity: .45; }
.threshold[data-state="notfound"] .rabsel,
.threshold[data-state="error"] .rabsel { pointer-events: none; }
.threshold[data-state="notfound"] .th-hint,
.threshold[data-state="error"] .th-hint { display: none; }

/* ---------- Page ---------- */
.page {
  position: relative; z-index: 2;
  max-width: 640px; margin: 0 auto;
  padding: 0 max(var(--gutter), env(safe-area-inset-left, 0px)) calc(env(safe-area-inset-bottom, 0px) + 40px) max(var(--gutter), env(safe-area-inset-right, 0px));
  visibility: hidden;
}
body.entered .page { visibility: visible; }
html:not(.js) .page, html:not(.js) .threshold, html:not(.js) .sound-btn { display: none; }
.page:focus { outline: none; }
.sec { padding: 56px 0; }
.eyebrow {
  margin: 0 0 10px; font-size: 13px; letter-spacing: .16em; text-transform: uppercase;
  color: var(--brass); font-weight: 500;
}
.sec-h, h1, h2, h3 {
  font-family: var(--serif); font-weight: 350;
  font-variation-settings: "opsz" 96, "SOFT" 100;
  line-height: 1.15; margin: 0 0 18px; color: var(--cream); overflow-wrap: anywhere;
}
.sec-h { font-size: clamp(28px, 7.6vw, 40px); }
legend.sec-h { padding: 0; }
.name { font-style: italic; font-weight: 400; color: var(--lamp); overflow-wrap: anywhere; }
p { margin: 0 0 14px; }
.muted { color: var(--smoke); font-size: 15px; }

/* Greeting */
.greeting {
  /* shorter than the screen on purpose: the next section peeks in, so it never looks like the end */
  min-height: calc(100vh - 120px); min-height: calc(100svh - 120px);
  display: flex; flex-direction: column; justify-content: center;
  padding-top: 88px; padding-bottom: 40px;
}
.greet-h { font-size: clamp(40px, 11vw, 64px); margin-bottom: 26px; font-weight: 300; font-variation-settings: "opsz" 144, "SOFT" 100; }
.greet-h:focus { outline: none; }
.greet-body p { font: 300 clamp(19px, 5.2vw, 23px)/1.5 var(--serif); font-variation-settings: "opsz" 30, "SOFT" 100; margin-bottom: 16px; }
.hosts { margin-top: 22px; color: var(--smoke); font-size: 15px; letter-spacing: .04em; }
.hosts .amp { font-family: var(--serif); font-style: italic; color: var(--brass); }
.line { display: inline-block; }
.greet-body .line, .hosts.line, .when-line.line { display: block; }
.js .greeting .line { opacity: 0; transform: translateY(10px); transition: opacity 1s var(--out), transform 1s var(--out); }
.js .greeting .line.awake { opacity: 1; transform: none; }

/* Reveal on scroll */
.js .reveal { opacity: 0; transform: translateY(12px); transition: opacity 1.1s var(--out), transform 1.1s var(--out); }
.js .reveal.in { opacity: 1; transform: none; }

/* Timeline: "the evening". Three equal steps on a thin line of light. */
.timeline { list-style: none; margin: 10px 0 0; padding: 0 0 0 28px; position: relative; }
.timeline::before {
  content: ""; position: absolute; left: 5px; top: 12px; bottom: 14px; width: 2px; border-radius: 2px;
  background: linear-gradient(180deg, rgba(244, 184, 96, .75), rgba(224, 122, 63, .55) 50%, rgba(244, 184, 96, .6));
}
.timeline li { position: relative; padding: 0 0 30px; }
.timeline li:last-child { padding-bottom: 0; }
.timeline > li::before {
  content: ""; position: absolute; left: -27px; top: 6px; width: 10px; height: 10px; border-radius: 50%;
  background: var(--lamp); box-shadow: 0 0 0 3px rgba(20, 21, 43, .9), 0 0 10px 2px rgba(244, 184, 96, .4);
}
.tl-when { display: block; font: 500 13px/1.3 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--lamp); margin-bottom: 4px; }
.tl-title { font-size: clamp(23px, 6.2vw, 28px); margin: 0 0 6px; }
.tl-what { display: block; margin: 0; color: rgba(247, 238, 221, .88); }
/* "drinks, snacks, music, good people": a quiet inline row, not buttons */
.perks {
  list-style: none; margin: 12px 0 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: 6px 18px;
  font-size: 15px; color: var(--cream);
}
.timeline .perks li { display: inline-flex; align-items: center; gap: 6px; padding: 0; white-space: nowrap; }
.perk-ico { width: 22px; height: 22px; flex: none; color: var(--lamp); }
.fed-note {
  display: flex; gap: 12px; align-items: flex-start; margin: 30px 0 0; padding: 14px 16px; border-radius: 14px;
  background: rgba(247, 238, 221, .045); border: 1px solid rgba(201, 161, 91, .18);
}
.fed-note p { margin: 0; font-size: 15.5px; color: rgba(247, 238, 221, .85); }
.fed-note strong { color: var(--cream); font-weight: 500; }
.fed-ico { width: 24px; height: 24px; flex: none; color: var(--brass); margin-top: 1px; }

/* Lights row */
.lights-wrap { margin: 22px 0 8px; }
.lights { display: grid; grid-template-columns: repeat(10, 1fr); gap: 10px 0; justify-items: center; max-width: 420px; }
.light {
  position: relative; width: 16px; height: 16px; border-radius: 50%;
  background: var(--unlit); box-shadow: inset 0 0 0 1px rgba(168, 163, 184, .4);
  transition: background .5s, box-shadow .5s, transform .5s cubic-bezier(.2, .9, .3, 1.4);
  display: grid; place-items: center;
  font: 500 9px/1 var(--sans); color: var(--dusk);
}
.light.taken {
  background: rgba(244, 184, 96, .7);
  box-shadow: 0 0 10px 1px rgba(244, 184, 96, .35);
  animation: flicker 5s var(--ease) infinite;
}
.light.mine {
  background: var(--lamp); transform: scale(1.18);
  box-shadow: 0 0 0 2px rgba(247, 238, 221, .6), 0 0 16px 4px rgba(244, 184, 96, .6);
  animation: none;
}
@keyframes flicker { 0%, 100% { opacity: 1; } 50% { opacity: .9; } }
.lights-cap { margin: 12px 0 0; color: var(--smoke); font-size: 15px; }
@media (min-width: 560px) { .lights { grid-template-columns: repeat(20, 1fr); max-width: none; } }

/* Find us */
.entrance-text { font-size: 17px; }
.photo { margin: 22px 0 20px; }
.photo-frame { position: relative; border-radius: 14px; overflow: hidden; background: var(--ridge); aspect-ratio: 1400 / 764; box-shadow: 0 10px 40px rgba(0, 0, 0, .35); }
.photo-frame img { width: 100%; height: 100%; object-fit: cover; }
.marker { position: absolute; width: 0; height: 0; }
.marker-dot {
  position: absolute; left: -8px; top: -8px; width: 16px; height: 16px; border-radius: 50%;
  background: var(--lamp); box-shadow: 0 0 0 3px rgba(20, 21, 43, .55), 0 0 18px 6px rgba(244, 184, 96, .75);
}
.marker-dot::after {
  content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid var(--lamp);
  animation: ping 2.2s var(--out) infinite;
}
@keyframes ping { 0% { transform: scale(.6); opacity: .9; } 100% { transform: scale(3); opacity: 0; } }
.marker-label {
  position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%);
  white-space: nowrap; padding: 4px 10px; border-radius: 999px;
  background: rgba(20, 21, 43, .82); color: var(--lamp); font-size: 13px; font-weight: 500;
  border: 1px solid rgba(244, 184, 96, .5);
}
.photo figcaption { margin-top: 10px; font-size: 14px; color: var(--smoke); }
.maps-row { margin: 4px 0 22px; }
.parking { margin-bottom: 18px; }
.parking h3 { font-size: 22px; margin-bottom: 6px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px; border-radius: 999px;
  font-weight: 500; font-size: 16px; text-decoration: none; border: 0;
  transition: background .12s, transform .12s, box-shadow .3s;
}
.btn svg { width: 19px; height: 19px; flex: none; }
.btn-lamp { background: var(--lamp); color: var(--dusk); box-shadow: 0 6px 24px rgba(244, 184, 96, .22); }
.btn-lamp:active { background: var(--ember); transform: scale(.98); }
.btn-ghost { background: transparent; color: var(--cream); box-shadow: inset 0 0 0 1px rgba(201, 161, 91, .55); }
.btn-ghost:active { background: rgba(244, 184, 96, .1); }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .6; cursor: progress; }
@media (hover: hover) {
  .btn-lamp:hover { background: #F7C67A; }
  .btn-ghost:hover { box-shadow: inset 0 0 0 1px var(--lamp); }
}

/* RSVP card */
.card {
  position: relative;
  background: linear-gradient(180deg, rgba(42, 44, 74, .55), rgba(30, 27, 46, .75));
  border: 1px solid rgba(201, 161, 91, .25);
  border-radius: 22px; padding: 26px 20px 24px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .35), inset 0 1px 0 rgba(247, 238, 221, .05);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
}
@media (min-width: 480px) { .card { padding: 34px 32px 30px; } }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.step { margin-bottom: 26px; }
.step:last-child { margin-bottom: 0; }
.q { font: 400 22px/1.3 var(--serif); font-variation-settings: "opsz" 40, "SOFT" 100; padding: 0; margin-bottom: 12px; }
.pills { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pill, .seg-btn {
  min-height: 52px; padding: 8px 12px; border-radius: 999px;
  background: rgba(20, 21, 43, .5); border: 1px solid rgba(201, 161, 91, .45);
  color: var(--cream); font-weight: 500; font-size: 16px; line-height: 1.2;
  transition: background .25s, border-color .25s, color .25s, box-shadow .25s, transform .12s;
}
.pill:active, .seg-btn:active { transform: scale(.97); }
.pill[aria-pressed="true"], .seg-btn[aria-pressed="true"] {
  background: var(--lamp); color: var(--dusk); border-color: var(--lamp);
  box-shadow: 0 0 22px rgba(244, 184, 96, .35);
}
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.seg-btn { min-height: 48px; }
.field { margin-top: 14px; }
.field label { display: block; font-size: 15px; color: var(--smoke); margin-bottom: 6px; }
.field .opt { color: var(--smoke); opacity: .8; }
.field input {
  width: 100%; min-height: 50px; padding: 10px 14px; border-radius: 12px;
  background: rgba(20, 21, 43, .7); border: 1px solid rgba(168, 163, 184, .35);
  font-size: 17px; /* >=16px: no iOS zoom */
  transition: border-color .2s, box-shadow .2s;
}
.field input:focus { outline: none; border-color: var(--lamp); box-shadow: 0 0 0 3px rgba(244, 184, 96, .25); }
.field input[aria-invalid="true"] { border-color: var(--ember); }
.err { color: #F2A27A; font-size: 14px; margin: 6px 0 0; min-height: 0; }
.err:empty { display: none; }
.form-err { margin: 0 0 12px; }
.echo { margin: 12px 0 0; font: italic 400 18px/1.4 var(--serif); color: var(--lamp); min-height: 0; opacity: 0; transition: opacity .8s; }
.echo.in { opacity: 1; }
.echo:empty { display: none; }
.toggles { display: grid; gap: 10px; margin-top: 16px; }
.switch {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  width: 100%; min-height: 54px; padding: 8px 14px 8px 16px; border-radius: 14px;
  background: rgba(20, 21, 43, .5); border: 1px solid rgba(168, 163, 184, .28);
  text-align: left; font-size: 16px;
  transition: border-color .25s, background .25s, opacity .25s;
}
.switch .who { overflow-wrap: anywhere; min-width: 0; }
.switch .track {
  position: relative; flex: none; width: 48px; height: 28px; border-radius: 999px;
  background: var(--unlit); box-shadow: inset 0 0 0 1px rgba(168, 163, 184, .4);
  transition: background .25s;
}
.switch .track::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%;
  background: var(--smoke); transition: transform .25s var(--out), background .25s;
}
.switch[aria-checked="true"] { border-color: rgba(244, 184, 96, .6); background: rgba(244, 184, 96, .08); }
.switch[aria-checked="true"] .track { background: rgba(244, 184, 96, .35); }
.switch[aria-checked="true"] .track::after { transform: translateX(20px); background: var(--lamp); box-shadow: 0 0 10px rgba(244, 184, 96, .8); }
.switch:disabled { opacity: .45; cursor: not-allowed; }
.note-line { margin: 12px 0 0; color: var(--smoke); font-size: 15px; }
.note-line:empty { display: none; }
.full-note p { margin: 0 0 8px; }
.full-note .full-h { font: italic 400 20px/1.3 var(--serif); color: var(--lamp); }

/* Summary */
.summary { text-align: left; }
.tick {
  display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; margin-bottom: 14px;
  color: var(--sage); box-shadow: inset 0 0 0 1.5px var(--sage), 0 0 22px rgba(157, 184, 154, .25);
}
.tick svg { width: 24px; height: 24px; }
.summary.declined .tick { color: var(--smoke); box-shadow: inset 0 0 0 1.5px rgba(168, 163, 184, .6); }
.summary h2:focus { outline: none; }
.summary-list { list-style: none; margin: 0 0 20px; padding: 0; }
.summary-list li { padding: 10px 0; border-top: 1px solid rgba(201, 161, 91, .18); }
.summary-list li:first-child { border-top: 0; padding-top: 0; }
.summary-list .k { display: block; font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--brass); margin-bottom: 2px; }
.summary-list .ok { color: var(--sage); }
.cal { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 18px; }
.change-note { margin: 0; }
.card.settling { animation: settle 1s var(--out); }
@keyframes settle { 0% { opacity: .35; transform: scale(.985); } 100% { opacity: 1; transform: none; } }

/* Closing + end */
.closing-text p { font: 300 clamp(19px, 5.2vw, 22px)/1.55 var(--serif); font-variation-settings: "opsz" 30, "SOFT" 100; }
.endstate { padding: 40px 0 90px; text-align: center; }
.end-line {
  font: italic 400 clamp(34px, 9.5vw, 54px)/1.15 var(--serif); font-variation-settings: "opsz" 144, "SOFT" 100;
  color: var(--lamp); text-shadow: 0 0 40px rgba(244, 184, 96, .35); margin: 0; overflow-wrap: anywhere;
}

/* Noscript + demo */
.noscript { position: relative; z-index: 5; max-width: 560px; margin: 0 auto; padding: 80px 16px; }
.demo-bar {
  position: fixed; z-index: 40; right: 8px; bottom: calc(env(safe-area-inset-bottom, 0px) + 8px);
  display: flex; flex-wrap: wrap; gap: 4px; max-width: calc(100vw - 16px); justify-content: flex-end;
  padding: 6px; border-radius: 12px; background: rgba(20, 21, 43, .85); border: 1px solid rgba(201, 161, 91, .35);
  font-size: 12px;
}
.demo-bar span { color: var(--smoke); padding: 4px 6px; }
.demo-bar a { padding: 4px 8px; border-radius: 8px; text-decoration: none; color: var(--cream); background: rgba(58, 54, 80, .8); }
.demo-bar a[aria-current="true"] { background: var(--lamp); color: var(--dusk); }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; }
  .js .reveal, .js .greeting .line, .th-name { transform: none !important; transition: opacity .2s linear !important; }
  .threshold { transition: opacity .4s linear; }
  .sky-warm, .scrim, .light, .switch, .echo { transition-duration: .2s !important; }
  .cam, .threshold .shutter, .threshold .interior, .threshold .frame-lit, .threshold .halo { transition-duration: .2s !important; transition-delay: 0s !important; }
  .sky .mist { animation: none !important; }
}

/* ======================================================================
   Party update: date line, personal note, RSVP extras, scroll hint,
   fairy lights + mood glow. Self-contained; does not touch the intro
   emblem (.rabsel window) or the valley backdrop.
   ====================================================================== */

/* Date · time · place: two small chips that wrap onto two rows on phones */
.when-line { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 20px; padding: 0; }
.when-line:empty { display: none !important; }
.greeting .when-line.line { display: flex; }
.when-chip {
  display: inline-flex; align-items: center; gap: 6px; max-width: 100%;
  padding: 6px 14px; border-radius: 999px;
  font-size: 14.5px; font-weight: 500; letter-spacing: .03em; line-height: 1.35; color: var(--lamp);
  background: rgba(244, 184, 96, .09); border: 1px solid rgba(244, 184, 96, .32);
}
.when-chip.place { color: var(--cream); background: rgba(247, 238, 221, .05); border-color: rgba(247, 238, 221, .2); padding-left: 10px; }
.when-chip svg { width: 15px; height: 15px; flex: none; color: var(--lamp); }
.when-chip .dot { color: var(--brass); margin: 0 .15em; }
@media (max-width: 360px) { .when-chip { font-size: 13.5px; padding: 5px 12px; letter-spacing: .02em; } }

/* Greeting: what's next (details below, RSVP at the end) */
.greet-next { display: block; margin-top: 30px; padding-top: 20px; border-top: 1px solid rgba(201, 161, 91, .22); }
.next-line { margin: 0 0 12px; font-size: 16.5px; color: rgba(247, 238, 221, .92); }
.next-line a { color: var(--lamp); text-decoration-color: rgba(244, 184, 96, .5); text-decoration-thickness: 1px; }
.toc { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 2px 0; font-size: 13px; letter-spacing: .1em; text-transform: uppercase; }
.toc li { display: inline-flex; align-items: center; }
.toc li + li::before { content: "·"; color: var(--brass); margin: 0 .55em; letter-spacing: 0; }
.toc a { display: inline-block; padding: 8px 0; color: var(--smoke); text-decoration: none; }
.toc a:hover { color: var(--cream); }
.toc li:last-child a { color: var(--lamp); }
@media (max-width: 360px) { .toc { font-size: 12px; letter-spacing: .07em; } .toc li + li::before { margin: 0 .4em; } }

/* Personal note card */
.note-sec { padding: 8px 0 40px; }
.note-card {
  position: relative; margin: 0 auto; max-width: 440px; padding: 30px 26px 22px;
  background:
    repeating-linear-gradient(180deg, transparent 0 33px, rgba(43, 35, 64, .07) 33px 34px),
    linear-gradient(170deg, #FBF3E2, var(--paper) 60%, #EEDFC2);
  color: var(--paper-ink); border-radius: 4px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, .4), 0 2px 0 rgba(255, 255, 255, .3) inset;
  transform: rotate(-1.4deg);
}
.note-pin {
  position: absolute; top: -9px; left: 50%; width: 18px; height: 18px; margin-left: -9px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #FFD9A0, var(--ember) 60%, #9C4A1F);
  box-shadow: 0 3px 6px rgba(0, 0, 0, .35);
}
.note-text { margin: 0; font: 500 clamp(24px, 6.6vw, 28px)/1.22 var(--hand); overflow-wrap: anywhere; }
.note-text p { margin: 0 0 8px; }
.note-from { margin: 10px 0 0; text-align: right; font: 500 24px/1.2 var(--hand); color: #7A3F1E; }
.note-from:empty { display: none; }

/* RSVP extras: song + wish (max two visible), "anything else" behind a link */
.extras .field:first-child { margin-top: 0; }
.field label .field-ico { width: 17px; height: 17px; vertical-align: -3px; margin-right: 4px; color: var(--lamp); }
.link-btn {
  display: inline-block; margin: 12px 0 0; padding: 8px 0; min-height: 40px; background: none; border: 0;
  color: var(--lamp); font-size: 15px; text-decoration: underline; text-underline-offset: 4px;
  text-decoration-color: rgba(244, 184, 96, .45);
}

/* Bottom cue: one affordance. "Details & RSVP ⌄" right after the intro, then a
   compact "RSVP" pill (or "Your answer") until the RSVP card is on screen. */
.cue {
  position: fixed; z-index: 25; left: 50%; bottom: calc(env(safe-area-inset-bottom, 0px) + 20px);
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px 0 18px; border-radius: 999px;
  background: rgba(20, 21, 43, .78); border: 1px solid rgba(244, 184, 96, .5); color: var(--lamp);
  font-size: 13px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; text-decoration: none; white-space: nowrap;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  box-shadow: 0 6px 24px rgba(0, 0, 0, .3), 0 0 18px rgba(244, 184, 96, .16);
  opacity: 0; visibility: hidden; transform: translate(-50%, 14px);
  transition: opacity .45s var(--out), transform .45s var(--out), visibility 0s linear .45s,
    background-color .35s, color .35s, border-color .35s;
}
.cue svg { width: 20px; height: 20px; flex: none; }
.cue.show {
  opacity: 1; visibility: visible; transform: translate(-50%, 0);
  transition: opacity .7s var(--out), transform .7s var(--out), visibility 0s,
    background-color .35s, color .35s, border-color .35s;
}
.cue[data-phase="intro"].show svg { animation: nudge 2.4s var(--ease) 1s infinite; }
@keyframes nudge { 0%, 60%, 100% { transform: none; } 30% { transform: translateY(3px); } }
/* compact call to action once the guest is reading */
.cue[data-phase="rsvp"] { background: var(--lamp); color: var(--dusk); border-color: var(--lamp); padding: 0 16px 0 20px; box-shadow: 0 6px 22px rgba(0, 0, 0, .35), 0 0 22px rgba(244, 184, 96, .3); }
.cue[data-phase="answer"] { color: var(--cream); border-color: rgba(201, 161, 91, .45); }
body.demo .cue { bottom: calc(env(safe-area-inset-bottom, 0px) + 84px); }
/* room at the very bottom so the cue never sits on the last line */
.page { padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 84px); }

/* Mood glow: warm amber wash that fades in as the evening section arrives (opacity set by party.js) */
.mood-glow {
  position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: 0;
  height: 100vh; height: 100lvh;
  background:
    radial-gradient(110% 38% at 50% 0%, rgba(244, 184, 96, .16), transparent 70%),
    radial-gradient(90% 55% at 15% 100%, rgba(224, 122, 63, .16), transparent 65%),
    radial-gradient(80% 50% at 90% 85%, rgba(244, 150, 80, .12), transparent 65%);
  will-change: opacity;
  transition: opacity .6s linear;
}

/* Festoon lights: hung across the top of "The evening" (built by party.js).
   In the page flow, full-bleed; they occupy their own band above the eyebrow. */
.festoon {
  position: relative; height: 64px; pointer-events: none;
  width: 100vw; margin: -34px 0 0 calc(50% - 50vw);
}
.festoon svg { position: absolute; left: 0; top: 0; width: 100%; height: 100%; overflow: visible; }
.festoon .wire { fill: none; stroke: #5B4632; stroke-width: 1.4; }
/* HTML bulbs so every change is a compositor-only opacity change (cheap on phones) */
.festoon .bulb { position: absolute; width: 0; height: 0; }
.festoon .bulb i { position: absolute; display: block; border-radius: 50%; }
.festoon .bulb .cap { left: -2.5px; top: 0; width: 5px; height: 5px; border-radius: 1px; background: #6A5640; }
.festoon .bulb .glass { left: -4.5px; top: 4px; width: 9px; height: 12px; border-radius: 50% 50% 48% 48% / 40% 40% 60% 60%; background: #4a4050; box-shadow: inset 0 0 0 1px rgba(168, 163, 184, .25); }
/* the lit layer: glass colour + halo; power-on = this layer's opacity, once */
.festoon .bulb .lit { left: 0; top: 0; width: 0; height: 0; border-radius: 0; opacity: 0; }
.festoon .bulb .filament { left: -4.5px; top: 4px; width: 9px; height: 12px; border-radius: 50% 50% 48% 48% / 40% 40% 60% 60%; background: var(--c, #FFD89A); }
.festoon .bulb .halo {
  left: -18px; top: -8px; width: 36px; height: 36px;
  background: radial-gradient(closest-side, var(--g, rgba(255, 200, 120, .5)), transparent);
  opacity: .9;
  /* always running from build: long, out of phase, shallow, never restarted */
  animation: glimmer var(--d, 9s) ease-in-out var(--dl, 0s) infinite;
}
@keyframes glimmer { 0%, 100% { opacity: .9; } 35% { opacity: .62; } 55% { opacity: 1; } 78% { opacity: .78; } }
.festoon.on .bulb .lit { animation: power-on .9s linear var(--on, 0s) both; }
@keyframes power-on { 0% { opacity: 0; } 18% { opacity: .85; } 30% { opacity: .2; } 48% { opacity: 1; } 100% { opacity: 1; } }
.festoon.on.instant .bulb .lit { animation: none; opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  .cue, .cue.show { transition: opacity .2s linear !important; transform: translate(-50%, 0); }
  .festoon.on .bulb .lit { opacity: 1; }
  .festoon .bulb .halo { opacity: .85; }
  .th-when { transform: none !important; transition: opacity .2s linear !important; }
}

/* demo mode: keep the intro prompt clear of the demo bar */
body.demo .threshold { padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 96px); }

/* jumps (cue, greeting links) land below the sound button */
#rsvp-card { scroll-margin-top: 76px; }
.sec { scroll-margin-top: 12px; }
