/* ============================================================
   码廊 CODELANE — 极简开发者工具风
   直角 · 低饱和商务蓝 · 明暗双主题 · 克制微交互
   ============================================================ */

/* ---------- Design tokens ---------- */
:root {
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
    "Liberation Mono", "Courier New", monospace;

  --bg: #ffffff;
  --bg-alt: #f7f8fa;
  --surface: #ffffff;
  --surface-2: #fbfcfd;
  --border: #e6e8ec;
  --border-2: #d7dae0;
  --text: #0d1015;
  --text-2: #5a616e;
  --text-3: #8a919e;
  --brand: #0052d9;
  --brand-ink: #0040ad;
  --brand-soft: #eef3ff;
  --ok: #0f9d58;

  --term-bg: #0d1015;
  --term-border: #23262f;
  --term-text: #ccd3e0;

  --wrap: 1140px;
  --pad: 24px;
  --radius: 0px;
  --shadow-sm: 0 1px 2px rgba(13, 16, 21, .04);
  --shadow-md: 0 8px 24px -12px rgba(13, 16, 21, .18);
  --header-h: 64px;
  --ease: cubic-bezier(.2, .7, .3, 1);
}

[data-theme="dark"] {
  --bg: #0f1116;
  --bg-alt: #12141a;
  --surface: #14161d;
  --surface-2: #171a22;
  --border: #23262f;
  --border-2: #2f333f;
  --text: #eceef3;
  --text-2: #a2a9b8;
  --text-3: #737a8a;
  --brand: #4d8dff;
  --brand-ink: #7aa9ff;
  --brand-soft: rgba(77, 141, 255, .10);
  --ok: #3ecf8e;

  --term-bg: #0a0c10;
  --term-border: #23262f;
  --term-text: #ccd3e0;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow-md: 0 12px 32px -18px rgba(0, 0, 0, .8);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
}
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.75;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background-color .25s var(--ease), color .25s var(--ease);
}
h1, h2, h3, h4, p, dl, dd, figure { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
strong, b { font-weight: 600; color: var(--text); }
::selection { background: var(--brand); color: #fff; }

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 10px 16px;
  background: var(--brand);
  color: #fff;
}
.skip-link:focus { left: 8px; top: 8px; }

/* ---------- Layout ---------- */
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--pad);
}

/* ---------- Buttons ---------- */
.btn {
  --h: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: var(--h);
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .01em;
  white-space: nowrap;
  transition: background-color .15s var(--ease), border-color .15s var(--ease),
    color .15s var(--ease), transform .15s var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}
.btn-primary:hover { background: var(--brand-ink); border-color: var(--brand-ink); }
[data-theme="dark"] .btn-primary:hover { background: #6b9dff; border-color: #6b9dff; color: #0b0d12; }
.btn-ghost {
  background: transparent;
  border-color: var(--border-2);
  color: var(--text);
}
.btn-ghost:hover { border-color: var(--brand); color: var(--brand); }
.btn-sm { --h: 36px; padding: 0 14px; font-size: 13px; }
.btn-block { width: 100%; }

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  height: var(--header-h);
  border-bottom: 1px solid transparent;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
  transition: border-color .2s var(--ease), background-color .25s var(--ease);
}
.site-header.is-scrolled {
  border-bottom-color: var(--border);
  box-shadow: var(--shadow-sm);
}
.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 28px;
}

.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand-mark { color: var(--brand); display: block; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: .06em;
}
.brand-text em {
  font-family: var(--font-mono);
  font-style: normal;
  font-size: 10px;
  letter-spacing: .18em;
  color: var(--text-3);
}

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: 8px;
}
.nav a {
  padding: 7px 12px;
  font-size: 14px;
  color: var(--text-2);
  border: 1px solid transparent;
  transition: color .15s var(--ease), border-color .15s var(--ease), background-color .15s var(--ease);
}
.nav a:hover { color: var(--text); background: var(--bg-alt); }
.nav a.is-active { color: var(--brand); border-color: var(--border); background: var(--brand-soft); }

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-2);
  transition: color .15s var(--ease), border-color .15s var(--ease);
}
.icon-btn:hover { color: var(--brand); border-color: var(--brand); }
.menu-btn { display: none; }

/* theme icon swap */
[data-theme="light"] .i-moon,
[data-theme="dark"] .i-sun { display: none; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: calc(var(--header-h) + 72px) 0 84px;
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, var(--border) 1px, transparent 1px),
    linear-gradient(to bottom, var(--border) 1px, transparent 1px);
  background-size: 64px 64px;
  opacity: .35;
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 0%, transparent 72%);
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 0%, transparent 72%);
  pointer-events: none;
}
.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 56px;
  align-items: center;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  border: 1px solid var(--border-2);
  background: var(--surface);
  font-size: 12.5px;
  letter-spacing: .02em;
  color: var(--text-2);
  margin-bottom: 22px;
}
.status-badge .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 18%, transparent);
  animation: pulse 2.4s var(--ease) infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .35; }
}

.hero h1 {
  font-size: clamp(2.3rem, 5.6vw, 3.9rem);
  line-height: 1.08;
  letter-spacing: -.035em;
  font-weight: 800;
}
.hero h1 .hl {
  color: var(--brand);
  border-bottom: 3px solid var(--brand);
  padding-bottom: .04em;
}
.hero-sub {
  margin-top: 22px;
  max-width: 34em;
  font-size: 16px;
  color: var(--text-2);
  line-height: 1.85;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin-top: 42px;
  border-top: 1px solid var(--border);
}
.metrics > div {
  padding: 16px 0 0;
  border-left: 1px solid var(--border);
  padding-left: 16px;
}
.metrics > div:first-child { border-left: 0; padding-left: 0; }
.metrics dt {
  font-size: 11px;
  letter-spacing: .14em;
  color: var(--text-3);
  text-transform: uppercase;
}
.metrics dd {
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -.02em;
  line-height: 1.4;
}
.metrics dd span {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-3);
  margin-left: 2px;
}

/* ---------- Terminal window ---------- */
.hero-term {
  border: 1px solid var(--term-border);
  background: var(--term-bg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}
.term-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  height: 38px;
  border-bottom: 1px solid var(--term-border);
  background: #12141a;
}
.term-dots { display: inline-flex; gap: 6px; }
.term-dots i {
  width: 9px;
  height: 9px;
  border: 1px solid #3a3f4d;
  border-radius: 50%;
  background: #22262f;
}
.term-title {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: #7c8494;
  letter-spacing: .02em;
}
.term-badge {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 1px 6px;
  border: 1px solid #2f3440;
  color: #7c8494;
}
.term-body {
  margin: 0;
  padding: 18px 20px 22px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.85;
  color: var(--term-text);
  tab-size: 2;
}
.term-body code { font-family: inherit; }
.c-prompt { color: #4d8dff; }
.c-cmd { color: #eceef3; font-weight: 600; }
.c-flag { color: #8a90a0; }
.c-ok { color: #3ecf8e; }
.c-key { color: #a9b6d0; }
.c-str { color: #d8c98a; }
.c-dim { color: #59606f; }
.c-cursor {
  color: #3ecf8e;
  animation: blink 1.1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* ---------- Sections ---------- */
.section {
  padding: 88px 0;
  border-bottom: 1px solid var(--border);
}
.section-alt { background: var(--bg-alt); }
.section-contact { background: var(--bg-alt); }

.section-head { max-width: 720px; margin-bottom: 44px; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .2em;
  color: var(--text-3);
  margin-bottom: 14px;
}
.eyebrow .idx {
  color: var(--brand);
  border: 1px solid var(--border-2);
  padding: 1px 6px;
  letter-spacing: .08em;
}
.section h2 {
  font-size: clamp(1.55rem, 3.1vw, 2.3rem);
  line-height: 1.22;
  letter-spacing: -.025em;
  font-weight: 700;
}
.section-desc {
  margin-top: 14px;
  font-size: 15.5px;
  color: var(--text-2);
  line-height: 1.85;
}
.section-note {
  margin-top: 32px;
  padding-left: 14px;
  border-left: 2px solid var(--border-2);
  font-size: 14px;
  color: var(--text-2);
}

/* ---------- Stack grid ---------- */
.stack-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}
.stack-card {
  background: var(--surface);
  padding: 22px 22px 24px;
}
.stack-card h3 {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 14px;
  padding-left: 10px;
  border-left: 2px solid var(--brand);
  line-height: 1.6;
}
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips li {
  padding: 3px 9px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text-2);
  border: 1px solid var(--border);
  background: var(--surface-2);
  transition: color .15s var(--ease), border-color .15s var(--ease);
}
.chips li:hover { color: var(--brand); border-color: var(--brand); }

/* ---------- Service cards ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(258px, 1fr));
  gap: 16px;
}
.service-card {
  display: flex;
  flex-direction: column;
  padding: 24px 22px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  transition: border-color .18s var(--ease), box-shadow .18s var(--ease), transform .18s var(--ease);
}
.service-card:hover {
  border-color: var(--brand);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.service-top {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 10px;
}
.service-top .num {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--brand);
  letter-spacing: .06em;
}
.service-card h3 {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -.01em;
  line-height: 1.4;
}
.service-card p {
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.8;
  flex: 1;
}
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
.tags li {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .04em;
  color: var(--text-3);
  padding: 2px 7px;
  border: 1px solid var(--border);
}

/* ---------- Steps ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  border-top: 1px solid var(--border);
}
.step {
  padding: 26px 24px 0 0;
  border-left: 1px solid var(--border);
  padding-left: 24px;
}
.step:first-child { border-left: 0; padding-left: 0; }
.step-num {
  display: block;
  font-family: var(--font-mono);
  font-size: 26px;
  font-weight: 600;
  color: var(--brand);
  letter-spacing: -.02em;
  line-height: 1;
  margin-bottom: 16px;
}
.step h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 8px;
}
.step p {
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.8;
}
.step-meta {
  margin-top: 12px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-3);
  letter-spacing: .04em;
}

/* ---------- Quote ---------- */
.quote-grid {
  display: grid;
  grid-template-columns: 1.25fr .85fr;
  gap: 28px;
  align-items: start;
}
.quote-flow { border: 1px solid var(--border); background: var(--surface); }
.qf-item {
  display: flex;
  gap: 18px;
  padding: 22px 22px;
  border-bottom: 1px solid var(--border);
}
.qf-item:last-child { border-bottom: 0; }
.qf-item > span {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--brand);
  padding-top: 3px;
  min-width: 22px;
}
.qf-item h3 {
  font-size: 15.5px;
  font-weight: 700;
  margin-bottom: 4px;
}
.qf-item p {
  font-size: 13.5px;
  color: var(--text-2);
  line-height: 1.75;
}

.quote-card {
  border: 1px solid var(--border-2);
  background: var(--surface);
  padding: 26px 24px;
  box-shadow: var(--shadow-sm);
}
.qc-label {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .16em;
  color: var(--text-3);
  text-transform: uppercase;
}
.qc-qq {
  font-family: var(--font-mono);
  font-size: clamp(1.9rem, 4vw, 2.5rem);
  font-weight: 600;
  letter-spacing: -.01em;
  line-height: 1.2;
  margin: 8px 0 10px;
  color: var(--text);
  user-select: all;
}
.qc-desc {
  font-size: 13.5px;
  color: var(--text-2);
  line-height: 1.75;
  margin-bottom: 18px;
}
.quote-card .btn + .btn { margin-top: 8px; }
.qc-points {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  display: grid;
  gap: 8px;
}
.qc-points li {
  position: relative;
  padding-left: 18px;
  font-size: 13px;
  color: var(--text-2);
}
.qc-points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .62em;
  width: 7px;
  height: 7px;
  border-left: 1.5px solid var(--brand);
  border-bottom: 1.5px solid var(--brand);
  transform: rotate(-45deg);
}

/* ---------- FAQ ---------- */
.faq-list {
  border: 1px solid var(--border);
  background: var(--surface);
}
.faq-item { border-bottom: 1px solid var(--border); }
.faq-item:last-child { border-bottom: 0; }
.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 22px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  transition: color .15s var(--ease), background-color .15s var(--ease);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:hover { color: var(--brand); background: var(--surface-2); }
.faq-item summary i {
  position: relative;
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  border: 1px solid var(--border-2);
}
.faq-item summary i::before,
.faq-item summary i::after {
  content: "";
  position: absolute;
  background: var(--text-2);
  transition: transform .2s var(--ease), background-color .15s var(--ease);
}
.faq-item summary i::before { left: 4px; right: 4px; top: 7px; height: 1px; }
.faq-item summary i::after { top: 4px; bottom: 4px; left: 7px; width: 1px; }
.faq-item[open] summary i::after { transform: scaleY(0); }
.faq-item[open] summary { color: var(--brand); }
.faq-item[open] summary i { border-color: var(--brand); }
.faq-item[open] summary i::before { background: var(--brand); }
.faq-body {
  padding: 0 22px 22px;
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.85;
  max-width: 76ch;
}
.faq-body strong { color: var(--text); font-family: var(--font-mono); }

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1.4fr .8fr;
  gap: 20px;
  align-items: stretch;
}
.contact-card {
  border: 1px solid var(--border-2);
  background: var(--surface);
  padding: 32px;
}
.cc-label {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .2em;
  color: var(--text-3);
}
.cc-number {
  font-family: var(--font-mono);
  font-size: clamp(2.6rem, 7vw, 4.4rem);
  font-weight: 600;
  letter-spacing: -.03em;
  line-height: 1.1;
  margin: 6px 0 22px;
  user-select: all;
}
.cc-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.cc-list {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  display: grid;
  gap: 0;
}
.cc-list li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--border);
  font-size: 13.5px;
}
.cc-list li:last-child { border-bottom: 0; }
.cc-list span { color: var(--text-3); }
.cc-list b { font-weight: 600; }

.qr-card {
  border: 1px solid var(--border);
  background: var(--surface);
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.qr-box {
  padding: 10px;
  background: #fff;
  border: 1px solid var(--border);
}
.qr-box img { width: 208px; height: 208px; }
.qr-title {
  margin-top: 16px;
  font-size: 14px;
  font-weight: 600;
}
.qr-desc {
  margin-top: 4px;
  font-size: 12.5px;
  color: var(--text-3);
  line-height: 1.7;
}

/* ---------- Footer ---------- */
.site-footer {
  padding: 26px 0;
  background: var(--bg);
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-3);
  letter-spacing: .02em;
}

/* ---------- Float CTA ---------- */
.float-cta {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 40;
  display: flex;
  align-items: stretch;
  border: 1px solid var(--border-2);
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-md);
  transform: translateY(0);
  transition: opacity .25s var(--ease), transform .25s var(--ease);
}
.float-cta.is-hidden { opacity: 0; transform: translateY(12px); pointer-events: none; }
.fc-main {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  height: 40px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  transition: color .15s var(--ease), background-color .15s var(--ease);
}
.fc-main svg { color: var(--brand); }
.fc-main:hover { color: var(--brand); background: var(--brand-soft); }
.fc-copy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  border-left: 1px solid var(--border);
  color: var(--text-2);
  transition: color .15s var(--ease), background-color .15s var(--ease);
}
.fc-copy:hover { color: var(--brand); background: var(--brand-soft); }

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  right: 20px;
  bottom: 72px;
  z-index: 60;
  padding: 9px 14px;
  font-size: 13px;
  font-family: var(--font-mono);
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border-2);
  box-shadow: var(--shadow-md);
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity .2s var(--ease), transform .2s var(--ease);
}
.toast.is-on { opacity: 1; transform: translateY(0); }

/* ---------- Reveal on scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .55s var(--ease), transform .55s var(--ease);
}
.reveal.is-in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-term { order: 2; }
  .quote-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 32px; }
  .step:nth-child(3) { border-left: 0; padding-left: 0; }
  .stack-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 820px) {
  :root { --pad: 18px; --header-h: 58px; }
  .hero { padding: calc(var(--header-h) + 48px) 0 60px; }
  .section { padding: 64px 0; }
  .section-head { margin-bottom: 32px; }

  .menu-btn { display: inline-flex; }
  .header-cta { display: none; }
  .nav {
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin: 0;
    padding: 6px;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-md);
  }
  .nav.is-open { display: flex; }
  .nav a { padding: 12px 14px; font-size: 15px; }

  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 18px; }
  .metrics > div:nth-child(3) { border-left: 0; padding-left: 0; }
  .metrics > div:nth-child(-n+2) { padding-top: 16px; }

  .stack-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .step { border-left: 0; padding-left: 0; padding-right: 0; padding-top: 20px; }
  .step + .step { border-top: 1px solid var(--border); }
  .contact-card { padding: 22px; }
  .qr-box img { width: 180px; height: 180px; }
  .footer-inner { justify-content: flex-start; }
}

@media (max-width: 520px) {
  .hero h1 { font-size: clamp(1.95rem, 8.4vw, 2.5rem); }
  .hero-actions .btn { width: 100%; }
  .cc-actions .btn { width: 100%; }
  .term-body { font-size: 11.5px; padding: 14px; }
  .float-cta { right: 12px; bottom: 12px; }
  .fc-main span { display: none; }
  .fc-main { padding: 0 12px; }
  .toast { right: 12px; bottom: 64px; }
}

/* ---------- Motion preference ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- Print ---------- */
@media print {
  .site-header, .float-cta, .toast, .hero-term { display: none; }
  body { background: #fff; color: #000; }
  .section { padding: 24px 0; break-inside: avoid; }
}
