/* Kuplo landing — tokens follow the Kuplo app itself (console/static/dashboard.css) */
@font-face {
  font-family: "Instrument Serif";
  src: url("assets/fonts/InstrumentSerif-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Serif";
  src: url("assets/fonts/InstrumentSerif-400i.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

:root {
  --bg: #ffffff;
  --bg-2: #f7f7f6;
  --bg-3: #eeeeec;
  --text: #1b1b1a;
  --text-2: #55554f;
  --text-3: #7c7b76;
  --line: rgba(24, 24, 23, 0.08);
  --line-strong: rgba(24, 24, 23, 0.14);
  --blue: #2f62d8;
  --blue-soft: rgba(47, 98, 216, 0.08);
  --night: #191919;
  --night-2: #202020;
  --night-text: #ebebea;
  --night-text-2: #ababa7;

  --serif: "Instrument Serif", "Noto Serif SC", "Songti SC", serif;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "MiSans", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, monospace;

  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
  --radius: 14px;
  --shadow: 0 1px 0 rgba(0, 0, 0, 0.02), 0 30px 60px -24px rgba(24, 24, 23, 0.22), 0 12px 24px -12px rgba(24, 24, 23, 0.1);
  color-scheme: light dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: 72px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 17px/1.7 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, h4, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--text); color: var(--bg); padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 6px; }

.wrap { width: 100%; max-width: calc(var(--wrap) + var(--gutter) * 2); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- type ---------- */
.display, .h2 {
  font-family: var(--serif);
  font-weight: 500;
  letter-spacing: -0.012em;
  color: var(--text);
  font-feature-settings: "palt";
}
.display { font-size: clamp(42px, 7.6vw, 104px); line-height: 1.14; }
.h2 { font-size: clamp(36px, 5.2vw, 64px); line-height: 1.12; }
.kicker {
  font: 500 13px/1 var(--mono);
  letter-spacing: 0.08em;
  color: var(--blue);
  margin-bottom: 18px;
}
.lede { font-size: clamp(17px, 1.6vw, 20px); line-height: 1.75; color: var(--text-2); max-width: 34em; }
.sec-sub { font-size: 17px; color: var(--text-2); max-width: 32em; margin-top: 18px; }
.fine { font-size: 13px; color: var(--text-3); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  height: 48px; padding: 0 22px; border-radius: 999px;
  font: 500 16px/1 var(--sans); text-decoration: none; white-space: nowrap;
  transition: transform 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-sm { height: 36px; padding: 0 16px; font-size: 14px; }
.btn-dark { background: var(--text); color: #fff; }
.btn-dark:hover { background: #000; }
.btn-blue { background: var(--blue); color: #fff; box-shadow: 0 8px 20px -8px rgba(47, 98, 216, 0.6); }
.btn-blue:hover { background: #2554c2; }
.btn-light { background: #fff; color: var(--night); }
.btn-light:hover { background: #e9e9e7; }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: saturate(1.6) blur(14px);
  -webkit-backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}
.nav.is-scrolled { border-bottom-color: var(--line); }
.nav { transition: border-color 0.2s ease, background-color 0.3s ease, color 0.3s ease; }
.nav.is-dark { background: rgba(25, 25, 25, 0.8); color: var(--night-text); border-bottom-color: rgba(255, 255, 255, 0.06); }
.nav.is-dark .nav-links a { color: var(--night-text-2); }
.nav.is-dark .nav-links a:hover { color: #fff; }
.nav.is-dark .btn-dark { background: #fff; color: var(--night); }
.nav.is-dark .lang-btn { color: var(--night-text-2); }
.nav.is-dark .lang-btn:hover { color: #fff; background: rgba(255, 255, 255, 0.08); }
.nav.is-dark .burger span { background: var(--night-text); }
.nav.is-dark .mnav { background: var(--night); border-top-color: rgba(255, 255, 255, 0.08); }
.nav.is-dark .mnav a { border-bottom-color: rgba(255, 255, 255, 0.08); }
.nav.is-dark .brand img { background: #ecece7; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08); }
.nav-in { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 20px; height: 64px; max-width: calc(var(--wrap) + var(--gutter) * 2); margin: 0 auto; padding: 0 var(--gutter); }
.brand { display: inline-flex; align-items: center; gap: 9px; justify-self: start; text-decoration: none; font: 800 21px/1 var(--sans); letter-spacing: -0.03em; white-space: nowrap; }
.brand img { width: 30px; height: 30px; padding: 2px; border-radius: 7px; object-fit: contain; transition: background-color 0.25s ease, box-shadow 0.25s ease; }
.nav-links { display: flex; align-items: center; gap: clamp(16px, 2.2vw, 30px); justify-self: center; }
.nav-links a { font-size: 14px; color: var(--text-2); text-decoration: none; white-space: nowrap; transition: color 0.15s ease; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--text); }
.nav-links a[aria-current="page"] { font-weight: 500; }
.gh-link { display: inline-flex; align-items: center; gap: 6px; }
.gh-ico { flex: none; opacity: 0.85; transform: translateY(-0.5px); }
.gh-link:hover .gh-ico { opacity: 1; }
.foot-cols a.gh-link { display: inline-flex; }
.mnav a.gh-link { display: flex; }
.nav-actions { display: flex; align-items: center; gap: 8px; justify-self: end; }
.lang-btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 36px; min-width: 36px; padding: 0 10px; border: 0; border-radius: 999px;
  background: transparent; color: var(--text-2); cursor: pointer;
  font: 500 13px/1 var(--sans); letter-spacing: 0.02em; white-space: nowrap;
  transition: color 0.15s ease, background-color 0.15s ease;
}
.lang-btn:hover { color: var(--text); background: var(--bg-2); }
.burger { display: none; width: 40px; height: 40px; border: 0; background: none; padding: 0; cursor: pointer; position: relative; }
.burger span { position: absolute; left: 11px; right: 11px; height: 1.6px; background: var(--text); border-radius: 2px; transition: transform 0.2s ease; }
.burger span:first-child { top: 16px; }
.burger span:last-child { top: 23px; }
.burger[aria-expanded="true"] span:first-child { transform: translateY(3.5px) rotate(45deg); }
.burger[aria-expanded="true"] span:last-child { transform: translateY(-3.5px) rotate(-45deg); }
.mnav { border-top: 1px solid var(--line); padding: 8px var(--gutter) 16px; background: #fff; }
.mnav a { display: block; padding: 12px 0; font-size: 17px; text-decoration: none; border-bottom: 1px solid var(--line); }

/* ---------- hero ---------- */
.hero { padding-top: clamp(56px, 9vw, 120px); }
.hero-copy { text-align: center; display: flex; flex-direction: column; align-items: center; }
.br-sm { display: none; }
.punct { display: inline-block; width: 0; white-space: nowrap; }
.scribble { position: relative; white-space: nowrap; }
.scribble svg { position: absolute; left: -2%; right: -2%; bottom: -0.06em; width: 104%; height: 0.24em; overflow: visible; }
.scribble path { fill: none; stroke: var(--blue); stroke-width: 6; stroke-linecap: round; stroke-dasharray: 260; stroke-dashoffset: 260; animation: draw 0.9s 0.35s cubic-bezier(0.6, 0, 0.3, 1) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.hero .lede { margin-top: 30px; }
.cta-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px; margin-top: 36px; }
.hero .fine { margin-top: 14px; }

.hero-stage { position: relative; margin-top: clamp(56px, 7vw, 88px); }
.window {
  position: relative; background: #fff; border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); outline: 1px solid var(--line-strong); outline-offset: -1px;
}
.window-bar { display: flex; align-items: center; gap: 7px; height: 30px; padding: 0 13px; background: #f3f3f1; border-bottom: 1px solid var(--line); }
.window-bar i { width: 11px; height: 11px; border-radius: 50%; background: #e0e0dd; }
.window img { width: 100%; }
.hero-stage .window { max-width: 1120px; margin: 0 auto; }
.hero-buddy {
  position: absolute; right: calc(var(--gutter) - 26px); top: -118px; width: clamp(150px, 19vw, 250px);
  pointer-events: none;
}
.hero-buddy img { width: 100%; mix-blend-mode: multiply; }

.platforms { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 14px 28px; padding-top: 44px; padding-bottom: 8px; }
.platforms-label { font-size: 13px; color: var(--text-3); }
.platforms ul { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 24px; }
.platforms li { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; color: var(--text-2); }
.platforms li img { width: 18px; height: 18px; }
.platforms .more { color: var(--text-3); }

/* ---------- sections ---------- */
.section { padding: clamp(96px, 12vw, 160px) 0; }
.sec-head { max-width: 760px; margin-bottom: clamp(48px, 6vw, 72px); }

/* day */
.shift { display: grid; grid-template-columns: repeat(5, 1fr); gap: 20px; position: relative; }
.shift li { position: relative; }
.tile { margin: 0 0 22px; aspect-ratio: 1 / 0.86; border-radius: 16px; background: var(--bg-2); display: grid; place-items: center; overflow: hidden; }
.tile img { width: 92%; mix-blend-mode: multiply; transition: transform 0.4s ease; }
.shift li:hover .tile img { transform: scale(1.04) rotate(-1deg); }
.is-key .tile { background: var(--blue-soft); }
.shift h3 { font-family: var(--serif); font-weight: 600; font-size: 24px; line-height: 1.25; letter-spacing: -0.01em; }
.shift p { margin-top: 8px; font-size: 15px; line-height: 1.7; color: var(--text-2); }

/* playbook */
.playbook { background: var(--bg-2); }
.pb-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.pb-tabs { margin-top: 36px; display: grid; border-top: 1px solid var(--line-strong); counter-reset: pb-tab; }
.pb-tabs button {
  display: grid; grid-template-columns: 28px 1fr; column-gap: 12px; row-gap: 4px; align-items: baseline;
  text-align: left; border: 0; border-bottom: 1px solid var(--line); background: transparent;
  padding: 20px 0; cursor: pointer; font: inherit; color: inherit; position: relative;
  transition: opacity 0.18s ease, border-color 0.18s ease;
  counter-increment: pb-tab;
}
.pb-tabs button::before {
  content: "0" counter(pb-tab);
  grid-row: 1 / span 2;
  font: 500 12px/1.6 var(--mono); letter-spacing: 0.04em; font-variant-numeric: tabular-nums;
  color: var(--text-3); transition: color 0.18s ease;
}
.pb-tabs button::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1.5px;
  background: var(--blue); transform: scaleX(0); transform-origin: left center;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.pb-tabs button[aria-selected="false"] { opacity: 0.56; }
.pb-tabs button[aria-selected="false"]:hover { opacity: 0.9; }
.pb-tabs button[aria-selected="true"]::before { color: var(--blue); }
.pb-tabs button[aria-selected="true"]::after { transform: scaleX(1); }
.pb-tabs b { grid-column: 2; display: block; font-weight: 600; font-size: 16px; color: var(--text); }
.pb-tabs span { grid-column: 2; display: block; font-size: 14px; line-height: 1.65; color: var(--text-2); }
.window-tilt { transform: perspective(1800px) rotateY(-4deg); transform-origin: left center; }
.window-tilt img { transition: opacity 0.18s ease; }
.window-tilt img.is-swapping { opacity: 0; }

.pb-sample-label { margin-top: clamp(72px, 8vw, 104px); font-size: 13px; color: var(--text-3); }
.pb-sample {
  margin-top: 16px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 0;
  border-top: 1px solid var(--line-strong);
  counter-reset: pb-rule;
}
.pb-sample article {
  padding: 28px 32px 8px 32px;
  border-left: 1px solid var(--line);
  counter-increment: pb-rule;
}
.pb-sample article:first-child { padding-left: 0; border-left: 0; }
.pb-sample article:last-child { padding-right: 0; }
.pb-sample article::before {
  content: "0" counter(pb-rule);
  display: block; margin-bottom: 14px;
  font: 500 12px/1 var(--mono); letter-spacing: 0.04em; font-variant-numeric: tabular-nums;
  color: var(--blue);
}
.pb-sample h4 { font-family: var(--serif); font-weight: 600; font-size: 20px; line-height: 1.4; letter-spacing: -0.01em; color: var(--text); }
.pb-sample p { margin-top: 10px; font: 400 15px/1.75 var(--sans); color: var(--text-2); }

/* handoff */
.ho-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(32px, 6vw, 96px); align-items: center; }
.ho-art { background: var(--blue-soft); border-radius: 28px; padding: 8% 6%; }
.ho-art img { mix-blend-mode: multiply; width: 100%; }
.ticks { margin-top: 32px; display: grid; gap: 0; border-top: 1px solid var(--line); }
.ticks li { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 16px; line-height: 1.6; }
.ticks li::before {
  content: ""; flex: none; width: 20px; height: 20px; margin-top: 2px; border-radius: 6px; background: var(--blue-soft)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M6 10.5l2.6 2.6L14 7.5' fill='none' stroke='%232F62D8' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 20px no-repeat;
}
.window-wide { margin-top: clamp(64px, 8vw, 112px); }
.caption { margin-top: 18px; text-align: center; font-family: "Instrument Serif", var(--serif); font-style: italic; font-size: 19px; color: var(--text-3); }

/* local */
.local { padding-top: 0; }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card { border-radius: 20px; background: var(--bg-2); padding: 12px 12px 32px; }
.card-art { background: #fff; border-radius: 14px; aspect-ratio: 4 / 3; display: grid; place-items: center; overflow: hidden; }
.card-art img { width: 82%; mix-blend-mode: multiply; }
.card h3 { font-family: var(--serif); font-weight: 600; font-size: 24px; line-height: 1.3; margin: 26px 16px 0; }
.card p { margin: 10px 16px 0; font-size: 15px; line-height: 1.75; color: var(--text-2); }

/* fit / who it's for */
.fit { border-top: 1px solid var(--line); }
.fit-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.fit-head .h2 { font-size: clamp(32px, 4.2vw, 52px); line-height: 1.18; }
.fit-list { border-top: 1px solid var(--line-strong); counter-reset: fit-item; }
.fit-list li {
  display: grid; grid-template-columns: 32px minmax(0, 1fr); column-gap: 14px; row-gap: 4px; align-items: baseline;
  padding: 20px 0; border-bottom: 1px solid var(--line);
  counter-increment: fit-item;
}
.fit-list li::before {
  content: "0" counter(fit-item);
  grid-row: 1 / span 2;
  font: 500 12px/1.6 var(--mono); letter-spacing: 0.04em; font-variant-numeric: tabular-nums;
  color: var(--blue);
}
.fit-list h3 { grid-column: 2; font-family: var(--serif); font-weight: 600; font-size: 21px; line-height: 1.35; color: var(--text); }
.fit-list p { grid-column: 2; font-size: 15px; line-height: 1.7; color: var(--text-2); }
.fit-sum { margin-top: 26px; font-size: 16.5px; line-height: 1.8; color: var(--text); max-width: 38em; }

/* faq */
.faq { border-top: 1px solid var(--line); }
.faq-grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: clamp(32px, 6vw, 96px); }
.qa { border-top: 1px solid var(--line-strong); }
.qa details { border-bottom: 1px solid var(--line-strong); }
.qa summary {
  list-style: none; cursor: pointer; padding: 24px 44px 24px 0; position: relative;
  font-size: 19px; font-weight: 500; line-height: 1.5;
}
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after {
  content: ""; position: absolute; right: 6px; top: 50%; width: 14px; height: 14px; margin-top: -7px;
  background: linear-gradient(var(--text), var(--text)) center / 14px 1.6px no-repeat, linear-gradient(var(--text), var(--text)) center / 1.6px 14px no-repeat;
  transition: transform 0.2s ease;
}
.qa details[open] summary::after { transform: rotate(45deg); }
.qa summary:hover { color: var(--blue); }
.qa details p { padding: 0 44px 26px 0; color: var(--text-2); font-size: 16px; line-height: 1.8; }

/* night */
.night { background: var(--night); color: var(--night-text); padding-bottom: clamp(96px, 12vw, 160px); color-scheme: dark; }
/* dusk: scroll-driven fade from day to night (site.js sets --p 0→1) */
.dusk { --p: 0; height: 220vh; background: linear-gradient(#fff, var(--night) 70%); }
.js .dusk { background: none; }
.dusk-stage {
  position: sticky; top: 0; height: 100vh; height: 100svh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px;
  background: var(--dusk-bg, transparent); color: var(--dusk-fg, var(--text));
}
.dusk-clock { font: 400 clamp(72px, 14vw, 200px)/1 var(--serif); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.dusk-line { font: 400 clamp(20px, 2.4vw, 30px)/1.4 var(--serif); opacity: var(--line-o, 0); transform: translateY(calc((1 - var(--line-o, 0)) * 12px)); color: var(--night-text-2); }
.night-in { padding-top: clamp(24px, 4vw, 48px); }
.night-in { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.kicker-night { color: #7fa4f2; }
.display-night { color: var(--night-text); font-size: clamp(34px, 4.1vw, 56px); line-height: 1.16; }
.display-night span { display: block; white-space: nowrap; }
.lede-night { color: var(--night-text-2); margin-top: 24px; }
.night .cta-row { justify-content: flex-start; }
.fine-night { color: #85847f; }
.window-night { background: var(--night-2); outline-color: rgba(255, 255, 255, 0.12); box-shadow: 0 40px 100px -30px rgba(0, 0, 0, 0.8), 0 0 120px -40px rgba(127, 164, 242, 0.25); }
.window-night .window-bar { background: #1c1c1c; border-bottom-color: rgba(255, 255, 255, 0.06); }
.window-night .window-bar i { background: #3a3a38; }
/* footer */
.site-foot { border-top: 1px solid var(--line); padding-top: clamp(56px, 7vw, 88px); font-size: 14px; }
.foot-top { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 40px; }
.foot-brand p { margin: 14px 0 22px; color: var(--text-2); }
.foot-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.foot-cols h4 { font: 500 12px/1 var(--mono); letter-spacing: 0.08em; color: var(--text-3); margin-bottom: 16px; }
.foot-cols a, .foot-cols p { display: block; color: var(--text-2); text-decoration: none; line-height: 2.1; }
.foot-cols a:hover { color: var(--blue); }
.foot-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px 24px; margin-top: clamp(48px, 6vw, 80px); padding-top: 22px; padding-bottom: 32px; border-top: 1px solid var(--line); font-size: 13px; color: var(--text-3); }

/* reveal */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1); }
.reveal.is-in { opacity: 1; transform: none; }
.window-tilt.reveal { transform: perspective(1800px) rotateY(-4deg) translateY(18px); }
.window-tilt.reveal.is-in { transform: perspective(1800px) rotateY(-4deg); }
.shift li.reveal:nth-child(2) { transition-delay: 0.06s; }
.shift li.reveal:nth-child(3) { transition-delay: 0.12s; }
.shift li.reveal:nth-child(4) { transition-delay: 0.18s; }
.shift li.reveal:nth-child(5) { transition-delay: 0.24s; }
.no-js .reveal { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .hero-buddy { top: -84px; }
}
@media (max-width: 960px) {
  .nav-in { display: flex; }
  .nav-links { display: none; }
  .nav-actions { margin-left: auto; }
  .burger { display: block; }
  .shift {
    grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(240px, 72%);
    align-items: start; overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory; scroll-padding-inline: var(--gutter);
    margin: 0 calc(var(--gutter) * -1); padding: 0 var(--gutter) 8px; scrollbar-width: none;
  }
  .shift::-webkit-scrollbar { display: none; }
  .shift li { scroll-snap-align: start; }
  .shift li.reveal { transform: none; }
  .pb-grid, .ho-grid, .fit-grid, .faq-grid, .night-in, .foot-top { grid-template-columns: 1fr; }
  .window-tilt, .window-tilt.reveal, .window-tilt.reveal.is-in { transform: none; }
  .pb-sample, .cards { grid-template-columns: 1fr; }
  .pb-sample article { padding: 24px 0; border-left: 0; border-bottom: 1px solid var(--line); }
  .pb-sample article:last-child { border-bottom: 0; padding-bottom: 0; }
  .ho-art { max-width: 520px; }
  .card-art { aspect-ratio: 16 / 10; }
  .card-art img { width: 60%; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .br-sm { display: inline; }
  .nav-actions { gap: 4px; }
  .nav .btn-sm { padding: 0 12px; font-size: 13px; }
  .hero-buddy { width: 120px; top: -64px; right: 4px; }
  .hero-stage { margin-top: 84px; }
  .window { border-radius: 10px; }
  .window-bar { height: 20px; padding: 0 9px; gap: 5px; }
  .window-bar i { width: 7px; height: 7px; }
  .cta-row .btn { flex: 1 1 auto; justify-content: center; }
  .night .cta-row { flex-direction: column; align-items: stretch; }
  .night .fine-night { text-align: center; }
  .foot-cols { grid-template-columns: 1fr 1fr; }
  .qa summary { font-size: 17px; }
  .platforms { gap: 12px; }
}

/* ---------- subpages (changelog / next / about) ---------- */
.subpage { padding: clamp(64px, 9vw, 120px) 0 clamp(96px, 12vw, 160px); }
.sub-wrap { max-width: 960px; }
.sub-head { max-width: 680px; }
.sub-head .lede { margin-top: 22px; }
.sub-action { margin-top: 22px; }
.text-link {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 15px; font-weight: 500; color: var(--blue); text-decoration: none;
  border-bottom: 1px solid transparent; transition: border-color 0.15s ease;
}
.text-link:hover { border-bottom-color: var(--blue); }

/* changelog */
.log-list { margin-top: clamp(56px, 7vw, 88px); border-top: 1px solid var(--line-strong); }
.log-entry {
  display: grid; grid-template-columns: minmax(0, 200px) minmax(0, 1fr); gap: 24px 48px;
  padding: clamp(36px, 5vw, 56px) 0; border-bottom: 1px solid var(--line);
}
.log-ver { font: 500 18px/1.3 var(--mono); color: var(--text); font-variant-numeric: tabular-nums; }
.log-date { margin-top: 6px; font-size: 13px; color: var(--text-3); }
.log-body h2 { font-family: var(--serif); font-weight: 600; font-size: clamp(26px, 3vw, 34px); line-height: 1.25; letter-spacing: -0.01em; }
.log-lead { margin-top: 14px; font-size: 16.5px; line-height: 1.75; color: var(--text-2); }
.log-points { margin-top: 24px; border-top: 1px solid var(--line); }
.log-points li {
  position: relative; padding: 13px 0 13px 18px; border-bottom: 1px solid var(--line);
  font-size: 15px; line-height: 1.7; color: var(--text-2);
}
.log-points li::before {
  content: ""; position: absolute; left: 0; top: 23px; width: 5px; height: 5px;
  border-radius: 50%; background: var(--blue);
}

/* next / roadmap */
.road-groups { margin-top: clamp(56px, 7vw, 88px); border-top: 1px solid var(--line-strong); }
.road-group {
  display: grid; grid-template-columns: minmax(0, 220px) minmax(0, 1fr); gap: 24px 48px;
  padding: clamp(36px, 5vw, 56px) 0; border-bottom: 1px solid var(--line);
}
.road-num { display: block; font: 500 12px/1 var(--mono); letter-spacing: 0.06em; color: var(--blue); font-variant-numeric: tabular-nums; }
.road-num em { font-style: normal; color: var(--text-3); margin-left: 8px; }
.road-label h2 { margin-top: 10px; font-family: var(--serif); font-weight: 600; font-size: 26px; line-height: 1.25; }
.road-lead { font-size: 16px; line-height: 1.8; color: var(--text-2); margin-bottom: 22px; }
.road-subnote { font-size: 14.5px; line-height: 1.75; color: var(--text-3); margin-bottom: 24px; }
.road-items { display: grid; }
.road-items li { padding: 18px 0; border-bottom: 1px solid var(--line); }
.road-items li:first-child { padding-top: 0; }
.road-items li:last-child { border-bottom: 0; padding-bottom: 0; }
.road-items h3 { font-family: var(--serif); font-weight: 600; font-size: 21px; line-height: 1.35; color: var(--text); }
.road-items p { margin-top: 6px; font-size: 15px; line-height: 1.75; color: var(--text-2); }
.road-mem { margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--line); font-size: 14.5px; line-height: 1.75; color: var(--text-2); }
.road-mem strong { font-weight: 600; color: var(--text); }

/* SOP diff specimen */
.diff-spec {
  margin-top: 28px;
  padding: 22px 24px;
  background: var(--bg-2);
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
}
.diff-head {
  font: 500 12px/1.4 var(--mono);
  letter-spacing: 0.04em;
  color: var(--text-3);
  margin-bottom: 16px;
}
.diff-lines { display: grid; gap: 10px; }
.diff-line {
  display: grid; grid-template-columns: 18px 1fr; gap: 10px; align-items: baseline;
  font-size: 15px; line-height: 1.7;
}
.diff-line i { font-style: normal; font: 600 14px/1 var(--mono); }
.diff-del { color: var(--text-3); }
.diff-del i { color: #b54738; }
.diff-del span { text-decoration: line-through; text-decoration-color: rgba(181, 71, 56, 0.45); }
.diff-add { color: var(--text); }
.diff-add i { color: var(--blue); }
.diff-why {
  margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line);
  font-size: 14px; line-height: 1.75; color: var(--text-2);
}
.diff-actions {
  margin-top: 14px; display: flex; flex-wrap: wrap; gap: 16px;
  font: 500 12.5px/1 var(--mono); color: var(--text-3); letter-spacing: 0.03em;
}
.diff-actions span:first-child { color: var(--blue); }

/* how-it-works / architecture */
.spec-line {
  margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--line);
  font: 400 13px/1.8 var(--mono); color: var(--text-3); letter-spacing: 0.01em;
}
.tech-sec {
  margin-top: clamp(56px, 7vw, 88px);
  padding-top: clamp(36px, 4.5vw, 52px);
  border-top: 1px solid var(--line-strong);
}
.tech-sec-head { max-width: 680px; }
.tech-sec-head h2 {
  margin-top: 12px; font-family: var(--serif); font-weight: 600;
  font-size: clamp(28px, 3.4vw, 38px); line-height: 1.22; letter-spacing: -0.012em; color: var(--text);
}
.tech-sec-head p { margin-top: 14px; font-size: 16px; line-height: 1.8; color: var(--text-2); }
.arch-flow {
  margin-top: 36px;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.arch-flow li {
  padding: 24px 22px;
  border-left: 1px solid var(--line);
}
.arch-flow li:first-child { padding-left: 0; border-left: 0; }
.arch-flow li:last-child { padding-right: 0; }
.arch-step {
  display: block; margin-bottom: 12px;
  font: 500 12px/1 var(--mono); letter-spacing: 0.06em; color: var(--blue);
  font-variant-numeric: tabular-nums;
}
.arch-flow strong {
  display: block; font-family: var(--serif); font-weight: 600;
  font-size: 20px; line-height: 1.3; color: var(--text);
}
.arch-flow p { margin-top: 8px; font-size: 14.5px; line-height: 1.72; color: var(--text-2); }

/* 6-step pipeline */
.pipe-grid {
  margin-top: 36px;
  display: grid; grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
}
.pipe-grid li {
  padding: 24px 26px 26px 26px;
  border-bottom: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
.pipe-grid li:nth-child(3n + 1) { padding-left: 0; border-left: 0; }
.pipe-grid li:nth-child(3n) { padding-right: 0; }
.pipe-grid strong {
  display: block; font-family: var(--serif); font-weight: 600;
  font-size: 22px; line-height: 1.3; color: var(--text);
}
.pipe-grid p { margin-top: 8px; font-size: 14.5px; line-height: 1.75; color: var(--text-2); }
.tech-note {
  margin-top: 22px; font-size: 14.5px; line-height: 1.8; color: var(--text-3); max-width: 48em;
}

/* 5-step send protocol */
.proto-list {
  margin-top: 32px; border-top: 1px solid var(--line);
}
.proto-list li {
  display: grid; grid-template-columns: 36px 132px minmax(0, 1fr); gap: 8px 20px; align-items: baseline;
  padding: 16px 0; border-bottom: 1px solid var(--line);
}
.proto-num { font: 500 12px/1 var(--mono); color: var(--blue); font-variant-numeric: tabular-nums; }
.proto-list strong { font-weight: 600; font-size: 15.5px; color: var(--text); }
.proto-list p { font-size: 15px; line-height: 1.75; color: var(--text-2); }

/* clean hairline tables */
.table-wrap { margin-top: 36px; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table-label {
  font: 500 12px/1.4 var(--mono); letter-spacing: 0.05em; color: var(--text-3);
  margin-bottom: 12px;
}
.clean-table { width: 100%; border-collapse: collapse; font-size: 14.5px; line-height: 1.65; }
.clean-table th, .clean-table td {
  text-align: left; vertical-align: top;
  padding: 13px 16px 13px 0;
  border-bottom: 1px solid var(--line);
}
.clean-table thead th {
  font: 500 12px/1.4 var(--mono); letter-spacing: 0.04em; color: var(--text-3);
  border-bottom: 1px solid var(--line-strong);
  padding-top: 0;
}
.clean-table td { color: var(--text-2); }
.clean-table tbody th { font-weight: 500; color: var(--text); width: 28%; }
.clean-table .col-kuplo { color: var(--text); font-weight: 500; }
.clean-table thead .col-kuplo { color: var(--blue); font-weight: 600; }
.compare-table { min-width: 620px; }
.compare-table tbody th { width: 20%; }

/* boundaries 2-col hairline grid */
.bound-grid {
  margin-top: 32px; display: grid; grid-template-columns: repeat(2, 1fr);
  border-top: 1px solid var(--line);
}
.bound-grid li {
  padding: 22px 28px 24px 0; border-bottom: 1px solid var(--line);
}
.bound-grid li:nth-child(2n) { padding-left: 28px; padding-right: 0; border-left: 1px solid var(--line); }
.bound-grid strong { display: block; font-weight: 600; font-size: 16px; color: var(--text); }
.bound-grid p { margin-top: 6px; font-size: 14.5px; line-height: 1.75; color: var(--text-2); }
.tech-prose { display: grid; gap: 16px; }
.tech-prose p { font-size: 16px; line-height: 1.8; color: var(--text-2); }

/* about */
.about-main { max-width: 660px; margin: 0 auto; }
.about-byline { margin-top: 18px; font-size: 15px; line-height: 1.7; color: var(--text-3); }
.prose { margin-top: clamp(32px, 4vw, 48px); display: grid; gap: 22px; }
.prose p { font-size: 17px; line-height: 1.85; color: var(--text-2); }
.about-meta { margin-top: clamp(44px, 5vw, 64px); border-top: 1px solid var(--line-strong); }
.about-meta div {
  display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 16px; align-items: baseline;
  padding: 16px 0; border-bottom: 1px solid var(--line);
}
.about-meta dt { font-size: 13px; color: var(--text-3); }
.about-meta dd { margin: 0; font-size: 15px; }

/* download */
.dl-main { max-width: 680px; margin: 0 auto; }
.dl-actions { margin-top: 32px; display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.dl-status { font-size: 14px; line-height: 1.6; color: var(--blue); }
.dl-guide { margin-top: clamp(48px, 6vw, 72px); }
.dl-steps { border-top: 1px solid var(--line-strong); counter-reset: dl-step; }
.dl-steps li {
  display: grid; grid-template-columns: 32px minmax(0, 1fr); column-gap: 14px; row-gap: 6px; align-items: baseline;
  padding: 24px 0; border-bottom: 1px solid var(--line);
  counter-increment: dl-step;
}
.dl-steps li::before {
  content: "0" counter(dl-step);
  grid-row: 1 / span 4;
  font: 500 12px/1.6 var(--mono); letter-spacing: 0.04em; font-variant-numeric: tabular-nums;
  color: var(--blue);
}
.dl-steps h2 { grid-column: 2; font-family: var(--serif); font-weight: 600; font-size: 22px; line-height: 1.35; color: var(--text); }
.dl-steps p { grid-column: 2; font-size: 15px; line-height: 1.8; color: var(--text-2); }
.dl-tip { margin-top: 10px; font-size: 13.5px; color: var(--text-3); }
.cmd-box {
  grid-column: 2; margin-top: 8px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 12px 10px 14px;
  background: var(--bg-2); border: 1px solid var(--line-strong); border-radius: 10px;
}
.cmd-box code {
  font: 400 13px/1.5 var(--mono); color: var(--text);
  overflow-x: auto; white-space: nowrap;
}
.cmd-copy {
  flex: none; border: 1px solid var(--line-strong); background: #fff; color: var(--text-2);
  height: 30px; padding: 0 11px; border-radius: 6px; cursor: pointer;
  font: 500 12.5px/1 var(--sans); white-space: nowrap;
  transition: color 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
}
.cmd-copy:hover { color: var(--text); border-color: rgba(24, 24, 23, 0.28); }
.cmd-copy.is-copied { color: var(--blue); border-color: rgba(47, 98, 216, 0.35); background: var(--blue-soft); }
.dl-mono { font-variant-numeric: tabular-nums; }

.sub-foot-link {
  margin-top: clamp(44px, 6vw, 64px); display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px;
  font-size: 15px; color: var(--text-2);
}

@media (max-width: 820px) {
  .log-entry, .road-group { grid-template-columns: 1fr; }
  .arch-flow { grid-template-columns: 1fr; }
  .arch-flow li { padding: 20px 0; border-left: 0; border-bottom: 1px solid var(--line); }
  .arch-flow li:last-child { border-bottom: 0; }
  .pipe-grid { grid-template-columns: repeat(2, 1fr); }
  .pipe-grid li:nth-child(3n + 1) { padding-left: 22px; border-left: 1px solid var(--line); }
  .pipe-grid li:nth-child(3n) { padding-right: 22px; }
  .pipe-grid li:nth-child(2n + 1) { padding-left: 0; border-left: 0; }
  .pipe-grid li:nth-child(2n) { padding-right: 0; }
  .bound-grid { grid-template-columns: 1fr; }
  .bound-grid li, .bound-grid li:nth-child(2n) { padding: 18px 0; border-left: 0; }
  .proto-list li { grid-template-columns: 32px 1fr; }
  .proto-list p { grid-column: 2; }
  .about-meta div { grid-template-columns: 1fr; gap: 4px; }
}
@media (max-width: 560px) {
  .pipe-grid { grid-template-columns: 1fr; }
  .pipe-grid li, .pipe-grid li:nth-child(2n + 1), .pipe-grid li:nth-child(3n + 1) {
    padding: 20px 0; border-left: 0;
  }
  .diff-spec { padding: 18px; }
}

/* ---------- English typography tuning ---------- */
html[lang="en"] {
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}
html[lang="en"] body {
  font-size: 16.5px;
  line-height: 1.65;
}
html[lang="en"] .display,
html[lang="en"] .h2,
html[lang="en"] .shift h3,
html[lang="en"] .card h3,
html[lang="en"] .pb-sample h4,
html[lang="en"] .log-body h2,
html[lang="en"] .road-label h2,
html[lang="en"] .road-items h3,
html[lang="en"] .arch-flow strong,
html[lang="en"] .tech-sec-head h2,
html[lang="en"] .pipe-grid strong,
html[lang="en"] .fit-list h3,
html[lang="en"] .dl-steps h2 {
  font-weight: 400;
}
html[lang="en"] .display {
  font-size: clamp(48px, 8.4vw, 118px);
  line-height: 1.02;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
html[lang="en"] .punct {
  display: inline;
  width: auto;
}
html[lang="en"] .h2 {
  font-size: clamp(40px, 5.4vw, 68px);
  line-height: 1.06;
  letter-spacing: -0.015em;
  text-wrap: balance;
}
html[lang="en"] .display-night {
  font-size: clamp(38px, 4.7vw, 66px);
  line-height: 1.08;
  letter-spacing: -0.015em;
}
html[lang="en"] .kicker {
  letter-spacing: 0.04em;
}
html[lang="en"] .lede {
  max-width: 38em;
  line-height: 1.65;
}
html[lang="en"] .sec-sub {
  max-width: 36em;
  line-height: 1.65;
}
html[lang="en"] .shift h3 {
  font-size: 27px;
  line-height: 1.15;
  letter-spacing: -0.01em;
}
html[lang="en"] .shift p {
  font-size: 14.5px;
  line-height: 1.65;
}
html[lang="en"] .pb-sample h4 {
  font-size: 23px;
  line-height: 1.25;
}
html[lang="en"] .card h3 {
  font-size: 27px;
  line-height: 1.18;
}
html[lang="en"] .qa summary {
  font-size: 18px;
}
html[lang="en"] .fit-head .h2 {
  font-size: clamp(36px, 4.4vw, 56px);
  line-height: 1.08;
}
html[lang="en"] .fit-list h3,
html[lang="en"] .dl-steps h2 {
  font-size: 24px;
  line-height: 1.22;
}
html[lang="en"] .fit-sum {
  font-size: 16px;
  line-height: 1.7;
}
html[lang="en"] .log-body h2 {
  font-size: clamp(30px, 3.4vw, 40px);
  line-height: 1.15;
}
html[lang="en"] .road-label h2 {
  font-size: 30px;
  line-height: 1.15;
}
html[lang="en"] .road-items h3 {
  font-size: 24px;
  line-height: 1.22;
}
html[lang="en"] .prose p {
  font-size: 16.5px;
  line-height: 1.75;
}
html[lang="en"] .arch-flow strong {
  font-size: 23px;
  line-height: 1.2;
}
html[lang="en"] .tech-sec-head h2 {
  font-size: clamp(32px, 3.8vw, 44px);
  line-height: 1.12;
}
html[lang="en"] .pipe-grid strong {
  font-size: 25px;
  line-height: 1.18;
}
html[lang="en"] .tech-prose p,
html[lang="en"] .road-lead {
  font-size: 15.5px;
  line-height: 1.72;
}

/* ---------- dark mode ---------- */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #191919;
    --bg-2: #212120;
    --bg-3: #2a2a28;
    --text: #ebebea;
    --text-2: #ababa7;
    --text-3: #868580;
    --line: rgba(255, 255, 255, 0.09);
    --line-strong: rgba(255, 255, 255, 0.16);
    --blue: #7fa4f2;
    --blue-soft: rgba(127, 164, 242, 0.14);
    --shadow: 0 1px 0 rgba(255, 255, 255, 0.04), 0 36px 80px -28px rgba(0, 0, 0, 0.78), 0 12px 28px -12px rgba(0, 0, 0, 0.55);
  }

  .nav { background: rgba(25, 25, 25, 0.84); }
  .nav.is-dark { background: rgba(17, 17, 17, 0.86); }
  .mnav { background: var(--bg); }
  .brand img { background: #ecece7; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08); }

  .btn-dark { background: var(--text); color: var(--bg); }
  .btn-dark:hover { background: #ffffff; }
  .btn-blue { background: #2f62d8; color: #ffffff; box-shadow: 0 10px 26px -10px rgba(47, 98, 216, 0.75); }
  .btn-blue:hover { background: #3b6fe3; }
  .btn-light { background: #ebebea; color: #191919; }
  .btn-light:hover { background: #ffffff; }

  .window { background: var(--bg-2); outline-color: rgba(255, 255, 255, 0.12); }
  .window-bar { background: #1f1f1e; border-bottom-color: rgba(255, 255, 255, 0.08); }
  .window-bar i { background: #3d3d3a; }
  .window:not(.window-night):not(.window-hero) img { filter: brightness(0.93) contrast(1.02); }

  /* Soft warm-stone matte stages keep dark-ink editorial illustrations crisp without glare or inverted faces */
  .hero-buddy {
    background: #dcdcd6;
    padding: 10px 12px 6px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: 0 20px 44px -18px rgba(0, 0, 0, 0.76);
  }
  .tile { background: #dcdcd6; }
  .is-key .tile, .ho-art { background: #d2ddf2; }
  .card { border: 1px solid var(--line); }
  .card-art { background: #dcdcd6; }

  .platforms li img[src*="tiktok.svg"],
  .platforms li img[src*="x.svg"] { filter: invert(0.92); }

  .ticks li::before {
    background: var(--blue-soft)
      url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M6 10.5l2.6 2.6L14 7.5' fill='none' stroke='%237FA4F2' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 20px no-repeat;
  }

  .dusk { background: linear-gradient(var(--bg), #111111 70%); }
  .night { background: #111111; }
  .window-night { background: #191919; }

  .diff-del i { color: #e07062; }
  .diff-del span { text-decoration-color: rgba(224, 112, 98, 0.55); }

  .cmd-copy { background: var(--bg-3); color: var(--text); border-color: var(--line-strong); }
  .cmd-copy:hover { background: #343431; border-color: rgba(255, 255, 255, 0.28); }
  .cmd-copy.is-copied { color: var(--blue); border-color: rgba(127, 164, 242, 0.45); background: var(--blue-soft); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, .window-tilt.reveal { opacity: 1; transform: none; transition: none; }
  .window-tilt.reveal { transform: perspective(1800px) rotateY(-4deg); }
  .scribble path { animation: none; stroke-dashoffset: 0; }
  .dusk { height: 60vh; }
  .dusk-stage { position: static; height: 60vh; }
  .tile img { transition: none; }
  .pb-tabs button::after { transition: none; }
}
