/* 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;
}

*, *::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: #fff; 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(52px, 9.4vw, 128px); line-height: 1.02; }
.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-ghost { color: var(--text); box-shadow: inset 0 0 0 1px var(--line-strong); }
.btn-ghost:hover { background: var(--bg-2); }
.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 .burger span { background: var(--night-text); }
.nav-in { display: flex; align-items: center; gap: 28px; 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; text-decoration: none; font: 800 21px/1 var(--sans); letter-spacing: -0.03em; }
.brand img { width: 28px; height: auto; }
.nav-links { display: flex; gap: 26px; margin-left: auto; }
.nav-links a { font-size: 14px; color: var(--text-2); text-decoration: none; }
.nav-links a:hover { color: var(--text); }
.burger { display: none; width: 40px; height: 40px; border: 0; background: none; padding: 0; margin-left: 4px; 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; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font: 500 13px/1 var(--mono); letter-spacing: 0.06em; color: var(--text-2); padding: 8px 14px; border-radius: 999px; background: var(--bg-2); margin-bottom: 28px; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: #2fb36a; box-shadow: 0 0 0 3px rgba(47, 179, 106, 0.18); animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 6px rgba(47, 179, 106, 0.05); } }
.br-sm { display: none; }
.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);
  mix-blend-mode: multiply; pointer-events: none;
}
.note {
  font-family: "Instrument Serif", var(--serif); font-style: italic; font-size: 19px; line-height: 1.35; color: var(--blue);
}
.note svg { width: 54px; height: 36px; fill: none; stroke: var(--blue); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.note-hero { position: absolute; left: calc(var(--gutter) - 8px); top: -96px; display: flex; flex-direction: column; align-items: flex-start; }
.note-hero svg { order: 2; margin-left: 30px; }

.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; counter-reset: s; }
.shift::before { content: ""; position: absolute; left: 0; right: 0; top: 9px; border-top: 1.5px dashed var(--line-strong); }
.shift li { position: relative; }
.shift time { position: relative; display: inline-flex; align-items: center; gap: 10px; font: 500 13px/20px var(--mono); color: var(--text-3); background: var(--bg); padding-right: 10px; }
.shift time::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--bg); box-shadow: inset 0 0 0 1.5px var(--text-3); }
.shift .is-key time { color: var(--blue); }
.shift .is-key time::before { background: var(--blue); box-shadow: 0 0 0 4px var(--blue-soft); }
.tile { margin: 20px 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: 40px; display: grid; gap: 4px; }
.pb-tabs button {
  text-align: left; border: 0; background: transparent; padding: 16px 18px 16px 20px; border-radius: 12px; cursor: pointer;
  font: inherit; color: inherit; position: relative; transition: background-color 0.15s ease;
}
.pb-tabs button::before { content: ""; position: absolute; left: 0; top: 16px; bottom: 16px; width: 2px; border-radius: 2px; background: var(--line-strong); }
.pb-tabs button:hover { background: rgba(24, 24, 23, 0.035); }
.pb-tabs button[aria-selected="true"] { background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 0 0 1px var(--line); }
.pb-tabs button[aria-selected="true"]::before { background: var(--blue); }
.pb-tabs b { display: block; font-weight: 600; font-size: 16px; }
.pb-tabs span { display: block; font-size: 14px; line-height: 1.6; color: var(--text-2); margin-top: 3px; }
.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: 14px; color: var(--text-3); }
.pb-sample { margin-top: 18px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.pb-sample article {
  background: #fff; border-radius: 14px; padding: 26px 26px 28px; box-shadow: 0 0 0 1px var(--line);
  font-family: var(--mono);
}
.pb-sample h4 { font: 600 15px/1.5 var(--sans); }
.pb-sample h4::before { content: "## "; color: var(--blue); font-family: var(--mono); font-weight: 500; }
.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); }

/* 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(44px, 5.4vw, 76px); line-height: 1.12; }
.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) {
  .note-hero { display: none; }
  .hero-buddy { top: -84px; }
}
@media (max-width: 960px) {
  .nav-links { display: none; }
  .nav .btn-sm { margin-left: auto; }
  .burger { display: block; }
  .shift { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(240px, 72%); overflow-x: auto; 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::before { left: var(--gutter); right: auto; width: calc(72% * 5 + 80px); }
  .shift li { scroll-snap-align: start; }
  .pb-grid, .ho-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; }
  .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; }
  .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; }
}

@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; }
  .dot { animation: none; }
  .dusk { height: 60vh; }
  .dusk-stage { position: static; height: 60vh; }
  .tile img { transition: none; }
}
