/* =========================================================
   Cignify — Shared Design System
   Dark · Terminal-inspired · Defense-grade
   ========================================================= */

:root {
  /* Surfaces — anchored on brand dark teal #00322E */
  --bg: #051815;
  --bg-1: #0A2723;
  --bg-2: #00322E;       /* brand dark — elevated/strip surface */
  --bg-3: #0E3631;
  --line: rgba(234, 253, 231, 0.08);
  --line-strong: rgba(234, 253, 231, 0.16);

  /* Text — anchored on brand mint #EAFDE7 */
  --ink: #F2FEEF;
  --ink-dim: rgba(234, 253, 231, 0.82);
  --ink-faint: rgba(234, 253, 231, 0.58);

  /* Accent — brand lime #72BF00 */
  --lime: #72BF00;
  --lime-dim: #8FD123;
  --lime-deep: #4F8500;
  --lime-glow: rgba(114, 191, 0, 0.22);
  --mint: #EAFDE7;       /* brand mint highlight */

  /* Brand mark (inline SVG) */
  --brand-mark: var(--lime);   /* circle + lens fill */
  --brand-screen: var(--bg);   /* window cutout = page surface */
  --brand-wm: var(--ink);      /* wordmark */

  /* Semantic */
  --danger: #FF5C5C;
  --warn:   #FFB23E;
  --ok:     var(--lime);

  /* Type — brand typefaces */
  --display: "Clash Display", "General Sans", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --sans: "General Sans", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --mono: "Geist Mono", "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* Rhythm */
  --max:    1320px;
  --gutter: clamp(20px, 4vw, 48px);
  --radius: 14px;
  --radius-sm: 8px;

  /* Motion */
  --ease: cubic-bezier(0.2, 0.6, 0.2, 1);
}

/* =========================================================
   LIGHT THEME  ·  html[data-theme="light"]
   "Deep green on light" — inverted, editorial
   ========================================================= */
html[data-theme="light"] {
  --bg: #E2ECDF;
  --bg-1: #FFFFFF;
  --bg-2: #DAE7D9;
  --bg-3: #CFE0CD;
  --line: rgba(44, 110, 32, 0.22);
  --line-strong: rgba(44, 110, 32, 0.40);

  --ink: #08231B;
  --ink-dim: rgba(8, 35, 27, 0.86);
  --ink-faint: rgba(8, 35, 27, 0.64);

  --lime: #3C8E2A;
  --lime-dim: #4FB23B;
  --lime-deep: #265F1B;
  --lime-glow: rgba(60, 142, 42, 0.26);
  --mint: #0E3327;

  --brand-mark: #10362B;
  --brand-screen: #FFFFFF;
  --brand-wm: #10362B;
}
/* Inverted action colors: deep-green fills with mint text */
html[data-theme="light"] .nav { background: rgba(255, 255, 255, 0.82); }
html[data-theme="light"] .btn-primary,
html[data-theme="light"] .nav-cta {
  background: #10362B;
  color: #EAFDE7;
}
html[data-theme="light"] .btn-primary:hover { box-shadow: 0 12px 40px rgba(16, 54, 43, 0.28); }
html[data-theme="light"] .nav-cta:hover { box-shadow: 0 8px 32px rgba(16, 54, 43, 0.22); }
html[data-theme="light"] .btn-ghost { color: #10362B; border-color: rgba(16, 54, 43, 0.25); }
html[data-theme="light"] .btn-ghost:hover { border-color: var(--lime); color: var(--lime-deep); background: rgba(63, 156, 47, 0.06); }
html[data-theme="light"] ::selection { background: #10362B; color: #EAFDE7; }
/* Make the background field clearly visible in light mode */
html[data-theme="light"] .ambient::before {
  opacity: 1;
  background-image:
    linear-gradient(to right, rgba(44,110,32,0.09) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(44,110,32,0.09) 1px, transparent 1px);
}
html[data-theme="light"] .ambient::after {
  opacity: 1;
  background:
    radial-gradient(900px 560px at 82% -8%, rgba(60,142,42,0.18), transparent 60%),
    radial-gradient(760px 460px at 8% 110%, rgba(60,142,42,0.12), transparent 62%);
}

/* =========================================================
   Theme toggle (nav)
   ========================================================= */
.theme-toggle {
  width: 44px; height: 44px;
  flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  color: var(--ink-dim);
  transition: color .2s var(--ease), border-color .2s var(--ease), background .2s var(--ease);
}
.theme-toggle:hover { color: var(--ink); border-color: var(--ink-dim); background: rgba(127,127,127,0.06); }
.theme-toggle svg { width: 17px; height: 17px; display: block; }
.theme-toggle .ic-sun { display: none; }
.theme-toggle .ic-moon { display: block; }
html[data-theme="light"] .theme-toggle .ic-sun { display: block; }
html[data-theme="light"] .theme-toggle .ic-moon { display: none; }

* { box-sizing: border-box; }

html {
  /* prevent iOS bumping font sizes on orientation change */
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  font-weight: 450;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
/* Body copy carries a touch more weight for contrast/legibility */
p, li, .lede, .nav-links a, .footer a { font-weight: 500; }

/* Tap targets feel native on touch, no blue flash */
* { -webkit-tap-highlight-color: rgba(60,142,42,0.18); }

/* Media never forces horizontal scroll */
img, video { max-width: 100%; height: auto; }
svg { max-width: 100%; }

a { color: inherit; text-decoration: none; }
button { font-family: inherit; line-height: inherit; cursor: pointer; }

/* Selection */
::selection { background: var(--lime); color: var(--bg); }

/* Scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #143630; border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: #1c4a42; }

/* =========================================================
   Ambient background — animated grid + scanlines
   ========================================================= */
.ambient {
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.ambient::before {
  content: "";
  position: absolute; inset: -2px;
  background-image:
    linear-gradient(to right, rgba(114,191,0,0.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(114,191,0,0.05) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at 50% 30%, #000 0%, #000 50%, transparent 90%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 30%, #000 0%, #000 50%, transparent 90%);
  animation: gridDrift 60s linear infinite;
}
.ambient::after {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(800px 500px at 80% -10%, rgba(114,191,0,0.08), transparent 60%),
    radial-gradient(700px 400px at 10% 110%, rgba(0,50,46,0.6), transparent 60%);
}
@keyframes gridDrift {
  from { transform: translate(0, 0); }
  to   { transform: translate(-56px, -56px); }
}

/* =========================================================
   Layout
   ========================================================= */
.wrap {
  position: relative;
  z-index: 1;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

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

/* =========================================================
   Top navigation
   ========================================================= */
.nav {
  position: sticky; top: 0;
  z-index: 50;
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  background: rgba(5, 24, 21, 0.72);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  display: flex;
  align-items: center;
  gap: 32px;
  height: 76px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  font-weight: 600;
  letter-spacing: -0.01em;
  font-family: var(--display);
  flex-shrink: 0;
}
.brand-mark {
  display: inline-block;
  height: 30px;
  width: auto;
  color: var(--brand-mark);
  flex-shrink: 0;
  transition: color .3s var(--ease);
}
.brand > span:not(.brand-mark):not(.cw-sl) {
  display: inline-block;
  font-size: 21px;
  line-height: 1;
  color: var(--brand-wm);
  transition: color .3s var(--ease);
}
.footer .brand-mark { height: 28px; }

/* Brand logo images (theme-swapped) */
.brand-logo { display: block; height: 38px; width: auto; flex-shrink: 0; }
.footer .brand-logo { height: 30px; }
@media (max-width: 520px) { .brand-logo { height: 34px; } }
/* dark theme (default): show the light-colored logo */
.brand-logo.is-dark { display: none; }
.brand-logo.is-light { display: block; }
/* light theme: show the dark-colored logo */
html[data-theme="light"] .brand-logo.is-light { display: none; }
html[data-theme="light"] .brand-logo.is-dark { display: block; }
.nav-links {
  display: flex;
  gap: 4px;
  margin-left: auto;
  flex: 0 0 auto;
}
.nav-links a {
  padding: 8px 12px;
  font-size: 14px;
  color: var(--ink-dim);
  border-radius: 6px;
  transition: color .2s var(--ease), background .2s var(--ease);
}
.nav-links a:hover { color: var(--ink); background: rgba(255,255,255,0.04); }
.nav-links a.active { color: var(--ink); }
.nav-links a.active::before {
  content: "▸ ";
  color: var(--lime);
  font-family: var(--mono);
}

/* Services dropdown (V1 · simple list) */
.cw-sl { color: var(--lime); font-weight: inherit; font-style: normal; margin: 0 0.02em; }
.cwb { display: inline; white-space: nowrap; }
/* on lime primary buttons the lime slash would vanish — use the dark button text color */
.btn-primary .cw-sl { color: rgb(24, 27, 20); }
.nav-svc { position: relative; }
.nav-svc-trigger {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 12px; font-size: 14px; font-family: inherit;
  color: var(--ink-dim); background: none; border: none; border-radius: 6px; cursor: pointer;
  transition: color .2s var(--ease), background .2s var(--ease);
}
.nav-svc-trigger:hover { color: var(--ink); background: rgba(255,255,255,0.04); }
.nav-svc-trigger.active { color: var(--ink); }
.nav-svc-caret { font-size: 8px; color: inherit; transition: transform .25s var(--ease); }
.nav-svc.open .nav-svc-trigger { color: var(--ink); }
.nav-svc.open .nav-svc-caret { transform: rotate(180deg); }
.nav-svc-menu {
  position: absolute; top: calc(100% + 10px); left: 50%;
  width: 282px; transform: translateX(-50%) translateY(-8px);
  background: var(--bg-1); border: 1px solid var(--line-strong); border-radius: 12px;
  padding: 8px; box-shadow: 0 24px 60px rgba(0,0,0,0.5);
  opacity: 0; pointer-events: none; transition: opacity .2s var(--ease), transform .2s var(--ease);
  z-index: 60;
}
.nav-svc.open .nav-svc-menu { opacity: 1; transform: translateX(-50%); pointer-events: auto; }
.nav-svc-menu a {
  display: flex; align-items: center; gap: 10px;
  padding: 10px; border-radius: 8px; color: var(--ink); font-size: 14px; white-space: nowrap;
}
.nav-svc-menu a:hover { background: rgba(114,191,0,0.06); color: var(--ink); }
.nav-svc-menu a .svc-ic {
  width: 28px; height: 28px; border-radius: 7px; flex-shrink: 0;
  border: 1px solid var(--line-strong); background: rgba(114,191,0,0.06);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-size: 12px; color: var(--lime);
}
.nav-svc-menu a .svc-n { margin-left: auto; font-family: var(--mono); font-size: 11px; color: var(--ink-faint); }
@media (max-width: 1024px) {
  /* in mobile menu, show as plain links */
  .nav-svc { width: 100%; }
  .nav-svc-menu { position: static; transform: none; width: 100%; opacity: 1; pointer-events: auto; box-shadow: none; border: 0; padding: 0 0 0 12px; background: none; display: none; }
  .nav-svc.open .nav-svc-menu { transform: none; }
  .nav-links.open .nav-svc-menu { display: block; }
  .nav-svc-caret { display: none; }
}
.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: var(--lime);
  color: var(--bg);
  font-weight: 600;
  font-size: 14px;
  border-radius: 0;
  clip-path: polygon(9px 0, 100% 0, 100% calc(100% - 9px), calc(100% - 9px) 100%, 0 100%, 0 9px);
  border: none;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
.nav-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 32px rgba(114,191,0,0.3);
}
.nav-secondary {
  padding: 9px 14px;
  font-size: 13px;
  color: var(--ink-dim);
  font-family: var(--mono);
  border: 1px solid var(--line-strong);
  border-radius: 0;
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
  background: transparent;
  transition: all .2s var(--ease);
}
.nav-secondary:hover { color: var(--ink); border-color: var(--ink-dim); }

.menu-toggle { display: none; min-width: 44px; min-height: 44px; background: transparent; border: 1px solid var(--line-strong); border-radius: 8px; padding: 8px 10px; color: var(--ink); align-items: center; justify-content: center; }

/* Nav CTA must never wrap */
.nav-cta { white-space: nowrap; flex-shrink: 0; }
.nav-secondary { white-space: nowrap; flex-shrink: 0; }
.nav-links a { white-space: nowrap; }

/* Drop the EN/AR pill first as space gets tight */
@media (max-width: 1100px) {
  .nav-secondary { display: none; }
}

/* Switch to mobile menu before the nav can ever overflow */
@media (max-width: 1024px) {
  .nav-links { display: none; }
  .theme-toggle { margin-left: auto; }
  .menu-toggle { display: inline-flex; }
  .nav-cta { display: none; }
  .nav-inner { gap: 10px; }
  .nav-links.open {
    display: flex;
    position: absolute;
    top: 76px; left: 0; right: 0;
    flex-direction: column;
    background: var(--bg-1);
    border-bottom: 1px solid var(--line);
    padding: 12px var(--gutter);
    gap: 2px;
    margin-left: 0;
  }
}

/* =========================================================
   Typography helpers
   ========================================================= */
.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--lime);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.eyebrow::before {
  content: "";
  display: inline-block;
  width: 8px; height: 8px;
  background: var(--lime);
  border-radius: 2px;
  box-shadow: 0 0 12px var(--lime);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .4; }
}

h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 500;
  letter-spacing: -0.02em;
  margin: 0;
  text-wrap: balance;
  color: var(--ink);
}
h1 { font-size: clamp(44px, 7vw, 96px); line-height: 0.98; }
h2 { font-size: clamp(32px, 4.6vw, 60px); line-height: 1.02; }
h3 { font-size: clamp(22px, 2.2vw, 30px); line-height: 1.2; }
h4 { font-size: 18px; line-height: 1.3; }

/* Card/label-scale sub-headings retagged from h4 to h3 for correct
   heading-order (no level skip after the nearest h2) without inheriting
   h3's larger default size -- semantic level and visual size are
   intentionally decoupled here. */
.svc-side h3, .st h3, .svc-rel-card h3, .method-step h3 { font-size: 18px; line-height: 1.3; }

/* Visually hidden but present for screen readers / heading-order outline */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

p { color: var(--ink-dim); text-wrap: pretty; }
.lede { font-size: clamp(17px, 1.6vw, 21px); color: var(--ink); line-height: 1.5; max-width: 60ch; }

.mono { font-family: var(--mono); }

/* =========================================================
   Button groups
   ========================================================= */
.hero-ctas, .cta-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}

/* =========================================================
   Buttons
   ========================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  border-radius: 0;
  /* cut-corner (notched) shape — top-left + bottom-right */
  clip-path: polygon(11px 0, 100% 0, 100% calc(100% - 11px), calc(100% - 11px) 100%, 0 100%, 0 11px);
  font-size: 15px;
  font-weight: 500;
  border: 1px solid transparent;
  transition: all .25s var(--ease);
  white-space: nowrap;
}
.btn-primary {
  background: var(--lime);
  color: var(--bg);
  font-weight: 600;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(114,191,0,0.35);
}
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line-strong);
}
.btn-ghost:hover {
  border-color: var(--lime);
  color: var(--lime);
  background: rgba(114,191,0,0.04);
}
.btn-arrow {
  display: inline-block;
  transition: transform .25s var(--ease);
}
.btn:hover .btn-arrow { transform: translateX(4px); }

/* =========================================================
   Section pattern
   ========================================================= */
.section {
  padding: clamp(80px, 12vw, 160px) 0;
  position: relative;
}
.section-head {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-bottom: 64px;
  max-width: 720px;
}

/* =========================================================
   Cards
   ========================================================= */
.card {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255,255,255,0.018), rgba(255,255,255,0));
  padding: 28px;
  transition: border-color .25s var(--ease), transform .25s var(--ease);
  overflow: hidden;
}
.card:hover {
  border-color: var(--line-strong);
}
.card-hover-glow:hover {
  border-color: rgba(114,191,0,0.35);
}
.card-hover-glow::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(400px 200px at var(--mx, 50%) var(--my, 0%), rgba(114,191,0,0.08), transparent 70%);
  opacity: 0;
  transition: opacity .3s var(--ease);
}
.card-hover-glow:hover::after { opacity: 1; }

.card-corner {
  position: absolute;
  width: 12px; height: 12px;
  border: 1px solid var(--lime);
  opacity: 0;
  transition: opacity .25s var(--ease);
}
.card-corner.tl { top: 8px; left: 8px; border-right: none; border-bottom: none; }
.card-corner.tr { top: 8px; right: 8px; border-left: none; border-bottom: none; }
.card-corner.bl { bottom: 8px; left: 8px; border-right: none; border-top: none; }
.card-corner.br { bottom: 8px; right: 8px; border-left: none; border-top: none; }
.card:hover .card-corner { opacity: 1; }

/* =========================================================
   Terminal block
   ========================================================= */
.terminal {
  background: #050606;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.65;
  overflow: hidden;
}
.terminal-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,0.018);
  font-size: 11px;
  color: var(--ink-dim);
  letter-spacing: 0.06em;
}
.terminal-bar .dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: #2a302d;
}
.terminal-bar .dot:nth-child(1) { background: #FF5C5C66; }
.terminal-bar .dot:nth-child(2) { background: #FFB23E66; }
.terminal-bar .dot:nth-child(3) { background: var(--lime); box-shadow: 0 0 8px var(--lime-glow); }
.terminal-bar .title { margin-left: 12px; }
.terminal-body { padding: 18px 22px; }
.terminal-line { display: block; white-space: pre-wrap; word-break: break-word; }
.terminal-line.dim { color: var(--ink-faint); }
.terminal-line.lime { color: var(--lime); }
.terminal-line.warn { color: var(--warn); }
.terminal-line.danger { color: var(--danger); }
.prompt { color: var(--lime); }
.cursor {
  display: inline-block;
  width: 8px; height: 14px;
  background: var(--lime);
  vertical-align: middle;
  margin-left: 2px;
  animation: blink 1.1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* =========================================================
   Animated rule / divider
   ========================================================= */
.rule {
  height: 1px;
  background: linear-gradient(to right, transparent, var(--line-strong), transparent);
  margin: 0;
  border: 0;
}

/* =========================================================
   Reveal-on-scroll
   Hidden state is scoped to .js so that if JS fails to load
   or the IntersectionObserver never fires, content stays
   visible instead of being permanently blank.
   ========================================================= */
.js .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .8s var(--ease), transform .8s var(--ease);
}
.js .reveal.in { opacity: 1; transform: none; }
.js .reveal-stagger > * {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}
.js .reveal-stagger.in > * { opacity: 1; transform: none; }
.reveal-stagger.in > *:nth-child(1) { transition-delay: 0ms; }
.reveal-stagger.in > *:nth-child(2) { transition-delay: 70ms; }
.reveal-stagger.in > *:nth-child(3) { transition-delay: 140ms; }
.reveal-stagger.in > *:nth-child(4) { transition-delay: 210ms; }
.reveal-stagger.in > *:nth-child(5) { transition-delay: 280ms; }
.reveal-stagger.in > *:nth-child(6) { transition-delay: 350ms; }
.reveal-stagger.in > *:nth-child(7) { transition-delay: 420ms; }
.reveal-stagger.in > *:nth-child(8) { transition-delay: 490ms; }

/* =========================================================
   Tag / chip
   ========================================================= */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-dim);
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
}
.chip-lime {
  color: var(--lime);
  border-color: rgba(114,191,0,0.3);
  background: rgba(114,191,0,0.05);
}

/* =========================================================
   Footer
   ========================================================= */
.footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--line);
  padding: 80px 0 40px;
  margin-top: 80px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 64px;
}
@media (max-width: 760px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
.footer-h {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 0 0 18px;
  font-weight: 500;
}
.footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.footer a {
  color: var(--ink-dim);
  font-size: 14px;
  transition: color .2s var(--ease);
}
.footer a:hover { color: var(--lime); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 32px;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-faint);
  gap: 24px;
  flex-wrap: wrap;
}

/* =========================================================
   Utilities
   ========================================================= */
.glow-text {
  text-shadow: 0 0 32px rgba(114,191,0,0.4);
}
.grad-text {
  background: linear-gradient(180deg, #fff 0%, var(--ink-dim) 110%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.kbd {
  display: inline-block;
  padding: 2px 6px;
  font-family: var(--mono);
  font-size: 11px;
  border: 1px solid var(--line-strong);
  border-bottom-width: 2px;
  border-radius: 4px;
  color: var(--ink-dim);
}

/* When JS has finished initial reveal pass, drop the will-change */
.js .reveal.in,
.js .reveal-stagger.in > * { will-change: auto; }

/* =========================================================
   RESPONSIVE LAYER — phones & tablets (iOS / Android)
   ========================================================= */

/* Mobile menu becomes a clean full-width panel; bigger touch targets */
@media (max-width: 1024px) {
  .nav-links.open a,
  .nav-links.open .nav-svc-trigger {
    min-height: 46px;
    display: flex;
    align-items: center;
    font-size: 16px;
  }
  .nav-links.open .nav-svc-menu a { min-height: 42px; }
  /* show the primary CTA inside the open mobile menu */
  .nav-links.open .nav-cta {
    display: inline-flex;
    width: 100%;
    justify-content: center;
    margin-top: 10px;
  }
}

/* Tablet / large phone */
@media (max-width: 720px) {
  section { scroll-margin-top: 80px; }
  /* generic 2-up grids collapse */
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: 10px; }
}

/* Phones */
@media (max-width: 520px) {
  :root { --radius: 12px; }
  body { font-size: 15.5px; }

  .footer-grid { grid-template-columns: 1fr; gap: 32px; }

  /* buttons go full-width & comfortably tall so rows never crowd */
  .btn { min-height: 48px; padding: 13px 20px; }
  .hero-ctas .btn,
  .cta-ctas .btn { flex: 1 1 100%; justify-content: center; }

  /* tighten the mobile menu panel to the viewport edges */
  .nav-links.open { top: 64px; }
}

/* Anything with a wide internal grid (tables, dashboards, code) may scroll
   horizontally inside its own card instead of stretching the page */
@media (max-width: 600px) {
  .dashboard-mock,
  .feature-vis,
  .rb-sheet,
  .sheet,
  .cp-sheet { -webkit-overflow-scrolling: touch; }
  .doc-code, .rb-code, .tk-code { font-size: 10.5px; }
}

/* iOS: account for the home-indicator / notch safe areas (never less than the gutter) */
@supports (padding: max(0px)) {
  .nav .nav-inner {
    padding-left: max(var(--gutter), env(safe-area-inset-left));
    padding-right: max(var(--gutter), env(safe-area-inset-right));
  }
  .footer { padding-bottom: max(24px, env(safe-area-inset-bottom)); }
}

/* Respect reduced-motion globally */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* =========================================================
   Cookie-consent banner
   ========================================================= */
.cc-banner {
  position: fixed;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%) translateY(140%);
  width: min(680px, calc(100vw - 32px));
  z-index: 200;
  background: var(--bg-1);
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  transition: transform 0.4s var(--ease), opacity 0.4s var(--ease);
  opacity: 0;
}
.cc-banner.in { transform: translateX(-50%) translateY(0); opacity: 1; }
.cc-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 16px 18px;
}
@media (min-width: 960px) {
  .cc-banner { left: 24px; bottom: 24px; transform: translateY(140%); width: min(560px, calc(100vw - 48px)); }
  .cc-banner.in { transform: translateY(0); }
  .cc-banner .cc-text { font-size: 12px; }
}
@media (max-width: 560px) {
  .cc-inner { flex-direction: column; align-items: stretch; gap: 10px; padding: 12px 14px; }
  .cc-banner { bottom: max(8px, env(safe-area-inset-bottom)); width: calc(100vw - 16px); }
  .cc-text { font-size: 12px; line-height: 1.4; }
  .cc-actions { gap: 8px; }
}
.cc-text {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink-dim);
}
.cc-text .cc-hl { color: var(--lime); font-family: var(--mono); font-size: 12px; }
.cc-actions { display: flex; gap: 10px; flex-shrink: 0; }
.cc-btn {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.18s var(--ease);
}
.cc-decline {
  background: transparent;
  color: var(--ink-dim);
  border: 1px solid var(--line-strong);
}
.cc-decline:hover { color: var(--ink); border-color: var(--ink-dim); }
.cc-accept {
  background: var(--lime);
  color: #07241F;
  border: 1px solid var(--lime);
}
.cc-accept:hover { box-shadow: 0 8px 24px var(--lime-glow); transform: translateY(-1px); }
html[data-theme="light"] .cc-accept { background: #10362B; color: #EAFDE7; border-color: #10362B; }
