:root{
  --forest:#1f3d33; --pine:#2f5d50; --moss:#4f8a5b; --amber:#e9a23b; --rust:#d4572f;
  --cream:#f7f0e1; --paper:#fffaf0; --ink:#1d2a24; --muted:#5d6b63;
  --serif:'Fraunces',Georgia,serif; --sans:'Inter',system-ui,sans-serif;
  --radius:18px; --shadow:0 18px 50px -20px rgba(20,40,30,.45);
}
*{box-sizing:border-box;margin:0}
html{scroll-behavior:smooth}
body{font-family:var(--sans);color:var(--ink);background:var(--cream);line-height:1.65;-webkit-font-smoothing:antialiased}
body.noscroll{overflow:hidden}
img{max-width:100%;display:block}
a{color:inherit}
.wrap{width:min(1120px,100% - 40px);margin-inline:auto}
.eyebrow{font-size:.78rem;letter-spacing:.22em;text-transform:uppercase;color:var(--rust);font-weight:600}
h1,h2,h3{font-family:var(--serif);line-height:1.08}
h2{font-size:clamp(2rem,5vw,3.4rem);margin:.3em 0 .6em;color:var(--forest)}
.lead{font-size:1.15rem;color:var(--muted);max-width:56ch}

/* buttons */
.btn{font:600 1rem var(--sans);padding:.85em 1.5em;border-radius:99px;border:2px solid transparent;cursor:pointer;transition:.2s}
.btn-primary{background:var(--amber);color:var(--forest)}
.btn-primary:hover{background:#f3b556;transform:translateY(-2px)}
.btn-ghost{background:transparent;border-color:currentColor;color:inherit}
.btn-ghost:hover{background:rgba(255,255,255,.15)}
.section .btn-ghost{color:var(--forest)}.section .btn-ghost:hover{background:rgba(31,61,51,.08)}

/* enter overlay */
#enter{position:fixed;inset:0;z-index:100;display:grid;place-items:center;text-align:center;color:var(--cream);
  background:radial-gradient(ellipse at 50% 120%,#e9a23b55,transparent 60%),linear-gradient(160deg,#16302a,#2f5d50 60%,#4f8a5b);transition:opacity .9s,visibility .9s}
#enter.leaving{opacity:0;visibility:hidden}
.enter-inner{padding:24px;animation:rise 1.2s both}
.enter-inner .eyebrow{color:var(--amber)}
.enter-name{font-size:clamp(4rem,16vw,9rem);font-style:italic;font-weight:400;margin:.1em 0}
.enter-sub{opacity:.85;margin-bottom:2rem}
.enter-actions{display:flex;gap:12px;justify-content:center;flex-wrap:wrap}
@keyframes rise{from{opacity:0;transform:translateY(24px)}}

/* nav */
#nav{position:fixed;inset:0 0 auto;z-index:50;display:flex;justify-content:space-between;align-items:center;padding:14px 24px;transition:.3s;color:#fff}
#nav.solid{background:rgba(31,61,51,.92);backdrop-filter:blur(8px);padding-block:10px}
.nav-brand{font:italic 1.5rem var(--serif);text-decoration:none}
.nav-links{display:flex;gap:20px}
.nav-links a{text-decoration:none;font-size:.9rem;font-weight:500;opacity:.9}
.nav-links a:hover{opacity:1;color:var(--amber)}
@media(max-width:820px){.nav-links{display:none}}

/* hero */
.hero{position:relative;min-height:100svh;display:grid;place-items:center;text-align:center;color:#fff;overflow:hidden;background:var(--forest)}
.hero-bg{position:absolute;inset:-10% 0;background:right center/cover;transform:scale(1.1);will-change:transform}
.hero::after{content:"";position:absolute;inset:0;background:linear-gradient(180deg,rgba(15,35,28,.35),rgba(15,35,28,.75))}
.hero-content{position:relative;z-index:1;padding:24px}
.hero .eyebrow{color:var(--amber)}
.hero-title{font-size:clamp(5rem,20vw,13rem);font-style:italic;font-weight:400;letter-spacing:-.03em;text-shadow:0 6px 40px rgba(0,0,0,.4)}
.hero-sub{max-width:34ch;margin:.5em auto 0;font-size:clamp(1.1rem,2.5vw,1.5rem);font-family:var(--serif);font-style:italic}
.scroll-cue{display:inline-block;margin-top:2.5rem;font-size:2rem;text-decoration:none;animation:bob 2s infinite}
@keyframes bob{50%{transform:translateY(10px)}}

/* sections */
.section{padding:clamp(70px,12vw,140px) 0}
.section-dark{background:var(--forest);color:var(--cream)}
.section-dark h2{color:var(--cream)}
.chapter:nth-of-type(even){background:var(--paper)}
.chapter-grid{display:grid;grid-template-columns:1fr 1.1fr;gap:clamp(30px,6vw,80px);align-items:center}
.chapter.flip .chapter-text{order:2}
.chapter-text p{margin-bottom:1em;font-size:1.08rem}
blockquote{margin-top:1.6em;padding-left:1.2em;border-left:4px solid var(--amber);font:italic 1.45rem/1.35 var(--serif);color:var(--pine)}
.chapter-photos{display:grid;grid-template-columns:1fr 1fr;grid-template-rows:auto auto;gap:14px}
.photo{border-radius:var(--radius);overflow:hidden;box-shadow:var(--shadow);background:#ddd}
.photo img{width:100%;height:100%;object-fit:cover;transition:transform .8s}
.photo:hover img{transform:scale(1.05)}
.photo.p0{grid-row:span 2;aspect-ratio:3/4.4}
.photo.p1,.photo.p2{aspect-ratio:1}
.photo.p1{transform:rotate(1.5deg)}.photo.p2{transform:rotate(-1.5deg)}
@media(max-width:820px){.chapter-grid{grid-template-columns:1fr}.chapter.flip .chapter-text{order:0}}

/* reveal */
.reveal{opacity:0;transform:translateY(28px);transition:opacity .8s,transform .8s}
.reveal.in{opacity:1;transform:none}
.photo.p1.reveal.in{transform:rotate(1.5deg)}.photo.p2.reveal.in{transform:rotate(-1.5deg)}
@media(prefers-reduced-motion:reduce){.reveal{opacity:1;transform:none;transition:none}html{scroll-behavior:auto}.scroll-cue{animation:none}}

/* family tributes */
.section-paper{background:var(--paper)}
.tributes{columns:2 320px;column-gap:22px;margin-top:2rem}
.tribute{break-inside:avoid;margin:0 0 22px;padding:26px 28px;background:var(--cream);border-radius:var(--radius);box-shadow:var(--shadow)}
.tribute blockquote{margin:0;border-left:0;padding:0;font-size:1.25rem}
.tribute blockquote::before{content:"\201C";display:block;font:700 3rem/0.6 var(--serif);color:var(--amber);margin-bottom:.2em}
.tribute figcaption{margin-top:1rem;font-size:.9rem;color:var(--muted)}
.tribute strong{color:var(--forest)}

/* timeline */
.timeline{list-style:none;padding:0;margin-top:2rem;position:relative;max-width:760px}
.timeline::before{content:"";position:absolute;left:96px;top:6px;bottom:6px;width:3px;background:linear-gradient(var(--amber),var(--moss));border-radius:3px}
.timeline li{display:flex;gap:34px;padding:0 0 2.2rem;position:relative}
.timeline li::before{content:"";position:absolute;left:89px;top:8px;width:17px;height:17px;border-radius:50%;background:var(--amber);border:4px solid var(--cream)}
.year{flex:0 0 80px;font:700 1.05rem var(--serif);color:var(--rust);text-align:right;padding-top:2px}
.timeline h3{font-size:1.5rem;color:var(--forest);margin-left:20px}
.timeline p{color:var(--muted);margin-left:20px}

/* gallery */
.masonry{columns:3 260px;column-gap:14px;margin-top:2rem}
.m-item{display:block;width:100%;margin:0 0 14px;padding:0;border:0;border-radius:14px;overflow:hidden;cursor:zoom-in;break-inside:avoid;background:#0003}
.m-item img{width:100%;transition:transform .6s,filter .3s}
.m-item:hover img{transform:scale(1.06);filter:brightness(1.08)}
.lightbox{position:fixed;inset:0;z-index:90;background:rgba(8,18,14,.94);display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:10px;padding:20px}
.lightbox[hidden]{display:none}
.lightbox figure{display:grid;justify-items:center;gap:10px;min-width:0}
.lightbox img{max-height:84vh;border-radius:10px}
.lightbox figcaption{color:var(--cream);opacity:.85}
.lightbox button{background:none;border:0;color:#fff;font-size:3rem;cursor:pointer;padding:0 14px}
#lb-close{position:absolute;top:10px;right:14px;font-size:1.8rem}

/* game */
.game-wrap{text-align:center}.game-wrap .lead{margin-inline:auto}
.game-controls{display:flex;gap:16px;justify-content:center;align-items:center;flex-wrap:wrap;margin:1.8rem 0}
.picker{display:flex;gap:10px}
.picker button{width:60px;height:60px;border-radius:12px;overflow:hidden;border:3px solid transparent;padding:0;cursor:pointer;opacity:.65;transition:.2s}
.picker button.active{border-color:var(--amber);opacity:1;transform:translateY(-3px)}
.picker img{width:100%;height:100%;object-fit:cover}
.seg{display:inline-flex;border:2px solid var(--forest);border-radius:99px;overflow:hidden}
.seg button{background:none;border:0;padding:.6em 1.2em;font:600 .95rem var(--sans);color:var(--forest);cursor:pointer}
.seg button.active{background:var(--forest);color:var(--cream)}
.game-stage{display:flex;gap:30px;justify-content:center;align-items:flex-start;flex-wrap:wrap}
.board{--n:3;width:min(460px,100%);aspect-ratio:1;display:grid;grid-template-columns:repeat(var(--n),1fr);gap:4px;padding:6px;background:var(--forest);border-radius:var(--radius);box-shadow:var(--shadow);outline-offset:4px}
.tile{border:0;border-radius:8px;cursor:pointer;transition:transform .12s,filter .2s}
.tile:hover:not(.empty){filter:brightness(1.1);transform:scale(.98)}
.tile.empty{background:#16302a!important;cursor:default}
.board.won{animation:pulse .8s 2}
.board.peek .tile{border-radius:0}
@keyframes pulse{50%{transform:scale(1.03);box-shadow:0 0 0 8px #e9a23b88}}
.game-side{display:flex;flex-direction:column;gap:12px;align-items:center;min-width:130px}
.stat{font:700 2.6rem var(--serif);line-height:1;color:var(--forest)}
.stat small{display:block;font:500 .75rem var(--sans);letter-spacing:.15em;text-transform:uppercase;color:var(--muted);margin-top:4px}
.hint{font-size:.85rem;color:var(--muted)}

/* video */
.video-wrap{max-width:900px;text-align:center}
.video-frame{margin:1.5rem 0 0;border-radius:var(--radius);overflow:hidden;box-shadow:var(--shadow);background:#000}
.video-frame video{width:100%;display:block;max-height:75vh}
.video-frame figcaption{padding:12px 18px;background:var(--forest);color:var(--cream);font-style:italic}
.video-frame figcaption:empty{display:none}

/* footer */
.footer{background:var(--forest);color:var(--cream);text-align:center;padding:90px 20px 140px}
.footer-title{font:italic clamp(2rem,6vw,4rem) var(--serif);color:var(--amber)}

.credit{margin-top:1.4rem;font-size:.8rem;opacity:.65}
.credit a{text-decoration:underline}

/* player */
.player{position:fixed;right:16px;bottom:16px;z-index:60;display:flex;align-items:center;gap:6px;padding:8px 14px;border-radius:99px;background:rgba(22,48,42,.94);color:#fff;backdrop-filter:blur(8px);box-shadow:var(--shadow);max-width:calc(100vw - 32px)}
.player[hidden]{display:none}
.player button{background:none;border:0;color:#fff;font-size:1rem;cursor:pointer;padding:6px;border-radius:50%}
.player button:hover{color:var(--amber)}
#p-toggle{background:var(--amber);color:var(--forest);width:36px;height:36px}
.p-meta{display:flex;flex-direction:column;line-height:1.15;margin:0 8px;max-width:140px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.p-meta span{font-weight:600;font-size:.85rem;overflow:hidden;text-overflow:ellipsis}
.p-meta small{opacity:.7;font-size:.72rem;overflow:hidden;text-overflow:ellipsis}
#p-vol{width:70px;accent-color:var(--amber)}
@media(max-width:520px){#p-vol,.p-meta small{display:none}}

/* confetti */
#confetti{position:fixed;inset:0;pointer-events:none;z-index:120;overflow:hidden}
#confetti i{position:absolute;top:-20px;width:10px;height:16px;border-radius:2px;animation:fall linear forwards}
@keyframes fall{to{transform:translateY(110vh) rotate(720deg)}}
