/* ==========================================================================
   By Myself — website v2
   Warm paper + ink, editorial serif display, one scroll-driven story line.
   Past / present / future colours (from the app) are accents only.
   ========================================================================== */

@font-face {
  font-family: "BM Serif";
  src: url("fonts/serif-sc.woff2?v=a9eb3a1c46") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "BM Inter";
  src: url("fonts/Inter-Variable-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212, U+FEFF;
}

:root {
  color-scheme: light;
  --font-sans: "BM Inter", "PingFang SC", "Microsoft YaHei UI", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
  --font-serif: "BM Serif", "Songti SC", "STSong", "SimSun", serif;

  --paper: #f2efe8;
  --paper-2: #e9e5dc;
  --card: #faf8f4;
  --ink: #1f1e1c;
  --ink-2: #57544e;
  --ink-3: #6f6b64;
  --line: rgba(31, 30, 28, 0.14);
  --line-soft: rgba(31, 30, 28, 0.08);
  --inv-bg: #1f1e1c;
  --inv-ink: #f2efe8;
  --inv-ink-2: #b9b4aa;
  --inv-line: rgba(242, 239, 232, 0.16);

  --past: #5856d6;
  --present: #34c759;
  --future: #ff9500;
  --past-text: #4f4dc9;
  --present-text: #17652c;
  --future-text: #934000;
  --past-soft: rgba(88, 86, 214, 0.12);
  --present-soft: rgba(52, 199, 89, 0.14);
  --future-soft: rgba(255, 149, 0, 0.14);
  --mood-1: #6e6cd8;
  --mood-2: #4a86c8;
  --mood-3: #7c7c82;
  --mood-4: #2fa84f;
  --mood-5: #e98a00;

  --grain-opacity: 0.1;
  --shadow: 0 1px 0 rgba(255, 255, 255, 0.6) inset, 0 24px 60px -24px rgba(31, 30, 28, 0.25);

  --wrap: 1280px;
  --gutter: clamp(16px, 4vw, 48px);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-io: cubic-bezier(0.65, 0, 0.35, 1);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #141413;
  --paper-2: #1b1b19;
  --card: #1f1f1d;
  --ink: #ece8e0;
  --ink-2: #b3aea5;
  --ink-3: #8f8a81;
  --line: rgba(236, 232, 224, 0.16);
  --line-soft: rgba(236, 232, 224, 0.08);
  --inv-bg: #ece8e0;
  --inv-ink: #1a1a18;
  --inv-ink-2: #57544e;
  --inv-line: rgba(26, 26, 24, 0.16);
  --past-text: #a8a7ff;
  --present-text: #63da84;
  --future-text: #ffb54d;
  --past-soft: rgba(94, 92, 230, 0.2);
  --present-soft: rgba(48, 209, 88, 0.18);
  --future-soft: rgba(255, 159, 10, 0.18);
  --grain-opacity: 0.07;
  --shadow: 0 24px 60px -24px rgba(0, 0, 0, 0.7);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --paper: #141413; --paper-2: #1b1b19; --card: #1f1f1d;
    --ink: #ece8e0; --ink-2: #b3aea5; --ink-3: #8f8a81;
    --line: rgba(236, 232, 224, 0.16); --line-soft: rgba(236, 232, 224, 0.08);
    --inv-bg: #ece8e0; --inv-ink: #1a1a18; --inv-ink-2: #57544e; --inv-line: rgba(26, 26, 24, 0.16);
    --past-text: #a8a7ff; --present-text: #63da84; --future-text: #ffb54d;
    --past-soft: rgba(94, 92, 230, 0.2); --present-soft: rgba(48, 209, 88, 0.18); --future-soft: rgba(255, 159, 10, 0.18);
    --grain-opacity: 0.07; --shadow: 0 24px 60px -24px rgba(0, 0, 0, 0.7);
  }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background-color 0.4s, color 0.4s;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p, ol, ul { margin: 0; padding: 0; }
ul, ol { list-style: none; }
button { font: inherit; color: inherit; }
code {
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: 0.88em; padding: 0.1em 0.4em; border-radius: 4px;
  background: var(--line-soft); word-break: break-all;
}
::selection { background: var(--ink); color: var(--paper); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 4px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.icon { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

/* Paper grain: one static tile on its own compositor layer, no blend mode, no SVG filter, so scrolling never repaints it. */
body::after { content: ""; position: fixed; inset: 0; z-index: 90; pointer-events: none; background: url("assets/grain.png") repeat; background-size: 160px; opacity: var(--grain-opacity); transform: translateZ(0); }
:root[data-theme="dark"] body::after { filter: invert(1); }

.skip { position: absolute; left: 16px; top: -60px; z-index: 200; padding: 10px 16px; background: var(--ink); color: var(--paper); border-radius: 6px; }
.skip:focus { top: 16px; }

/* ---------- Type helpers ---------- */
.meta-row { display: flex; flex-wrap: wrap; gap: 8px 32px; font-size: 13px; color: var(--ink-3); letter-spacing: 0.04em; }
.meta-row span::before { content: "●"; font-size: 6px; vertical-align: 3px; margin-right: 10px; color: var(--ink-3); }
.meta-label { font-size: 13px; letter-spacing: 0.08em; color: var(--ink-3); margin-bottom: 28px; }
.meta-label--inv { color: var(--inv-ink-2); }
.display-2 {
  font-family: var(--font-serif); font-weight: 600;
  font-size: clamp(36px, 5.6vw, 76px); line-height: 1.12; letter-spacing: -0.01em;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 44px; padding: 0 22px; border-radius: 999px;
  font-size: 15px; font-weight: 500; white-space: nowrap; cursor: pointer;
  border: 1px solid transparent;
  transition: background-color 0.25s, color 0.25s, border-color 0.25s, transform 0.25s var(--ease);
}
.btn:active { transform: scale(0.97); }
.btn--sm { min-height: 36px; padding: 0 18px; font-size: 14px; }
.btn--lg { min-height: 54px; padding: 0 28px; font-size: 16px; }
.btn--ink { background: var(--ink); color: var(--paper); }
.btn--ink:hover { background: var(--past); color: #fff; }
.btn--line { border-color: var(--line); color: var(--ink); }
.btn--line:hover { border-color: var(--ink); }
.btn--line .icon { transition: transform 0.3s var(--ease); }
.btn--line:hover .icon { transform: translateY(3px); }

.icon-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: none; border: 0; cursor: pointer; color: var(--ink-2); transition: background-color 0.2s, color 0.2s; }
.icon-btn:hover { background: var(--line-soft); color: var(--ink); }
.icon--moon { display: none; }
:root[data-theme="dark"] .icon--sun { display: none; }
:root[data-theme="dark"] .icon--moon { display: block; }

/* ---------- Loader ---------- */
.loader { display: none; }
.intro .loader {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 28px;
  position: fixed; inset: 0; z-index: 150; background: var(--paper);
  animation: loader-out 0.9s var(--ease-io) 1.9s forwards;
}
.loader__mark { position: relative; width: 220px; height: 40px; }
.loader__line { position: absolute; left: 20px; right: 20px; top: 50%; height: 2px; margin-top: -1px; background: var(--ink); transform-origin: left; transform: scaleX(0); animation: draw 0.8s var(--ease-io) 0.15s forwards; }
.loader__dot { position: absolute; top: 50%; border-radius: 50%; transform: translate(-50%, -50%) scale(0); animation: pop 0.5s var(--ease) forwards; }
.loader__dot--past { left: 20px; width: 14px; height: 14px; background: var(--past); animation-delay: 0.45s; }
.loader__dot--present { left: 110px; width: 26px; height: 26px; background: var(--present); animation-delay: 0.7s; }
.loader__dot--future { left: 200px; width: 14px; height: 14px; border: 2.5px solid var(--future); animation-delay: 0.95s; }
.loader__word { font-family: var(--font-serif); font-size: 22px; letter-spacing: 0.02em; opacity: 0; animation: fade-up 0.6s var(--ease) 1.15s forwards; }
/* repeat visits in the same session: same opening, about twice as fast */
.intro.intro-quick .loader { animation-duration: 0.75s; animation-delay: 0.8s; }
.intro-quick .loader__line { animation-duration: 0.45s; animation-delay: 0.05s; }
.intro-quick .loader__dot--past { animation-delay: 0.2s; }
.intro-quick .loader__dot--present { animation-delay: 0.32s; }
.intro-quick .loader__dot--future { animation-delay: 0.44s; }
.intro-quick .loader__word { animation-delay: 0.45s; }
@keyframes draw { to { transform: scaleX(1); } }
@keyframes pop { to { transform: translate(-50%, -50%) scale(1); } }
@keyframes fade-up { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes loader-out { to { transform: translateY(-100%); visibility: hidden; } }

/* ---------- Nav ---------- */
.nav { position: fixed; top: 0; left: 0; right: 0; z-index: 60; transition: background-color 0.3s, border-color 0.3s, transform 0.4s var(--ease); border-bottom: 1px solid transparent; }
.nav.is-scrolled { background: color-mix(in srgb, var(--paper) 82%, transparent); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); border-bottom-color: var(--line-soft); }
.nav.is-hidden { transform: translateY(-100%); }
.nav__inner { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); height: 68px; display: flex; align-items: center; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; font-size: 16px; }
.brand img { border-radius: 7px; }
.nav nav { margin-left: auto; }
.nav__links { display: flex; gap: 4px; }
.nav__links a { position: relative; display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; font-size: 14px; color: var(--ink-2); transition: color 0.2s; }
.nav__links a::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: 9px; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: right; transition: transform 0.35s var(--ease); }
.nav__links a:hover { color: var(--ink); }
.nav__links a:hover::after { transform: scaleX(1); transform-origin: left; }
.nav__actions { display: flex; align-items: center; gap: 8px; }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: 100svh; display: flex; flex-direction: column; justify-content: flex-end; padding: 104px 0 0; }
.hero__meta { margin-bottom: clamp(24px, 4vh, 48px); }
.hero__title {
  font-family: var(--font-serif); font-weight: 600;
  font-size: clamp(48px, min(9vw, 15vh), 136px); line-height: 1.06; letter-spacing: -0.02em;
}
.line { display: block; overflow: hidden; padding-bottom: 0.04em; }
.line--indent { padding-left: 1.2em; }
.line__in { display: inline-flex; align-items: center; transform: translateY(105%); transition: transform 1.1s var(--ease); }
.is-ready .line__in { transform: none; }
.is-ready .line:nth-child(2) .line__in { transition-delay: 0.1s; }
.is-ready .line:nth-child(3) .line__in { transition-delay: 0.2s; }
.tick { display: inline-block; width: 0.16em; height: 0.16em; border-radius: 50%; margin-right: 0.28em; flex: none; }
.tick--past { background: var(--past); }
.tick--present { background: var(--present); width: 0.24em; height: 0.24em; }
.tick--future { border: 0.035em solid var(--future); }
.hero__foot { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 32px; margin-top: clamp(28px, 5vh, 64px); }
.hero__lede { font-size: clamp(16px, 1.5vw, 19px); color: var(--ink-2); max-width: 30em; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; }
.hero__foot { opacity: 0; transform: translateY(16px); transition: opacity 0.9s var(--ease) 0.45s, transform 0.9s var(--ease) 0.45s; }
.is-ready .hero__foot { opacity: 1; transform: none; }

.spine { position: relative; height: 110px; margin-top: clamp(32px, 5vh, 64px); overflow: hidden; }
.spine__line { position: absolute; left: 0; right: 0; top: 50%; height: 1.5px; background: var(--ink); transform-origin: left; transform: scaleX(0); transition: transform 1.6s var(--ease-io) 0.3s; }
.is-ready .spine__line { transform: scaleX(1); }
.spine__dot { position: absolute; top: 50%; border-radius: 50%; transform: translate(-50%, -50%) scale(0); transition: transform 0.7s var(--ease); }
.spine__dot em { position: absolute; top: calc(50% + 24px); left: 50%; transform: translateX(-50%); font-style: normal; font-size: 13px; color: var(--ink-3); white-space: nowrap; letter-spacing: 0.1em; }
.spine__dot--past { left: 16%; width: 14px; height: 14px; background: var(--past); transition-delay: 0.7s; }
.spine__dot--present { left: 50%; width: 28px; height: 28px; background: var(--present); transition-delay: 1s; }
.spine__dot--future { left: 84%; width: 14px; height: 14px; border: 2.5px solid var(--future); background: var(--paper); transition-delay: 1.3s; }
.is-ready .spine__dot { transform: translate(-50%, -50%) scale(1); }
.spine__dot--present::after { content: ""; position: absolute; inset: -10px; border-radius: 50%; border: 1px solid var(--present); opacity: 0; animation: ping 2.6s var(--ease) 2.4s infinite; }
@keyframes ping { 0% { transform: scale(0.6); opacity: 0.7; } 100% { transform: scale(1.8); opacity: 0; } }

/* ---------- Showcase: real app screens ---------- */
.showcase { padding: clamp(96px, 12vw, 168px) 0 clamp(40px, 6vw, 80px); }
.showcase__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 24px 48px; margin-bottom: clamp(36px, 5vw, 56px); }
.showcase__sub { max-width: 26em; color: var(--ink-2); font-size: 16px; }
.sc-tabs { display: grid; grid-template-columns: repeat(6, 1fr); border-top: 1px solid var(--line); }
.sc-tab {
  position: relative; display: flex; align-items: baseline; gap: 10px; min-height: 56px; padding: 16px 12px 16px 0;
  background: none; border: 0; text-align: left; cursor: pointer; font-size: 15px; color: var(--ink-3); transition: color 0.3s;
}
.sc-tab:hover { color: var(--ink); }
.sc-tab.is-on { color: var(--ink); font-weight: 600; }
.sc-tab__no { font-family: var(--font-serif); font-size: 13px; font-weight: 600; color: var(--ink-3); }
.sc-tab__bar { position: absolute; left: 0; right: 12px; top: -1px; height: 2px; background: var(--ink); transform: scaleX(0); transform-origin: left; }
.sc-tab.is-on .sc-tab__bar { transform: scaleX(1); }
.showcase.is-playing .sc-tab.is-on .sc-tab__bar { animation: sc-progress var(--sc-dur, 6s) linear forwards; }
.showcase.is-paused .sc-tab.is-on .sc-tab__bar { animation-play-state: paused; }
@keyframes sc-progress { from { transform: scaleX(0); } to { transform: scaleX(1); } }

.sc-stage { margin-top: 28px; perspective: 1600px; }
.sc-window {
  border-radius: 14px; overflow: hidden; background: var(--card);
  border: 1px solid var(--line-soft);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.5) inset, 0 50px 100px -40px rgba(31, 30, 28, 0.45), 0 20px 40px -30px rgba(31, 30, 28, 0.35);
  transform-origin: 50% 0%;
}
:root[data-theme="dark"] .sc-window { background: #1c1c1e; box-shadow: 0 50px 100px -40px rgba(0, 0, 0, 0.9); }
.sc-titlebar { display: flex; justify-content: space-between; align-items: center; height: 34px; padding: 0 0 0 14px; font-size: 12px; color: var(--ink-3); border-bottom: 1px solid var(--line-soft); }
.sc-titlebar__app { display: inline-flex; align-items: center; gap: 8px; }
.sc-titlebar__app img { border-radius: 4px; }
.sc-titlebar__ctl { display: flex; height: 100%; }
.sc-titlebar__ctl i { position: relative; width: 46px; height: 100%; }
.sc-titlebar__ctl i::before, .sc-titlebar__ctl i::after { content: ""; position: absolute; left: 50%; top: 50%; background: currentColor; }
.sc-titlebar__ctl .min::before { width: 10px; height: 1px; transform: translate(-50%, -50%); }
.sc-titlebar__ctl .max::before { width: 9px; height: 9px; background: none; border: 1px solid currentColor; transform: translate(-50%, -50%); }
.sc-titlebar__ctl .cls::before, .sc-titlebar__ctl .cls::after { width: 12px; height: 1px; transform: translate(-50%, -50%) rotate(45deg); }
.sc-titlebar__ctl .cls::after { transform: translate(-50%, -50%) rotate(-45deg); }
.sc-screens { position: relative; aspect-ratio: 16 / 10; background: var(--paper-2); }
.sc-shot { position: absolute; inset: 0; margin: 0; opacity: 0; overflow: hidden; transition: opacity 0.6s var(--ease); }
.gsap-ok .sc-shot { transition: none; }
.gsap-ok .sc-shot .sc-img { will-change: transform; }
.sc-shot[hidden] { display: block; visibility: hidden; }
.sc-shot.is-on { opacity: 1; visibility: visible; }
.sc-img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top left; }
.sc-img--dark { display: none; }
:root[data-theme="dark"] .sc-img--light { display: none; }
:root[data-theme="dark"] .sc-img--dark { display: block; }
.sc-caps { position: relative; margin-top: 28px; min-height: 3.4em; }
.sc-cap { position: absolute; inset: 0 auto auto 0; max-width: 44em; font-size: 16px; color: var(--ink-2); opacity: 0; transform: translateY(8px); transition: opacity 0.5s, transform 0.6s var(--ease); }
.sc-cap.is-on { opacity: 1; transform: none; }
.sc-cap b { color: var(--ink); margin-right: 12px; font-weight: 600; }

/* ---------- Manifesto ---------- */
.manifesto { padding: clamp(120px, 18vw, 240px) 0; }
.manifesto__text {
  font-family: var(--font-serif); font-weight: 600;
  font-size: clamp(26px, 3.6vw, 50px); line-height: 1.5; max-width: 22em;
}
.manifesto__text .w { color: var(--ink); opacity: 0.16; transition: opacity 0.3s; }
.manifesto__text .w.is-lit { opacity: 1; }

/* ---------- Story ---------- */
.story { padding-bottom: clamp(80px, 12vw, 160px); }
.story__grid { display: grid; grid-template-columns: minmax(240px, 0.8fr) 2fr; gap: clamp(32px, 6vw, 96px); }
.story__rail { position: relative; }
.rail { position: sticky; top: 18vh; }
.rail__num { height: clamp(96px, 12vw, 176px); overflow: hidden; font-family: var(--font-serif); font-size: clamp(96px, 12vw, 176px); line-height: 1; }
.rail__digits { display: flex; flex-direction: column; transition: transform 0.8s var(--ease); }
.rail__digits b { font-weight: 600; height: 1em; }
.rail__names { position: relative; height: 32px; margin-top: 18px; overflow: hidden; font-size: 20px; letter-spacing: 0.3em; }
.rail__names span { position: absolute; left: 0; top: 0; opacity: 0; transform: translateY(100%); transition: opacity 0.5s, transform 0.6s var(--ease); }
.rail__names span.is-on { opacity: 1; transform: none; }
.rail__names span.is-past { transform: translateY(-100%); }
.rail__track { position: relative; width: 1.5px; height: 220px; margin: 36px 0 0 6px; background: var(--line); }
.rail__fill { position: absolute; left: 0; top: 0; width: 100%; height: 0; background: var(--ink); }
.rail__dot { position: absolute; left: 50%; width: 12px; height: 12px; border-radius: 50%; transform: translate(-50%, -50%); background: var(--paper); border: 1.5px solid var(--line); transition: background-color 0.4s, border-color 0.4s, transform 0.4s var(--ease); }
.rail__dot--past { top: 0; }
.rail__dot--present { top: 50%; }
.rail__dot--future { top: 100%; }
.rail__dot.is-on { transform: translate(-50%, -50%) scale(1.3); }
.rail__dot--past.is-on { background: var(--past); border-color: var(--past); }
.rail__dot--present.is-on { background: var(--present); border-color: var(--present); }
.rail__dot--future.is-on { border-color: var(--future); border-width: 2.5px; }

.story__chapters { display: grid; gap: clamp(120px, 16vw, 220px); }
.chapter { min-height: 80vh; }
.chapter__en { font-size: 13px; letter-spacing: 0.12em; color: var(--c-text); margin-bottom: 20px; }
.chapter__title { font-family: var(--font-serif); font-weight: 600; font-size: clamp(38px, 5vw, 72px); line-height: 1.14; letter-spacing: -0.01em; }
.chapter__body { margin-top: 24px; font-size: 18px; color: var(--ink-2); max-width: 30em; }
.panel {
  position: relative; margin-top: 48px; padding: clamp(22px, 3vw, 36px);
  background: var(--card); border: 1px solid var(--line-soft); border-radius: 20px; box-shadow: var(--shadow);
}
.panel::before { content: ""; position: absolute; inset: -1px; border-radius: inherit; pointer-events: none; background: linear-gradient(160deg, var(--c-soft), transparent 45%); }
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 40px; padding-top: 28px; border-top: 1px solid var(--line); }
.facts li { font-size: 14px; color: var(--ink-2); line-height: 1.6; }
.facts .icon { color: var(--c-text); margin-bottom: 12px; }
.facts b { display: block; color: var(--ink); font-size: 15px; font-weight: 600; margin-bottom: 4px; }

/* timeline */
.tl__year { font-family: var(--font-serif); font-size: 30px; color: var(--past-text); margin-bottom: 8px; }
.tl__year:not(:first-child) { margin-top: 24px; }
.tl__item { position: relative; display: flex; gap: 18px; padding: 12px 0; }
.tl__item + .tl__item::before { content: ""; position: absolute; left: 5px; top: -14px; height: 28px; width: 1.5px; background: var(--line); }
.tl__item i { width: 12px; height: 12px; border-radius: 50%; margin-top: 7px; flex: none; background: var(--d); box-shadow: 0 0 0 4px color-mix(in srgb, var(--d) 18%, transparent); }
.tl__date { font-size: 13px; color: var(--ink-3); }
.tl__text { font-size: 17px; font-weight: 500; }

/* journal */
.journal__head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-bottom: 16px; border-bottom: 1px solid var(--line-soft); }
.journal__date { font-size: 13px; color: var(--ink-3); }
.journal__saved { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--present-text); }
.journal__saved .icon { width: 14px; height: 14px; }
.journal__text { font-family: var(--font-serif); font-size: clamp(17px, 1.6vw, 21px); line-height: 1.85; padding: 20px 0 24px; }
.caret { display: inline-block; width: 2px; height: 1.1em; margin-left: 2px; vertical-align: -0.15em; background: var(--present); animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.journal__row { display: grid; grid-template-columns: 1fr auto; gap: 24px; padding-top: 18px; border-top: 1px solid var(--line-soft); }
.mini-label { font-size: 12px; color: var(--ink-3); letter-spacing: 0.06em; margin-bottom: 10px; }
.moods { display: flex; gap: 10px; }
.mood { width: 32px; height: 32px; padding: 0; border-radius: 50%; border: 2px solid var(--m); background: transparent; cursor: pointer; transition: background-color 0.2s, transform 0.3s var(--ease), box-shadow 0.3s; }
.mood:hover { transform: scale(1.1); }
.mood[aria-pressed="true"] { background: var(--m); box-shadow: 0 0 0 4px color-mix(in srgb, var(--m) 22%, transparent); }
.thumbs { display: flex; gap: 8px; }
.thumbs span { width: 36px; height: 36px; border-radius: 8px; }
.thumbs span:nth-child(1) { background: linear-gradient(135deg, #a9c8ff, #5856d6); }
.thumbs span:nth-child(2) { background: linear-gradient(135deg, #ffd8a3, #ff9500); }
.thumbs span:nth-child(3) { background: linear-gradient(135deg, #bfeecb, #34c759); }

/* goal */
.goal__head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.goal__title { font-family: var(--font-serif); font-size: clamp(19px, 2vw, 24px); }
.goal__pct { color: var(--future-text); font-weight: 600; font-variant-numeric: tabular-nums; }
.progress { height: 6px; border-radius: 6px; background: var(--future-soft); margin: 18px 0 22px; overflow: hidden; }
.progress span { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--future); transition: width 1.4s var(--ease) 0.3s; }
.panel.is-in .progress span { width: 60%; }
.steps { display: grid; gap: 12px; font-size: 15px; }
.steps li { display: flex; align-items: center; gap: 12px; }
.steps li.is-done { color: var(--ink-3); text-decoration: line-through; text-decoration-color: var(--line); }
.steps .icon { width: 18px; height: 18px; color: var(--future-text); }
.steps i { width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--line); flex: none; }

/* ---------- Sealed letter (inverted) ---------- */
.letter-sec { position: relative; color: var(--inv-ink); padding: clamp(100px, 14vw, 200px) 0; }
.letter-sec__bg { position: absolute; inset: 0; background: var(--inv-bg); z-index: 0; }
.letter-sec__grid { position: relative; z-index: 1; }
.letter-sec__grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(48px, 7vw, 120px); align-items: center; }
.letter-sec__body { margin-top: 32px; font-size: 17px; color: var(--inv-ink-2); max-width: 30em; }
.envelope { position: relative; padding: 40px 32px 32px; border: 1px solid var(--inv-line); border-radius: 20px; text-align: center; }
.envelope__paper { position: relative; padding: 28px 28px 36px; border-radius: 12px; background: color-mix(in srgb, var(--inv-ink) 6%, transparent); text-align: left; overflow: hidden; }
.envelope__to { font-family: var(--font-serif); font-size: 22px; margin-bottom: 20px; }
.envelope__line { height: 10px; border-radius: 6px; background: color-mix(in srgb, var(--inv-ink) 14%, transparent); margin-top: 12px; }
.envelope__line--short { width: 55%; }
.envelope__paper::after { content: ""; position: absolute; inset: 0; background: color-mix(in srgb, var(--inv-bg) 55%, transparent); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); transform: translateY(100%); transition: transform 1.2s var(--ease-io) 0.2s; }
.envelope.is-in .envelope__paper::after { transform: none; }
.envelope__seal {
  position: relative; z-index: 1; display: grid; place-items: center; width: 64px; height: 64px; margin: -32px auto 0; border-radius: 50%;
  background: var(--future); color: #fff; box-shadow: 0 10px 30px rgba(255, 149, 0, 0.35);
  transform: scale(0) rotate(-30deg); transition: transform 0.7s var(--ease) 1.2s;
}
.envelope.is-in .envelope__seal { transform: none; }
.envelope__seal .icon { width: 26px; height: 26px; }
.countdown { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 28px; }
.countdown div { padding: 12px 4px; border-top: 1px solid var(--inv-line); }
.countdown strong { display: block; font-family: var(--font-serif); font-size: clamp(28px, 3.4vw, 44px); font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1.1; }
.countdown span { font-size: 12px; color: var(--inv-ink-2); letter-spacing: 0.1em; }
.envelope__meta { margin-top: 18px; font-size: 13px; color: var(--inv-ink-2); }

/* ---------- Privacy ledger ---------- */
.privacy { padding: clamp(100px, 14vw, 200px) 0 clamp(60px, 8vw, 100px); }
.section-head { margin-bottom: clamp(48px, 6vw, 80px); }
.ledger { border-top: 1px solid var(--ink); }
.ledger li { display: grid; grid-template-columns: 80px 1fr 1.4fr; gap: 24px; align-items: baseline; padding: 36px 0; border-bottom: 1px solid var(--line); transition: background-color 0.3s; }
.ledger li:hover { background: color-mix(in srgb, var(--ink) 3%, transparent); }
.ledger__no { font-family: var(--font-serif); font-size: 18px; color: var(--ink-3); }
.ledger h3 { font-family: var(--font-serif); font-weight: 600; font-size: clamp(24px, 2.6vw, 34px); display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.ledger p { color: var(--ink-2); font-size: 16px; }
.badge { font-family: var(--font-sans); font-size: 11px; font-weight: 600; letter-spacing: 0.08em; padding: 3px 9px; border-radius: 999px; background: var(--future-soft); color: var(--future-text); }

/* ---------- Details ---------- */
.details { padding: clamp(40px, 6vw, 80px) 0 clamp(100px, 14vw, 180px); }
.detail-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; }
.detail-grid .icon { color: var(--ink-2); width: 22px; height: 22px; margin-bottom: 16px; }
.detail-grid h3 { font-size: 16px; font-weight: 600; }
.detail-grid p { margin-top: 6px; font-size: 14px; color: var(--ink-2); }

/* ---------- Download ---------- */
.download { padding: clamp(100px, 14vw, 180px) 0; background: var(--paper-2); }
.download__head { margin-bottom: 56px; }
.download__sub { margin-top: 20px; color: var(--ink-2); }
.dl-list { border-top: 1px solid var(--ink); }
.dl { position: relative; display: grid; grid-template-columns: 1fr auto 56px; align-items: center; gap: 24px; padding: 28px 0; border-bottom: 1px solid var(--line); overflow: hidden; }
.dl::before { content: ""; position: absolute; inset: 0; background: var(--ink); transform: scaleY(0); transform-origin: bottom; transition: transform 0.5s var(--ease); z-index: 0; }
.dl > * { position: relative; z-index: 1; transition: color 0.4s, transform 0.5s var(--ease); }
.dl__name { font-family: var(--font-serif); font-weight: 600; font-size: clamp(28px, 4vw, 52px); line-height: 1.1; }
.dl__meta { font-size: 14px; color: var(--ink-3); }
.dl__go { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--line); }
a.dl:hover::before { transform: scaleY(1); }
a.dl:hover > * { color: var(--paper); }
a.dl:hover .dl__name { transform: translateX(16px); }
a.dl:hover .dl__go { border-color: var(--paper); }
.dl--soon { opacity: 0.5; }
.note { margin-top: 28px; max-width: 46em; font-size: 13px; color: var(--ink-3); }

/* ---------- FAQ ---------- */
.faq { padding: clamp(100px, 14vw, 180px) 0; }
.faq__grid { display: grid; grid-template-columns: 1fr 1.6fr; gap: clamp(32px, 6vw, 96px); }
.faq__list { border-top: 1px solid var(--ink); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 72px; padding: 18px 0; cursor: pointer; list-style: none; font-size: 18px; font-weight: 500; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .icon { transition: transform 0.4s var(--ease); color: var(--ink-3); }
.faq details[open] summary .icon { transform: rotate(45deg); }
.faq details p { padding: 0 0 26px; max-width: 40em; color: var(--ink-2); }

/* ---------- Footer ---------- */
.footer { background: var(--inv-bg); color: var(--inv-ink); padding: clamp(64px, 8vw, 100px) 0 28px; overflow: hidden; }
.footer__top { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; }
.footer__tag { font-family: var(--font-serif); font-size: clamp(20px, 2.4vw, 30px); line-height: 1.4; color: var(--inv-ink-2); }
.footer .btn--line { border-color: var(--inv-line); color: var(--inv-ink); }
.footer .btn--line:hover { border-color: var(--inv-ink); }
.wordmark {
  display: flex; justify-content: space-between; margin: clamp(48px, 8vw, 96px) 0 0; padding-bottom: 0.26em;
  font-family: var(--font-serif); font-weight: 600; font-size: clamp(60px, 15.5vw, 236px); line-height: 0.9; letter-spacing: -0.03em;
  user-select: none;
}
.wordmark span { display: inline-block; }
.wordmark .sp { width: 0.2em; }
.footer__bottom { display: flex; justify-content: space-between; gap: 16px; padding-top: 20px; border-top: 1px solid var(--inv-line); font-size: 13px; color: var(--inv-ink-2); }

/* ---------- Reveal ---------- */
.js .reveal { opacity: 0; transform: translateY(32px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.js .reveal.is-in { opacity: 1; transform: none; }
html:not(.js) .line__in, html:not(.js) .hero__foot { transform: none; opacity: 1; }
html:not(.js) .spine__line { transform: scaleX(1); }
html:not(.js) .spine__dot { transform: translate(-50%, -50%) scale(1); }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .detail-grid { grid-template-columns: repeat(2, 1fr); }
  .sc-tabs { display: flex; overflow-x: auto; scrollbar-width: none; gap: 20px; margin: 0 calc(var(--gutter) * -1); padding: 0 var(--gutter); }
  .sc-tabs::-webkit-scrollbar { display: none; }
  .sc-tab { flex: none; white-space: nowrap; padding-right: 0; }
  .sc-tab__bar { right: 0; }
}
@media (max-width: 640px) {
  .sc-titlebar { height: 26px; font-size: 11px; }
  .sc-titlebar__ctl i { width: 30px; }
  .sc-window { border-radius: 10px; }
  .sc-caps { min-height: 5.6em; }
  .sc-cap { font-size: 15px; }
  .sc-cap b { display: block; margin-bottom: 2px; }
}
@media (max-width: 900px) {
  .nav__links { display: none; }
  .nav__actions { margin-left: auto; }
  .story__grid { grid-template-columns: 1fr; }
  .story__rail { position: sticky; top: 0; z-index: 5; margin: 0 calc(var(--gutter) * -1); padding: 10px var(--gutter); background: color-mix(in srgb, var(--paper) 88%, transparent); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line-soft); }
  .rail { position: static; display: flex; align-items: center; gap: 16px; }
  .rail__num { height: 36px; font-size: 36px; }
  .rail__names { margin: 0; height: 28px; font-size: 16px; flex: 1; }
  .rail__track { width: 120px; height: 1.5px; margin: 0; }
  .rail__fill { height: 100% !important; width: var(--fill, 0%); }
  .rail__dot { top: 50% !important; }
  .rail__dot--past { left: 0; }
  .rail__dot--present { left: 50%; }
  .rail__dot--future { left: 100%; }
  .chapter { min-height: 0; }
  .facts { grid-template-columns: 1fr; gap: 18px; }
  .letter-sec__grid, .faq__grid { grid-template-columns: 1fr; }
  .ledger li { grid-template-columns: 48px 1fr; }
  .ledger p { grid-column: 2; }
}
@media (max-width: 640px) {
  .line--indent { padding-left: 0.6em; }
  .hero__cta .btn { width: 100%; }
  .hero__cta { width: 100%; }
  .spine { height: 90px; }
  .detail-grid { grid-template-columns: 1fr; }
  .dl { grid-template-columns: 1fr 48px; }
  .dl__meta { grid-column: 1; grid-row: 2; margin-top: -16px; }
  .dl__go { grid-column: 2; grid-row: 1 / span 2; }
  .journal__row { grid-template-columns: 1fr; }
  .countdown { gap: 4px; }
  .envelope { padding: 32px 18px 24px; }
  .footer__bottom { flex-direction: column; }
}

/* ==========================================================================
   Motion mode (GSAP + Lenis). html.motion is set before first paint when the
   user allows motion; html.gsap-ok once the libraries actually loaded.
   GSAP owns these properties, so CSS transitions on them are switched off.
   ========================================================================== */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

.gsap-ok .line__in,
.gsap-ok .hero__foot,
.gsap-ok .spine__line,
.gsap-ok .spine__dot,
.gsap-ok .reveal,
.gsap-ok .manifesto__text .w,
.gsap-ok .rail__digits,
.gsap-ok .progress span,
.gsap-ok .envelope__seal,
.gsap-ok .envelope__paper::after { transition: none !important; }
.gsap-ok .line__in { transform: none; }
.gsap-ok .reveal { opacity: 1; transform: none; }
.gsap-ok .envelope__paper::after { transform: translateY(var(--veil, 100%)); }
.gsap-ok .envelope__seal { transform: none; }

/* split characters */
.ch { display: inline-block; will-change: transform; }
.ml { display: block; overflow: hidden; padding-bottom: 0.08em; margin-bottom: -0.08em; }
.ml__in { display: block; will-change: transform; }

/* hairlines that draw themselves */
.gsap-ok .ledger, .gsap-ok .dl-list, .gsap-ok .faq__list { border-top-color: transparent; position: relative; }
.draw-line { position: absolute; left: 0; right: 0; top: -1px; height: 1px; background: var(--ink); transform-origin: left; }

/* seal ripple */
.envelope__ring { position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--future); opacity: 0; pointer-events: none; }

.gsap-ok .mood { transition: background-color 0.2s, box-shadow 0.3s; }

/* footer wordmark letters live in a mask (clip only the bottom edge, keep side overhangs) */
.gsap-ok .wordmark { clip-path: inset(-50% -10% 0 -10%); }

/* loader leaves with a soft curved edge */
@keyframes loader-out {
  0% { transform: translateY(0); border-radius: 0; }
  100% { transform: translateY(-100%); border-radius: 0 0 50% 50% / 0 0 14vh 14vh; visibility: hidden; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: 0.01ms !important; transition-delay: 0s !important; }
  .js .reveal { opacity: 1; transform: none; }
  .manifesto__text .w { opacity: 1; }
}
