/* ============================================================
   GALOK 2.0 — Prototype stylesheet v1.0-RC (2026-11-11)
   Values mirror docs/GALOK-2.0-DESIGN-TOKENS.json (source of truth).
   Design study only — NOT for production deployment.
   ============================================================ */

:root {
  --font-galok: "Google Sans Flex", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  /* light scene */
  --paper: #f5f4f0;
  --surface: #faf9f6;
  --ink: #111315;
  --ink-2: #626b73;
  --ink-soft: #5f676e;     /* small-text tone: 5.2:1 on paper, 5.4:1 on surface — AA */
  --ink-3: #8a8f94;        /* decorative/ghost only — never text below 24px (2.9:1) */
  --rule: #d8d9d6;
  --accent: #7898b0;       /* non-text only */
  --accent-ink: #46617a;   /* text-level accent */
  /* dark scene (Work / Cinematic Poetry) */
  --night: #101419;
  --night-surface: #1d252d;
  --night-line: #39444d;
  --night-text: #f3f4f2;
  --night-text-2: #a4b4c0;
  --night-accent: #a5bfcf;
  /* semantic */
  --status-shipped: #3e6b4f;
  --status-early: #46617a;
  --status-research: #7a6a4f;
  --status-planned: #626b73;
  /* motion */
  --ease: cubic-bezier(.22, 1, .36, 1);
  --ease-move: cubic-bezier(.45, 0, .15, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-galok);
  font-optical-sizing: auto;
  margin: 0;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; }
img { max-width: 100%; display: block; }
p { margin-top: 0; }
::selection { background: var(--accent); color: #fff; }
:focus-visible { outline: 2px solid var(--accent-ink); outline-offset: 2px; }
.dark-page :focus-visible { outline-color: var(--night-accent); }

.wrap { width: min(1320px, calc(100% - 96px)); margin-inline: auto; }

/* ---------- type utilities ---------- */
.eyebrow, .mono, .meta {
  font-family: var(--font-galok);
  font-size: 12px; letter-spacing: .10em; text-transform: uppercase;
}
.eyebrow { color: var(--accent-ink); }
.mono-small { font-weight: 500; font-size: 11px; }
.caption { font-weight: 500; font-size: 11px; color: var(--ink-soft); letter-spacing: .04em; }

.display {
  font-size: clamp(64px, 8.5vw, 136px);
  line-height: .94; letter-spacing: -.06em; font-weight: 650; margin: 0;
}
.italic { font-weight: 440; font-style: oblique 8deg; letter-spacing: -.048em; }
.lede {
  font-size: clamp(16px, 1.5vw, 20px); line-height: 1.62;
  max-width: 510px; color: #3f4243;
}
.subhead {
  font-size: clamp(34px, 4vw, 60px); line-height: 1.06;
  letter-spacing: -.045em; font-weight: 580; margin: 0;
}
.subhead .italic { font-size: 1.01em; }
.editorial-quote {
  font-weight: 440; font-style: oblique 8deg;
  font-size: clamp(28px, 3vw, 52px); line-height: 1.2; letter-spacing: -.04em;
}

/* ---------- nav ---------- */
.nav {
  height: 82px; border-bottom: 1px solid var(--rule);
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  background: rgba(250, 249, 246, .93);
  position: sticky; top: 0; z-index: 20;
  backdrop-filter: blur(6px);
}
.nav .brand { display: flex; gap: 12px; align-items: center; min-height: 44px; }
.brand-mark { font-weight: 700; font-size: 24px; letter-spacing: -.08em; }
.brand-word { font-size: 12px; letter-spacing: .18em; font-weight: 700; }
.brand-sub { display: block; letter-spacing: .11em; font-size: 9px; color: var(--ink-2); margin-top: 4px; }
.links { display: flex; gap: 28px; align-items: center; font-size: 12px; font-weight: 600; }
.links a { display: inline-flex; align-items: center; min-height: 44px; padding: 4px 2px; }
.links a .ext { font-size: 10px; margin-left: 3px; opacity: .8; }
.links a.site-nav__secondary { color: var(--ink-2); }
@media (max-width: 800px) {
  .links a.site-nav__secondary { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--rule); }
}
.links a:hover, .links a[aria-current] {
  text-decoration: underline; text-underline-offset: 8px;
}
.nav-toggle {
  display: none; border: 1px solid var(--rule); background: transparent;
  padding: 10px 14px; min-width: 96px; min-height: 44px;
  white-space: nowrap; align-items: center; gap: 8px; justify-content: center;
}
/* dark scene: explicit tokens — the toggle must never inherit light-scoped ink */
.dark-page .nav-toggle { color: var(--night-text); border-color: var(--night-line); }
.dark-page .nav-toggle:hover { border-color: var(--night-text-2); background: rgba(243, 244, 242, .06); }
[id] { scroll-margin-top: 96px; }

/* ---------- chips (honesty system) ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 8px; height: 24px;
  padding: 0 10px; border: 1px solid currentColor; border-radius: 999px;
  font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
}
.chip .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.chip--early { color: var(--status-early); }
.chip--shipped { color: var(--status-shipped); }
.chip--research { color: var(--status-research); }
.chip--planned { color: var(--status-planned); }

/* ---------- buttons / links ---------- */
.btn {
  display: inline-flex; gap: 28px; align-items: center; justify-content: space-between;
  background: var(--ink); color: #fff; padding: 14px 17px;
  font-size: 12px; min-height: 46px; border: 0; cursor: pointer;
}
.btn:hover { background: #2b3945; }
.btn .arr, .ghost-link .arr { display: inline-block; transition: transform 150ms var(--ease); }
.btn:hover .arr, .ghost-link:hover .arr { transform: translate(2px, -2px); }
.ghost-link {
  display: inline-flex; align-items: center; gap: 16px; text-transform: uppercase;
  min-height: 44px;
  font-size: 11px; font-weight: 600; letter-spacing: .09em;
  border-bottom: 1px solid currentColor; padding-bottom: 9px; background: none; border-top: 0; border-left: 0; border-right: 0; cursor: pointer;
}
.ghost-link .arr { font-size: 19px; }

/* ---------- sections ---------- */
.section { padding: 96px 0; border-bottom: 1px solid var(--rule); }
.section-label { font-size: 12px; letter-spacing: .12em; color: var(--ink-2); margin-bottom: 28px; text-transform: uppercase; }
.section-label .no { color: var(--accent-ink); }

/* ---------- home hero ---------- */
.hero {
  display: grid; grid-template-columns: 1fr 1.05fr; gap: 3vw;
  min-height: 660px; align-items: center; padding-top: 32px; padding-bottom: 40px;
}
.hero-text { position: relative; z-index: 2; }
.hero-text .eyebrow { margin-bottom: 28px; }
.hero-text .display { max-width: 700px; }
.hero-text .lede { margin-top: 28px; margin-bottom: 34px; }
.hero-note {
  margin-top: 56px; display: flex; align-items: center; gap: 12px;
  color: var(--ink-soft); font-size: 10px; letter-spacing: .07em; text-transform: uppercase;
}
.hero-note .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); flex: none; }
.hero-art {
  position: relative; align-self: stretch; display: flex; flex-direction: column;
  align-items: center; justify-content: center; overflow: hidden;
}
.hero-art::before {
  content: ""; position: absolute; width: 80%; height: 72%;
  background: radial-gradient(ellipse at 42% 48%, #dbe4e8 0, #d7dee1 26%, transparent 66%);
  filter: blur(28px);
}
.hero-art .art-frame { position: relative; z-index: 1; will-change: transform; }
.hero-art img { width: min(88%, 580px); height: auto; mix-blend-mode: multiply; filter: contrast(1.03); }
.fig-line {
  position: relative; z-index: 2; margin-top: 14px; align-self: flex-end;
  color: var(--ink-soft); font-size: 10px; letter-spacing: .06em; text-transform: uppercase;
}

/* ---------- feature split (make / observe) ---------- */
.split-feature { display: grid; grid-template-columns: .8fr 1.2fr; gap: 55px; align-items: center; }
.project-title { font-size: clamp(45px, 5vw, 84px); letter-spacing: -.06em; line-height: .98; font-weight: 680; margin: 0 0 18px; }
.feature-row .lede { font-size: 16px; }

/* concept frame — self-declared illustration, never a fake screenshot */
.feature-panel {
  min-height: 355px; background: var(--night); padding: 32px;
  display: flex; align-items: center; justify-content: center;
}
.ui-product {
  width: 94%; height: 270px; background: var(--night-surface);
  border: 1px solid #4f5d69; box-shadow: 18px 24px 60px rgba(0, 0, 0, .35); overflow: hidden;
}
.ui-head {
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid var(--night-line); padding: 12px 17px;
  color: #d0d7db; font-size: 11px; letter-spacing: .06em;
}
.ui-head .flag { color: var(--night-accent); font-size: 9px; letter-spacing: .1em; }
.ui-body { display: grid; grid-template-columns: 28% 72%; height: calc(100% - 39px); }
.ui-side { border-right: 1px solid var(--night-line); padding: 15px; }
.ui-side span { display: block; width: 72%; height: 5px; background: #54616a; margin-bottom: 15px; }
.ui-side span:nth-child(2n) { width: 48%; }
.ui-canvas {
  display: flex; align-items: center; justify-content: center;
  background: #27323a; position: relative; overflow: hidden;
}
.shape-a { width: 55%; height: 55%; background: #829db2; clip-path: polygon(8% 100%, 55% 22%, 100% 100%); }
.shape-b { position: absolute; width: 16%; aspect-ratio: 1; background: #d9c8b7; border-radius: 50%; top: 23%; right: 25%; }

/* city placeholder — explicitly labeled */
.city-card {
  min-height: 350px; position: relative; overflow: hidden;
  background: linear-gradient(135deg, #d6d6ce 0%, #b3bfbd 36%, #758d99 65%, #4f6572 100%);
}
.city-card::before {
  content: ""; display: block; position: absolute; inset: 0;
  background: linear-gradient(0deg, rgba(14, 31, 40, .58), transparent 60%),
    repeating-linear-gradient(90deg, transparent, transparent 85px, rgba(255, 255, 255, .05) 85px, rgba(255, 255, 255, .05) 86px);
}
.city-card::after {
  content: ""; position: absolute; left: -1%; right: -1%; bottom: 0; height: 32%;
  background: #3e515d;
  clip-path: polygon(0 80%, 10% 80%, 10% 28%, 17% 28%, 17% 0, 22% 0, 22% 58%, 29% 58%, 29% 20%, 37% 20%, 37% 66%, 45% 66%, 45% 10%, 50% 10%, 50% 63%, 61% 63%, 61% 45%, 68% 45%, 68% 9%, 74% 9%, 74% 72%, 84% 72%, 84% 29%, 90% 29%, 90% 69%, 100% 69%, 100% 100%, 0 100%);
}
.city-cap {
  position: absolute; z-index: 2; left: 27px; bottom: 24px; right: 27px;
  color: #fff; font-size: 12px; letter-spacing: .12em; text-transform: uppercase;
}

/* ---------- mini grid ---------- */
.mini-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.mini-item { border-top: 1px solid var(--rule); padding-top: 22px; }
.mini-item .mono { color: var(--accent-ink); }
.mini-item h3 { margin: 10px 0 13px; font-size: 26px; letter-spacing: -.02em; font-weight: 560; }
.mini-item p { color: var(--ink-2); font-size: 14px; line-height: 1.6; }

/* ---------- about ---------- */
.page-hero {
  padding-top: 80px; padding-bottom: 72px;
  display: grid; grid-template-columns: 1.2fr .8fr; gap: 50px; border-bottom: 1px solid var(--rule);
  align-items: center;
}
.page-hero .display { font-size: clamp(64px, 9vw, 148px); }
.page-hero .lede { margin-top: 28px; }
.sign-line { margin-top: 48px; color: var(--ink-2); }
.about-portrait {
  justify-self: end; width: min(100%, 330px);
  border: 1px solid var(--rule); background: var(--surface); padding: 18px;
}
/* colophon author plate: natural 4:5 asset; height:auto overrides the
   HTML height attribute, max-height guards future taller assets */
.about-portrait img {
  width: 100%; height: auto; max-height: 460px;
  object-fit: cover; object-position: 50% 10%;
  mix-blend-mode: multiply;
}
.about-portrait .plate {
  margin-top: 12px; color: var(--ink-soft); font-size: 9px; letter-spacing: .1em;
  text-transform: uppercase; text-align: center;
}
.ledger { margin-top: 30px; }
.ledger-row {
  display: grid; grid-template-columns: 185px 1fr; border-top: 1px solid var(--rule);
  padding: 20px 0; gap: 25px; font-size: 16px; line-height: 1.55;
  transition: background-color 150ms var(--ease);
}
.ledger-row:last-child { border-bottom: 1px solid var(--rule); }
.ledger-row:hover { background: var(--surface); }
.ledger-row .mono { color: var(--accent-ink); }
.contact-lines { border-top: 1px solid var(--rule); margin-top: 38px; }
.contact-row {
  border-bottom: 1px solid var(--rule); display: grid; grid-template-columns: 160px 1fr auto;
  gap: 24px; align-items: center; padding: 25px 0;
}
.contact-row strong { font-size: 20px; font-weight: 500; }
.contact-row .caption { grid-column: 2; max-width: 560px; line-height: 1.6; }
.about-note { margin-top: 15px; color: var(--ink-2); font-size: 13px; line-height: 1.6; }

/* ---------- work (dark scene) ---------- */
.dark-page { background: var(--night); color: var(--night-text); }
.dark-page .nav { background: rgba(16, 20, 25, .93); border-color: var(--night-line); }
.dark-page .brand-sub, .dark-page .section-label, .dark-page .footer { color: var(--night-text-2); }
.dark-page .links a { color: #e7ecef; }
.dark-page .eyebrow { color: var(--night-accent); }
.dark-page .section { border-color: var(--night-line); }
.dark-page .section-label .no { color: var(--night-accent); }

.work-hero {
  display: grid; grid-template-columns: 1fr 1.1fr; gap: 65px; align-items: center;
  padding: 110px 0 100px; min-height: 640px;
}
.work-hero .display { font-size: clamp(72px, 10vw, 156px); font-weight: 680; letter-spacing: -.065em; }
.work-hero .ital {
  font-weight: 440; font-style: oblique 8deg; letter-spacing: -.04em;
  font-size: clamp(30px, 3.4vw, 46px); line-height: 1.18; color: #e1e8ed; margin: 18px 0 26px;
}
.work-hero .lede { color: #b9c3ca; max-width: 460px; }
.work-hero .chip { margin-top: 26px; }
.work-hero .chip--early { color: var(--night-accent); }
.work-hero .feature-panel { padding: 7px; min-height: 475px; }
.work-hero .ui-product { height: 375px; width: 96%; }
@media (min-width: 1024px) and (prefers-reduced-motion: no-preference) {
  .work-hero .ui-product { transform: perspective(1100px) rotateY(-6deg); }
}

.steps { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--night-line); border-bottom: 1px solid var(--night-line); }
.step { padding: 35px 24px; border-right: 1px solid var(--night-line); }
.step:last-child { border-right: 0; }
.step .no { color: var(--night-accent); font-weight: 500; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
.step h3 { font-size: 28px; margin: 26px 0 12px; font-weight: 560; }
.step p { color: #abbac5; font-size: 14px; line-height: 1.5; }
.steps-note { margin-top: 16px; color: var(--night-text-2); font-size: 12px; letter-spacing: .02em; }
.dark-page .editorial-quote { color: var(--night-text); }
.dark-page .lede { color: var(--night-text-2); }
.status-list { margin: 34px 0 0; padding: 0; list-style: none; border-top: 1px solid var(--night-line); max-width: 860px; }
.status-list li {
  display: flex; gap: 20px; align-items: baseline; padding: 18px 0;
  border-bottom: 1px solid var(--night-line); font-size: 15px; line-height: 1.55;
}
.status-list .mono { flex: 0 0 130px; color: var(--night-accent); font-size: 11px; }
.status-list p { margin: 0; color: var(--night-text-2); }

/* ---------- footer ---------- */
.footer {
  display: flex; justify-content: space-between; gap: 15px; flex-wrap: wrap;
  padding: 28px 0 36px; font-size: 10px; letter-spacing: .08em;
  color: var(--ink-2); text-transform: uppercase;
}
.dark-page .footer { border-top: 1px solid var(--night-line); }

/* ---------- archive agent ---------- */
.agent-dock {
  position: fixed; right: 24px; bottom: 24px; z-index: 25;
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 48px; padding: 0 18px; background: var(--ink); color: #fff;
  border: 0; border-radius: 999px; cursor: pointer; font-size: 12px; font-weight: 600; letter-spacing: .06em;
}
.agent-dock:hover { background: #2b3945; }
.agent-inline { display: none; }

/* ---------- motion: reveal (enabled only for real users) ---------- */
.js .reveal { opacity: 0; transform: translateY(12px); transition: opacity 600ms var(--ease), transform 600ms var(--ease); transition-delay: var(--d, 0ms); }
.js .reveal.is-in { opacity: 1; transform: none; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 1023px) {
  .section { padding: 72px 0; }
}

@media (max-width: 800px) {
  .wrap { width: calc(100% - 44px); }
  .nav { height: 66px; }
  .links {
    display: none; position: absolute; top: 66px; left: 0; right: 0;
    background: var(--surface); padding: 18px 23px 26px; border-bottom: 1px solid var(--rule);
    flex-direction: column; gap: 8px; align-items: stretch;
  }
  .links a { padding: 14px 2px; font-size: 15px; }
  .nav[data-open="true"] .links { display: flex; }
  .nav-toggle { display: inline-flex; }
  .dark-page .nav[data-open="true"] .links { background: var(--night); }

  .hero { display: flex; flex-direction: column; gap: 0; min-height: auto; padding-top: 20px; }
  .hero-art { order: 0; width: 100%; height: auto; padding-top: 6px; }
  .hero-art img { width: 88%; max-width: 390px; margin-inline: auto; }
  .fig-line { align-self: center; margin-top: 10px; }
  .hero-text { order: 1; padding-top: 18px; }
  .hero-text .eyebrow { font-size: 9px; margin-bottom: 15px; }
  .display { font-size: clamp(51px, 14vw, 77px); }
  .hero-text .lede { margin-top: 21px; margin-bottom: 25px; }
  .hero-note { margin-top: 32px; }

  .section { padding: 56px 0; }
  .split-feature { grid-template-columns: 1fr; gap: 28px; }
  .feature-panel { min-height: 265px; padding: 20px; }
  .ui-product { height: 220px; }
  .city-card { min-height: 260px; }
  .city-cap { left: 16px; right: 16px; bottom: 16px; font-size: 10px; letter-spacing: .1em; line-height: 1.6; }
  .mini-grid { grid-template-columns: 1fr; gap: 20px; }

  .page-hero { grid-template-columns: 1fr; padding-top: 44px; padding-bottom: 45px; gap: 30px; }
  .page-hero .display { font-size: clamp(56px, 15vw, 86px); }
  .about-portrait { justify-self: start; width: min(100%, 300px); }
  .ledger-row { grid-template-columns: 115px 1fr; gap: 10px; font-size: 14px; padding: 17px 0; }
  .contact-row { grid-template-columns: 55px 1fr auto; gap: 12px; }
  .contact-row strong { font-size: 15px; overflow-wrap: anywhere; }

  .work-hero { grid-template-columns: 1fr; padding: 56px 0 45px; min-height: unset; gap: 28px; }
  .work-hero .display { font-size: clamp(72px, 19vw, 120px); }
  .work-hero .ital { font-size: 30px; }
  .work-hero .feature-panel { min-height: 290px; }
  .work-hero .ui-product { height: 260px; width: 100%; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .step:nth-child(2) { border-right: 0; }
  .step:nth-child(-n+2) { border-bottom: 1px solid var(--night-line); }
  .step { padding: 25px 15px; }
  .step h3 { font-size: 23px; margin: 17px 0 8px; }
  .status-list .mono { flex-basis: 100px; }
  .footer { flex-direction: column; gap: 8px; }

  /* mobile: agent becomes inline entry, never floating over text */
  .agent-dock { display: none; }
  .agent-inline {
    display: flex; justify-content: space-between; align-items: center;
    border-top: 1px solid var(--rule); margin-top: 8px; padding: 20px 0;
    font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  }
  .dark-page .agent-inline { border-color: var(--night-line); }
}

@media (max-width: 360px) {
  .brand-sub { display: none; }
  .display { letter-spacing: -.05em; }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
  .js .reveal { opacity: 1; transform: none; }
}
