/* =====================================================================
   VOLARY brand site - shared design system
   Aesthetic: dark-tech engineering. Single accent = azure (蔚蓝).
   Type: Bricolage Grotesque (display) / Inter (body) / JetBrains Mono (labels)
   One theme (dark, locked). One radius system. Vanilla CSS + tokens.
   ===================================================================== */

:root {
  /* Surfaces (off-black navy, never pure #000) */
  --ink:        #06090F;
  --ink-2:      #0A0F1B;
  --ink-3:      #0E1524;
  --ink-4:      #121C30;

  /* Lines / borders */
  --line:        rgba(150, 178, 222, 0.12);
  --line-strong: rgba(150, 178, 222, 0.22);

  /* Text */
  --text:    #E9EEF7;
  --muted:   #97A6BE;
  --muted-2: #808FA8;

  /* Accent - azure, the only accent on the page */
  --azure:        #4C93F7;
  --azure-bright: #6FA8FF;
  --azure-soft:   rgba(76, 147, 247, 0.14);
  --azure-line:   rgba(76, 147, 247, 0.35);

  /* On-accent text (dark for AA contrast against azure fill) */
  --on-azure: #05101F;

  /* Radius system: interactive = pill, surfaces = 14px, chips = 8px */
  --r:      14px;
  --r-lg:   20px;
  --r-xs:   8px;
  --r-btn:  999px;

  /* Shadow tinted to the navy background, not pure black */
  --shadow:    0 22px 60px rgba(3, 7, 18, 0.55);
  --shadow-sm: 0 8px 24px rgba(3, 7, 18, 0.45);

  /* Type */
  --f-display: "Bricolage Grotesque", "Inter", system-ui, sans-serif;
  --f-sans:    "Inter", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --f-mono:    "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  /* Layout */
  --maxw: 1180px;
  --gutter: clamp(20px, 5vw, 56px);

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ------------------------------ reset ------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  font-family: var(--f-sans);
  background: var(--ink);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
::selection { background: var(--azure); color: var(--on-azure); }

/* Ambient background wash: subtle azure glow at top, locked to theme */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(60% 45% at 78% -8%, rgba(76, 147, 247, 0.16), transparent 60%),
    radial-gradient(50% 40% at 8% 0%, rgba(76, 147, 247, 0.08), transparent 55%);
  pointer-events: none;
}

/* Fine grain to kill banding, fixed + non-interactive per perf guardrails */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 60;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ------------------------------ layout ------------------------------ */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
section { padding-block: clamp(72px, 11vw, 132px); }
.section-tight { padding-block: clamp(48px, 7vw, 80px); }

.eyebrow {
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--azure);
  font-weight: 500;
}

h1, h2, h3, h4 { font-family: var(--f-display); font-weight: 600; line-height: 1.04; letter-spacing: -0.02em; }
h1 { font-size: clamp(2.5rem, 6.2vw, 4.6rem); }
h2 { font-size: clamp(1.9rem, 4vw, 3rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.6rem); letter-spacing: -0.01em; }
p  { color: var(--muted); }
.lead { font-size: clamp(1.05rem, 1.5vw, 1.28rem); color: var(--text); opacity: 0.86; max-width: 60ch; line-height: 1.55; }
.measure { max-width: 62ch; }
.dim { color: var(--muted); }

/* ------------------------------ nav ------------------------------ */
.nav {
  position: sticky; top: 0; z-index: 50;
  height: 68px;
  display: flex; align-items: center;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: rgba(6, 9, 15, 0.72);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
}
.nav.scrolled { border-bottom-color: var(--line); background: rgba(6, 9, 15, 0.9); }
.nav .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; }

.brand { display: flex; align-items: center; gap: 11px; font-family: var(--f-display); font-weight: 600; letter-spacing: 0.02em; font-size: 1.14rem; }
.brand .mark { width: 30px; height: 30px; flex: none; }
.brand b { font-weight: 600; }

.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-links a { font-size: 0.94rem; color: var(--muted); transition: color 0.2s var(--ease); position: relative; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--text); }
.nav-links a[aria-current="page"]::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -22px; height: 2px;
  background: var(--azure); border-radius: 2px;
}
.nav-right { display: flex; align-items: center; gap: 18px; }

.nav-toggle { display: none; width: 42px; height: 42px; border: 1px solid var(--line-strong); border-radius: var(--r-xs); background: transparent; align-items: center; justify-content: center; }
.nav-toggle span { display: block; width: 18px; height: 2px; background: var(--text); position: relative; }
.nav-toggle span::before, .nav-toggle span::after { content: ""; position: absolute; left: 0; width: 18px; height: 2px; background: var(--text); }
.nav-toggle span::before { top: -6px; } .nav-toggle span::after { top: 6px; }

/* ------------------------------ buttons ------------------------------ */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 12px 22px; border-radius: var(--r-btn);
  font-size: 0.95rem; font-weight: 500; white-space: nowrap;
  border: 1px solid transparent; transition: transform 0.15s var(--ease), background 0.2s var(--ease), border-color 0.2s var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--azure); color: var(--on-azure); font-weight: 600; }
.btn-primary:hover { background: var(--azure-bright); }
.btn-ghost { border-color: var(--line-strong); color: var(--text); background: rgba(255,255,255,0.02); }
.btn-ghost:hover { border-color: var(--azure-line); background: var(--azure-soft); }
.btn .arw { transition: transform 0.2s var(--ease); }
.btn:hover .arw { transform: translateX(3px); }
.btn-sm { padding: 9px 16px; font-size: 0.88rem; }

.textlink { color: var(--azure); font-weight: 500; display: inline-flex; align-items: center; gap: 6px; }
.textlink .arw { transition: transform 0.2s var(--ease); }
.textlink:hover .arw { transform: translateX(3px); }

/* ------------------------------ chips ------------------------------ */
.chip {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 13px; border-radius: var(--r-btn);
  border: 1px solid var(--line-strong); background: rgba(255,255,255,0.02);
  font-family: var(--f-mono); font-size: 12px; letter-spacing: 0.03em; color: var(--muted);
}
.chip.accent { border-color: var(--azure-line); color: var(--azure); background: var(--azure-soft); }

/* ------------------------------ hero ------------------------------ */
.hero { position: relative; min-height: 100dvh; display: flex; align-items: center; padding-top: 68px; overflow: hidden; }
.hero-canvas { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; }
.hero-fade { position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(180deg, rgba(6,9,15,0.2) 0%, rgba(6,9,15,0.55) 62%, var(--ink) 100%); }
.hero-inner { max-width: 46rem; }
.hero h1 { margin-top: 18px; }
.hero .lead { margin-top: 22px; }
.hero-cta { margin-top: 34px; display: flex; flex-wrap: wrap; gap: 14px; }

/* page hero (inner pages, shorter) */
.phero { position: relative; padding-top: clamp(96px, 14vh, 150px); padding-bottom: clamp(40px, 6vw, 72px); overflow: hidden; }
.phero .wrap { position: relative; z-index: 1; }
.phero h1 { margin-top: 16px; max-width: 18ch; }
.phero .lead { margin-top: 20px; }
.phero-glow { position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: radial-gradient(46% 60% at 88% 0%, rgba(76,147,247,0.16), transparent 62%); }
.phero-canvas { position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; pointer-events: none; }

/* incubated strip */
.strip { border-block: 1px solid var(--line); }
.strip .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 26px; padding-block: 22px; }
.strip .label { font-family: var(--f-mono); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted-2); }
.strip .orgs { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 22px; }
.org { display: inline-flex; align-items: center; gap: 9px; color: var(--muted); font-weight: 500; font-size: 0.95rem; }
.org .dot { width: 22px; height: 22px; border-radius: 6px; border: 1px solid var(--line-strong); display: grid; place-items: center; font-family: var(--f-mono); font-size: 11px; color: var(--azure); background: var(--azure-soft); }

/* ------------------------------ section heading ------------------------------ */
.shead { max-width: 58ch; margin-bottom: clamp(34px, 5vw, 56px); }
.shead h2 { margin-top: 14px; }
.shead p { margin-top: 16px; }

/* ------------------------------ grids / bento ------------------------------ */
.grid { display: grid; gap: 18px; }
.bento { display: grid; grid-template-columns: repeat(6, 1fr); gap: 18px; }
.bento .cell { grid-column: span 3; }
.bento .cell.wide { grid-column: span 6; }
.bento .cell.half { grid-column: span 3; }
.bento .cell.third { grid-column: span 2; }

.card {
  position: relative; border: 1px solid var(--line); border-radius: var(--r);
  background: linear-gradient(180deg, var(--ink-3), var(--ink-2));
  padding: clamp(22px, 2.4vw, 32px);
  transition: border-color 0.3s var(--ease), transform 0.3s var(--ease);
  overflow: hidden;
}
.card:hover { border-color: var(--line-strong); }
.card .kicker { font-family: var(--f-mono); font-size: 12px; letter-spacing: 0.06em; color: var(--azure); text-transform: uppercase; }
.card h3 { margin-top: 12px; }
.card p { margin-top: 10px; font-size: 0.98rem; }
.card .index { font-family: var(--f-mono); font-size: 12px; color: var(--muted-2); }

/* feature card variants with visual variation (bento background diversity) */
.card.glow { background: linear-gradient(155deg, rgba(76,147,247,0.16), var(--ink-3) 46%); border-color: var(--azure-line); }
.card.tint { background: linear-gradient(180deg, var(--ink-4), var(--ink-2)); }

/* ------------------------------ split ------------------------------ */
.split { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(28px, 5vw, 68px); align-items: center; }
.split.reverse > :first-child { order: 2; }
.media {
  position: relative; border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--line);
  background: var(--ink-2); aspect-ratio: 4 / 3; min-height: 260px;
}
.media img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(0.35) contrast(1.02) brightness(0.82); }
.media .tone { position: absolute; inset: 0; background: linear-gradient(155deg, rgba(76,147,247,0.28), transparent 55%), linear-gradient(0deg, rgba(6,9,15,0.6), transparent 60%); mix-blend-mode: normal; }
.media .cap { position: absolute; left: 14px; bottom: 12px; font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.05em; color: var(--text); opacity: 0.82; }

/* ------------------------------ stack ladder (L0-L8 / L0-L4) ------------------------------ */
.ladder { display: flex; flex-direction: column; gap: 2px; border-radius: var(--r); overflow: hidden; border: 1px solid var(--line); }
.rung { display: grid; grid-template-columns: 78px 1fr; gap: 16px; align-items: center; padding: 16px 20px; background: var(--ink-2); transition: background 0.25s var(--ease); }
.rung:hover { background: var(--ink-3); }
.rung .lv { font-family: var(--f-mono); font-size: 0.9rem; color: var(--azure); font-weight: 500; }
.rung .rb h4 { font-family: var(--f-display); font-size: 1.05rem; font-weight: 600; letter-spacing: -0.01em; }
.rung .rb p { margin-top: 3px; font-size: 0.9rem; }
.rung.accent { background: linear-gradient(90deg, var(--azure-soft), var(--ink-2)); }

/* vertical layered model */
.layers { display: grid; gap: 14px; }
.layer { display: grid; grid-template-columns: 60px 1fr; gap: 20px; align-items: start; padding: 20px 22px; border: 1px solid var(--line); border-radius: var(--r); background: linear-gradient(180deg, var(--ink-3), var(--ink-2)); position: relative; }
.layer .lnum { font-family: var(--f-mono); font-weight: 600; color: var(--azure); font-size: 1.05rem; }
.layer h3 { font-size: 1.15rem; }
.layer p { margin-top: 6px; font-size: 0.96rem; }

/* ------------------------------ list rows (grouped, sparse dividers) ------------------------------ */
.rows { border-top: 1px solid var(--line); }
.row { display: grid; grid-template-columns: 0.4fr 1.6fr; gap: 24px; padding: 22px 4px; border-bottom: 1px solid var(--line); align-items: start; }
.row .rk { font-family: var(--f-mono); font-size: 0.86rem; color: var(--azure); letter-spacing: 0.02em; }
.row h3 { font-size: 1.16rem; }
.row p { margin-top: 8px; font-size: 0.97rem; }

/* ------------------------------ steps (funnel) ------------------------------ */
.flow { display: grid; gap: 16px; grid-template-columns: repeat(4, 1fr); }
.stepc { border: 1px solid var(--line); border-radius: var(--r); padding: 22px; background: var(--ink-2); position: relative; }
.stepc .num { font-family: var(--f-mono); color: var(--azure); font-size: 0.85rem; }
.stepc h3 { font-size: 1.06rem; margin-top: 10px; }
.stepc p { margin-top: 8px; font-size: 0.92rem; }

/* ------------------------------ callout / cta band ------------------------------ */
.band { position: relative; border: 1px solid var(--azure-line); border-radius: var(--r-lg); overflow: hidden;
  background: linear-gradient(150deg, rgba(76,147,247,0.16), var(--ink-3) 55%); padding: clamp(34px, 5vw, 60px); }
.band h2 { max-width: 20ch; }
.band p { margin-top: 16px; max-width: 52ch; }
.band .hero-cta { margin-top: 30px; }

/* ------------------------------ define / meta list ------------------------------ */
.deflist { display: grid; gap: 0; }
.defrow { display: grid; grid-template-columns: 220px 1fr; gap: 28px; padding: 20px 0; border-top: 1px solid var(--line); }
.defrow dt { font-family: var(--f-display); font-weight: 600; font-size: 1.02rem; }
.defrow dd { color: var(--muted); font-size: 0.98rem; }

/* ------------------------------ footer ------------------------------ */
.footer { border-top: 1px solid var(--line); background: var(--ink-2); padding-block: clamp(48px, 7vw, 76px); }
.footer .cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; }
.footer .brand { margin-bottom: 16px; }
.footer p { font-size: 0.95rem; max-width: 40ch; }
.footer .ftitle { font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted-2); margin-bottom: 16px; }
.footer .flinks { display: grid; gap: 11px; }
.footer .flinks a { color: var(--muted); font-size: 0.95rem; transition: color 0.2s var(--ease); width: fit-content; }
.footer .flinks a:hover { color: var(--text); }
.footer .base { margin-top: clamp(36px, 5vw, 56px); padding-top: 24px; border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; justify-content: space-between; }
.footer .base small { color: var(--muted-2); font-size: 0.85rem; }

/* ------------------------------ reveal motion ------------------------------ */
[data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
[data-reveal].in { opacity: 1; transform: none; }
[data-reveal][data-delay="1"] { transition-delay: 0.06s; }
[data-reveal][data-delay="2"] { transition-delay: 0.12s; }
[data-reveal][data-delay="3"] { transition-delay: 0.18s; }
[data-reveal][data-delay="4"] { transition-delay: 0.24s; }

@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1; transform: none; transition: none; }
  .btn:active { transform: none; }
}

/* ------------------------------ responsive ------------------------------ */
@media (max-width: 900px) {
  .split { grid-template-columns: 1fr; }
  .split.reverse > :first-child { order: 0; }
  .footer .cols { grid-template-columns: 1fr 1fr; }
  .flow { grid-template-columns: repeat(2, 1fr); }
  .bento .cell, .bento .cell.wide, .bento .cell.half, .bento .cell.third { grid-column: span 6; }
}

@media (max-width: 720px) {
  .nav-links, .nav-right .btn { display: none; }
  .nav-toggle { display: inline-flex; }
  .nav.open + .mobile-menu { display: block; }
  .row { grid-template-columns: 1fr; gap: 8px; }
  .layer { grid-template-columns: 40px 1fr; gap: 14px; padding: 18px; }
  .defrow { grid-template-columns: 1fr; gap: 6px; }
  .footer .cols { grid-template-columns: 1fr; gap: 30px; }
  .flow { grid-template-columns: 1fr; }
  .rung { grid-template-columns: 60px 1fr; padding: 14px 16px; }
}

/* mobile menu (revealed by JS) */
.mobile-menu { display: none; position: sticky; top: 68px; z-index: 49; background: var(--ink-2); border-bottom: 1px solid var(--line); }
.mobile-menu .wrap { display: grid; gap: 4px; padding-block: 16px; }
.mobile-menu a { padding: 12px 6px; color: var(--muted); border-radius: var(--r-xs); font-size: 1.02rem; }
.mobile-menu a:hover { color: var(--text); background: rgba(255,255,255,0.03); }
.mobile-menu .btn { margin-top: 8px; justify-content: center; }
.mobile-menu.show { display: block; }

/* ===================== solutions / capabilities components ===================== */

/* honest positioning strip (no fabricated metrics) */
.statband { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: var(--ink-2); }
.statband .st { padding: 22px 24px; border-right: 1px solid var(--line); }
.statband .st:last-child { border-right: none; }
.statband .st .k { font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--azure); }
.statband .st .v { margin-top: 9px; font-family: var(--f-display); font-weight: 600; font-size: 1.04rem; letter-spacing: -0.01em; line-height: 1.25; }

/* icon chip */
.ic { width: 46px; height: 46px; border-radius: 12px; border: 1px solid var(--azure-line); background: var(--azure-soft); color: var(--azure); display: grid; place-items: center; flex: none; }
.ic svg { width: 24px; height: 24px; }
.card .ic { margin-bottom: 18px; }

/* application domains */
.domains { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.domain { border: 1px solid var(--line); border-radius: var(--r); background: var(--ink-2); padding: 24px; transition: border-color 0.3s var(--ease); }
.domain:hover { border-color: var(--azure-line); }
.domain .ic { width: 40px; height: 40px; margin-bottom: 16px; }
.domain .ic svg { width: 21px; height: 21px; }
.domain h3 { font-size: 1.08rem; }
.domain p { margin-top: 8px; font-size: 0.92rem; }

/* stage tag + mini list inside cards */
.taglabel { display: inline-flex; align-items: center; gap: 8px; font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted-2); }
.taglabel.now { color: var(--azure); }
.taglabel::before { content: ""; width: 18px; height: 1px; background: currentColor; display: inline-block; }
.minilist { margin-top: 20px; border-top: 1px solid var(--line); }
.minilist div { padding: 13px 0; border-bottom: 1px solid var(--line); font-size: 0.96rem; color: var(--text); display: flex; align-items: center; gap: 11px; }
.minilist div:last-child { border-bottom: none; }
.minilist div span { font-family: var(--f-mono); color: var(--azure); font-size: 0.85rem; }

/* engagement models (reuse flow) + product-style card */
.offer { border: 1px solid var(--line); border-radius: var(--r); background: linear-gradient(180deg, var(--ink-3), var(--ink-2)); padding: clamp(22px,2.4vw,30px); }
.offer .ic { margin-bottom: 16px; }
.offer h3 { font-size: 1.12rem; }
.offer p { margin-top: 9px; font-size: 0.94rem; }

@media (max-width: 900px) {
  .statband { grid-template-columns: repeat(2, 1fr); }
  .statband .st:nth-child(2) { border-right: none; }
  .domains { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .statband { grid-template-columns: 1fr; }
  .statband .st { border-right: none; border-bottom: 1px solid var(--line); }
  .statband .st:last-child { border-bottom: none; }
  .domains { grid-template-columns: 1fr; }
}
