/* HongXiao DigiTech · Keel — brand site
   Tokens are the Keel family's (KeelUni / KeelCue DESIGN.md). Colour carries meaning:
   teal = action / the product line; everything else is grey on near-black teal.
   No gradients, shadows or illustrations. */

@font-face {
  font-family: "Inter Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("fonts/inter-latin-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("fonts/inter-latin-ext-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --bg: #1b2429;
  --surface: #0f1a1f;
  --surface-raised: #273035;
  --border: #273035;
  --border-strong: #575e62;
  --text: #f6fefd;
  --text-secondary: #d2dad7;
  --text-muted: #949e9c;
  --accent: #50d2c1;
  --accent-hover: #97fce4;
  --accent-text: #04060c;
  --accent-soft: #0e3333;

  --font: "Inter Variable", "PingFang TC", "PingFang HK", "Noto Sans TC", "Microsoft JhengHei", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --max: 1160px;
  --gutter: clamp(20px, 4vw, 40px);
  --section: clamp(72px, 10vw, 128px);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text-secondary);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  font-feature-settings: "tnum";
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3, h4 { color: var(--text); margin: 0; font-weight: 600; letter-spacing: -0.01em; text-wrap: balance; }
.pitch, .lede, .section-head p { text-wrap: pretty; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 100; background: var(--surface); padding: 8px 12px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 20px; border-radius: 8px;
  font: 500 15px/1 var(--font); cursor: pointer; border: 1px solid transparent;
  transition: background-color .15s, color .15s, border-color .15s;
  white-space: nowrap;
}
.btn-primary { background: var(--accent); color: var(--accent-text); }
.btn-primary:hover { background: var(--accent-hover); color: var(--accent-text); }
.btn-ghost { border-color: var(--border-strong); color: var(--text); background: transparent; }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-sm { height: 36px; padding: 0 14px; font-size: 14px; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(15, 26, 31, 0.92);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--border);
}
.site-header .wrap { display: flex; align-items: center; height: 64px; gap: 32px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); }
.brand:hover { color: var(--text); }
.brand img { width: 30px; height: 30px; }
.brand-name { font-weight: 600; font-size: 16px; line-height: 1.15; }
.brand-name small { display: block; font-weight: 400; font-size: 11px; color: var(--text-muted); letter-spacing: .02em; }
.nav { display: flex; gap: 4px; margin-left: auto; }
.nav a { color: var(--text-muted); font-size: 14px; padding: 8px 12px; border-radius: 6px; }
.nav a:hover { color: var(--accent-hover); }
.header-actions { display: flex; align-items: center; gap: 12px; }
.lang { color: var(--text-muted); font-size: 13px; padding: 6px 10px; border: 1px solid var(--border); border-radius: 6px; }
.lang:hover { color: var(--text); border-color: var(--border-strong); }
.menu-btn { display: none; background: none; border: 1px solid var(--border); border-radius: 6px; color: var(--text); width: 40px; height: 36px; cursor: pointer; }

/* ---------- hero ---------- */
.hero { padding: clamp(64px, 9vw, 112px) 0 var(--section); border-bottom: 1px solid var(--border); }
.hero .wrap { display: grid; grid-template-columns: 1.15fr 1fr; gap: clamp(40px, 6vw, 88px); align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--accent); letter-spacing: .04em; margin-bottom: 20px; }
.eyebrow::before { content: ""; width: 18px; height: 1px; background: var(--accent); }
.hero h1 { font-size: clamp(40px, 6vw, 68px); line-height: 1.08; letter-spacing: -0.025em; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero .lede { margin-top: 24px; font-size: clamp(16px, 1.6vw, 19px); color: var(--text-secondary); max-width: 34em; }
.hero .ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.hero.notfound { border-bottom: 0; min-height: calc(100vh - 64px); }
.hero.notfound .wrap { display: block; }

/* the keel diagram: Sonar → Cue → Uni, a spine ending in the keel point */
.flow { position: relative; background: var(--surface); border-radius: 12px; padding: 28px 28px 20px; }
.flow-head { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-muted); margin-bottom: 20px; }
.flow-head .live { display: inline-flex; align-items: center; gap: 6px; }
.flow-head .live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.flow-steps { position: relative; display: grid; gap: 14px; }
.flow-steps::before {
  content: ""; position: absolute; left: 27px; top: 28px; bottom: 28px; width: 2px; background: var(--border);
}
.flow-step { position: relative; display: grid; grid-template-columns: 56px 1fr auto; gap: 16px; align-items: center; padding: 12px 14px 12px 0; border-radius: 8px; }
.flow-step img { width: 56px; height: 56px; background: var(--surface); position: relative; }
.flow-step .t { color: var(--text); font-weight: 600; font-size: 16px; }
.flow-step .d { font-size: 13px; color: var(--text-muted); line-height: 1.45; }
.flow-step .k { font-size: 12px; color: var(--accent); border: 1px solid var(--accent-soft); background: var(--accent-soft); border-radius: 4px; padding: 2px 8px; white-space: nowrap; }
.flow-keel { display: flex; justify-content: flex-start; padding-left: 21px; margin-top: 6px; }
.flow-keel svg { width: 14px; height: 12px; }
.flow-foot { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border); font-size: 12px; color: var(--text-muted); display: flex; justify-content: space-between; gap: 12px; }

/* ---------- sections ---------- */
section.block { padding: var(--section) 0; border-bottom: 1px solid var(--border); }
.section-head { max-width: 820px; margin-bottom: clamp(40px, 5vw, 64px); }
.section-head .eyebrow { margin-bottom: 14px; }
.section-head h2 { font-size: clamp(30px, 3.6vw, 44px); line-height: 1.15; letter-spacing: -0.02em; }
.section-head p:not(.eyebrow) { margin-top: 16px; font-size: 17px; color: var(--text-muted); }

/* products */
.products { display: grid; gap: 3px; background: var(--bg); }
.product {
  display: grid; grid-template-columns: 280px 1fr; gap: clamp(24px, 4vw, 56px);
  background: var(--surface); padding: clamp(28px, 4vw, 44px); border-radius: 5px;
}
.products .product:first-child { border-radius: 12px 12px 5px 5px; }
.products .product:last-child { border-radius: 5px 5px 12px 12px; }
.product-id img { width: 64px; height: 64px; margin-bottom: 20px; }
.product-id .stage { font-size: 12px; color: var(--text-muted); letter-spacing: .06em; text-transform: uppercase; }
.product-id h3 { font-size: 28px; margin-top: 4px; letter-spacing: -0.02em; }
.product-id h3 span { color: var(--accent); }
.product-id .kind { margin-top: 6px; color: var(--text-secondary); font-size: 15px; }
.product-id .tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 18px; }
.tag { font-size: 12px; color: var(--text-muted); border: 1px solid var(--border); border-radius: 4px; padding: 3px 8px; white-space: nowrap; }
.product-body .pitch { font-size: clamp(18px, 1.8vw, 22px); color: var(--text); line-height: 1.5; max-width: 30em; }
.features { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 32px; margin-top: 28px; }
.features li { padding-left: 18px; position: relative; font-size: 15px; }
.features li::before { content: ""; position: absolute; left: 0; top: .62em; width: 8px; height: 2px; background: var(--accent); }
.features b { display: block; color: var(--text); font-weight: 500; margin-bottom: 2px; }
.features span { color: var(--text-muted); font-size: 14px; line-height: 1.55; display: block; }
.venues { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--border); display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 13px; color: var(--text-muted); }
.venues strong { color: var(--text-secondary); font-weight: 500; margin-right: 4px; }
.product-cta { margin-top: 28px; display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.product-cta .note { font-size: 13px; color: var(--text-muted); }

/* principles */
.principles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 3px; }
.principle { background: var(--surface); padding: 28px 24px 32px; border-radius: 5px; }
.principle:first-child { border-radius: 12px 5px 5px 12px; }
.principle:last-child { border-radius: 5px 12px 12px 5px; }
.principle .n { font: 500 13px var(--mono); color: var(--accent); }
.principle h3 { font-size: 18px; margin: 14px 0 10px; }
.principle p { font-size: 14px; color: var(--text-muted); line-height: 1.65; }

/* roadmap */
.roadmap { display: grid; grid-template-columns: repeat(2, 1fr); gap: 3px; }
.future { background: var(--surface); padding: 32px; border-radius: 5px; display: grid; grid-template-columns: 52px 1fr; gap: 20px; }
.roadmap .future:nth-child(1) { border-top-left-radius: 12px; }
.roadmap .future:nth-child(2) { border-top-right-radius: 12px; }
.roadmap .future:nth-last-child(2) { border-bottom-left-radius: 12px; }
.roadmap .future:nth-last-child(1) { border-bottom-right-radius: 12px; }
.future .ghost { width: 52px; height: 52px; border: 1.5px dashed var(--border-strong); border-radius: 12px; display: grid; place-items: center; }
.future .ghost svg { width: 14px; height: 12px; }
.future .row { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.future h3 { font-size: 20px; }
.future h3 span { color: var(--accent); }
.future .status { font-size: 12px; color: var(--text-muted); border: 1px solid var(--border); border-radius: 999px; padding: 1px 10px; }
.future .status.on { color: var(--accent); border-color: var(--accent-soft); background: var(--accent-soft); }
.future .kind { font-size: 14px; color: var(--text-secondary); margin-top: 4px; }
.future p { font-size: 14px; color: var(--text-muted); margin-top: 12px; }
.roadmap-note { margin-top: 20px; font-size: 13px; color: var(--text-muted); }

/* contact */
.contact { background: var(--surface); border-radius: 12px; padding: clamp(32px, 5vw, 64px); display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 72px); }
.contact h2 { font-size: clamp(30px, 3.6vw, 44px); line-height: 1.15; letter-spacing: -0.02em; }
.contact .intro { margin-top: 16px; color: var(--text-muted); font-size: 16px; }
.mailbox { margin-top: 32px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.mailbox a.addr { font-size: clamp(17px, 1.8vw, 20px); color: var(--text); border-bottom: 1px solid var(--border-strong); padding-bottom: 2px; word-break: break-all; }
.mailbox a.addr:hover { color: var(--accent); border-color: var(--accent); }
.copy { background: var(--surface-raised); border: 0; color: var(--text-muted); font: 13px var(--font); border-radius: 6px; padding: 6px 10px; cursor: pointer; }
.copy:hover { color: var(--text); }
.steps { margin-top: 32px; display: grid; gap: 14px; }
.steps li { display: grid; grid-template-columns: 28px 1fr; gap: 12px; font-size: 14px; color: var(--text-muted); }
.steps li b { color: var(--text); font-weight: 500; display: block; }
.steps .i { font: 500 13px var(--mono); color: var(--accent); padding-top: 1px; }

.form { display: grid; gap: 16px; align-content: start; }
.field { display: grid; gap: 6px; }
.field label, .field legend { font-size: 13px; color: var(--text-muted); padding: 0; }
.field input, .field textarea {
  width: 100%; background: var(--surface-raised); border: 1px solid transparent; color: var(--text);
  border-radius: 8px; padding: 11px 12px; font: 15px var(--font);
}
.field textarea { min-height: 110px; resize: vertical; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--border-strong); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
fieldset.field { border: 0; margin: 0; padding: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.chip span { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 8px; background: var(--surface-raised); color: var(--text-secondary); font-size: 14px; border: 1px solid transparent; }
.chip input:checked + span { background: var(--accent-soft); color: var(--accent); border-color: var(--accent); }
.chip input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.form .hint { font-size: 12px; color: var(--text-muted); }

/* footer */
.site-footer { padding: 48px 0 56px; font-size: 13px; color: var(--text-muted); }
.site-footer .top { display: flex; justify-content: space-between; gap: 32px; flex-wrap: wrap; padding-bottom: 28px; border-bottom: 1px solid var(--border); }
.site-footer .brand-name { font-size: 15px; }
.site-footer nav { display: flex; gap: 20px; flex-wrap: wrap; }
.site-footer nav a { color: var(--text-muted); }
.site-footer nav a:hover { color: var(--text); }
.disclaimer { margin-top: 24px; max-width: 880px; line-height: 1.7; }
.copyright { margin-top: 16px; }

/* ---------- responsive ---------- */
@media (max-width: 1000px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .flow { max-width: 560px; }
  .product { grid-template-columns: 1fr; }
  .principles { grid-template-columns: 1fr 1fr; }
  .principle, .principle:first-child, .principle:last-child { border-radius: 5px; }
  .contact { grid-template-columns: 1fr; }
  .nav { display: none; }
  .menu-btn { display: inline-grid; place-items: center; margin-left: auto; }
  .site-header.open .nav {
    display: flex; flex-direction: column; position: absolute; top: 64px; left: 0; right: 0;
    background: var(--surface); border-bottom: 1px solid var(--border); padding: 8px var(--gutter) 16px;
  }
  .site-header.open .nav a { padding: 12px 0; font-size: 16px; border-bottom: 1px solid var(--border); border-radius: 0; }
}
@media (max-width: 640px) {
  .features { grid-template-columns: 1fr; }
  .principles, .roadmap { grid-template-columns: 1fr; }
  .roadmap .future { border-radius: 5px !important; }
  .future { grid-template-columns: 1fr; padding: 24px; }
  .field-row { grid-template-columns: 1fr; }
  .header-actions .btn { display: none; }
  .flow-step { grid-template-columns: 48px 1fr; }
  .flow-step img { width: 48px; height: 48px; }
  .flow-step .k { display: none; }
  .flow-steps::before { left: 23px; }
  .flow-keel { padding-left: 17px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
