/* ============================================================
   JIHU — design system
   Look: technical instrument / spec-sheet. Graphite ground,
   restrained cold-cyan signal, monospaced utility type.
   Neutral by construction — no nationally-coded colors.
   ============================================================ */

:root {
  /* palette — from the ArcFox logo: white ground, navy ink, orange signal */
  --ink:        #fcfbfa;   /* page ground */
  --ink-2:      #f5f4f2;   /* raised panel */
  --ink-3:      #edecea;   /* hover card */
  --line:       #e6e4e0;   /* hairline rule */
  --line-2:     #d6d3cd;
  --fog:        #5d6673;   /* muted text */
  --fog-2:      #8b939e;   /* faint / captions */
  --paper:      #222d3a;   /* primary text — logo navy */
  --paper-dim:  #45505e;
  --signal:     #c95f15;   /* text-safe orange */
  --signal-bright: #ee8338; /* logo orange — buttons, graphics */
  --signal-dim: #e2a878;   /* orange borders, dashes */
  --signal-ink: #1d2734;   /* text on orange */

  /* type */
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --mono: "JetBrains Mono", "SF Mono", ui-monospace, "Cascadia Code", Menlo, monospace;
  --brand-cn: "PingFang SC", "Noto Sans CJK SC", "Source Han Sans SC", "HarmonyOS Sans SC", system-ui, sans-serif;

  /* scale */
  --maxw: 1180px;
  --gut: clamp(20px, 5vw, 64px);
  --r: 3px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  background: var(--ink);
  color: var(--paper);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* subtle measurement grid in the background */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  opacity: 0.28;
  pointer-events: none;
  z-index: 0;
  mask-image: radial-gradient(ellipse 100% 60% at 50% 0%, #000 30%, transparent 80%);
}

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gut); position: relative; z-index: 1; }

a { color: inherit; text-decoration: none; }
.disabled-link,
a[data-disabled-href] { pointer-events: none; cursor: not-allowed; opacity: 0.48; }


/* ---------- type roles ---------- */
.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--signal);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: var(--signal-dim);
}
html[lang="zh-CN"] .eyebrow {
  font-family: var(--brand-cn);
  font-weight: 500;
  letter-spacing: 0.08em;
}
html[lang="zh-CN"] .hero .btn,
html[lang="zh-CN"] .hero-meta .k,
html[lang="zh-CN"] .dim .go {
  font-family: var(--brand-cn);
  font-weight: 500;
  letter-spacing: 0.02em;
}

h1, h2, h3 { font-weight: 600; letter-spacing: -0.025em; line-height: 1.08; }
h1 { font-size: clamp(2.4rem, 5.5vw, 4.4rem); }
h2 { font-size: clamp(1.7rem, 3.5vw, 2.7rem); }
h3 { font-size: 1.18rem; letter-spacing: -0.015em; }

.lead { font-size: clamp(1.05rem, 1.6vw, 1.3rem); color: var(--paper-dim); line-height: 1.55; font-weight: 400; }
.muted { color: var(--fog); }
.mono { font-family: var(--mono); }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(252,251,250,0.82);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav-in {
  max-width: var(--maxw); margin: 0 auto; padding: 14px var(--gut);
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.brand { display: flex; align-items: center; gap: 11px; font-weight: 600; letter-spacing: -0.02em; }
.brand .mark { width: 28px; height: 25px; flex: none; object-fit: contain; }
.brand .cn { font-family: var(--brand-cn); font-size: 13px; font-weight: 500; color: var(--fog); letter-spacing: 0.01em; }
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a {
  font-size: 13.5px; color: var(--paper-dim); padding: 8px 13px; border-radius: var(--r);
  transition: color .15s, background .15s;
}
.nav-links a:hover { color: var(--paper); background: var(--ink-3); }
.nav-links a.active { color: var(--signal); }
.lang {
  font-family: var(--mono); font-size: 12px; color: var(--fog);
  border: 1px solid var(--line-2); border-radius: var(--r);
  padding: 6px 10px; cursor: pointer; background: transparent;
  transition: border-color .15s, color .15s;
}
.lang:hover { color: var(--paper); border-color: var(--signal-dim); }
.nav-toggle { display: none; background: none; border: 1px solid var(--line-2); border-radius: var(--r); color: var(--paper); padding: 7px 10px; cursor: pointer; font-family: var(--mono); font-size: 12px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--mono); font-size: 13px; letter-spacing: 0.02em;
  padding: 12px 20px; border-radius: var(--r); cursor: pointer;
  transition: transform .12s, background .15s, border-color .15s, color .15s;
  border: 1px solid transparent;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--signal-bright); color: var(--signal-ink); font-weight: 600; }
.btn-primary:hover { background: #f5944d; }
.btn-ghost { border-color: var(--line-2); color: var(--paper-dim); }
.btn-ghost:hover { border-color: var(--signal-dim); color: var(--paper); }
.btn .arr { transition: transform .15s; }
.btn:hover .arr { transform: translateX(3px); }

/* ---------- sections ---------- */
section { position: relative; z-index: 1; }
.sec { padding: clamp(64px, 9vw, 120px) 0; }
.sec-head { max-width: 720px; margin-bottom: clamp(40px, 5vw, 64px); }
.sec-head h2 { margin: 16px 0 18px; }

/* ---------- hero ---------- */
.hero { padding: clamp(70px, 11vw, 150px) 0 clamp(50px, 7vw, 90px); }
.hero h1 { margin: 22px 0 26px; max-width: 16ch; }
.hero .lead { max-width: 56ch; }
.hero-cta { display: flex; gap: 14px; margin-top: 38px; flex-wrap: wrap; }
.hero-meta {
  margin-top: 56px; padding-top: 28px; border-top: 1px solid var(--line);
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px;
}
.hero-meta .k { font-family: var(--mono); font-size: 12px; color: var(--fog-2); letter-spacing: 0.06em; text-transform: uppercase; }
.hero-meta .v { font-size: 15px; color: var(--paper-dim); margin-top: 8px; line-height: 1.45; }

/* ---------- the three dimensions (home) ---------- */
.dims { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.dim {
  background: var(--ink-2); padding: 32px 28px 30px; display: flex; flex-direction: column;
  min-height: 340px; transition: background .2s;
}
.dim:hover { background: var(--ink-3); }
.dim .idx { font-family: var(--mono); font-size: 12px; color: var(--signal); letter-spacing: 0.1em; }
.dim .axis { font-family: var(--mono); font-size: 11px; color: var(--fog-2); letter-spacing: 0.14em; text-transform: uppercase; margin-top: 4px; }
.dim h3 { margin: 22px 0 12px; }
.dim p { font-size: 14.5px; color: var(--fog); line-height: 1.6; flex: 1; }
.dim .go { font-family: var(--mono); font-size: 13px; color: var(--paper-dim); margin-top: 22px; display: inline-flex; align-items: center; gap: 8px; transition: color .15s, gap .15s; }
.dim:hover .go { color: var(--signal); gap: 12px; }

/* ---------- thesis / principle band ---------- */
.thesis { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--ink-2); }
.thesis .wrap { padding-top: clamp(56px, 7vw, 96px); padding-bottom: clamp(56px, 7vw, 96px); }
.thesis-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 6vw, 90px); align-items: start; }
.thesis blockquote { font-size: clamp(1.4rem, 2.6vw, 2.1rem); line-height: 1.28; letter-spacing: -0.02em; font-weight: 500; }
.thesis blockquote .hl { color: var(--signal); }
.thesis .note { font-size: 15px; color: var(--fog); line-height: 1.65; }
.thesis .note p + p { margin-top: 16px; }

/* ---------- generic feature rows ---------- */
.rows { display: flex; flex-direction: column; }
.row {
  display: grid; grid-template-columns: 80px 1fr 1.3fr; gap: clamp(20px, 4vw, 56px);
  padding: 34px 0; border-top: 1px solid var(--line); align-items: start;
}
.row:last-child { border-bottom: 1px solid var(--line); }
.row .num { font-family: var(--mono); font-size: 13px; color: var(--signal); padding-top: 4px; }
.row h3 { margin-bottom: 0; }
.row .desc { color: var(--fog); font-size: 15px; line-height: 1.62; }

/* ---------- spec list (for sub pages) ---------- */
.specs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.spec { background: var(--ink-2); padding: 26px 26px; }
.spec .label { font-family: var(--mono); font-size: 11px; color: var(--fog-2); letter-spacing: 0.12em; text-transform: uppercase; }
.spec h3 { font-size: 1.02rem; margin: 14px 0 9px; }
.spec p { font-size: 14px; color: var(--fog); line-height: 1.6; }

/* ---------- method / framework table ---------- */
.frame { border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.frame-row { display: grid; grid-template-columns: 200px 1fr; border-top: 1px solid var(--line); }
.frame-row:first-child { border-top: none; }
.frame-row .h { background: var(--ink-2); padding: 22px 24px; font-family: var(--mono); font-size: 13px; color: var(--signal); letter-spacing: 0.04em; }
.frame-row .b { padding: 22px 24px; color: var(--paper-dim); font-size: 15px; line-height: 1.6; }
.frame-row .b .sub { color: var(--fog); font-size: 13.5px; margin-top: 6px; }

/* ---------- sub-page hero ---------- */
.phero { padding: clamp(56px, 8vw, 104px) 0 clamp(30px, 4vw, 54px); border-bottom: 1px solid var(--line); }
.phero .axis-tag { font-family: var(--mono); font-size: 12px; color: var(--fog); letter-spacing: 0.1em; }
.phero h1 { font-size: clamp(2rem, 4.4vw, 3.4rem); margin: 18px 0 22px; max-width: 18ch; }
.phero .lead { max-width: 60ch; }

/* ---------- callout ---------- */
.callout { border: 1px solid var(--signal-dim); border-radius: var(--r); background: linear-gradient(180deg, rgba(238,131,56,0.07), transparent); padding: 28px 30px; }
.callout .eyebrow { margin-bottom: 12px; }
.callout p { color: var(--paper-dim); font-size: 15.5px; line-height: 1.6; }

/* ---------- CTA band ---------- */
.cta-band { border-top: 1px solid var(--line); }
.cta-band .wrap { padding: clamp(56px, 8vw, 100px) var(--gut); text-align: center; }
.cta-band h2 { max-width: 18ch; margin: 0 auto 18px; }
.cta-band .lead { max-width: 50ch; margin: 0 auto 32px; }
.cta-band .hero-cta { justify-content: center; }

/* ---------- footer ---------- */
.foot { border-top: 1px solid var(--line); background: var(--ink-2); padding: 56px 0 40px; }
.foot-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 32px; }
.foot h4 { font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--fog-2); margin-bottom: 16px; }
.foot a, .foot p { display: block; font-size: 14px; color: var(--fog); margin-bottom: 10px; transition: color .15s; }
.foot a:hover { color: var(--signal); }
.foot .brand { margin-bottom: 16px; }
.foot .entity { font-size: 13px; color: var(--fog-2); line-height: 1.6; }
.foot-bot { margin-top: 44px; padding-top: 24px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-family: var(--mono); font-size: 12px; color: var(--fog-2); }
.foot-bot .copyright,
.foot-bot .icp { color: inherit; font-family: var(--brand-cn); letter-spacing: 0.02em; }
.foot-bot .icp:hover { color: var(--signal); }

/* ---------- reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s cubic-bezier(.2,.6,.2,1), transform .6s cubic-bezier(.2,.6,.2,1); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .nav-links { display: none; }
  .nav-toggle { display: inline-block; }
  .nav.open .nav-links {
    display: flex; flex-direction: column; align-items: stretch;
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--ink-2); border-bottom: 1px solid var(--line); padding: 12px var(--gut) 18px; gap: 2px;
  }
  .dims { grid-template-columns: 1fr; }
  .thesis-grid { grid-template-columns: 1fr; gap: 32px; }
  .specs { grid-template-columns: 1fr; }
  .row { grid-template-columns: 1fr; gap: 12px; }
  .row .num { padding-top: 0; }
  .frame-row { grid-template-columns: 1fr; }
  .frame-row .h { border-bottom: 1px solid var(--line); }
  .hero-meta { grid-template-columns: 1fr; gap: 20px; }
  .foot-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
}
@media (max-width: 520px) {
  .foot-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn .arr, .dim .go { transition: none; }
}

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