/* ═══════════════════════════════════════════════════════════════
   KITSONG METHOD · 3D world — styles
   palette: soil #1a120b / bark #6b4a2f / gold #d9a441 / pale gold
   #ffe9b8 / leaf #7ca85e / deep green #2e4530 / ember #c96f3b /
   dusk violet #4a3a52 / dawn cream #f4ead8
   ═══════════════════════════════════════════════════════════════ */

* { margin:0; padding:0; box-sizing:border-box; }
html { scroll-behavior:auto; }
html, body { background:#120d08; overflow-x:hidden; }
body {
  font-family:'Inter', system-ui, sans-serif;
  color:#f4ead8;
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
}
::selection { background:#d9a44166; }

/* ——— fixed canvas + dressing ——— */
#gl { position:fixed; inset:0; width:100%; height:100%; display:block; z-index:0; }
#tint { position:fixed; inset:0; z-index:1; pointer-events:none; mix-blend-mode:soft-light; transition:background 1.2s ease; }
.vignette { position:fixed; inset:0; z-index:2; pointer-events:none;
  background:radial-gradient(ellipse 120% 90% at 50% 45%, transparent 55%, rgba(8,5,2,.55) 100%); }
.grain { position:fixed; inset:-50%; z-index:3; pointer-events:none; opacity:.05;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23n)'/%3E%3C/svg%3E");
  animation:grain 7s steps(9) infinite; }
@keyframes grain { 0%{transform:translate(0,0)} 20%{transform:translate(-4%,3%)} 40%{transform:translate(3%,-5%)} 60%{transform:translate(-5%,-2%)} 80%{transform:translate(4%,4%)} 100%{transform:translate(0,0)} }

#track { position:relative; z-index:-1; width:1px; }

/* ——— header ——— */
#bar { position:fixed; top:0; left:0; right:0; z-index:40;
  display:flex; justify-content:space-between; align-items:center;
  padding:calc(env(safe-area-inset-top, 0px) + 14px) 20px 12px;
  background:linear-gradient(to bottom, rgba(10,7,4,.55), transparent);
  pointer-events:none; }
.mark { display:flex; align-items:baseline; gap:8px; }
.bird { width:22px; height:22px; fill:#d9a441; align-self:center; }
.word { font-family:'Fraunces', serif; font-weight:600; letter-spacing:.28em; font-size:15px; color:#f4ead8; }
.sub  { font-size:9px; letter-spacing:.4em; color:#d9a441; font-weight:600; }
.bar-right { display:flex; align-items:center; gap:10px; pointer-events:auto; }
.badge { font-size:10px; letter-spacing:.14em; text-transform:uppercase; color:#e8d9b8;
  border:1px solid #d9a44155; border-radius:99px; padding:5px 11px; background:rgba(20,14,8,.4); backdrop-filter:blur(6px); }
#mute-btn { font-size:15px; line-height:1; background:rgba(20,14,8,.4); color:#f4ead8;
  border:1px solid #d9a44155; border-radius:99px; width:34px; height:34px; cursor:pointer; backdrop-filter:blur(6px); }
#mute-btn:hover { border-color:#d9a441; }

/* ——— waymarks ——— */
#waymarks { position:fixed; right:14px; top:50%; transform:translateY(-50%); z-index:30;
  height:min(46vh, 380px); width:14px; pointer-events:none; }
.way-line { position:absolute; top:0; bottom:0; left:6px; width:2px; background:rgba(244,234,216,.14); border-radius:2px; overflow:hidden; }
.way-fill { width:100%; height:0%; background:linear-gradient(#d9a441, #7ca85e); border-radius:2px; }
.way-dot { position:absolute; left:3px; width:8px; height:8px; border-radius:50%;
  background:#120d08; border:1.5px solid rgba(244,234,216,.4); transition:all .5s ease; }
.way-dot.lit { background:#d9a441; border-color:#ffe9b8; box-shadow:0 0 10px #d9a441aa; }
.way-dot.hubdot { width:10px; height:10px; left:2px; }
.way-dot.hubdot.lit { background:#ffe9b8; box-shadow:0 0 14px #ffe9b8; }
@media (max-width:700px){ #waymarks{ right:8px; } }

/* ——— entry gate ——— */
#gate { position:fixed; inset:0; z-index:50; display:flex; align-items:center; justify-content:center;
  background:radial-gradient(ellipse 110% 80% at 50% 30%, #2a2016 0%, #16100a 55%, #0d0906 100%);
  transition:opacity 1.4s ease; text-align:center; overflow-y:auto; }
#gate.leaving { opacity:0; pointer-events:none; }
.gate-inner { max-width:620px; padding:90px 26px 60px; }
.eyebrow { font-size:11px; letter-spacing:.32em; text-transform:uppercase; color:#d9a441; margin-bottom:18px; }
#gate h1 { font-family:'Fraunces', serif; font-weight:340; font-size:clamp(44px, 9vw, 82px);
  line-height:1.02; letter-spacing:-.01em; color:#f7efe0; margin-bottom:22px; }
.gate-line { font-size:clamp(14px,2.3vw,17px); line-height:1.65; color:#cbbfa8; margin-bottom:26px; }
.gate-quote { font-family:'Fraunces', serif; font-style:italic; font-weight:340; font-size:clamp(15px,2.5vw,19px);
  line-height:1.6; color:#ffe9b8; max-width:520px; margin:0 auto 34px; }
.gate-quote cite { display:block; font-family:'Inter',sans-serif; font-style:normal; font-size:11px;
  letter-spacing:.18em; text-transform:uppercase; color:#a89777; margin-top:12px; }
.gate-btns { display:flex; gap:14px; justify-content:center; flex-wrap:wrap; margin-bottom:22px; }
.gate-btns button { cursor:pointer; font-family:'Inter',sans-serif; border-radius:99px; transition:all .25s ease; }
#enter-sound { background:linear-gradient(135deg,#d9a441,#b9822c); color:#1a120b; border:none;
  font-size:15px; font-weight:600; letter-spacing:.02em; padding:15px 30px; box-shadow:0 6px 30px #d9a44133; }
#enter-sound:hover { transform:translateY(-2px); box-shadow:0 10px 38px #d9a44155; }
#enter-sound .btn-sub { display:block; font-size:10.5px; font-weight:500; opacity:.75; margin-top:3px; letter-spacing:.04em; }
#enter-quiet { background:transparent; color:#e8d9b8; border:1px solid #d9a44166; font-size:14px; padding:15px 26px; }
#enter-quiet:hover { border-color:#d9a441; background:#d9a4411a; }
.gate-hint { font-size:11.5px; letter-spacing:.14em; color:#8a7b62; margin-bottom:30px; }
.gentle-link { background:none; border:none; color:#8a7b62; font-size:12px; text-decoration:underline;
  text-underline-offset:3px; cursor:pointer; }
.gentle-link:hover { color:#d9a441; }

/* ——— journey overlays ——— */
#ovs { position:fixed; inset:0; z-index:20; pointer-events:none; }
.ov { position:fixed; opacity:0; will-change:opacity, transform; max-width:min(480px, calc(100vw - 48px)); }
.ov.left  { left:max(24px, 5vw); top:50%; }
.ov.right { right:max(24px, 5vw); top:50%; text-align:right; }
.ov.center{ left:50%; top:50%; text-align:center; }
.ov .card { display:inline-block; text-align:left; padding:22px 26px; border-radius:18px;
  background:linear-gradient(160deg, rgba(16,11,6,.62), rgba(16,11,6,.38));
  border:1px solid rgba(217,164,65,.22); backdrop-filter:blur(10px); -webkit-backdrop-filter:blur(10px);
  box-shadow:0 12px 50px rgba(0,0,0,.35); }
.ov.center .card { text-align:center; }
.ov .eyebrow { margin-bottom:10px; }
.ov h2 { font-family:'Fraunces', serif; font-weight:380; font-size:clamp(24px,4.6vw,38px); line-height:1.08; color:#f7efe0; margin-bottom:12px; }
.ov h2 em { font-style:italic; color:#ffe9b8; }
.ov .big { font-size:clamp(30px,6vw,52px); }
.ov blockquote { font-family:'Fraunces', serif; font-style:italic; font-weight:340;
  font-size:clamp(14px,2.4vw,17.5px); line-height:1.55; color:#ffe9b8; margin:0 0 12px; }
.ov blockquote cite { display:block; font-family:'Inter',sans-serif; font-style:normal; font-size:10px;
  letter-spacing:.18em; text-transform:uppercase; color:#a89777; margin-top:8px; }
.ov p { font-size:clamp(13px,2vw,15px); line-height:1.66; color:#d8ccb4; margin-bottom:10px; }
.ov p:last-child { margin-bottom:0; }
.ov .hint { font-size:11px; letter-spacing:.16em; text-transform:uppercase; color:#d9a441cc; margin-top:10px; }
.practice { display:flex; gap:10px; align-items:baseline; font-size:clamp(12px,1.9vw,13.5px);
  line-height:1.55; color:#cbbfa8; margin-bottom:7px; }
.practice .dot { flex:0 0 8px; width:8px; height:8px; border-radius:50%; position:relative; top:0; }
.dot.head  { background:#ffd98a; box-shadow:0 0 8px #ffd98a88; }
.dot.heart { background:#c96f3b; box-shadow:0 0 8px #c96f3b88; }
.dot.hands { background:#8fc06a; box-shadow:0 0 8px #8fc06a88; }
.practice b { color:#f4ead8; font-weight:600; }
.ph { display:inline-block; font-size:10px; letter-spacing:.1em; text-transform:uppercase;
  color:#e8b968; border:1px dashed #e8b96877; border-radius:99px; padding:3px 9px; margin-top:6px; }
.adopt { font-size:12px; font-style:italic; color:#a89777; line-height:1.6; margin-top:10px; }
.facts { display:flex; flex-direction:column; gap:10px; margin-top:6px; }
.fact { border-left:2px solid #d9a44166; padding-left:12px; }
.fact .num { font-family:'Fraunces',serif; font-size:20px; color:#ffd98a; }
.fact p { font-size:12.5px; margin:2px 0 0; }
#again-btn { pointer-events:auto; cursor:pointer; margin-top:16px; font-family:'Inter',sans-serif;
  background:linear-gradient(135deg,#d9a441,#b9822c); color:#1a120b; border:none; border-radius:99px;
  font-size:14px; font-weight:600; padding:13px 28px; box-shadow:0 6px 30px #d9a44133; transition:all .25s ease; }
#again-btn:hover { transform:translateY(-2px); }
.wide-only { display:inline; }
@media (max-width:700px){
  .wide-only { display:none; }
  .ov.left, .ov.right { left:16px; right:16px; text-align:left; }
  .ov.right .card { text-align:left; }
  .ov { max-width:calc(100vw - 32px); }
  .ov .card { padding:16px 18px; border-radius:14px; }
  .adopt { display:none; }
}
@media (max-height:600px){ .ov .card { padding:14px 16px; } .ov p { margin-bottom:6px; } }

/* ——— gentle / fallback story mode ——— */
#story { position:relative; z-index:10; max-width:720px; margin:0 auto; padding:110px 24px 40px; }
#story .s-note { font-size:12px; letter-spacing:.12em; text-transform:uppercase; color:#a89777;
  text-align:center; margin-bottom:60px; }
#story section { margin-bottom:90px; padding:34px 30px; border-radius:22px;
  border:1px solid rgba(217,164,65,.18); background:linear-gradient(165deg, rgba(30,22,13,.85), rgba(18,13,8,.9)); }
#story section.zone-light { background:linear-gradient(165deg, rgba(46,69,48,.55), rgba(18,13,8,.9)); }
#story section.zone-gold { background:linear-gradient(165deg, rgba(107,74,47,.5), rgba(18,13,8,.9)); }
#story h2 { font-family:'Fraunces',serif; font-weight:380; font-size:clamp(26px,5vw,38px); color:#f7efe0; margin:8px 0 14px; }
#story blockquote { font-family:'Fraunces',serif; font-style:italic; color:#ffe9b8; font-size:17px; line-height:1.6; margin-bottom:14px; }
#story blockquote cite { display:block; font-style:normal; font-family:'Inter',sans-serif; font-size:10px; letter-spacing:.16em; text-transform:uppercase; color:#a89777; margin-top:8px; }
#story p { color:#d8ccb4; line-height:1.7; font-size:15px; margin-bottom:12px; }

/* ——— footer ——— */
#foot { position:relative; z-index:10; text-align:center; padding:30px 20px 46px; color:#cbbfa8; font-size:13px; }
#foot .foot-small { margin-top:8px; font-size:11px; color:#8a7b62; max-width:560px; margin-left:auto; margin-right:auto; line-height:1.6; }

/* ——— reduced motion ——— */
@media (prefers-reduced-motion: reduce){
  .grain { animation:none; }
  * { scroll-behavior:auto !important; }
}
