/* ============================================================
   潜海科技 · QianHai Technology — shared styles
   ============================================================ */

:root {
  /* Brand palette */
  --primary:   #3A0CA3;
  --primary-2: #782CBF;
  --mint:      #80ED99;
  --paper:     #F8F9FA;

  /* Derived */
  --ink-0:     #05021a;
  --ink-1:     #0a0524;
  --ink-2:     #14092f;
  --ink-3:     #1b0e3d;
  --paper-2:   #ECEEF2;
  --paper-3:   #DEE2EB;
  --line:      rgba(58, 12, 163, 0.14);
  --line-dark: rgba(255, 255, 255, 0.10);
  --muted:     rgba(20, 9, 47, 0.62);
  --muted-d:   rgba(248, 249, 250, 0.62);

  --ff-cn-sans: 'Noto Sans SC', 'PingFang SC', 'Hiragino Sans GB', sans-serif;
  --ff-cn-serif: 'Noto Serif SC', 'Source Han Serif SC', serif;
  --ff-en: 'Space Grotesk', 'Helvetica Neue', sans-serif;
  --ff-mono: 'JetBrains Mono', ui-monospace, monospace;

  --radius: 14px;
  --radius-lg: 22px;

  --motion-scale: 1; /* tweak: 0 (off) .. 1 (full) .. 1.4 (extra) */
}

/* Tweak: themes */
:root,
[data-theme="light"] {
  --page-bg: var(--paper);
  --page-fg: var(--ink-1);
  --card-bg: #ffffff;
  --card-bd: var(--line);
  --soft:   var(--paper-2);
}
[data-theme="dark"] {
  --page-bg: var(--ink-0);
  --page-fg: var(--paper);
  --card-bg: rgba(255,255,255,0.04);
  --card-bd: rgba(255,255,255,0.08);
  --soft:   var(--ink-2);
}

* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0;
  background: var(--page-bg, var(--ink-0));
  color: var(--page-fg, var(--paper));
  font-family: var(--ff-cn-sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body { overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font: inherit; cursor: pointer; }
::selection { background: var(--mint); color: var(--ink-0); }

.en {
  font-family: var(--ff-en);
  font-feature-settings: "ss01", "ss02";
  letter-spacing: 0.01em;
}
.mono { font-family: var(--ff-mono); letter-spacing: 0; }

/* ---------- Nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 18px 32px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  background: color-mix(in oklab, var(--page-bg) 70%, transparent);
  border-bottom: 1px solid color-mix(in oklab, var(--page-fg) 8%, transparent);
}
.nav-brand {
  display: flex; align-items: center; gap: 12px;
}
.nav-mark {
  width: 38px; height: 38px;
  border-radius: 9px;
  display: grid; place-items: center;
  position: relative;
  overflow: hidden;
  flex: none;
}
.nav-mark img { display: block; }
.nav-brand-text { line-height: 1.1; }
.nav-brand-cn {
  font-family: var(--ff-cn-serif);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0.05em;
}
.nav-brand-en {
  font-family: var(--ff-en);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.62;
  margin-top: 2px;
}
.nav-links {
  display: flex; justify-content: center; gap: 30px;
  font-size: 14px;
}
.nav-link { position: relative; padding: 8px 0; opacity: 0.86; transition: opacity .2s; white-space: nowrap; }
.nav-link:hover { opacity: 1; }
.nav-link .en { display: block; font-size: 9.5px; letter-spacing: 0.16em; text-transform: uppercase; opacity: 0.55; margin-top: 2px; }
.nav-link.active::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: -2px;
  height: 2px; background: var(--mint);
  border-radius: 2px;
}
.nav-actions { display: flex; align-items: center; gap: 10px; }
.btn {
  border: 1px solid transparent;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 13px;
  display: inline-flex; align-items: center; gap: 8px;
  transition: transform .2s, background .2s, color .2s, border-color .2s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
  background: var(--mint);
  color: var(--ink-1);
  border-color: var(--mint);
  font-weight: 600;
}
.btn-primary:hover { background: #6fdc88; }
.btn-ghost {
  background: transparent;
  color: var(--page-fg);
  border-color: color-mix(in oklab, var(--page-fg) 22%, transparent);
}
.btn-ghost:hover { background: color-mix(in oklab, var(--page-fg) 8%, transparent); }
.btn .arrow { transition: transform .2s; }
.btn:hover .arrow { transform: translateX(3px); }

/* ---------- Layout ---------- */
.section {
  position: relative;
  padding: 140px 32px;
}
.section-dark { background: var(--ink-0); color: var(--paper); }
.section-light { background: var(--paper); color: var(--ink-1); }
.section-grad {
  background: radial-gradient(ellipse at top, var(--ink-3) 0%, var(--ink-0) 60%);
  color: var(--paper);
}
.container { max-width: 1320px; margin: 0 auto; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--ff-mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.7;
}
.eyebrow::before {
  content: ""; width: 24px; height: 1px; background: currentColor; opacity: 0.5;
}
.section-title {
  font-family: var(--ff-cn-serif);
  font-weight: 700;
  font-size: clamp(38px, 5vw, 68px);
  line-height: 1.08;
  letter-spacing: 0.01em;
  margin: 18px 0 12px;
}
.section-title .en {
  display: block;
  font-family: var(--ff-en);
  font-weight: 500;
  font-size: 0.42em;
  letter-spacing: 0.04em;
  opacity: 0.55;
  margin-top: 14px;
  text-transform: none;
}
.section-lede {
  font-size: 18px;
  line-height: 1.7;
  max-width: 60ch;
  opacity: 0.82;
}
.section-lede .en {
  display: block;
  font-size: 14px;
  opacity: 0.55;
  margin-top: 8px;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  background: var(--paper);
  color: var(--ink-1);
  display: flex; flex-direction: column;
  padding: 130px 32px 50px;
  gap: 60px;
}
.hero-content {
  position: relative;
  z-index: 3;
  max-width: 1320px;
  margin: 0 auto;
  width: 100%;
  flex: 1;
  display: flex; flex-direction: column; justify-content: center;
  padding: 40px 0 30px;
}
.hero-canvas { position: absolute; inset: 0; z-index: 0; }
.hero-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(58,12,163,0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(58,12,163,0.07) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(ellipse 75% 55% at 50% 50%, black 30%, transparent 80%);
  z-index: 1;
  opacity: 1;
}
.hero-glow {
  position: absolute;
  width: 1100px; height: 1100px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 30% 40%, rgba(120,44,191,0.22) 0%, transparent 55%),
    radial-gradient(circle at 70% 60%, rgba(128,237,153,0.18) 0%, transparent 50%);
  top: -350px; left: 50%; transform: translateX(-50%);
  filter: blur(40px);
  z-index: 1;
  animation: glow-drift calc(18s / var(--motion-scale, 1)) ease-in-out infinite alternate;
}
@keyframes glow-drift {
  to { transform: translate(-55%, 80px) scale(1.05); }
}
.hero-content {
  position: relative;
  z-index: 3;
  max-width: 1320px;
  margin: 0 auto;
  width: 100%;
}
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 8px 14px;
  border: 1px solid rgba(58,12,163,0.18);
  border-radius: 999px;
  background: rgba(58,12,163,0.04);
  font-family: var(--ff-mono);
  font-size: 11.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--primary);
}
.hero-eyebrow .dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--primary);
  box-shadow: 0 0 0 4px rgba(58,12,163,0.18);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  50% { box-shadow: 0 0 0 8px rgba(58,12,163,0); }
}
.hero-title {
  font-family: var(--ff-cn-serif);
  font-weight: 700;
  font-size: clamp(44px, 6.6vw, 96px);
  line-height: 1.02;
  letter-spacing: 0.01em;
  margin: 28px 0 0;
  color: var(--primary);
}
.hero-title .row { display: block; }
.hero-title .accent { color: var(--primary-2); font-style: normal; }
.hero-en {
  font-family: var(--ff-en);
  font-weight: 500;
  font-size: clamp(16px, 1.6vw, 22px);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.68;
  margin-top: 22px;
}
.hero-sub {
  margin-top: 36px;
  max-width: 56ch;
  font-size: 17px;
  line-height: 1.75;
  opacity: 0.78;
}
.hero-sub .en {
  display: block;
  font-size: 14px;
  opacity: 0.6;
  margin-top: 6px;
}
.hero-actions { display: flex; gap: 14px; margin-top: 40px; flex-wrap: wrap; }
.hero-meta {
  position: relative;
  width: 100%; max-width: 1320px;
  margin: 0 auto;
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  z-index: 3;
  padding-top: 32px;
  border-top: 1px solid var(--line);
}
.hero-meta .stat-n {
  font-family: var(--ff-en);
  font-weight: 500;
  font-size: clamp(28px, 3.6vw, 48px);
  letter-spacing: -0.01em;
  display: flex; align-items: baseline; gap: 4px;
}
.hero-meta .stat-n .suf { font-size: 0.5em; opacity: 0.7; }
.hero-meta .stat-l { font-size: 12.5px; opacity: 0.65; margin-top: 4px; }
.hero-meta .stat-l .en { display: block; font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; opacity: 0.7; margin-top: 2px; }

/* Manta — animated abstract figure */
.manta-float {
  position: absolute;
  right: -40px; top: 70px;
  width: 620px; height: 620px;
  z-index: 2;
  pointer-events: none;
  filter: drop-shadow(0 30px 60px rgba(58,12,163,0.22));
  animation: manta-glide calc(24s / var(--motion-scale, 1)) ease-in-out infinite;
}
@keyframes manta-glide {
  0%, 100% { transform: translate(0, 0) rotate(-2deg); }
  50% { transform: translate(-12px, -16px) rotate(2deg); }
}

/* Orbit rings */
.m-ring { transform-origin: 300px 300px; transform-box: fill-box; }
.m-ring-a { animation: m-orbit calc(38s / var(--motion-scale, 1)) linear infinite; }
.m-ring-b { animation: m-orbit calc(54s / var(--motion-scale, 1)) linear infinite reverse; transform: rotate(20deg); }
.m-ring-c { animation: m-orbit calc(72s / var(--motion-scale, 1)) linear infinite; transform: rotate(-15deg); }
@keyframes m-orbit { to { transform: rotate(360deg); } }

.m-glow { animation: m-pulse calc(6s / var(--motion-scale, 1)) ease-in-out infinite; transform-origin: center; transform-box: fill-box; }
@keyframes m-pulse {
  0%, 100% { opacity: 0.85; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.05); }
}

/* Globe — slow rotation feel via meridian spinning */
.globe { transform-origin: 300px 300px; transform-box: fill-box; animation: globe-tilt calc(20s / var(--motion-scale, 1)) ease-in-out infinite; }
@keyframes globe-tilt {
  0%, 100% { transform: rotate(-4deg); }
  50% { transform: rotate(4deg); }
}
.globe-merid { transform-origin: 300px 300px; transform-box: fill-box; animation: globe-spin calc(28s / var(--motion-scale, 1)) linear infinite; }
@keyframes globe-spin { to { transform: rotate(360deg); } }

/* Trade route flow */
.route { stroke-dasharray: 5 8; animation: route-flow calc(4s / var(--motion-scale, 1)) linear infinite; opacity: 0.8; }
.route-2 { animation-duration: calc(5s / var(--motion-scale, 1)); }
.route-3 { animation-duration: calc(6s / var(--motion-scale, 1)); }
.route-4 { animation-duration: calc(4.5s / var(--motion-scale, 1)); }
.route-5 { animation-duration: calc(7s / var(--motion-scale, 1)); opacity: 0.55; }
@keyframes route-flow { to { stroke-dashoffset: -52; } }

/* Hub pulse */
.hub { transform-box: fill-box; }
.hub-ring { animation: hub-pulse calc(2.4s / var(--motion-scale, 1)) ease-out infinite; animation-delay: var(--d, 0s); transform-origin: center; transform-box: fill-box; }
@keyframes hub-pulse {
  0% { transform: scale(1); opacity: 1; }
  100% { transform: scale(4); opacity: 0; }
}

/* Travelling data packets */
.m-bubble { opacity: 0.85; }

/* ---------- Cards / Products ---------- */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin-top: 60px;
}
.card-3d {
  position: relative;
  border-radius: var(--radius-lg);
  background: linear-gradient(160deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02));
  border: 1px solid var(--line-dark);
  padding: 32px;
  transform-style: preserve-3d;
  transition: transform .25s cubic-bezier(.2,.7,.3,1), border-color .25s;
  overflow: hidden;
  min-height: 380px;
  display: flex; flex-direction: column;
}
.section-light .card-3d {
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 1px 0 rgba(58,12,163,0.04);
}
.card-3d:hover { border-color: rgba(128,237,153,0.5); }
.card-3d .inner { transform: translateZ(30px); position: relative; z-index: 2; }
.card-3d::before {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(400px circle at var(--mx, 50%) var(--my, 50%), rgba(128,237,153,0.18), transparent 40%);
  opacity: 0;
  transition: opacity .3s;
  pointer-events: none;
}
.card-3d:hover::before { opacity: 1; }
.card-tag {
  display: inline-flex;
  font-family: var(--ff-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 5px 11px;
  border-radius: 999px;
  background: color-mix(in oklab, var(--mint) 32%, transparent);
  color: #1b6b34;
  border: 1px solid color-mix(in oklab, var(--mint) 70%, transparent);
  font-weight: 600;
}
.section-light .card-tag {
  color: var(--primary);
  background: color-mix(in oklab, var(--primary) 10%, transparent);
  border-color: color-mix(in oklab, var(--primary) 28%, transparent);
}
.card-title {
  font-family: var(--ff-cn-serif);
  font-weight: 700;
  font-size: 28px;
  line-height: 1.2;
  margin: 22px 0 6px;
}
.card-title .en { display: block; font-family: var(--ff-en); font-weight: 500; font-size: 13px; letter-spacing: 0.06em; opacity: 0.55; margin-top: 6px; text-transform: none; }
.card-desc { font-size: 14.5px; line-height: 1.7; opacity: 0.74; margin-bottom: auto; }
.card-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 28px; padding-top: 20px; border-top: 1px solid currentColor; border-color: color-mix(in oklab, currentColor 12%, transparent); }
.card-id { font-family: var(--ff-mono); font-size: 11px; opacity: 0.55; letter-spacing: 0.12em; }
.card-arrow {
  width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid color-mix(in oklab, currentColor 22%, transparent);
  display: grid; place-items: center;
  transition: background .2s, color .2s, transform .2s;
}
.card-3d:hover .card-arrow { background: var(--mint); color: var(--ink-1); border-color: var(--mint); transform: rotate(-45deg); }

/* card visual (svg placeholder area) */
.card-visual {
  position: absolute; right: -30px; top: -30px;
  width: 220px; height: 220px;
  opacity: 0.18;
  pointer-events: none;
}
.card-3d:hover .card-visual { opacity: 0.35; }

/* ---------- Wave / chart placeholders ---------- */
.svg-wave { width: 100%; height: 100%; }

/* ---------- Logo wall ---------- */
.logo-wall {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
.section-dark .logo-wall { border-color: var(--line-dark); }
.logo-wall .cell {
  aspect-ratio: 3 / 2;
  display: grid; place-items: center;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  font-family: var(--ff-en);
  font-weight: 600;
  font-size: 17px;
  letter-spacing: 0.05em;
  opacity: 0.7;
  transition: opacity .2s, background .2s;
  position: relative;
}
.section-dark .logo-wall .cell { border-color: var(--line-dark); }
.logo-wall .cell:hover { opacity: 1; background: color-mix(in oklab, var(--primary) 6%, transparent); }
.logo-wall .cell .cn { font-family: var(--ff-cn-serif); font-size: 19px; font-weight: 700; }
.logo-wall .cell .sub { font-family: var(--ff-mono); font-size: 9px; letter-spacing: 0.16em; text-transform: uppercase; opacity: 0.5; margin-top: 4px; }

/* ---------- Footer ---------- */
.foot {
  background: var(--paper-2);
  color: var(--ink-1);
  padding: 80px 32px 36px;
  border-top: 1px solid var(--line);
}
.foot-grid {
  max-width: 1320px; margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 60px;
}
.foot-brand .nav-brand-cn { font-size: 26px; }
.foot-brand p { opacity: 0.72; font-size: 14px; max-width: 32ch; margin-top: 16px; line-height: 1.7; }
.foot-col h4 {
  font-family: var(--ff-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.62;
  margin: 0 0 18px;
  font-weight: 500;
  color: var(--primary);
}
.foot-col ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.foot-col a { font-size: 14px; opacity: 0.88; transition: opacity .2s, color .2s; }
.foot-col a:hover { color: var(--primary-2); }
.foot-col li .en { display: block; font-size: 10.5px; opacity: 0.55; margin-top: 1px; }
.foot-bottom {
  max-width: 1320px; margin: 64px auto 0;
  border-top: 1px solid var(--line);
  padding-top: 28px;
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--ff-mono);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  opacity: 0.6;
  flex-wrap: wrap; gap: 12px;
}

/* ---------- Scroll cue ---------- */
.scroll-cue {
  position: absolute;
  bottom: 18px; right: 32px;
  font-family: var(--ff-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.55;
  display: flex; align-items: center; gap: 8px;
  z-index: 5;
}
.scroll-cue::after {
  content: ""; width: 1px; height: 36px;
  background: linear-gradient(to bottom, currentColor 50%, transparent 50%);
  background-size: 1px 8px;
  animation: scrollcue 2s linear infinite;
}
@keyframes scrollcue {
  from { background-position: 0 -16px; }
  to { background-position: 0 24px; }
}

/* ---------- Tilt-on-mouse (JS sets --rx, --ry) ---------- */
.tilt {
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform .15s ease-out;
}

/* ---------- Data viz ---------- */
.viz-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 40px;
  align-items: stretch;
  margin-top: 60px;
}
.viz-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--line-dark);
  border-radius: var(--radius-lg);
  padding: 30px;
  position: relative;
  overflow: hidden;
}
.section-light .viz-card { background: #fff; border-color: var(--line); }
.viz-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 24px; }
.viz-head h4 { font-family: var(--ff-cn-serif); font-weight: 700; font-size: 20px; margin: 0; }
.viz-head h4 .en { display: block; font-family: var(--ff-en); font-weight: 500; font-size: 12px; opacity: 0.55; margin-top: 4px; text-transform: none; letter-spacing: 0.04em; }
.viz-pill {
  font-family: var(--ff-mono); font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase;
  padding: 4px 10px; border-radius: 999px;
  background: color-mix(in oklab, var(--mint) 18%, transparent);
  color: var(--mint);
}

/* ---------- Page header ---------- */
.page-header {
  padding: 180px 32px 100px;
  background: var(--paper);
  color: var(--ink-1);
  position: relative;
  overflow: hidden;
}
.page-header::after {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(58,12,163,0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(58,12,163,0.06) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, black 20%, transparent 80%);
  pointer-events: none;
}
.page-header .container { position: relative; z-index: 2; }
.page-h1 {
  font-family: var(--ff-cn-serif);
  font-weight: 700;
  font-size: clamp(56px, 8vw, 112px);
  line-height: 1;
  margin: 24px 0 0;
  color: var(--primary);
}
.page-h1 .en { display: block; font-family: var(--ff-en); font-weight: 500; font-size: 0.28em; letter-spacing: 0.06em; opacity: 0.55; margin-top: 18px; color: var(--ink-1); }
.page-lede { font-size: 18px; max-width: 60ch; opacity: 0.78; margin-top: 30px; line-height: 1.75; }
.page-lede .en { display: block; font-size: 14px; opacity: 0.55; margin-top: 6px; }

/* ---------- Tweaks panel ---------- */
.tweaks {
  position: fixed; right: 24px; bottom: 24px;
  z-index: 200;
  width: 280px;
  background: rgba(10,5,36,0.92);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius-lg);
  padding: 18px;
  color: var(--paper);
  font-size: 13px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
  transform: translateY(calc(100% + 30px));
  transition: transform .35s cubic-bezier(.2,.7,.3,1);
}
.tweaks.open { transform: translateY(0); }
.tweaks-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.tweaks-head h5 { margin: 0; font-family: var(--ff-mono); font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; opacity: 0.7; font-weight: 500; }
.tweaks-close { background: transparent; border: 0; color: inherit; opacity: 0.6; }
.tweak-row { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-top: 1px solid rgba(255,255,255,0.08); }
.tweak-row:first-of-type { border-top: 0; }
.tweak-row label { font-size: 12.5px; opacity: 0.85; }
.tweak-seg { display: inline-flex; background: rgba(255,255,255,0.08); border-radius: 999px; padding: 3px; gap: 2px; }
.tweak-seg button {
  background: transparent; border: 0; color: inherit;
  padding: 4px 10px; border-radius: 999px;
  font-size: 11.5px; opacity: 0.65;
  transition: background .2s, opacity .2s, color .2s;
}
.tweak-seg button.on { background: var(--mint); color: var(--ink-1); opacity: 1; font-weight: 600; }
.tweaks-toggle {
  position: fixed; right: 24px; bottom: 24px; z-index: 199;
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--mint); border: 0; color: var(--ink-1);
  display: grid; place-items: center;
  box-shadow: 0 14px 40px rgba(128,237,153,0.4);
  transition: transform .2s;
}
.tweaks-toggle:hover { transform: scale(1.05); }
.tweaks.open ~ .tweaks-toggle { display: none; }

/* ---------- Reveal on scroll ---------- */
/* Content is visible by default. JS may add .reveal-prep to opt into a fade-in. */
.reveal { transition: opacity .8s cubic-bezier(.2,.7,.3,1), transform .8s cubic-bezier(.2,.7,.3,1); }
.reveal-prep { opacity: 0; transform: translateY(24px); }
.reveal-prep.in { opacity: 1; transform: none; }

/* ---------- Credentials grid (shared) ---------- */
.cred-list-grid {
  display: grid !important;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
@media (max-width: 700px) { .cred-list-grid { grid-template-columns: 1fr; } }

/* ---------- Tables (use-case rows etc) ---------- */
.row-list { border-top: 1px solid var(--line); }
.section-dark .row-list, .page-header + * .row-list { border-color: var(--line-dark); }
.row-item {
  display: grid;
  grid-template-columns: 80px 1fr 2fr 1fr 40px;
  align-items: center;
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
  gap: 24px;
  transition: padding .25s;
  cursor: pointer;
}
.section-dark .row-item { border-color: var(--line-dark); }
.row-item:hover { padding-left: 12px; padding-right: 12px; background: color-mix(in oklab, var(--primary) 4%, transparent); }
.section-dark .row-item:hover { background: rgba(255,255,255,0.03); }
.row-num { font-family: var(--ff-mono); font-size: 12px; opacity: 0.5; letter-spacing: 0.12em; }
.row-tag { font-family: var(--ff-mono); font-size: 11px; padding: 4px 10px; border-radius: 999px; border: 1px solid currentColor; opacity: 0.7; justify-self: start; letter-spacing: 0.12em; text-transform: uppercase; }
.row-title { font-family: var(--ff-cn-serif); font-weight: 700; font-size: 22px; line-height: 1.3; }
.row-title .en { display: block; font-family: var(--ff-en); font-weight: 400; font-size: 12px; opacity: 0.55; margin-top: 4px; text-transform: none; letter-spacing: 0.02em; }
.row-meta { font-family: var(--ff-mono); font-size: 12px; opacity: 0.6; }

/* ---------- Marquee strip ---------- */
.marquee {
  display: flex; gap: 60px; align-items: center;
  font-family: var(--ff-cn-serif);
  font-size: 22px;
  padding: 22px 0;
  border-top: 1px solid var(--line-dark);
  border-bottom: 1px solid var(--line-dark);
  white-space: nowrap; overflow: hidden;
}
.marquee-track { display: flex; gap: 60px; animation: marquee calc(30s / var(--motion-scale, 1)) linear infinite; padding-right: 60px; }
.marquee-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--mint); flex: none; }
@keyframes marquee { to { transform: translateX(-100%); } }

/* ---------- Big CTA section ---------- */
.cta-band {
  padding: 140px 32px;
  background:
    radial-gradient(ellipse at 30% 50%, rgba(120,44,191,0.6) 0%, transparent 55%),
    radial-gradient(ellipse at 80% 20%, rgba(128,237,153,0.18) 0%, transparent 50%),
    var(--ink-0);
  color: var(--paper);
  position: relative;
  overflow: hidden;
}
.cta-inner { max-width: 1320px; margin: 0 auto; }
.cta-band h2 { font-family: var(--ff-cn-serif); font-weight: 700; font-size: clamp(48px, 7vw, 96px); line-height: 1.04; margin: 0; max-width: 18ch; }
.cta-band h2 .en { display: block; font-family: var(--ff-en); font-weight: 500; font-size: 0.28em; opacity: 0.6; margin-top: 16px; letter-spacing: 0.06em; }
.cta-band .btn { margin-top: 40px; padding: 18px 28px; font-size: 15px; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .cards-grid { grid-template-columns: repeat(2, 1fr); }
  .logo-wall { grid-template-columns: repeat(4, 1fr); }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .viz-grid { grid-template-columns: 1fr; }
  .manta-float { width: 460px; height: 460px; right: -60px; opacity: 0.85; }
  .hero-meta { grid-template-columns: repeat(2, 1fr); gap: 24px; }
}
@media (max-width: 720px) {
  .nav { padding: 14px 18px; grid-template-columns: auto auto; }
  .nav-links { display: none; }
  .section { padding: 90px 18px; }
  .page-header { padding: 140px 18px 70px; }
  .cards-grid { grid-template-columns: 1fr; gap: 16px; }
  .logo-wall { grid-template-columns: repeat(2, 1fr); }
  .foot-grid { grid-template-columns: 1fr; gap: 36px; }
  .hero { padding: 110px 18px 50px; gap: 30px; }
  .hero-content { padding: 20px 0; }
  .scroll-cue { display: none; }
  .row-item { grid-template-columns: 40px 1fr 40px; }
  .row-item .row-tag, .row-item .row-meta { display: none; }
}
