/* Kova · Cursor light warmth
   warm paper, ink, one vermilion signal, a romantic painting as the stage */

@font-face {
  font-family: "Instrument Sans";
  font-style: normal;
  font-weight: 400 700;
  font-stretch: 100%;
  font-display: swap;
  src: url("assets/fonts/instrument-sans.woff2") format("woff2");
}

:root {
  --bg: #F7F7F4;
  --surface: #F2F1ED;
  --surface-deep: #E6E5E0;
  --ink: #26251E;
  --ink-invert: #F7F7F4;
  --muted: rgba(38, 37, 30, 0.55);
  --accent: #C8451D;
  --border: rgba(38, 37, 30, 0.2);
  --hairline: rgba(38, 37, 30, 0.08);
  --card: #FFFFFF;
  --success: #3F7A46;
  --error: #B0413E;
  --shadow-float: 0 0 16px rgba(0, 0, 0, 0.02), 0 0 8px rgba(0, 0, 0, 0.008);
  --shadow-window: 0 18px 40px -24px rgba(38, 37, 30, 0.32),
    0 2px 8px rgba(38, 37, 30, 0.06);
  --shadow-card: 0 10px 30px -18px rgba(38, 37, 30, 0.25);
  --font-sans: "Instrument Sans", -apple-system, BlinkMacSystemFont, "PingFang SC",
    "Noto Sans SC", "Microsoft YaHei", system-ui, sans-serif;
  --font-mono: "SF Mono", ui-monospace, "JetBrains Mono", Menlo, Consolas, monospace;
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 10px;
  --sp-4: 12px;
  --sp-5: 20px;
  --sp-6: 32px;
  --sp-7: 52px;
  --sp-8: 68px;
  --sp-9: 112px;
  --radius: 4px;
  --pill: 9999px;
  --wrap: 1300px;
  --ease-fast: cubic-bezier(0.25, 1, 0.5, 1);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  overflow-x: clip;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 72px;
  background: var(--bg);
}

body {
  margin: 0;
  overflow-x: clip;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-variant-numeric: tabular-nums;
  transition: background 0.3s var(--ease-fast), color 0.3s var(--ease-fast);
}

::selection {
  background: var(--accent);
  color: #FFF9F5;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

h1, h2, h3, h4, p, ul, ol, figure {
  margin: 0;
}

ul, ol {
  padding: 0;
  list-style: none;
}

button {
  font: inherit;
  color: inherit;
}

code {
  font-family: var(--font-mono);
  font-size: 0.92em;
}

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
  border-radius: 2px;
}

.skip {
  position: absolute;
  left: 16px;
  top: -56px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: var(--radius);
  background: var(--ink);
  color: var(--ink-invert);
  font-size: 14px;
  transition: top 0.2s var(--ease-fast);
}

.skip:focus {
  top: 10px;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--sp-5);
}

/* =========================================================
   Type
   ========================================================= */
h1 {
  max-width: 680px;
  font-size: clamp(30px, 3.2vw, 40px);
  line-height: 1.2;
  font-weight: 400;
  letter-spacing: -0.018em;
  overflow-wrap: break-word;
  min-width: 0;
}

h2 {
  max-width: 680px;
  font-size: clamp(24px, 2.4vw, 30px);
  line-height: 1.25;
  font-weight: 400;
  letter-spacing: -0.011em;
  overflow-wrap: break-word;
}

h2 .dim {
  display: block;
  color: var(--muted);
}

h3 {
  font-size: 16px;
  line-height: 1.4;
  font-weight: 500;
}

p {
  max-width: 658px;
  font-size: 16px;
  line-height: 1.55;
}

.text-link {
  font-size: 14px;
  color: var(--ink);
  transition: color 0.14s var(--ease-fast);
}

.text-link:hover {
  color: var(--muted);
}

.lang-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 32px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: var(--pill);
  background: transparent;
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.14s var(--ease-fast),
    border-color 0.14s var(--ease-fast);
}

.lang-btn:hover {
  background: var(--surface);
  border-color: var(--ink);
}

.accent-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: var(--sp-5);
  font-size: 15px;
  color: var(--accent);
}

.accent-link span {
  transition: transform 0.14s var(--ease-fast);
}

.accent-link:hover span {
  transform: translateX(2px);
}

.accent-link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* =========================================================
   Buttons
   ========================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  height: 40px;
  padding: 0 16px;
  border-radius: var(--pill);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.14s var(--ease-fast), color 0.14s var(--ease-fast),
    border-color 0.14s var(--ease-fast), transform 0.14s var(--ease-fast);
}

.btn svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.14s var(--ease-fast);
}

.btn:hover svg {
  transform: translateX(2px);
}

.btn .icon-github {
  fill: currentColor;
  stroke: none;
  transform: none;
}

.btn:active {
  transform: translateY(1px);
}

.btn-ink {
  background: var(--ink);
  color: var(--ink-invert);
}

.btn-ink:hover {
  background: #3A382F;
}

.btn-soft {
  background: var(--surface-deep);
  color: var(--ink);
}

.btn-soft:hover {
  background: #DCDBD5;
}

.btn-outline {
  border: 1px solid var(--border);
  background: transparent;
  color: var(--ink);
}

.btn-outline:hover {
  background: var(--surface);
}

.btn-sm {
  height: 36px;
  padding: 0 15px;
  font-size: 14px;
}

.btn-lg {
  height: 44px;
  padding: 0 18px;
  font-size: 15px;
}

.btn-xl {
  height: 48px;
  padding: 0 22px;
  font-size: 15px;
}

/* =========================================================
   Header
   ========================================================= */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  height: 52px;
  background: var(--bg);
  transition: background 0.3s var(--ease-fast);
}

.header-inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: var(--sp-6);
  max-width: 1360px;
  height: 52px;
  margin: 0 auto;
  padding: 0 var(--sp-5);
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.logo img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.nav {
  display: flex;
  justify-content: center;
  gap: 28px;
}

.nav a {
  padding: var(--sp-2) 0;
  font-size: 14px;
  color: var(--ink);
  transition: color 0.14s var(--ease-fast);
}

.nav a:hover {
  color: var(--muted);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  justify-self: end;
}

.theme-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.14s var(--ease-fast);
}

.theme-icon:hover {
  color: var(--ink);
}

.theme-icon svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.theme-icon .i-auto,
.theme-icon .i-dark {
  display: none;
}

[data-mode="auto"] .theme-icon .i-auto {
  display: block;
}

[data-mode="auto"] .theme-icon .i-light {
  display: none;
}

[data-mode="dark"] .theme-icon .i-dark {
  display: block;
}

[data-mode="dark"] .theme-icon .i-light {
  display: none;
}

.menu-btn {
  display: none;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: transparent;
  cursor: pointer;
}

.menu-btn span {
  display: block;
  grid-area: 1 / 1;
  width: 16px;
  height: 1.5px;
  margin: 0;
  background: var(--ink);
  transition: transform 0.2s var(--ease-fast);
}

.menu-btn span:first-child {
  transform: translateY(-3px);
}

.menu-btn span:last-child {
  transform: translateY(3px);
}

.menu-btn[aria-expanded="true"] span:first-child {
  transform: rotate(45deg);
}

.menu-btn[aria-expanded="true"] span:last-child {
  transform: rotate(-45deg);
}

.mobile-menu {
  position: fixed;
  inset: 52px 0 0 0;
  z-index: 49;
  display: grid;
  align-content: start;
  gap: 0;
  padding: var(--sp-5);
  background: var(--bg);
  border-top: 1px solid var(--hairline);
  overflow-y: auto;
}

.mobile-menu[hidden] {
  display: none;
}

.mobile-menu > a {
  padding: var(--sp-5) 0;
  font-size: 18px;
  border-bottom: 1px solid var(--hairline);
  opacity: 0;
  transform: translateY(8px);
  animation: menuIn 0.4s var(--ease-out) forwards;
}

.mobile-menu > a:nth-child(2) { animation-delay: 0.03s; }
.mobile-menu > a:nth-child(3) { animation-delay: 0.06s; }
.mobile-menu > a:nth-child(4) { animation-delay: 0.09s; }
.mobile-menu > a:nth-child(5) { animation-delay: 0.12s; }
.mobile-menu > a:nth-child(6) { animation-delay: 0.15s; }
.mobile-menu > a:nth-child(7) { animation-delay: 0.18s; }

@keyframes menuIn {
  to {
    opacity: 1;
    transform: none;
  }
}

/* =========================================================
   Hero
   ========================================================= */
.hero {
  padding: 112px 0 0;
}

.hero-copy h1 {
  animation: rise 0.5s var(--ease-out) both;
}

.hero-copy p {
  margin-top: var(--sp-5);
  animation: rise 0.5s var(--ease-out) 0.05s both;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
  margin-top: var(--sp-6);
  animation: rise 0.5s var(--ease-out) 0.1s both;
}

.hero-note {
  margin-top: var(--sp-4);
  font-size: 13px;
  color: var(--muted);
  animation: rise 0.5s var(--ease-out) 0.15s both;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.stage {
  position: relative;
  height: 520px;
  margin-top: var(--sp-7);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
  isolation: isolate;
  animation: rise 0.6s var(--ease-out) 0.2s both;
}

.stage-art {
  position: absolute;
  inset: -4% 0;
  background-image: url("assets/painting.webp");
  background-size: cover;
  background-position: center 42%;
  filter: saturate(0.92) contrast(0.98);
  transform: translateY(var(--par, 0px));
  will-change: transform;
}

.stage::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(247, 247, 244, 0.08);
  pointer-events: none;
}

.win {
  position: absolute;
  z-index: 2;
  border-radius: var(--radius);
  border: 1px solid rgba(38, 37, 30, 0.1);
  background: var(--card);
  overflow: hidden;
  box-shadow: var(--shadow-window);
  transition: transform 0.2s var(--ease-fast);
}

.win img {
  width: 100%;
}

.win:hover {
  transform: scale(0.995);
}

.win-main {
  left: 5%;
  top: 12%;
  width: 66%;
}

.win-side {
  right: 4%;
  bottom: 9%;
  z-index: 3;
  width: 40%;
  box-shadow:
    0 24px 50px -26px rgba(38, 37, 30, 0.45),
    0 2px 8px rgba(38, 37, 30, 0.08);
}

.stage-plaque {
  position: absolute;
  left: var(--sp-5);
  bottom: var(--sp-5);
  z-index: 4;
  display: grid;
  gap: 2px;
  padding: var(--sp-3) 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(247, 247, 244, 0.94);
  box-shadow: var(--shadow-float);
}

@media (min-width: 961px) {
  .stage-plaque {
    left: auto;
    right: var(--sp-5);
    top: var(--sp-5);
    bottom: auto;
  }
}

.stage-plaque span:first-child {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
}

.stage-plaque span:last-child {
  font-size: 13px;
  color: var(--ink);
}

.stage-credit {
  margin-top: var(--sp-2);
  font-size: 11px;
  color: var(--muted);
  text-align: right;
}

/* =========================================================
   Features
   ========================================================= */
.feature {
  padding: var(--sp-8) 0;
}

.feature-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--sp-8);
  align-items: center;
}

.feature-stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 440px;
  padding: var(--sp-6);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
  isolation: isolate;
}

.feature-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: url("assets/painting.webp");
  background-size: cover;
  filter: saturate(0.9) contrast(0.98);
  opacity: 0.96;
}

.feature-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(247, 247, 244, 0.06);
}

.art-a::before { background-position: center 38%; }
.art-b::before { background-position: 20% 60%; }
.art-c::before { background-position: 80% 30%; }

.feature-window {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid rgba(38, 37, 30, 0.1);
  background: var(--card);
  overflow: hidden;
  box-shadow: var(--shadow-window);
  transition: transform 0.2s var(--ease-fast);
}

.feature-window img {
  width: 100%;
}

.feature-window:hover {
  transform: scale(0.995);
}

.feature-copy h2 {
  margin-bottom: var(--sp-5);
}

.feature-copy p {
  color: var(--muted);
  max-width: 560px;
}

/* =========================================================
   Architecture
   ========================================================= */
.architecture {
  padding: var(--sp-9) 0;
}

.section-intro {
  margin-bottom: var(--sp-8);
}

.section-intro h2 {
  margin-bottom: var(--sp-5);
}

.section-intro p {
  color: var(--muted);
}

.layers {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--sp-6);
}

.layers article {
  padding-top: var(--sp-5);
  border-top: 1px solid var(--border);
}

.layers .label {
  margin-bottom: var(--sp-5);
  font-size: 13px;
  color: var(--muted);
}

.layers h3 {
  margin-bottom: var(--sp-2);
  font-size: 18px;
  font-weight: 500;
}

.layers article > p:last-child {
  font-size: 14px;
  color: var(--muted);
  max-width: 320px;
}

/* =========================================================
   Screens
   ========================================================= */
.screens {
  padding: var(--sp-9) 0;
  background: var(--surface);
  transition: background 0.3s var(--ease-fast);
}

.screen-track {
  display: flex;
  gap: var(--sp-5);
  width: 100%;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: var(--sp-6) max(var(--sp-5), calc((100% - var(--wrap)) / 2 + var(--sp-5))) 0;
  scrollbar-width: none;
  cursor: grab;
}

.screen-track.is-dragging {
  cursor: grabbing;
  scroll-snap-type: none;
}

.screen-track::-webkit-scrollbar {
  display: none;
}

.screen-track figure {
  flex: 0 0 min(440px, 78%);
  scroll-snap-align: center;
}

.screen-card {
  border-radius: var(--radius);
  border: 1px solid var(--hairline);
  background: var(--card);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: transform 0.2s var(--ease-fast);
}

.screen-card img {
  width: 100%;
}

.screen-card:hover {
  transform: translateY(-2px);
}

.screen-track figcaption {
  margin-top: var(--sp-3);
  font-size: 13px;
  color: var(--muted);
  max-width: 42ch;
}

/* =========================================================
   Start
   ========================================================= */
.start {
  padding: var(--sp-9) 0;
}

.start-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: var(--sp-8);
  align-items: start;
}

.start-copy h2 {
  margin-bottom: var(--sp-5);
}

.start-copy > p {
  color: var(--muted);
}

.steps {
  margin: var(--sp-6) 0 var(--sp-6);
}

.steps li {
  padding: var(--sp-4) 0;
  border-top: 1px solid var(--hairline);
}

.steps h3 {
  margin-bottom: 2px;
}

.steps p {
  font-size: 14px;
  color: var(--muted);
}

.note {
  margin-bottom: var(--sp-5);
  font-size: 13px;
  color: var(--muted);
  max-width: 46ch;
}

.command {
  border-radius: var(--radius);
  border: 1px solid var(--hairline);
  background: var(--card);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.command-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 40px;
  padding: 0 var(--sp-4);
  border-bottom: 1px solid var(--hairline);
}

.command-bar > span {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
}

.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 var(--sp-3);
  border: 1px solid var(--border);
  border-radius: var(--pill);
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  cursor: pointer;
  transition: color 0.14s var(--ease-fast), border-color 0.14s var(--ease-fast);
}

.copy-btn:hover {
  color: var(--ink);
  border-color: var(--ink);
}

.copy-btn.is-copied {
  color: var(--accent);
  border-color: var(--accent);
}

.copy-btn svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
}

.command-body {
  margin: 0;
  padding: var(--sp-5);
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.85;
  color: var(--ink);
}

.command-body code {
  color: inherit;
}

.c-dim {
  color: var(--muted);
}

.command-foot {
  padding: var(--sp-3) var(--sp-4);
  border-top: 1px solid var(--hairline);
  font-size: 12px;
  color: var(--muted);
}

/* =========================================================
   FAQ
   ========================================================= */
.faq {
  padding: var(--sp-9) 0;
}

.faq-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.3fr);
  gap: var(--sp-8);
  align-items: start;
}

.faq-head h2 {
  margin-bottom: var(--sp-5);
}

.faq-head p {
  color: var(--muted);
}

.faq-list details {
  padding: var(--sp-4) 0;
  border-top: 1px solid var(--hairline);
}

.faq-list summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-5);
  font-size: 16px;
  cursor: pointer;
  list-style: none;
}

.faq-list summary::-webkit-details-marker {
  display: none;
}

.faq-list summary::after {
  content: "+";
  color: var(--accent);
  font-size: 18px;
  line-height: 1;
  transition: transform 0.14s var(--ease-fast);
}

.faq-list details[open] summary::after {
  transform: rotate(45deg);
}

.faq-list details p {
  margin-top: var(--sp-3);
  font-size: 14px;
  line-height: 1.6;
  color: var(--muted);
  max-width: 640px;
}

/* =========================================================
   Final
   ========================================================= */
.final {
  padding: 140px 0 150px;
  border-top: 1px solid var(--hairline);
  text-align: center;
}

.final h2 {
  max-width: 900px;
  margin: 0 auto var(--sp-6);
  font-size: clamp(40px, 5.4vw, 68px);
  line-height: 1.05;
  letter-spacing: -0.03em;
}

/* =========================================================
   Footer
   ========================================================= */
.footer {
  padding: var(--sp-8) 0 var(--sp-5);
  background: var(--surface);
  transition: background 0.3s var(--ease-fast);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.8fr repeat(3, minmax(0, 1fr));
  gap: var(--sp-7);
}

.footer-brand p {
  margin-top: var(--sp-5);
  font-size: 14px;
  color: var(--muted);
  max-width: 320px;
}

.footer-grid nav {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}

.footer-grid h4 {
  margin-bottom: var(--sp-2);
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
}

.footer-grid nav a {
  font-size: 14px;
  color: var(--ink);
  transition: color 0.14s var(--ease-fast);
}

.footer-grid nav a:hover {
  color: var(--muted);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-5);
  margin-top: var(--sp-8);
  padding-top: var(--sp-5);
  border-top: 1px solid var(--border);
}

.footer-bottom p {
  font-size: 12px;
  color: var(--muted);
}

.footer-end {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}

.theme-group {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-top: var(--sp-6);
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: var(--pill);
  background: var(--bg);
}

.footer-end .theme-group {
  margin-top: 0;
}

.theme-group button {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: background 0.14s var(--ease-fast), color 0.14s var(--ease-fast);
}

.theme-group button:hover {
  color: var(--ink);
}

.theme-group button[aria-pressed="true"] {
  background: var(--ink);
  color: var(--ink-invert);
}

.theme-group svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.lang {
  font-size: 12px;
  color: var(--muted);
}

/* =========================================================
   Motion
   ========================================================= */
.js .reveal {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.5s var(--ease-out), transform 0.5s var(--ease-out);
}

.js .reveal.in {
  opacity: 1;
  transform: none;
}

/* =========================================================
   Dark
   ========================================================= */
[data-theme="dark"] {
  --bg: #1A1915;
  --surface: #211F1A;
  --surface-deep: #2A2822;
  --ink: #F2EFE7;
  --ink-invert: #1A1915;
  --muted: rgba(242, 239, 231, 0.55);
  --accent: #E06A3E;
  --border: rgba(242, 239, 231, 0.2);
  --hairline: rgba(242, 239, 231, 0.08);
  --card: #262420;
  --shadow-window: 0 18px 40px -24px rgba(0, 0, 0, 0.6),
    0 2px 8px rgba(0, 0, 0, 0.25);
  --shadow-card: 0 10px 30px -18px rgba(0, 0, 0, 0.5);
  color-scheme: dark;
}

[data-theme="dark"] .btn-ink:hover {
  background: #3A382F;
}

[data-theme="dark"] .btn-soft:hover {
  background: #35322B;
}

[data-theme="dark"] .stage-art,
[data-theme="dark"] .feature-stage::before {
  filter: brightness(0.62) saturate(0.82);
}

[data-theme="dark"] .stage::after {
  background: rgba(26, 25, 21, 0.24);
}

[data-theme="dark"] .feature-stage::after {
  background: rgba(26, 25, 21, 0.2);
}

[data-theme="dark"] .stage-plaque {
  background: rgba(26, 25, 21, 0.92);
}

[data-theme="dark"] .win,
[data-theme="dark"] .feature-window {
  border-color: rgba(0, 0, 0, 0.3);
}

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 1100px) {
  .nav {
    gap: 20px;
  }

  .feature-grid {
    gap: var(--sp-7);
  }

  .stage {
    height: 460px;
  }

  .feature-stage {
    min-height: 380px;
  }
}

@media (max-width: 960px) {
  .nav,
  .header-actions .text-link,
  .header-actions .btn {
    display: none;
  }

  .menu-btn {
    display: grid;
  }

  .header-actions {
    gap: var(--sp-2);
  }

  .hero {
    padding-top: 96px;
  }

  .stage {
    height: 400px;
  }

  .win-main {
    width: 72%;
  }

  .win-side {
    width: 44%;
  }

  .feature-grid,
  .start-grid,
  .faq-grid {
    grid-template-columns: 1fr;
    gap: var(--sp-6);
  }

  .feature-grid.reverse .feature-copy {
    order: 2;
  }

  .feature-grid.reverse .feature-stage {
    order: 1;
  }

  .feature-stage {
    min-height: 0;
    padding: var(--sp-5);
  }

  .layers {
    grid-template-columns: 1fr;
    gap: var(--sp-5);
  }

  .layers .label {
    margin-bottom: var(--sp-2);
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }

  .architecture,
  .screens,
  .start,
  .faq {
    padding: var(--sp-8) 0;
  }

  .final {
    padding: var(--sp-9) 0;
  }
}

@media (max-width: 640px) {
  .wrap {
    padding: 0 var(--sp-4);
  }

  .header-inner {
    padding: 0 var(--sp-4);
  }

  h1 {
    font-size: clamp(26px, 8.4vw, 34px);
  }

  h2 {
    font-size: clamp(22px, 6.8vw, 26px);
  }

  .hero-note {
    font-size: 12px;
  }

  .stage {
    height: 300px;
    margin-top: var(--sp-6);
  }

  .win-main {
    left: 4%;
    top: 10%;
    width: 78%;
  }

  .win-side {
    right: 3%;
    bottom: 8%;
    width: 46%;
  }

  .stage-plaque {
    left: var(--sp-3);
    bottom: var(--sp-3);
    padding: var(--sp-2) var(--sp-3);
  }

  .stage-plaque span:first-child {
    font-size: 10px;
  }

  .stage-plaque span:last-child {
    font-size: 11px;
  }

  .stage-credit {
    font-size: 10px;
    text-align: left;
  }

  .feature {
    padding: var(--sp-7) 0;
  }

  .feature-stage {
    padding: var(--sp-3);
  }

  .screen-track {
    padding-left: var(--sp-4);
    padding-right: var(--sp-4);
  }

  .screen-track figure {
    flex-basis: 84%;
  }

  .command-body {
    font-size: 11px;
    padding: var(--sp-4);
  }

  .final h2 {
    font-size: clamp(34px, 10vw, 44px);
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--sp-6);
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }

  .mobile-menu .theme-group {
    justify-self: start;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .hero-copy h1,
  .hero-copy p,
  .hero-actions,
  .hero-note,
  .stage,
  .mobile-menu > a {
    animation: none;
    opacity: 1;
    transform: none;
  }

  .js .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
