/* Wayne Augustine James memorial | wayneajames.com */

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

:root {
  --night: #0B1020;
  --night-2: #121A2F;
  --night-3: #1A2340;
  --gold: #D4AF37;
  --gold-light: #E8CC72;
  --gold-pale: #F6E7B4;
  --gold-deep: #9C7A26;
  --cream: #F3EDE2;
  --cream-2: #FBF8F2;
  --ink: #1D1912;
  --ink-soft: #625843;
  --line-dark: rgba(232, 204, 114, .22);
  --line-light: rgba(156, 122, 38, .28);
  --display: "Cormorant Garamond", "Cormorant", Garamond, "Times New Roman", serif;
  --body: "Figtree", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --container: 1200px;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --foil: linear-gradient(105deg, #9C7A26 0%, #D4AF37 20%, #F6E7B4 34%, #E8CC72 46%, #B8912E 62%, #E8CC72 80%, #9C7A26 100%);
  box-sizing: border-box;
}
*, *::before, *::after { box-sizing: inherit; font-variant-numeric: lining-nums !important; }
:where(h1, h2, h3, h4, p, figure, blockquote, ul, ol, dl, dd) { margin: 0; padding: 0; }
:where(ul, ol) { list-style: none; }
html { scroll-behavior: smooth; scroll-padding-top: calc(72px + env(safe-area-inset-top, 0px)); -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--night); color: var(--cream);
  font-family: var(--body); font-size: 1.0625rem; line-height: 1.65;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  font-variant-numeric: lining-nums;
}
img, iframe { max-width: 100%; display: block; }
a { color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--gold-light); outline-offset: 3px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.container { width: min(var(--container), 100% - var(--gutter) * 2); margin-inline: auto; }

.foil {
  background-image: var(--foil); background-size: 220% 100%; background-position: 0% 50%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.js .foil.shimmer { animation: shimmer 3.2s cubic-bezier(.3,.1,.2,1) .9s 1 both; }
@keyframes shimmer { from { background-position: 100% 50%; } to { background-position: 0% 50%; } }

.flourish { display: block; width: 120px; height: 18px; color: var(--gold); }

/* buttons: pill for every interactive control */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .65rem;
  min-height: 52px; padding: 0 1.6rem; border-radius: 999px; border: 0; cursor: pointer;
  font: 600 .98rem/1 var(--body); letter-spacing: .01em; text-decoration: none; white-space: nowrap;
  transition: transform .18s ease, box-shadow .25s ease, background-color .25s ease, color .25s ease;
}
.btn svg { width: 18px; height: 18px; flex: none; }
.btn:active { transform: translateY(1px) scale(.99); }
.btn-gold {
  color: #221A06;
  background: linear-gradient(180deg, #F3DB8A 0%, #D4AF37 52%, #B48E2C 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.55), 0 14px 34px -14px rgba(212,175,55,.75);
}
.btn-gold:hover { box-shadow: inset 0 1px 0 rgba(255,255,255,.55), 0 18px 40px -12px rgba(212,175,55,.95); }
.btn-ghost { color: var(--cream); background: rgba(243,237,226,.04); box-shadow: inset 0 0 0 1px var(--line-dark); }
.btn-ghost:hover { background: rgba(232,204,114,.1); box-shadow: inset 0 0 0 1px rgba(232,204,114,.5); }
.btn-line { color: var(--ink); background: transparent; box-shadow: inset 0 0 0 1px var(--gold-deep); }
.btn-line:hover { background: rgba(212,175,55,.14); }

/* ---------------- NAV ---------------- */
.nav {
  position: fixed; inset: 0 0 auto; z-index: 50;
  padding-top: env(safe-area-inset-top, 0px);
  transition: background-color .35s ease, box-shadow .35s ease;
}
.nav.is-solid { background: rgba(11,16,32,.95); -webkit-backdrop-filter: blur(14px) saturate(140%); backdrop-filter: blur(14px) saturate(140%); box-shadow: 0 1px 0 var(--line-dark); }
.nav-inner { height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; }
.nav-name { font: 600 1.3rem/1 var(--display); text-decoration: none; letter-spacing: .01em; color: var(--cream); }
.nav-name span { color: var(--gold-light); font-style: italic; font-weight: 500; }
.nav-links { display: flex; align-items: center; gap: clamp(1rem, 2.4vw, 2rem); }
.nav-links a:not(.btn) { text-decoration: none; font-size: .93rem; color: rgba(243,237,226,.78); transition: color .2s ease; }
.nav-links a:not(.btn):hover { color: var(--gold-light); }
.nav .btn { min-height: 40px; padding: 0 1.1rem; font-size: .88rem; }

/* ---------------- HERO ---------------- */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: clamp(600px, 84svh, 900px);
  display: grid; align-items: center;
  background:
    var(--night);
}
.hero-photo {
  position: absolute; z-index: -2; top: 0; bottom: 0; right: 0; left: auto; margin: 0;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 34%), linear-gradient(to bottom, #000 76%, transparent 100%);
  -webkit-mask-composite: source-in; mask-composite: intersect;
  mask-image: linear-gradient(to right, transparent 0%, #000 34%), linear-gradient(to bottom, #000 76%, transparent 100%);
}
.hero-photo img { height: 100%; width: auto; max-width: none; }
.hero-photo::after { /* night scrims so the name reads and the photo sits in the palette */
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(11,16,32,.95) 0%, rgba(11,16,32,.8) 28%, rgba(11,16,32,.3) 52%, rgba(11,16,32,0) 68%),
    linear-gradient(180deg, rgba(11,16,32,.6) 0%, rgba(11,16,32,0) 16%, rgba(11,16,32,0) 74%, #0B1020 100%),
    linear-gradient(0deg, rgba(20,30,64,.26), rgba(20,30,64,.26));
}
#motes { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; pointer-events: none; }

.hero-copy { position: relative; padding: calc(96px + env(safe-area-inset-top, 0px)) 0 clamp(4rem, 9vh, 7rem); max-width: 40rem; }
.hero-pre { font: italic 500 clamp(1.25rem, 2vw, 1.55rem)/1.2 var(--display); color: var(--gold-light); margin-bottom: .6rem; }
.hero-name { font-family: var(--display); font-weight: 600; line-height: .86; letter-spacing: -.02em; }
.hero-name .first, .hero-name .last { display: block; font-size: clamp(4.4rem, 11.5vw, 10.5rem); padding: 0 .06em .2em 0; margin-bottom: -.12em; }
.hero-name .middle {
  display: block; font-style: italic; font-weight: 500; letter-spacing: 0;
  font-size: clamp(2rem, 4.6vw, 4.1rem); line-height: 1.12; padding: .06em 0 .1em .12em; color: var(--cream);
}
.hero-dates { margin-top: 1.4rem; font: 500 clamp(.95rem, 1.3vw, 1.08rem)/1.4 var(--body); letter-spacing: .03em; color: rgba(243,237,226,.82); font-variant-numeric: lining-nums; }
.hero-sub { margin-top: .5rem; font: italic 400 clamp(1.35rem, 2.3vw, 1.85rem)/1.3 var(--display); color: rgba(243,237,226,.9); }
.hero-actions { margin-top: 2.4rem; display: flex; flex-wrap: wrap; gap: .9rem; }

.js .rise { opacity: 0; transform: translateY(18px); }
.js .is-loaded .rise { opacity: 1; transform: none; transition: opacity 1.1s ease, transform 1.2s cubic-bezier(.2,.7,.2,1); }
.js .is-loaded .rise:nth-child(2) { transition-delay: .12s; }
.js .is-loaded .rise:nth-child(3) { transition-delay: .3s; }
.js .is-loaded .rise:nth-child(4) { transition-delay: .45s; }
.js .hero-photo { opacity: 0; transform: scale(1.04); }
.js .is-loaded .hero-photo { opacity: 1; transform: none; transition: opacity 2s ease, transform 3s cubic-bezier(.2,.7,.2,1); }

/* ---------------- STREAM ---------------- */
.stream { position: relative; padding: clamp(4rem, 9vw, 7.5rem) 0 clamp(3rem, 6vw, 5rem); background: linear-gradient(180deg, var(--night) 0%, var(--night-2) 100%); }
.stream-head { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 1.5rem 3rem; margin-bottom: clamp(1.75rem, 3.5vw, 2.5rem); }
.stream-title { font: 600 clamp(2.4rem, 5.2vw, 4.2rem)/1 var(--display); letter-spacing: -.01em; }
.stream-title em { font-weight: 500; color: var(--gold-light); }
.stream-lede { margin-top: .8rem; max-width: 38rem; color: rgba(243,237,226,.72); }
.stream-when { text-align: right; font-size: .92rem; color: rgba(243,237,226,.62); line-height: 1.5; }
.stream-when strong { display: block; font: 600 1.45rem/1.15 var(--display); color: var(--cream); }

.screen {
  position: relative; border-radius: 20px; padding: 1px;
  background: linear-gradient(140deg, rgba(246,231,180,.8), rgba(156,122,38,.25) 30%, rgba(156,122,38,.1) 60%, rgba(232,204,114,.65));
  box-shadow: 0 60px 120px -50px rgba(0,0,0,.95), 0 0 160px -40px rgba(212,175,55,.28);
}
.player { position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: 19px; overflow: hidden; background: #060912; }
@supports not (aspect-ratio: 16 / 9) { .player { height: 0; padding-top: 56.25%; } }
.player > iframe, .player > video, .player > .stage { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.stage {
  display: grid; place-items: center; text-align: center; padding: 2rem;
  background:
    radial-gradient(55% 75% at 50% 45%, rgba(212,175,55,.17), transparent 70%),
    linear-gradient(180deg, #0E1428, #060912);
}
.stage-inner { display: grid; justify-items: center; gap: clamp(.6rem, 1.6vw, 1.1rem); max-width: 36rem; }
.stage-mark { width: clamp(58px, 8vw, 84px); aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; color: var(--gold-light); box-shadow: inset 0 0 0 1px rgba(232,204,114,.7), 0 0 50px -10px rgba(212,175,55,.5); }
.stage-mark svg { width: 34%; height: 34%; margin-left: 7%; }
.stage-title { font: 600 clamp(1.5rem, 3.6vw, 2.6rem)/1.1 var(--display); color: var(--gold-light); background: none; -webkit-background-clip: border-box; background-clip: border-box; }
.stage-note { font-size: clamp(.85rem, 1.6vw, 1rem); color: rgba(243,237,226,.66); }
.countdown { display: flex; gap: clamp(1rem, 3.5vw, 2.6rem); font-family: var(--display); }
.countdown div { display: grid; justify-items: center; }
.countdown b { font-size: clamp(1.9rem, 5vw, 3.4rem); font-weight: 600; line-height: 1; color: var(--gold-light); font-variant-numeric: lining-nums tabular-nums; }
.countdown small { font: 500 .75rem/1 var(--body); margin-top: .5rem; color: rgba(243,237,226,.55); }

.badge {
  position: absolute; z-index: 3; top: clamp(.7rem, 2vw, 1.2rem); left: clamp(.7rem, 2vw, 1.2rem);
  display: inline-flex; align-items: center; gap: .55rem; padding: .45rem .9rem .45rem .75rem; border-radius: 999px;
  font: 600 .78rem/1 var(--body); letter-spacing: .02em; color: var(--cream);
  background: rgba(6,9,18,.72); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  box-shadow: inset 0 0 0 1px rgba(232,204,114,.4); pointer-events: none;
}
.badge i { width: 8px; height: 8px; border-radius: 50%; background: var(--gold-light); }
.badge.is-live { box-shadow: inset 0 0 0 1px rgba(231,76,76,.65); }
.badge.is-live i { background: #E5484D; animation: pulse 1.6s ease-out infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(229,72,77,.7); } 75%, 100% { box-shadow: 0 0 0 10px rgba(229,72,77,0); } }

.stream-tabs { display: flex; flex-wrap: wrap; gap: .6rem; margin-bottom: 1.1rem; }
.stream-tab {
  font: 600 .92rem/1 var(--body); color: rgba(243,237,226,.78); background: rgba(243,237,226,.04);
  border: 0; border-radius: 999px; padding: .8rem 1.25rem; cursor: pointer; box-shadow: inset 0 0 0 1px var(--line-dark);
  transition: background-color .2s ease, color .2s ease;
}
.stream-tab:hover { color: var(--cream); background: rgba(232,204,114,.1); }
.stream-tab.is-active { color: #221A06; background: linear-gradient(180deg, #F3DB8A 0%, #D4AF37 52%, #B48E2C 100%); box-shadow: none; }
.stream-foot { margin-top: 1.4rem; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1rem; font-size: .92rem; color: rgba(243,237,226,.6); }
.stream-foot .btn { min-height: 44px; font-size: .9rem; margin-left: auto; }

/* ---------------- TRIBUTE + CANDLE (night to dawn) ---------------- */
.tribute {
  position: relative; overflow: hidden;
  padding: clamp(3rem, 6vw, 5rem) 0 clamp(5rem, 11vw, 9rem);
  background: linear-gradient(180deg, var(--night-2) 0%, #1E2033 30%, #4A3B26 62%, #B89252 86%, var(--cream) 100%);
}
.tribute-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: clamp(3rem, 7vw, 6.5rem); align-items: center; }
.tribute-text {
  font: 400 clamp(1.55rem, 2.7vw, 2.25rem)/1.42 var(--display); color: var(--cream);
  max-width: 34ch;
}
.tribute-sign { margin-top: 2rem; display: flex; align-items: center; gap: 1rem; font: italic 500 1.2rem/1 var(--display); color: var(--gold-light); }
.tribute-sign::before { content: ""; width: 48px; height: 1px; background: currentColor; }

.candle-card {
  justify-self: center; width: min(100%, 340px); text-align: center;
  padding: 2.4rem 1.8rem 2rem; border-radius: 26px;
  background: rgba(11,16,32,.78); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  box-shadow: inset 0 0 0 1px rgba(246,231,180,.18), 0 40px 80px -40px rgba(0,0,0,.6);
}
.candle { position: relative; width: 120px; height: 190px; margin: 0 auto 1.4rem; }
.candle-glow {
  position: absolute; left: 50%; top: 18px; width: 220px; height: 220px; transform: translate(-50%, -30%);
  background: radial-gradient(closest-side, rgba(255,214,120,.55), rgba(255,190,80,.12) 55%, transparent);
  opacity: .55; transition: opacity 1.2s ease, transform 1.2s ease;
}
.candle-flame {
  position: absolute; left: 50%; top: 22px; width: 22px; height: 46px; margin-left: -11px;
  border-radius: 50% 50% 46% 46% / 62% 62% 38% 38%;
  background: radial-gradient(ellipse at 50% 78%, #FFFFFF 0%, #FFF4C9 18%, #FFD36B 42%, #F49B2C 72%, rgba(232,110,30,0) 100%);
  transform-origin: 50% 90%;
  filter: drop-shadow(0 0 10px rgba(255,200,90,.9));
  animation: flicker 2.6s ease-in-out infinite;
}
.candle-flame::after { content: ""; position: absolute; left: 50%; bottom: 3px; width: 7px; height: 13px; margin-left: -3.5px; border-radius: 50%; background: rgba(60,90,200,.55); filter: blur(1.5px); }
@keyframes flicker {
  0%, 100% { transform: scale(1, 1) rotate(-1deg); }
  25% { transform: scale(.94, 1.06) rotate(1.5deg); }
  50% { transform: scale(1.04, .95) rotate(-1.5deg); }
  75% { transform: scale(.97, 1.04) rotate(1deg); }
}
.candle-wick { position: absolute; left: 50%; top: 62px; width: 3px; height: 12px; margin-left: -1.5px; border-radius: 2px; background: #2A2118; }
.candle-body {
  position: absolute; left: 50%; bottom: 14px; width: 62px; height: 112px; margin-left: -31px; border-radius: 8px 8px 6px 6px;
  background: linear-gradient(90deg, #E7DCC6 0%, #FFFBF1 38%, #F5EBD7 62%, #D9CBAE 100%);
  box-shadow: inset 0 10px 14px -10px rgba(255,214,120,.9);
}
.candle-body::before { content: ""; position: absolute; left: 0; right: 0; top: -5px; height: 12px; border-radius: 50%; background: radial-gradient(ellipse at 50% 40%, #FFF8E6, #E8DCC2); }
.candle-dish { position: absolute; left: 50%; bottom: 0; width: 120px; height: 22px; margin-left: -60px; border-radius: 50%; background: linear-gradient(180deg, #F1D888, #9C7A26); box-shadow: 0 10px 20px -8px rgba(0,0,0,.6); }
.candle-card.is-lit .candle-glow { opacity: 1; transform: translate(-50%, -30%) scale(1.25); }
.candle-count { font: 600 clamp(2.6rem, 5vw, 3.4rem)/1 var(--display); color: var(--gold-pale); font-variant-numeric: lining-nums tabular-nums; }
.candle-count.is-zero { font-size: clamp(1.6rem, 3vw, 2rem); line-height: 1.15; }
.candle-label { margin: .35rem 0 1.4rem; font-size: .95rem; color: rgba(243,237,226,.75); }
.candle-card .btn { width: 100%; }
.candle-card .btn[disabled] { cursor: default; color: var(--gold-pale); background: rgba(232,204,114,.12); box-shadow: inset 0 0 0 1px rgba(232,204,114,.45); }
.bump { animation: bump .6s cubic-bezier(.2,.7,.2,1); }
@keyframes bump { 40% { transform: scale(1.14); color: #FFF; } }

/* ---------------- WAKE ---------------- */
.wake { background: var(--cream); color: var(--ink); padding: clamp(4rem, 9vw, 7.5rem) 0 clamp(4.5rem, 9vw, 8rem); }
.wake-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(2.5rem, 6vw, 6rem); align-items: start; }
.wake-lockup { text-align: center; position: sticky; top: 110px; }
.wake-lockup .pre { font: italic 500 1.35rem/1 var(--display); color: var(--ink-soft); margin-bottom: .9rem; }
.wake-lockup h2 { font-family: var(--display); line-height: .9; }
.wake-lockup .l1 { display: block; font-weight: 700; font-size: clamp(3.6rem, 8vw, 6.6rem); letter-spacing: .015em; }
.wake-lockup .l2 { display: block; font-weight: 600; font-style: italic; font-size: clamp(3.4rem, 7.6vw, 6.2rem); line-height: 1; padding: 0 .1em .22em; margin-bottom: -.14em; }
.wake-lockup .l3 { display: flex; align-items: center; justify-content: center; gap: 1rem; margin-top: 1rem; font-weight: 600; font-size: clamp(1.3rem, 2.2vw, 1.7rem); letter-spacing: .38em; text-indent: .38em; color: var(--gold-deep); }
.wake-lockup .l3::before, .wake-lockup .l3::after { content: ""; flex: 0 1 70px; height: 1px; background: linear-gradient(90deg, transparent, var(--gold-deep)); }
.wake-lockup .l3::after { background: linear-gradient(90deg, var(--gold-deep), transparent); }
.wake .foil { background-image: linear-gradient(105deg, #6F5414 0%, #A8822A 22%, #D9B14A 40%, #8E6C1D 60%, #C29A36 80%, #7A5C18 100%); }
.wake-lockup .flourish { margin: 1.8rem auto 0; color: var(--gold-deep); }

.wake-invite { font: italic 400 clamp(1.45rem, 2.3vw, 1.8rem)/1.45 var(--display); max-width: 34ch; }
.wake-invite + .wake-invite { margin-top: 1rem; color: var(--ink-soft); font-size: clamp(1.25rem, 2vw, 1.5rem); }

.facts { margin-top: 2.6rem; border-top: 1px solid var(--line-light); }
.fact { display: grid; grid-template-columns: 7.5rem 1fr; gap: 1.5rem; align-items: start; padding: 1.4rem 0; border-bottom: 1px solid var(--line-light); }
.fact dt { font: 500 .88rem/1.4 var(--body); color: var(--ink-soft); padding-top: .5rem; }
.fact dd { font: 600 1.55rem/1.25 var(--display); }
.fact dd small { display: block; margin-top: .25rem; font: 400 .95rem/1.4 var(--body); color: var(--ink-soft); }
.fact .big { font-size: 1em; }

.map {
  margin-top: 2.2rem; border-radius: 18px; overflow: hidden; position: relative; aspect-ratio: 16 / 10;
  background: #E7DFD0; box-shadow: 0 0 0 1px var(--line-light), 0 30px 60px -36px rgba(80,60,20,.45);
}
.map iframe { width: 100%; height: 100%; border: 0; filter: sepia(.18) saturate(.85); }
.wake-actions { margin-top: 1.4rem; display: flex; flex-wrap: wrap; gap: .8rem; }

/* ---------------- MEMORIES ---------------- */
.memories { background: var(--cream-2); color: var(--ink); padding: clamp(4.5rem, 9vw, 8rem) 0; border-top: 1px solid var(--line-light); }
.memories-head { max-width: 40rem; margin-bottom: clamp(2.2rem, 4vw, 3.2rem); }
.memories-head h2 { font: 600 clamp(2.5rem, 5vw, 4rem)/1 var(--display); letter-spacing: -.01em; }
.memories-head h2 em { font-weight: 500; color: var(--gold-deep); }
.memories-head p { margin-top: 1rem; color: var(--ink-soft); max-width: 36rem; }
.memories-grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: stretch; }

.share-form {
  position: sticky; top: 100px; align-self: start; color: var(--cream); background: var(--night);
  border-radius: 24px; padding: clamp(1.6rem, 3.5vw, 2.4rem);
  box-shadow: 0 40px 70px -40px rgba(11,16,32,.65);
}
.share-form h3 { font: 600 1.9rem/1.1 var(--display); }
.share-form > p { margin: .5rem 0 1.6rem; font-size: .94rem; color: rgba(243,237,226,.62); }
.field { display: grid; gap: .45rem; margin-bottom: 1.15rem; }
.field label { font-size: .88rem; font-weight: 500; color: rgba(243,237,226,.88); }
.field label span { font-weight: 400; color: rgba(243,237,226,.5); }
.field input, .field textarea {
  width: 100%; font: 400 1rem/1.4 var(--body); color: var(--cream);
  background: var(--night-3); border: 1px solid rgba(232,204,114,.2); border-radius: 12px; padding: .85rem 1rem;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.field textarea { min-height: 150px; resize: vertical; font: 400 1.18rem/1.55 var(--display); }
.field input::placeholder, .field textarea::placeholder { color: rgba(243,237,226,.38); }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(212,175,55,.22); }
.field .err { font-size: .82rem; color: #F3B1AC; }
.field .err:empty { display: none; }
.field.hp { position: absolute; left: -9999px; }
.share-form .btn { width: 100%; margin-top: .3rem; }
.form-msg { margin-top: 1rem; font-size: .92rem; text-align: center; color: var(--gold-light); }
.form-msg:empty { display: none; }
.form-msg.is-error { color: #F3B1AC; }

.wall { columns: 2 260px; column-gap: 1.2rem; }
.note {
  break-inside: avoid; margin: 0 0 1.2rem; background: #FFFFFF; border-radius: 18px;
  padding: 1.6rem 1.6rem 1.35rem; position: relative;
  box-shadow: 0 0 0 1px rgba(156,122,38,.12), 0 20px 40px -32px rgba(60,45,15,.45);
}
.note::before { content: "\201C"; position: absolute; top: .55rem; right: 1.1rem; font: 600 3.6rem/1 var(--display); color: rgba(212,175,55,.35); }
.note blockquote { font: 400 1.22rem/1.55 var(--display); color: var(--ink); white-space: pre-line; padding-right: 1.4rem; }
.note footer { margin-top: 1rem; font-size: .88rem; color: var(--ink-soft); line-height: 1.45; }
.note footer strong { display: block; color: var(--ink); font-weight: 600; }
.note.is-pending { background: #FFFDF6; box-shadow: 0 0 0 1px rgba(212,175,55,.5); }
.note.is-pending footer::after { content: "Waiting for the family to approve"; display: block; margin-top: .35rem; color: var(--gold-deep); font-weight: 500; }
.note.is-new { animation: settle .8s cubic-bezier(.2,.7,.2,1); }
@keyframes settle { from { opacity: 0; transform: translateY(-12px); } }
.wall.is-empty { columns: auto; display: flex; }
.wall-empty {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1rem;
  text-align: center; color: var(--ink-soft); border-radius: 24px;
  padding: clamp(2.5rem, 5vw, 4rem) clamp(1.5rem, 4vw, 3.5rem);
  background: radial-gradient(70% 55% at 50% 0%, rgba(232,204,114,.2), transparent 70%), #FFFFFF;
  box-shadow: 0 0 0 1px rgba(156,122,38,.18), 0 30px 60px -40px rgba(60,45,15,.45);
}
.wall-empty-mark { display: block; height: .42em; font: 600 7rem/.75 var(--display); color: var(--gold); }
.wall-empty h3 { font: 600 clamp(1.9rem, 3vw, 2.5rem)/1.1 var(--display); color: var(--ink); max-width: 16ch; }
.wall-empty p { max-width: 36ch; }
.prompts { display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem; margin-top: .4rem; }
.prompt {
  font: 500 .92rem/1 var(--body); color: var(--ink); background: var(--cream-2); border: 0; border-radius: 999px;
  padding: .8rem 1.15rem; cursor: pointer; box-shadow: inset 0 0 0 1px rgba(156,122,38,.4);
  transition: background-color .2s ease, box-shadow .2s ease;
}
.prompt:hover { background: rgba(212,175,55,.16); box-shadow: inset 0 0 0 1px var(--gold-deep); }

/* ---------------- FOOTER ---------------- */
.footer { position: relative; overflow: hidden; text-align: center; padding: clamp(5rem, 10vw, 8rem) 0 calc(2.6rem + env(safe-area-inset-bottom, 0px)); background: var(--night); }
.footer::before { content: ""; position: absolute; left: 50%; top: -30%; width: 80%; height: 80%; transform: translateX(-50%); background: radial-gradient(closest-side, rgba(212,175,55,.14), transparent); pointer-events: none; }
.footer-quote { position: relative; max-width: 26ch; margin: 0 auto; font: italic 500 clamp(2rem, 4.6vw, 3.4rem)/1.18 var(--display); padding-bottom: .06em; }
.footer .flourish { margin: 2.2rem auto; }
.share-row { display: flex; flex-wrap: wrap; justify-content: center; gap: .7rem; }
.share-row .btn { min-height: 46px; font-size: .92rem; }
.footer-sign { margin-top: 3.2rem; font: 600 1.35rem/1.2 var(--display); }
.footer-dates { margin-top: .3rem; font-size: .95rem; color: rgba(243,237,226,.7); }
.footer-small { margin-top: .9rem; font-size: .85rem; color: rgba(243,237,226,.48); }

/* scroll reveal: hidden only when JS is running */
.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity 1s ease, transform 1.1s cubic-bezier(.2,.7,.2,1); }
.js .reveal.is-in { opacity: 1; transform: none; }

/* ---------------- RESPONSIVE ---------------- */
@media (max-width: 1000px) {
  .tribute-grid, .wake-grid, .memories-grid { grid-template-columns: 1fr; }
  .wake-lockup, .share-form { position: static; }
  .wake-invite { margin-inline: auto; text-align: center; }
  .wake-details { width: 100%; }
}
@media (min-width: 761px) and (max-width: 1000px) {
  .hero-photo {
    top: auto; height: 78%; right: -14vw;
    -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 34%), linear-gradient(to bottom, transparent 0%, #000 16%, #000 76%, transparent 100%);
    mask-image: linear-gradient(to right, transparent 0%, #000 34%), linear-gradient(to bottom, transparent 0%, #000 16%, #000 76%, transparent 100%);
  }
}
@media (max-width: 760px) {
  .nav-links a:not(.btn) { display: none; }
  .hero { align-items: end; min-height: 0; }
  .hero-photo { inset: calc(48px + env(safe-area-inset-top, 0px)) 0 auto 0; width: 100%; height: 60%; -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 8%, #000 66%, transparent 100%); mask-image: linear-gradient(to bottom, transparent 0%, #000 8%, #000 66%, transparent 100%); }
  .hero-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 88% 50%; }
  .hero-photo::after { background: linear-gradient(180deg, rgba(11,16,32,.55) 0%, rgba(11,16,32,0) 16%, rgba(11,16,32,0) 58%, #0B1020 100%), linear-gradient(0deg, rgba(20,30,64,.24), rgba(20,30,64,.24)); }
  .hero-copy { padding-top: 47svh; padding-bottom: 3rem; text-align: center; margin-inline: auto; }
  .hero-name .first, .hero-name .last { font-size: clamp(3.6rem, 17vw, 5.6rem); }
  .hero-name .middle { font-size: clamp(1.7rem, 7.5vw, 2.6rem); padding-left: 0; }
  .hero-sub { margin-top: 1.1rem; }
  .hero-actions { justify-content: center; margin-top: 1.8rem; }
  .hero-actions .btn { flex: 1 1 100%; }
  .hero-actions .btn-ghost { display: none; }
  .stream-head { grid-template-columns: 1fr; }
  .stream-when { text-align: left; }
  .stage-note, .stage-mark { display: none; }
  .badge { font-size: .7rem; padding: .35rem .7rem .35rem .6rem; }
  .countdown small { font-size: .65rem; }
  .tribute-text { text-align: left; }
  .fact { grid-template-columns: 1fr; gap: .2rem; }
  .fact dt { padding-top: 0; }
  .map { aspect-ratio: 4 / 3; }
  .wake-actions .btn, .stream-foot .btn { flex: 1 1 100%; }
  .wall { columns: 1; }
}
/* ---------------- HERO PORTRAIT v2: beside the name, centred with it ---------------- */
.hero { min-height: max(640px, 100svh); }
.hero-photo {
  top: calc(96px + env(safe-area-inset-top, 0px)); bottom: clamp(4rem, 9vh, 7rem);
  left: auto; right: max(var(--gutter), (100% - var(--container)) / 2); width: auto; height: auto;
  display: flex; justify-content: flex-end;
  -webkit-mask-image: none; mask-image: none;
}
.hero-photo::after { content: none; }
.hero-photo img {
  height: 100%; width: auto; max-width: none; object-fit: fill;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 16%, #000 84%, transparent 100%), linear-gradient(to bottom, transparent 0%, #000 6%, #000 80%, transparent 100%);
  -webkit-mask-composite: source-in; mask-composite: intersect;
  mask-image: linear-gradient(to right, transparent 0%, #000 16%, #000 84%, transparent 100%), linear-gradient(to bottom, transparent 0%, #000 6%, #000 80%, transparent 100%);
}
@media (max-width: 1000px) {
  .hero { align-items: end; min-height: 0; }
  .hero-photo {
    top: calc(80px + env(safe-area-inset-top, 0px)); bottom: auto; left: 0; right: 0; height: 52vh;
    justify-content: center; -webkit-mask-image: none; mask-image: none;
  }
  .hero-photo img { width: auto; height: 100%; object-fit: fill; }
  .hero-copy { padding-top: calc(80px + 52vh - 3rem); padding-bottom: 3rem; text-align: center; margin-inline: auto; }
  .hero-actions { justify-content: center; }
}
@media (max-width: 760px) {
  .hero-photo { top: calc(64px + env(safe-area-inset-top, 0px)); height: 45vh; }
  .hero-copy { padding-top: calc(64px + 45vh - 2rem); }
}

/* ---------------- stream placeholder ---------------- */
.stage { overflow: hidden; }
.stage-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 82% 30%; }
.stage::before {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: radial-gradient(70% 90% at 50% 50%, rgba(6,9,18,.62), rgba(6,9,18,.9)), linear-gradient(0deg, rgba(20,30,64,.25), rgba(20,30,64,.25));
}
.stage-inner { position: relative; z-index: 2; }
.stage-kicker { font: italic 500 clamp(1.05rem, 2vw, 1.35rem)/1.2 var(--display); color: var(--gold-light); }
.stage-when { font-size: clamp(.9rem, 1.7vw, 1.05rem); color: rgba(243,237,226,.88); }
@media (min-width: 761px) {
  .stage { place-items: center start; padding-left: clamp(2.5rem, 7vw, 5.5rem); }
  .stage-inner { justify-items: start; text-align: left; max-width: 30rem; }
  .stage::before { background: linear-gradient(90deg, rgba(6,9,18,.94) 0%, rgba(6,9,18,.8) 42%, rgba(6,9,18,.3) 72%, rgba(6,9,18,.15) 100%), linear-gradient(0deg, rgba(20,30,64,.2), rgba(20,30,64,.2)); }
}
@media (max-width: 760px) {
  .stage { padding: 1rem; }
  .stage-kicker, .stage-note { display: none; }
  .stage-when { font-size: .82rem; }
  .countdown b { font-size: 1.6rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .rise, .js .reveal, .js .hero-photo { opacity: 1 !important; transform: none !important; }
  #motes { display: none; }
}
