@font-face {
  font-family: "Inter";
  src: url("fonts/inter-latin.59a95948ff.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --paper: #F7F4EE;
  --surface: #FBF9F5;
  --ink: #20272A;
  --ink-strong: #191F22;
  --qing: #3E6473;
  --dan: #B64D3B;
  --rule: #D9D3C7;
  --on-ink: #F7F4EE;
  --bar: #E6E0D5;

  --font: "Inter", "InterVariable", system-ui, -apple-system, "Segoe UI", "Noto Sans TC", "Noto Sans CJK TC", "PingFang TC", sans-serif;

  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px;
  --s6: 32px; --s7: 48px; --s8: 64px; --s9: 96px;

  --radius: 6px;
  --radius-sm: 4px;
  --max: 1200px;
  --gutter: 24px;
  --pad: 48px;
  color-scheme: light;
}

[data-theme="dark"] {
  --paper: #191F22;
  --surface: #20272A;
  --ink: #F2EEE6;
  --ink-strong: #F2EEE6;
  --qing: #9FBBC5;
  --dan: #E08470;
  --rule: #323B3F;
  --on-ink: #191F22;
  --bar: #2B3438;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3, p, dl, dd, ul, ol { margin: 0; padding: 0; }
ul, ol { list-style: none; }

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

.skip {
  position: absolute; left: var(--s4); top: -100px;
  background: var(--ink); color: var(--on-ink);
  padding: var(--s2) var(--s4); border-radius: var(--radius-sm);
  text-decoration: none; font-weight: 600; z-index: 10;
}
.skip:focus { top: var(--s4); }

.wrap { max-width: calc(var(--max) + var(--pad) * 2); margin: 0 auto; padding: 0 var(--pad); }
.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); }

/* Theme-aware asset swap */
.on-dark { display: none; }
[data-theme="dark"] .on-light { display: none; }
[data-theme="dark"] .on-dark { display: block; }

/* Shared bits */
.seal { display: inline-block; width: 10px; height: 10px; background: var(--dan); flex: none; }
.eyebrow {
  display: inline-flex; align-items: center; gap: var(--s3);
  font-size: 12px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--qing);
}
.index {
  font-size: 13px; font-weight: 700; letter-spacing: 0.04em;
  color: var(--dan); font-variant-numeric: tabular-nums;
}

/* Header */
.site-header { border-bottom: 1px solid var(--rule); }
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  height: 72px; gap: var(--s5);
}
.brand { display: inline-flex; align-items: center; gap: var(--s3); text-decoration: none; }
.brand { --mark: 32px; --lk-h: 28px; align-items: flex-start; }
.brand .mark { width: var(--mark); height: var(--mark); }
.brand .wordmark-img {
  height: var(--lk-h); width: calc(var(--lk-h) * 444 / 116); max-width: none;
  margin-top: calc(var(--mark) * 56 / 64 - var(--lk-h) * 82.872 / 116);
  margin-bottom: calc(var(--mark) - var(--mark) * 56 / 64 + var(--lk-h) * 82.872 / 116 - var(--lk-h));
}

.nav { display: flex; align-items: center; gap: var(--s6); }
.site-header .brand { position: relative; top: -3.3px; }
.site-header .nav { position: relative; top: 3.3px; }
.nav ul { display: flex; gap: var(--s6); }
.nav a {
  font-size: 15px; font-weight: 500; text-decoration: none; color: var(--ink);
  padding: var(--s2) 0; border-bottom: 1px solid transparent;
}
.nav a:hover { border-bottom-color: var(--ink); }
.nav .x { color: var(--qing); }

.theme-toggle {
  display: inline-flex; align-items: center; gap: var(--s2);
  height: 34px; padding: 0 var(--s3);
  font: inherit; font-size: 13px; font-weight: 600; letter-spacing: 0.02em;
  color: var(--ink); background: transparent;
  border: 1px solid var(--rule); border-radius: var(--radius-sm); cursor: pointer;
}
.theme-toggle:hover { border-color: var(--ink); }
.theme-toggle .swatch {
  position: relative; width: 12px; height: 12px; border: 1px solid var(--ink);
}
.theme-toggle .swatch::after {
  content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 50%; background: var(--ink);
}

/* Hero */
.hero { padding: var(--s9) 0 var(--s9); border-bottom: 1px solid var(--rule); }
.hero-copy { grid-column: 1 / span 7; align-self: center; }
.hero h1 {
  margin-top: var(--s5);
  font-size: clamp(44px, 6.2vw, 88px);
  font-weight: 800; line-height: 0.98; letter-spacing: -0.04em;
  color: var(--ink-strong);
  max-width: 11ch;
}
.lead {
  margin-top: var(--s6);
  max-width: 34em; font-size: 19px; line-height: 1.6; color: var(--qing);
}
.actions { margin-top: var(--s7); display: flex; flex-wrap: wrap; align-items: center; gap: var(--s5); }
.btn {
  display: inline-flex; align-items: center; gap: var(--s3);
  height: 48px; padding: 0 var(--s5);
  font-size: 16px; font-weight: 600; text-decoration: none;
  border-radius: var(--radius-sm); border: 1px solid var(--ink);
}
.btn-primary { background: var(--ink); color: var(--on-ink); }
.btn-primary:hover { background: var(--qing); border-color: var(--qing); }
.btn-primary .seal { width: 8px; height: 8px; }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--on-ink); }
.text-link {
  font-size: 16px; font-weight: 600; text-decoration: underline;
  text-underline-offset: 6px; text-decoration-thickness: 1px; text-decoration-color: var(--qing);
}
.text-link:hover { text-decoration-color: var(--ink); }

.plate {
  grid-column: 9 / span 4; align-self: center;
  border: 1px solid var(--ink); border-radius: var(--radius-sm);
  background: var(--surface);
}
.plate-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--s3) var(--s4);
  border-bottom: 1px solid var(--ink);
  font-size: 12px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
}
.plate li {
  display: grid; grid-template-columns: 40px 1fr; column-gap: var(--s3);
  padding: var(--s4); border-top: 1px solid var(--rule);
}
.plate li:first-child { border-top: 0; }
.plate .index { padding-top: 3px; }
.plate strong { display: block; font-size: 17px; font-weight: 700; letter-spacing: -0.01em; line-height: 1.35; }
.plate span.note { display: block; margin-top: 2px; font-size: 14px; line-height: 1.5; color: var(--qing); }
.plate-foot {
  display: flex; justify-content: space-between;
  padding: var(--s3) var(--s4); border-top: 1px solid var(--ink);
  font-size: 12px; color: var(--qing); letter-spacing: 0.04em;
}

/* Section head */
.section { padding: var(--s9) 0; border-bottom: 1px solid var(--rule); }
.section-head { margin-bottom: var(--s7); align-items: end; }
.section-head .eyebrow { grid-column: 1 / span 3; padding-bottom: 10px; }
.section-head h2 {
  grid-column: 4 / span 9;
  font-size: clamp(32px, 3.6vw, 48px); font-weight: 800;
  line-height: 1.05; letter-spacing: -0.03em; color: var(--ink-strong);
}

/* Products */
.products { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gutter); }
.card {
  display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius);
  padding: var(--s7);
}
.card-top { display: flex; align-items: center; justify-content: space-between; }
.badge {
  display: inline-flex; align-items: center; gap: var(--s2);
  height: 26px; padding: 0 var(--s3);
  font-size: 11px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  border-radius: var(--radius-sm);
}
.badge-live { color: var(--ink); border: 1px solid var(--ink); }
.badge-live .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--dan); }
.badge-dev { color: var(--qing); border: 1px solid var(--qing); }

.lockup { margin-top: var(--s6); height: 52px; display: flex; align-items: center; }
.lockup img { height: 52px; width: auto; max-width: none; }

.visual {
  margin-top: var(--s6);
  border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule);
  padding: var(--s5) 0;
}
.visual svg { width: 100%; height: auto; max-height: 190px; }
.v-ink { fill: var(--ink); }
.v-qing { fill: var(--qing); }
.v-dan { fill: var(--dan); }
.v-bar { fill: var(--bar); }
.v-paper { fill: var(--surface); }
.v-onink { fill: var(--on-ink); }
.v-rule { stroke: var(--rule); fill: none; }
.v-line { stroke: var(--ink); fill: none; }
.v-label { fill: var(--qing); font-family: var(--font); font-size: 11px; font-weight: 600; letter-spacing: 0.12em; }

.desc { margin-top: var(--s5); font-size: 18px; line-height: 1.55; max-width: 32em; }

.specs { margin-top: var(--s5); border-top: 1px solid var(--rule); }
.specs div {
  display: grid; grid-template-columns: 120px 1fr; column-gap: var(--s4);
  padding: var(--s3) 0; border-bottom: 1px solid var(--rule);
  font-size: 15px;
}
.specs dt { color: var(--qing); font-weight: 500; }
.specs dd { font-weight: 600; }

.card-foot { margin-top: auto; padding-top: var(--s6); }
.muted { font-size: 14px; color: var(--qing); }
.muted a { color: var(--ink); font-weight: 600; text-underline-offset: 4px; text-decoration-thickness: 1px; }

/* Principles */
.principles { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--ink); }
.principle { padding: var(--s6) var(--s6) 0 0; }
.principle + .principle { padding-left: var(--s6); border-left: 1px solid var(--rule); }
.principle h3 { margin-top: var(--s3); font-size: 22px; font-weight: 750; letter-spacing: -0.02em; line-height: 1.25; }
.principle p { margin-top: var(--s3); font-size: 16px; color: var(--qing); max-width: 30em; }

/* Footer */
.site-footer { padding: var(--s8) 0 var(--s6); }
.foot-main { align-items: start; }
.foot-brand { grid-column: 1 / span 6; }
.foot-brand p { margin-top: var(--s4); color: var(--qing); font-size: 16px; }
.foot-contact { grid-column: 8 / span 5; display: grid; grid-template-columns: 1fr 1fr; gap: var(--gutter); }
.foot-contact dt {
  font-size: 12px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--qing);
}
.foot-contact dd { margin-top: var(--s2); }
.foot-contact a { display: inline-block; font-size: 17px; font-weight: 600; text-decoration: none; border-bottom: 1px solid var(--rule); }
.foot-contact a:hover { border-bottom-color: var(--ink); }
.colophon {
  margin-top: var(--s8); padding-top: var(--s4); border-top: 1px solid var(--rule);
  display: flex; justify-content: space-between; gap: var(--s4);
  font-size: 13px; color: var(--qing);
}

/* Responsive: 1440 desktop, 768 tablet, 390 phone */
@media (max-width: 1100px) {
  .hero-copy { grid-column: 1 / span 12; }
  .plate { grid-column: 1 / span 12; margin-top: var(--s8); }
  .plate ol { display: grid; grid-template-columns: 1fr 1fr; }
  .plate li:nth-child(2) { border-top: 0; }
  .plate li:nth-child(even) { border-left: 1px solid var(--rule); }
  .hero h1 { max-width: 12ch; }
}
@media (max-width: 900px) {
  :root { --pad: 32px; }
  .products { grid-template-columns: 1fr; }
  .section-head .eyebrow, .section-head h2 { grid-column: 1 / span 12; }
  .section-head h2 { margin-top: var(--s4); }
  .foot-brand, .foot-contact { grid-column: 1 / span 12; }
  .foot-contact { margin-top: var(--s7); }
}
@media (max-width: 768px) {
  .hero { padding: var(--s8) 0; }
  .section { padding: var(--s8) 0; }
  .principles { grid-template-columns: 1fr; }
  .principle, .principle + .principle { padding: var(--s5) 0; border-left: 0; }
  .principle + .principle { border-top: 1px solid var(--rule); }
  .principle:last-child { padding-bottom: 0; }
}
@media (min-width: 561px) and (max-width: 640px) {
  .site-header .wrap, .nav, .nav ul { gap: var(--s3); }
}
@media (max-width: 560px) {
  :root { --pad: 20px; }
  body { font-size: 16px; }
  .site-header .wrap {
    height: auto; min-height: 64px; flex-wrap: wrap;
    column-gap: var(--s4); row-gap: var(--s1);
    padding-top: var(--s3); padding-bottom: var(--s3);
  }
  .nav, .nav ul { gap: var(--s4); }
  .site-header .brand { --lk-h: 24px; }
  .nav li.nav-x, .theme-toggle .label { display: none; }
  .theme-toggle { width: 34px; padding: 0; justify-content: center; }
  .lead { font-size: 17px; }
  .plate ol { grid-template-columns: 1fr; }
  .plate li:nth-child(2) { border-top: 1px solid var(--rule); }
  .plate li:nth-child(even) { border-left: 0; }
  .card { padding: var(--s5); }
  .lockup, .lockup img { height: 40px; }
  .specs div { grid-template-columns: 96px 1fr; }
  .foot-contact { grid-template-columns: 1fr; }
  .colophon { flex-direction: column; gap: var(--s1); }
}
@media (max-width: 420px) {
  .v-label { font-size: 15px; letter-spacing: 0.08em; }
  .v-callout { display: none; }
}
@media (prefers-reduced-motion: no-preference) {
  .btn, .nav a, .theme-toggle, .text-link, .foot-contact a { transition: background-color .15s, color .15s, border-color .15s, text-decoration-color .15s; }
}

/* Not-found page */
.not-found {
  min-height: 100vh;
  padding-top: var(--s6);
}
.not-found .theme-toggle { float: right; }
.not-found h1 { margin: var(--s9) 0 var(--s4); }
.not-found .btn { margin-top: var(--s6); }
