/* Hallmark · pre-emit critique: P5 H4 E4 S5 R5 V5 · macrostructure: full-bleed sky scene + scroll lore + coda · studied-DNA (source: Tension, Awwwards Nominee) · contrast: pass · mobile: pass */
@font-face { font-family: 'Darker Grotesque'; src: url('fonts/darker-grotesque-latin-700-normal.woff2') format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Darker Grotesque'; src: url('fonts/darker-grotesque-latin-800-normal.woff2') format('woff2'); font-weight: 800; font-display: swap; }
@font-face { font-family: 'Darker Grotesque'; src: url('fonts/darker-grotesque-latin-500-normal.woff2') format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Karla'; src: url('fonts/karla-latin-400-normal.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Karla'; src: url('fonts/karla-latin-500-normal.woff2') format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Karla'; src: url('fonts/karla-latin-600-normal.woff2') format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Karla'; src: url('fonts/karla-latin-400-italic.woff2') format('woff2'); font-weight: 400; font-style: italic; font-display: swap; }

:root {
  --plum: #2b0e35;
  --night: #1a0821;
  --cream: #ebe4d3;
  --dusk: #b8a6bd;
  --dawn: #e9b98a;
  --rule: #4a2a55;
  --ease: cubic-bezier(.2, .7, .1, 1);
  --display: 'Darker Grotesque', 'Arial Narrow', sans-serif;
  --body: 'Karla', 'Helvetica Neue', Arial, sans-serif;
}
* { box-sizing: border-box; }
html { background: var(--night); color: var(--cream); -webkit-text-size-adjust: 100%; overflow-x: clip; }
body { margin: 0; font-family: var(--body); font-size: 15px; line-height: 1.5; overflow-x: clip; }
a { color: inherit; }
button, input, textarea { font: inherit; color: inherit; }
::selection { background: var(--cream); color: var(--plum); }
:focus-visible { outline: 2px solid var(--dawn); outline-offset: 3px; }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- top chrome ---------- */
.top { position: fixed; inset: 0 0 auto 0; z-index: 30; display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; pointer-events: none; }
.top > * { pointer-events: auto; }
.brandmark { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brandmark img { width: 44px; height: 44px; border-radius: 9px; display: block; }
.brandmark span { font-weight: 600; font-size: 13px; color: var(--cream); }
.brandmark em { font-style: normal; color: var(--dusk); font-weight: 500; }
.coin { display: flex; align-items: center; gap: 8px; }
.ico { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--rule); background: rgba(26, 8, 33, .55); backdrop-filter: blur(8px); transition: border-color .15s, background .15s; }
.ico:hover { border-color: var(--cream); }
.ico svg { width: 15px; height: 15px; fill: var(--cream); }
.ca { display: none; align-items: center; gap: 8px; height: 36px; padding: 0 6px 0 14px; border-radius: 18px; border: 1px solid var(--rule); background: rgba(26, 8, 33, .55); backdrop-filter: blur(8px); font-size: 13px; font-weight: 500; cursor: pointer; }
.ca.on { display: inline-flex; }
.ca b { font-weight: 600; }
.buy { display: none; height: 36px; padding: 0 16px; align-items: center; border-radius: 18px; background: var(--cream); color: var(--plum); font-weight: 600; font-size: 13px; text-decoration: none; }
.buy.on { display: inline-flex; }

/* ---------- the sky ---------- */
.skywrap { position: relative; height: 100vh; height: 100svh; min-height: 560px; overflow: hidden; background: var(--plum); }
#sky { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: grab; touch-action: pan-y; }
#sky.drag { cursor: grabbing; }
#sky.point { cursor: pointer; }
.empty { position: absolute; left: 50%; top: 40%; transform: translate(-50%, -50%); text-align: center; width: min(520px, 86vw); pointer-events: none; opacity: 0; transition: opacity .8s var(--ease); }
.empty.on { opacity: 1; }
.empty p { margin: 0; font-family: var(--display); font-weight: 700; font-size: clamp(26px, 3vw, 38px); line-height: 1.02; letter-spacing: -.01em; }
.empty small { display: block; margin-top: 10px; color: var(--dusk); font-size: 14px; }
.tip { position: absolute; z-index: 5; pointer-events: none; max-width: 280px; padding: 9px 12px; border-radius: 10px; background: rgba(26, 8, 33, .86); border: 1px solid var(--rule); font-size: 13px; line-height: 1.35; opacity: 0; transform: translateY(4px); transition: opacity .15s, transform .15s; }
.tip.on { opacity: 1; transform: none; }
.tip i { display: block; font-style: normal; color: var(--dusk); font-size: 12px; margin-top: 3px; }

/* loader: the title block, centred, then it settles bottom-left */
.loader { position: absolute; inset: 0; z-index: 20; display: grid; place-items: center; background: var(--plum); transition: opacity .9s var(--ease), visibility .9s; }
.loader.gone { opacity: 0; visibility: hidden; }
.loadblock { width: min(420px, 80vw); }
.loadblock .big { font-family: var(--display); font-weight: 800; font-size: clamp(110px, 14vw, 190px); line-height: .78; letter-spacing: -.045em; margin: 0; }
.loadblock .say { font-family: var(--display); font-weight: 700; font-size: clamp(30px, 3.4vw, 46px); line-height: 1; letter-spacing: -.015em; margin: 14px 0 0; }
.track { margin-top: 26px; height: 1px; background: var(--rule); position: relative; overflow: hidden; }
.track i { position: absolute; inset: 0; background: var(--cream); transform-origin: 0 50%; transform: scaleX(0); transition: transform .5s var(--ease); }
.status { margin-top: 10px; display: flex; gap: 8px; align-items: center; justify-content: center; font-size: 13px; font-weight: 600; color: var(--dusk); }
.spin { width: 11px; height: 11px; border-radius: 50%; border: 1.5px solid var(--rule); border-top-color: var(--cream); animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* bottom-left: the title and the write field */
.hud { position: absolute; z-index: 10; left: 28px; bottom: 28px; width: min(470px, calc(100vw - 56px)); opacity: 0; transform: translateY(16px); transition: opacity .9s var(--ease) .15s, transform .9s var(--ease) .15s; }
.ready .hud { opacity: 1; transform: none; }
.hud h1 { margin: 0; font-family: var(--display); font-weight: 800; font-size: clamp(76px, 8vw, 118px); line-height: .78; letter-spacing: -.045em; }
.hud h1 span { display: block; font-weight: 700; font-size: .36em; line-height: 1; letter-spacing: -.015em; margin-top: .3em; }
.hud h1 .wm { display: block; width: clamp(210px, 19vw, 320px); height: auto; margin-left: -2px; }
.hud h1 .wm + span { font-size: clamp(30px, 2.9vw, 46px); margin-top: .32em; white-space: nowrap; }
.hud .lead { margin: 16px 0 0; max-width: 400px; color: var(--cream); font-size: 15px; }
.hud .lead em { font-style: normal; color: var(--dusk); }
.write { margin-top: 18px; display: flex; gap: 8px; align-items: stretch; }
.write label { flex: 1; position: relative; display: block; }
.write input { width: 100%; height: 50px; padding: 0 58px 0 18px; border-radius: 25px; border: 1px solid var(--rule); background: rgba(26, 8, 33, .72); backdrop-filter: blur(10px); font-size: 15px; outline: none; transition: border-color .15s; }
.write input::placeholder { color: #9d8aa3; }
.write input:focus { border-color: var(--cream); }
.write .count { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); font-size: 12px; color: var(--dusk); font-variant-numeric: tabular-nums; }
.btn { height: 50px; padding: 0 22px; border-radius: 25px; border: 1px solid var(--cream); background: var(--cream); color: var(--plum); font-weight: 600; font-size: 14px; cursor: pointer; white-space: nowrap; transition: background .15s, color .15s, opacity .15s; }
.btn:hover { background: #fff8e8; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn:active { transform: translateY(1px); }
.btn.ghost { background: rgba(26, 8, 33, .6); color: var(--cream); border-color: var(--rule); }
.btn.ghost:hover { border-color: var(--cream); background: rgba(26, 8, 33, .8); }
.btn.small { height: 38px; padding: 0 16px; font-size: 13px; }
.note { margin: 10px 2px 0; font-size: 13px; color: var(--dusk); min-height: 1.5em; }
.note.err { color: var(--dawn); }
.mine { margin-top: 18px; padding: 16px 18px; border-radius: 18px; border: 1px solid var(--rule); background: rgba(26, 8, 33, .72); backdrop-filter: blur(10px); }
.mine q { display: block; font-family: var(--display); font-weight: 700; font-size: 24px; line-height: 1.05; quotes: none; }
.mine p { margin: 8px 0 12px; font-size: 13px; color: var(--dusk); }
.row { display: flex; flex-wrap: wrap; gap: 8px; }
.textlink { background: none; border: 0; padding: 0; color: var(--dusk); font-size: 13px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.textlink:hover { color: var(--cream); }

/* bottom-right: views and the live counts */
.views { position: absolute; z-index: 10; right: 28px; bottom: 28px; display: flex; flex-direction: column; align-items: flex-end; gap: 12px; opacity: 0; transition: opacity .9s var(--ease) .35s; }
.ready .views { opacity: 1; }
.pills { display: flex; gap: 6px; padding: 4px; border-radius: 22px; border: 1px solid var(--rule); background: rgba(26, 8, 33, .6); backdrop-filter: blur(8px); }
.pills button { height: 34px; padding: 0 16px; border: 0; border-radius: 17px; background: none; font-size: 13px; font-weight: 600; color: var(--dusk); cursor: pointer; transition: background .2s, color .2s; }
.pills button[aria-pressed="true"] { background: var(--cream); color: var(--plum); }
.counts { margin-top: 22px; text-shadow: 0 1px 10px var(--night); text-align: right; font-size: 13px; color: var(--cream); font-variant-numeric: tabular-nums; max-width: 460px; }
.counts small { display: block; color: var(--dusk); }
.scrollhint { position: absolute; z-index: 10; left: 50%; bottom: 22px; transform: translateX(-50%); font-size: 12px; color: var(--dusk); text-decoration: none; opacity: 0; transition: opacity .9s .6s; }
.ready .scrollhint { opacity: 1; }

/* the dream panel */
.panel { position: fixed; z-index: 40; top: 0; right: 0; bottom: 0; width: min(440px, 100vw); padding: 92px 34px 34px; background: rgba(26, 8, 33, .94); backdrop-filter: blur(14px); border-left: 1px solid var(--rule); transform: translateX(102%); transition: transform .6s var(--ease); overflow-y: auto; }
.panel.open { transform: none; }
.panel .x { position: absolute; top: 24px; right: 24px; }
.panel .night { font-family: var(--display); font-weight: 800; font-size: 64px; line-height: .8; letter-spacing: -.035em; margin: 0; }
.panel .night.dawn { color: var(--dawn); }
.panel .night span { display: block; margin-top: 10px; font-size: .56em; line-height: .9; color: var(--cream); }
.panel blockquote { margin: 22px 0 0; font-family: var(--display); font-weight: 700; font-size: 32px; line-height: 1.02; letter-spacing: -.01em; overflow-wrap: anywhere; }
.panel .facts { margin: 18px 0 0; color: var(--dusk); font-size: 14px; }
.panel .facts b { color: var(--cream); font-weight: 600; }
.panel .said { margin: 14px 0 0; padding-left: 14px; border-left: 2px solid var(--dawn); font-style: italic; }
.panel .acts { margin-top: 24px; display: flex; flex-wrap: wrap; gap: 8px; }
.panel .own { margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--rule); }
.panel .own h3 { margin: 0 0 6px; font-family: var(--display); font-weight: 700; font-size: 24px; line-height: 1; }
.panel .own p { margin: 0 0 12px; color: var(--dusk); font-size: 13px; }
.panel .code { display: block; margin: 8px 0 12px; padding: 12px 14px; border-radius: 12px; border: 1px dashed var(--rule); font-size: 15px; font-weight: 600; letter-spacing: .04em; user-select: all; overflow-wrap: anywhere; }
.panel input { width: 100%; height: 44px; margin-bottom: 10px; padding: 0 14px; border-radius: 22px; border: 1px solid var(--rule); background: rgba(43, 14, 53, .7); outline: none; }
.panel input:focus { border-color: var(--cream); }
.panel .report { margin-top: 34px; }

/* care note (self-harm) */
.care { position: fixed; inset: 0; z-index: 60; display: none; place-items: center; background: rgba(26, 8, 33, .82); backdrop-filter: blur(6px); padding: 20px; }
.care.on { display: grid; }
.care div { width: min(460px, 100%); padding: 30px; border-radius: 22px; background: var(--plum); border: 1px solid var(--rule); }
.care h2 { margin: 0 0 10px; font-family: var(--display); font-weight: 800; font-size: 34px; line-height: .95; letter-spacing: -.02em; }
.care p { margin: 0 0 12px; color: var(--cream); }
.care p small { color: var(--dusk); font-size: 13px; }

/* ---------- the lore ---------- */
.lore { position: relative; background: var(--night); padding: 140px 28px 60px; }
.lore .logo-read { max-width: 1100px; margin: 0 auto; display: grid; grid-template-columns: 1fr; justify-items: center; }
.lore .logo-read img { width: min(620px, 86vw); height: auto; aspect-ratio: 1; border-radius: 28px; display: block; }
.letters { width: min(860px, 100%); display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; margin-top: 46px; }
.letters article { border-top: 1px solid var(--rule); padding-top: 16px; }
.letters h3 { margin: 0 0 8px; font-family: var(--display); font-weight: 800; font-size: 44px; line-height: .9; letter-spacing: -.03em; }
.letters p { margin: 0; color: var(--dusk); font-size: 15px; }
.letters article:nth-child(2) h3 { color: var(--cream); }
.story { max-width: 900px; margin: 150px auto 0; }
.story p { margin: 0 0 .6em; font-family: var(--display); font-weight: 700; font-size: clamp(30px, 3.6vw, 52px); line-height: 1.02; letter-spacing: -.015em; color: var(--cream); }
.story p.soft { color: var(--dusk); }
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.coda { max-width: 1200px; margin: 170px auto 0; text-align: center; }
.coda .huge { margin: 0; font-family: var(--display); font-weight: 800; font-size: clamp(120px, 22vw, 340px); line-height: .74; letter-spacing: -.05em; }
.coda .huge2 { margin: 22px 0 0; font-family: var(--display); font-weight: 700; font-size: clamp(40px, 6vw, 92px); line-height: .9; letter-spacing: -.025em; }
.coda p { margin: 26px auto 0; max-width: 520px; color: var(--dusk); }
.coda .btn { margin-top: 26px; }
.coda .huge, .coda .huge2 { max-width: none; color: var(--cream); }
.coda .huge2 { white-space: nowrap; }
.foot { max-width: 1200px; margin: 150px auto 0; padding-top: 22px; border-top: 1px solid var(--rule); display: flex; flex-wrap: wrap; gap: 14px 26px; justify-content: space-between; font-size: 13px; color: var(--dusk); }
.foot nav { display: flex; gap: 20px; flex-wrap: wrap; }
.foot a { color: var(--cream); text-decoration: none; }
.foot a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- docs / status pages ---------- */
.page { max-width: 760px; margin: 0 auto; padding: 130px 26px 80px; }
.page h1 { margin: 0; font-family: var(--display); font-weight: 800; font-size: clamp(64px, 9vw, 110px); line-height: .8; letter-spacing: -.045em; }
.page h1 span { display: block; font-weight: 700; font-size: .4em; letter-spacing: -.015em; margin-top: .35em; line-height: 1; }
.page h2 { margin: 56px 0 10px; font-family: var(--display); font-weight: 800; font-size: 34px; line-height: 1; letter-spacing: -.02em; }
.page p, .page li { color: var(--cream); font-size: 16px; }
.page p.soft, .page .soft { color: var(--dusk); }
.page ul { padding-left: 20px; }
.page code { font-size: 14px; padding: 1px 6px; border-radius: 6px; background: var(--plum); }
.checks { margin-top: 30px; border-top: 1px solid var(--rule); }
.checks div { display: flex; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--rule); font-size: 15px; }
.checks span:last-child { color: var(--dusk); text-align: right; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 10px; background: var(--dawn); vertical-align: 1px; }
.dot.ok { background: var(--cream); }

@media (max-width: 760px) {
  .top { padding: 14px; }
  .brandmark span { display: none; }
  .hud { left: 16px; right: 16px; bottom: 18px; width: auto; }
  .hud h1 { font-size: 72px; }
  .hud h1 .wm { width: 168px; }
  .hud h1 .wm + span { font-size: 30px; }
  .hud .lead { font-size: 14px; margin-top: 12px; }
  .views { right: 16px; top: 74px; bottom: auto; }
  .counts { display: none; }
  .scrollhint { display: none; }
  .write { flex-direction: column; }
  .btn { width: 100%; }
  .btn.small, .pills button, .panel .acts .btn, .row .btn { width: auto; }
  .letters { grid-template-columns: 1fr; gap: 24px; }
  .story { margin-top: 100px; }
  .panel { padding: 80px 22px 28px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- docs and status ---------- */
.doc-page { background: linear-gradient(180deg, var(--night) 0, var(--plum) 900px, var(--night) 100%); min-height: 100vh; }
.doc { max-width: 760px; margin: 0 auto; padding: 150px 28px 60px; }
.doc h1 { margin: 0; font-family: var(--display); font-weight: 800; font-size: clamp(84px, 13vw, 170px); line-height: .76; letter-spacing: -.05em; }
.doc h1 span { display: block; margin-top: 18px; font-weight: 700; font-size: clamp(30px, 4.4vw, 54px); line-height: .95; letter-spacing: -.02em; color: var(--cream); }
.doc .intro { margin: 34px 0 10px; font-size: 19px; line-height: 1.55; color: var(--cream); max-width: 640px; }
.doc section { margin-top: 56px; }
.doc h2 { margin: 0 0 12px; font-family: var(--display); font-weight: 800; font-size: 38px; line-height: 1; letter-spacing: -.02em; }
.doc p, .doc li { color: var(--dusk); font-size: 16px; line-height: 1.65; }
.doc p a, .doc li a { color: var(--cream); }
.doc ul { padding-left: 20px; }
.doc .foot { margin-top: 110px; }
.doc .small { color: var(--dusk); font-size: 13px; }
.stats { margin-top: 30px; border-top: 1px solid var(--rule); }
.stat { display: grid; grid-template-columns: 14px 170px 1fr auto; gap: 14px; align-items: center; padding: 18px 0; border-bottom: 1px solid var(--rule); font-size: 15px; }
.stat .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--dusk); }
.stat.ok .dot { background: var(--dawn); box-shadow: 0 0 0 4px rgba(233, 185, 138, .14); }
.stat.down .dot { background: #c96a6a; }
.stat b { font-weight: 600; }
.stat .what { color: var(--dusk); }
.stat .ms { color: var(--dusk); font-size: 13px; }
@media (max-width: 760px) {
  .doc { padding: 120px 20px 40px; }
  .stat { grid-template-columns: 14px 1fr auto; }
  .stat b { grid-column: 2; grid-row: 1; } .stat .ms { grid-column: 3; grid-row: 1; white-space: nowrap; } .stat .what { grid-column: 2 / 4; grid-row: 2; margin-top: -8px; }
}
[hidden] { display: none !important; }
