/* ==========================================================================
   Mayon — site.css
   Dark-first, light-capable. Tokens on :root, light overrides under
   [data-theme="light"]. Logical properties throughout so the same sheet
   serves LTR (en) and RTL (ar).
   ========================================================================== */

/* ---------- Tokens ------------------------------------------------------ */
:root {
  /* MayonFlow brand ramp — the animated background reads these (partials/lines-field).
     Identical in both themes; the animation picks a different step per theme. */
  --brand-900: #0a3a3a;
  --brand-800: #0d4f4f;
  --brand-700: #116161;
  --brand-600: #147878;
  --brand-500: #168f7d;
  --brand-400: #1faa8c;
  --brand-300: #2ec4a6;
  --brand-200: #5fd6bb;
  --brand-100: #a8ead8;

  --primary: #006D5B;
  --primary-light: #00997F;
  --primary-dark: #004D40;
  --accent: #2ec4a6;            /* text-level highlight; darkened in light mode */
  --on-primary: #FFFFFF;

  --bg: #0A0A0A;
  --bg-2: #101211;
  --glass: rgba(255, 255, 255, 0.035);
  --glass-2: rgba(255, 255, 255, 0.06);
  --glass-strong: rgba(14, 16, 15, 0.66);
  --border: rgba(255, 255, 255, 0.08);
  --border-2: rgba(255, 255, 255, 0.16);
  --text: #EDEDED;
  --text-2: #A3A8A6;
  --text-3: #6E7472;
  --nav-bg: rgba(10, 10, 10, 0.62);
  --shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.7);
  --shadow-sm: 0 10px 30px -18px rgba(0, 0, 0, 0.6);
  --ring: rgba(46, 196, 166, 0.45);
  --tint: rgba(0, 109, 91, 0.12);
  --tint-2: rgba(46, 196, 166, 0.10);
  --dot: rgba(255, 255, 255, 0.03);
  --console-bg: rgba(8, 10, 9, 0.78);

  --font: 'Cairo', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  --r-sm: 10px;
  --r: 16px;
  --r-lg: 24px;
  --r-xl: 32px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-io: cubic-bezier(0.65, 0, 0.35, 1);
  --dur: 0.32s;

  --nav-h: 76px;
  --container: 1200px;
  --gutter: clamp(20px, 4vw, 40px);
  --section: clamp(96px, 11vw, 160px);

  color-scheme: dark;
}

[data-theme="light"] {
  --primary-light: #00806A;
  --accent: #00806A;
  --bg: #FFFFFF;
  --bg-2: #F4F7F6;
  --glass: rgba(255, 255, 255, 0.55);
  --glass-2: rgba(255, 255, 255, 0.75);
  --glass-strong: rgba(255, 255, 255, 0.78);
  --border: rgba(16, 21, 19, 0.10);
  --border-2: rgba(16, 21, 19, 0.20);
  --text: #101513;
  --text-2: #56625E;
  --text-3: #7A8582;
  --nav-bg: rgba(255, 255, 255, 0.72);
  --shadow: 0 30px 80px -40px rgba(16, 21, 19, 0.25);
  --shadow-sm: 0 10px 30px -20px rgba(16, 21, 19, 0.25);
  --ring: rgba(0, 109, 91, 0.35);
  --tint: rgba(0, 109, 91, 0.08);
  --tint-2: rgba(0, 109, 91, 0.06);
  --dot: rgba(0, 0, 0, 0.05);
  --console-bg: rgba(16, 21, 19, 0.92);

  color-scheme: light;
}

/* ---------- Base -------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
  min-height: 100vh;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: radial-gradient(var(--dot) 1px, transparent 1px);
  background-size: 24px 24px;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ul, ol { list-style: none; }

h1, h2, h3, h4 {
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.08;
  text-wrap: balance;
}
p { text-wrap: pretty; }

::selection { background: var(--brand-400); color: #041a15; }

:focus-visible {
  outline: 2px solid var(--brand-300);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip-link {
  position: fixed;
  inset-inline-start: 16px;
  top: -60px;
  z-index: 1000;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--primary);
  color: var(--on-primary);
  font-weight: 700;
  transition: top 0.2s;
}
.skip-link:focus { top: 16px; }

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
  position: relative;
  z-index: 1;
}

main { position: relative; z-index: 1; }

/* ---------- Type utilities --------------------------------------------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}
.eyebrow::before {
  content: '';
  width: 22px; height: 1px;
  background: currentColor;
  opacity: 0.7;
}
.eyebrow .num { color: var(--text-3); }

.h-display {
  font-size: clamp(2.75rem, 7.2vw, 6.25rem);
  line-height: 0.98;
  letter-spacing: -0.035em;
}
.h-section {
  font-size: clamp(2rem, 4.2vw, 3.4rem);
  margin-top: 18px;
}
.lede {
  color: var(--text-2);
  font-size: clamp(1.05rem, 1.35vw, 1.2rem);
  line-height: 1.7;
  max-width: 62ch;
}
.section-head { max-width: 760px; margin-bottom: clamp(44px, 6vw, 72px); }
.section-head .lede { margin-top: 18px; }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head.center .eyebrow { justify-content: center; }
.section-head.center .lede { margin-inline: auto; }

.accent-text {
  background: linear-gradient(120deg, var(--brand-300), var(--brand-500) 60%, var(--brand-300));
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shine 8s linear infinite;
}
[data-theme="light"] .accent-text {
  background-image: linear-gradient(120deg, var(--primary), var(--brand-500) 60%, var(--primary));
}
@keyframes shine { to { background-position: 200% 0; } }

/* ---------- Buttons ----------------------------------------------------- */
.btn {
  --_bg: var(--glass-2);
  --_fg: var(--text);
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 50px;
  padding: 0 24px;
  border-radius: 14px;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--_fg);
  background: var(--_bg);
  border: 1px solid var(--border);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease),
              background var(--dur) var(--ease), border-color var(--dur) var(--ease);
  will-change: transform;
  white-space: nowrap;
}
.btn svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.btn .arrow { transition: transform var(--dur) var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }
html[dir="rtl"] .btn .arrow { transform: scaleX(-1); }
html[dir="rtl"] .btn:hover .arrow { transform: scaleX(-1) translateX(4px); }

.btn-primary {
  --_bg: linear-gradient(135deg, var(--brand-400), var(--primary));
  --_fg: #FFFFFF;
  border-color: transparent;
  box-shadow: 0 14px 34px -14px rgba(0, 109, 91, 0.75);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 44px -16px rgba(46, 196, 166, 0.55);
}
.btn-primary:active { transform: translateY(0); }

.btn-ghost:hover {
  transform: translateY(-2px);
  border-color: var(--border-2);
  background: var(--glass-2);
}
[data-theme="light"] .btn-ghost { background: rgba(255, 255, 255, 0.6); }

.btn-lg { min-height: 56px; padding: 0 30px; font-size: 1.02rem; border-radius: 16px; }

/* ---------- Glass surfaces --------------------------------------------- */
.glass {
  background: var(--glass);
  border: 1px solid var(--border);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  box-shadow: var(--shadow-sm);
}

/* ---------- Nav --------------------------------------------------------- */
.nav {
  position: fixed;
  inset-inline: 0;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  transition: height var(--dur) var(--ease), background var(--dur) var(--ease),
              border-color var(--dur) var(--ease), backdrop-filter var(--dur);
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled {
  --nav-h: 64px;
  background: var(--nav-bg);
  border-bottom-color: var(--border);
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
}
.nav-inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
  width: 100%;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}
.brand .mark { width: 38px; height: 38px; color: var(--text); }
.brand .mark .mark-track { opacity: 0.16; }
/* Node rings are invisible until the scroll-pause ripple animates them. */
.mark-node { opacity: 0; transform-box: fill-box; transform-origin: center; }
.mark-piece { transform-box: fill-box; transform-origin: center; }

.nav-links {
  display: flex;
  justify-content: center;
  gap: 4px;
}
.nav-links a {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 10px;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-2);
  transition: color var(--dur), background var(--dur);
}
.nav-links a:hover, .nav-links a.is-active { color: var(--text); background: var(--glass-2); }

.nav-actions { display: flex; align-items: center; gap: 8px; }

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--glass);
  color: var(--text-2);
  transition: color var(--dur), border-color var(--dur), background var(--dur), transform var(--dur) var(--ease);
}
.icon-btn:hover { color: var(--text); border-color: var(--border-2); transform: translateY(-1px); }
.icon-btn svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.icon-btn.lang { width: auto; padding: 0 14px; font-family: var(--mono); font-size: 0.78rem; font-weight: 600; letter-spacing: 0.06em; }

.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: block; }
[data-theme="light"] .theme-toggle .icon-sun { display: block; }
[data-theme="light"] .theme-toggle .icon-moon { display: none; }

.nav-cta { min-height: 44px; padding: 0 20px; border-radius: 12px; font-size: 0.9rem; }

.nav-burger { display: none; position: relative; }
.nav-burger span {
  position: absolute; inset-inline: 13px;
  height: 2px; border-radius: 2px;
  background: currentColor;
  transition: transform var(--dur) var(--ease), opacity var(--dur), top var(--dur) var(--ease);
}
.nav-burger span:nth-child(1) { top: 16px; }
.nav-burger span:nth-child(2) { top: 21px; }
.nav-burger span:nth-child(3) { top: 26px; }
.nav-burger[aria-expanded="true"] span:nth-child(1) { top: 21px; transform: rotate(45deg); }
.nav-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-burger[aria-expanded="true"] span:nth-child(3) { top: 21px; transform: rotate(-45deg); }

/* ---------- Hero -------------------------------------------------------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding-top: calc(var(--nav-h) + 40px);
  padding-bottom: 80px;
  overflow: clip;
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px 8px 10px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-2);
  background: var(--glass);
  border: 1px solid var(--border);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
html[dir="rtl"] .chip { padding: 8px 10px 8px 14px; }
.chip .pulse {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--brand-300);
  box-shadow: 0 0 0 0 var(--ring);
  animation: pulse 2.2s ease-out infinite;
}
@keyframes pulse { 0% { box-shadow: 0 0 0 0 var(--ring); } 70% { box-shadow: 0 0 0 9px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }

.hero h1 { margin-top: 26px; }
.hero h1 .line { display: block; }
.hero .lede { margin-top: 26px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }

.hero-proof {
  display: flex; flex-wrap: wrap; gap: 8px 28px;
  margin-top: 44px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
}
.hero-proof div { display: flex; align-items: baseline; gap: 8px; }
.hero-proof b { font-family: var(--mono); font-size: 1.15rem; font-weight: 600; color: var(--text); letter-spacing: -0.02em; }
.hero-proof span { font-size: 0.85rem; color: var(--text-2); }

/* Right column: floating mark + console */
.hero-visual { position: relative; min-height: 420px; }
/* The mark sits above the console; the card only kisses its bottom edge so the
   whole "M" stays readable instead of being cut in half. */
.hero-mark {
  position: absolute;
  inset-inline-end: 0;
  top: -4%;
  width: min(420px, 80%);
  aspect-ratio: 1;
  color: var(--text);
  pointer-events: none;
}
.hero-mark .mark-track { opacity: 0.08; }
.hero-mark .mark-ink { filter: drop-shadow(0 0 22px rgba(46, 196, 166, 0.35)); }
[data-theme="light"] .hero-mark .mark-ink { filter: drop-shadow(0 0 18px rgba(0, 109, 91, 0.18)); }

.console {
  position: relative;
  z-index: 1;
  margin-top: clamp(280px, 27vw, 330px);
  margin-inline-start: 0;
  width: min(440px, 100%);
  border-radius: var(--r-lg);
  background: var(--console-bg);
  border: 1px solid var(--border-2);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  color: #DDE5E2;
  direction: ltr;
  text-align: left;
  overflow: hidden;
}
.console::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(46, 196, 166, 0.10), transparent 45%);
  pointer-events: none;
}
.console-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.console-bar i { width: 10px; height: 10px; border-radius: 50%; background: rgba(255, 255, 255, 0.14); }
.console-bar i:nth-child(1) { background: #ff5f57; } .console-bar i:nth-child(2) { background: #febc2e; } .console-bar i:nth-child(3) { background: #28c840; }
.console-bar span { margin-inline-start: auto; font-family: var(--mono); font-size: 0.7rem; color: rgba(255, 255, 255, 0.4); letter-spacing: 0.06em; }
.console-body {
  padding: 18px 20px 20px;
  font-family: var(--mono);
  font-size: 0.82rem;
  line-height: 1.85;
  min-height: 214px;
}
.console-body .ln { display: flex; gap: 12px; opacity: 0; transform: translateY(4px); }
.console-body .ln.show { opacity: 1; transform: none; transition: opacity 0.35s var(--ease), transform 0.35s var(--ease); }
.console-body .ok { color: var(--brand-300); }
.console-body .dim { color: rgba(255, 255, 255, 0.42); }
.console-body .cmd { color: #fff; }
.console-body .cmd::before { content: '$ '; color: var(--brand-300); }
.console-body .val { margin-inline-start: auto; color: rgba(255, 255, 255, 0.6); }
.console-body .cursor { display: inline-block; width: 8px; height: 1.05em; vertical-align: -0.2em; background: var(--brand-300); animation: blink 1s steps(2, start) infinite; }
@keyframes blink { to { visibility: hidden; } }

.scroll-cue {
  position: absolute;
  inset-inline-start: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  color: var(--text-3);
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
html[dir="rtl"] .scroll-cue { transform: translateX(50%); }
.scroll-cue i { width: 1px; height: 46px; background: linear-gradient(var(--brand-300), transparent); animation: cue 2s var(--ease-io) infinite; transform-origin: top; }
@keyframes cue { 0% { transform: scaleY(0); opacity: 0; } 30% { opacity: 1; } 100% { transform: scaleY(1); opacity: 0; } }

/* ---------- Marquee ----------------------------------------------------- */
.marquee {
  position: relative;
  z-index: 1;
  padding: 26px 0;
  border-block: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg) 40%, transparent);
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.marquee-track {
  display: flex;
  width: max-content;
  gap: 56px;
  padding-inline-end: 56px;
  animation: marquee 44s linear infinite;
}
html[dir="rtl"] .marquee-track { animation-direction: reverse; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-item {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--mono);
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-2);
  white-space: nowrap;
}
.marquee-item svg { width: 22px; height: 22px; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Sections ---------------------------------------------------- */
.section { position: relative; padding-block: var(--section); }

/* ---------- Bento services --------------------------------------------- */
.bento {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.card {
  position: relative;
  display: flex; flex-direction: column;
  padding: clamp(24px, 3vw, 34px);
  border-radius: var(--r-lg);
  background: var(--glass);
  border: 1px solid var(--border);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform var(--dur) var(--ease), border-color var(--dur), box-shadow var(--dur) var(--ease);
  isolation: isolate;
}
.card::before {
  /* pointer spotlight */
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), var(--tint-2), transparent 55%);
  opacity: 0;
  transition: opacity 0.4s var(--ease);
  pointer-events: none;
  z-index: -1;
}
.card:hover { transform: translateY(-4px); border-color: var(--border-2); box-shadow: var(--shadow); }
.card:hover::before { opacity: 1; }
.card.span-2 { grid-column: span 2; }

.card-icon {
  width: 52px; height: 52px;
  display: grid; place-items: center;
  border-radius: 16px;
  background: var(--tint);
  border: 1px solid var(--border);
  color: var(--accent);
  margin-bottom: 22px;
}
.card-icon svg { width: 24px; height: 24px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.card h3 { font-size: 1.28rem; letter-spacing: -0.015em; }
.card p { margin-top: 10px; color: var(--text-2); line-height: 1.7; max-width: 52ch; }
.card .tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 24px; }
.tag {
  display: inline-flex; align-items: center;
  padding: 5px 10px;
  border-radius: 8px;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  color: var(--text-2);
  background: var(--glass-2);
  border: 1px solid var(--border);
}
.card.feature { min-height: 300px; }
.card.feature .card-art {
  position: absolute;
  inset-inline-end: -40px; bottom: -40px;
  width: 260px; height: 260px;
  opacity: 0.35;
  pointer-events: none;
  color: var(--brand-400);
  z-index: -1;
}
.card.feature .card-art svg { width: 100%; height: 100%; stroke: currentColor; fill: none; stroke-width: 0.6; }

/* ---------- Process ----------------------------------------------------- */
.process { position: relative; }
.process-rail {
  position: absolute;
  inset-inline: 0;
  top: 26px;
  height: 2px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
}
.process-rail i {
  display: block; height: 100%; width: 100%;
  background: linear-gradient(90deg, var(--brand-300), var(--primary));
  transform: scaleX(0);
  transform-origin: 0 50%;
}
html[dir="rtl"] .process-rail i { transform-origin: 100% 50%; }
.steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 28px;
}
.step { position: relative; padding-top: 64px; }
.step .dot {
  position: absolute; top: 18px; inset-inline-start: 0;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--border-2);
  transition: border-color 0.4s, box-shadow 0.4s;
}
.step.is-on .dot { border-color: var(--brand-300); box-shadow: 0 0 0 6px var(--tint-2); }
.step .idx { font-family: var(--mono); font-size: 0.78rem; color: var(--accent); letter-spacing: 0.1em; }
.step h3 { margin-top: 8px; font-size: 1.2rem; }
.step p { margin-top: 10px; color: var(--text-2); line-height: 1.7; }

/* ---------- About / stats / pillars ------------------------------------ */
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
}
.about-copy p { color: var(--text-2); font-size: 1.06rem; line-height: 1.75; }
.about-copy p + p { margin-top: 18px; }
.about-copy .h-section { margin-bottom: 26px; }

.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.stat {
  padding: 28px 26px;
  border-radius: var(--r-lg);
  background: var(--glass);
  border: 1px solid var(--border);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.stat b {
  display: block;
  font-family: var(--mono);
  font-size: clamp(2rem, 3.4vw, 2.8rem);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--text);
}
.stat b span, .stat b em { display: inline; font: inherit; color: inherit; margin: 0; }
.stat b em { font-style: normal; color: var(--accent); }
.stat > span { display: block; margin-top: 10px; font-size: 0.9rem; color: var(--text-2); }

.pillars {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: clamp(48px, 6vw, 80px);
}
.pillar { padding: 28px; border-radius: var(--r-lg); border: 1px solid var(--border); background: var(--glass); }
.pillar .card-icon { width: 44px; height: 44px; border-radius: 13px; margin-bottom: 18px; }
.pillar .card-icon svg { width: 20px; height: 20px; }
.pillar h3 { font-size: 1.1rem; }
.pillar p { margin-top: 8px; color: var(--text-2); font-size: 0.95rem; line-height: 1.7; }

/* ---------- CTA band ---------------------------------------------------- */
.cta-band {
  position: relative;
  padding: clamp(48px, 7vw, 88px) clamp(24px, 6vw, 80px);
  border-radius: var(--r-xl);
  background: var(--glass-strong);
  border: 1px solid var(--border-2);
  backdrop-filter: blur(24px) saturate(150%);
  -webkit-backdrop-filter: blur(24px) saturate(150%);
  box-shadow: var(--shadow);
  text-align: center;
  overflow: hidden;
}
.cta-band::before {
  content: '';
  position: absolute; inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(46, 196, 166, 0.55), transparent 40%, transparent 60%, rgba(0, 109, 91, 0.5));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
          mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  pointer-events: none;
}
.cta-band .mark { width: 64px; height: 64px; margin: 0 auto 22px; color: var(--text); }
.cta-band .mark .mark-track { opacity: 0.12; }
.cta-band h2 { font-size: clamp(1.9rem, 4vw, 3.2rem); }
.cta-band .lede { margin: 16px auto 0; }
.cta-band .actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 34px; }

/* ---------- Contact ----------------------------------------------------- */
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
}
.contact-side .h-section { margin-top: 18px; }
.contact-side .lede { margin-top: 18px; }
.contact-list { margin-top: 32px; display: grid; gap: 10px; }
.contact-list a, .contact-list div {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 18px;
  border-radius: var(--r);
  border: 1px solid var(--border);
  background: var(--glass);
  color: var(--text);
  font-weight: 600;
  transition: border-color var(--dur), transform var(--dur) var(--ease);
}
.contact-list a:hover { border-color: var(--border-2); transform: translateY(-2px); }
.contact-list svg { width: 20px; height: 20px; stroke: var(--accent); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.contact-list small { display: block; font-weight: 500; font-size: 0.8rem; color: var(--text-3); }

.form {
  padding: clamp(24px, 3vw, 36px);
  border-radius: var(--r-lg);
  background: var(--glass-strong);
  border: 1px solid var(--border);
  backdrop-filter: blur(24px) saturate(150%);
  -webkit-backdrop-filter: blur(24px) saturate(150%);
  box-shadow: var(--shadow);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: grid; gap: 8px; margin-bottom: 16px; }
.field label { font-size: 0.82rem; font-weight: 700; color: var(--text-2); letter-spacing: 0.02em; }
.field input, .field textarea {
  width: 100%;
  min-height: 52px;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--glass-2);
  color: var(--text);
  font: inherit;
  font-size: 0.98rem;
  transition: border-color var(--dur), box-shadow var(--dur), background var(--dur);
}
[data-theme="light"] .field input, [data-theme="light"] .field textarea { background: #fff; }
.field textarea { min-height: 150px; resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: var(--text-3); }
.field input:focus, .field textarea:focus { outline: 0; border-color: var(--brand-400); box-shadow: 0 0 0 4px var(--ring); }
.field .err { display: none; font-size: 0.8rem; color: #ff8a80; font-weight: 600; }
[data-theme="light"] .field .err { color: #b3261e; }
.field.is-invalid input, .field.is-invalid textarea { border-color: #ff8a80; }
.field.is-invalid .err { display: block; }
.form-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 6px; }
.form-foot small { color: var(--text-3); font-size: 0.8rem; }
.form-status { margin-top: 14px; font-size: 0.9rem; font-weight: 600; color: var(--accent); min-height: 1.4em; }
.form-status.is-error { color: #ff8a80; }
[data-theme="light"] .form-status.is-error { color: #b3261e; }
.hp { position: absolute; inset-inline-start: -9999px; opacity: 0; height: 0; width: 0; overflow: hidden; }

.form-success {
  display: none;
  text-align: center;
  padding: 24px 8px;
}
.form.is-done form { display: none; }
.form.is-done .form-success { display: block; }
.form-success .ok-ring {
  width: 72px; height: 72px; margin: 0 auto 18px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: var(--tint);
  border: 1px solid var(--border-2);
  color: var(--accent);
}
.form-success .ok-ring svg { width: 30px; height: 30px; stroke: currentColor; fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.form-success h3 { font-size: 1.4rem; }
.form-success p { margin-top: 8px; color: var(--text-2); }

/* ---------- Footer ------------------------------------------------------ */
.footer {
  position: relative; z-index: 1;
  border-top: 1px solid var(--border);
  padding: 64px 0 32px;
  background: color-mix(in srgb, var(--bg) 60%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
}
.footer .brand .mark { width: 34px; height: 34px; }
.footer .tag-line { margin-top: 14px; color: var(--text-2); max-width: 36ch; font-size: 0.95rem; }
.footer h4 { font-size: 0.8rem; font-family: var(--mono); font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-3); margin-bottom: 16px; }
.footer ul { display: grid; gap: 10px; }
.footer ul a { color: var(--text-2); transition: color var(--dur); font-weight: 500; }
.footer ul a:hover { color: var(--text); }
.footer-bottom {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px;
  margin-top: 48px; padding-top: 24px;
  border-top: 1px solid var(--border);
  font-size: 0.85rem; color: var(--text-3);
}

/* ---------- Mobile nav drawer ------------------------------------------ */
@media (max-width: 900px) {
  .nav-inner { grid-template-columns: auto auto; justify-content: space-between; }
  .nav-burger { display: inline-flex; }
  .nav-cta { display: none; }
  .nav-links {
    position: fixed;
    inset: var(--nav-h) 0 0 0;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    padding: 24px;
    background: color-mix(in srgb, var(--bg) 94%, transparent);
    backdrop-filter: blur(28px) saturate(150%);
    -webkit-backdrop-filter: blur(28px) saturate(150%);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease), visibility var(--dur);
  }
  .nav-links.is-open { opacity: 1; visibility: visible; transform: none; }
  .nav-links a { justify-content: center; font-size: 1.5rem; font-weight: 700; min-height: 56px; color: var(--text); }
  .nav-links .nav-cta-mobile { display: inline-flex; margin-top: 18px; }
  body.nav-open { overflow: hidden; }
}
@media (min-width: 901px) { .nav-links .nav-cta-mobile { display: none; } }

/* ---------- Responsive -------------------------------------------------- */
@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { min-height: 0; margin-top: 24px; }
  .hero-mark { display: none; }
  .console { margin-top: 0; margin-inline-start: 0; width: 100%; }
  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card.span-2 { grid-column: span 2; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px 28px; }
  .process-rail { display: none; }
  .step { padding-top: 0; padding-inline-start: 30px; }
  .step .dot { top: 4px; }
  .step::before { content: ''; position: absolute; inset-inline-start: 8px; top: 24px; bottom: -24px; width: 2px; background: var(--border); }
  .step:last-child::before { display: none; }
  .about-grid, .contact-grid { grid-template-columns: 1fr; }
  .pillars { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  :root { --nav-h: 68px; }
  .hero { padding-top: calc(var(--nav-h) + 28px); min-height: 0; padding-bottom: 56px; }
  .hero-actions .btn { flex: 1 1 100%; }
  .bento { grid-template-columns: 1fr; }
  .card.span-2 { grid-column: span 1; }
  .card.feature { min-height: 0; }
  .steps { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; gap: 12px; }
  .stat { padding: 22px 18px; }
  .form-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .scroll-cue { display: none; }
  .marquee-track { gap: 36px; }
}

/* ---------- Motion preferences ----------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .marquee-track { animation: none; flex-wrap: wrap; width: auto; justify-content: center; gap: 20px 40px; }
  .marquee-item[aria-hidden="true"] { display: none; }
  .marquee { -webkit-mask-image: none; mask-image: none; }
  .console-body .ln { opacity: 1; transform: none; }
  .process-rail i { transform: none; }
}
html[data-motion="off"] .marquee-track { animation: none; flex-wrap: wrap; width: auto; justify-content: center; gap: 20px 40px; }
html[data-motion="off"] .marquee-item[aria-hidden="true"] { display: none; }
html[data-motion="off"] .marquee { -webkit-mask-image: none; mask-image: none; }
