/* ==========================================================================
   Global Tech Network — Design System
   Modern dark "tech" aesthetic: deep space navy, electric cyan → violet
   gradients, glassmorphism, mono accents, motion with restraint.
   ========================================================================== */

:root {
  /* Palette */
  --bg: #05070f;
  --bg-elevated: #0a0e1c;
  --surface: rgba(255, 255, 255, 0.03);
  --surface-2: rgba(255, 255, 255, 0.055);
  --border: rgba(148, 163, 210, 0.14);
  --border-strong: rgba(148, 163, 210, 0.28);

  --text: #e8ecf8;
  --text-muted: #98a2bf;
  --text-faint: #6b7694;

  --cyan: #22d3ee;
  --blue: #3b82f6;
  --violet: #8b5cf6;
  --mint: #34d399;

  --grad-brand: linear-gradient(135deg, #22d3ee 0%, #3b82f6 45%, #8b5cf6 100%);
  --grad-text: linear-gradient(100deg, #67e8f9 0%, #60a5fa 50%, #a78bfa 100%);

  /* Type */
  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", monospace;

  /* Layout */
  --container: 1180px;
  --radius: 16px;
  --radius-lg: 24px;

  --shadow-glow-cyan: 0 0 40px rgba(34, 211, 238, 0.18);
  --shadow-card: 0 20px 50px -20px rgba(0, 0, 0, 0.6);

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);

  /* Fixed chrome heights: AI banner + nav bar */
  --banner-h: 34px;
  --nav-h: 76px;
  --header-offset: calc(var(--nav-h) + var(--banner-h));
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* Guard: never let any horizontal overflow become scrollable overflow — this is
   what keeps the mobile layout viewport at device width (body's overflow-x:
   hidden above propagates to the viewport, which still leaves it scrollable;
   clip does not). Fallback for old browsers is the hidden rule above. */
html, body { overflow-x: clip; }

img, svg { display: block; max-width: 100%; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin: 0 0 0.6em;
  text-wrap: balance;
}

h1 { font-size: clamp(2.4rem, 5.4vw, 4.2rem); }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.7rem); }
h3 { font-size: clamp(1.15rem, 2vw, 1.4rem); }

p { margin: 0 0 1.1em; }

a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: none; }

::selection { background: rgba(34, 211, 238, 0.28); color: #fff; }

.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 200;
  background: var(--cyan); color: #04101a; padding: 0.6rem 1rem;
  border-radius: 0 0 8px 0; font-weight: 600;
}
.skip-link:focus { left: 0; }

/* ---------- Utility ---------- */
.container { width: min(var(--container), calc(100% - 2.5rem)); margin-inline: auto; }

.text-gradient {
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.muted { color: var(--text-muted); }

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

.eyebrow {
  display: inline-flex; align-items: center; gap: 0.55rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 1.1rem;
}
.eyebrow::before {
  content: ""; width: 26px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--cyan));
}

/* overflow-x: clip — decorative orbs overhang section edges; without clipping
   they widen the page and mobile browsers expand the layout viewport, which
   shoves the (centered) fixed banner/nav off to the right on phones. */
.section { padding: clamp(4rem, 8vw, 6.5rem) 0; position: relative; overflow-x: clip; }
.section-head { max-width: 680px; margin-bottom: clamp(2.2rem, 5vw, 3.5rem); }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head.center .eyebrow { justify-content: center; }
.section-head p { color: var(--text-muted); font-size: 1.06rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  font-family: var(--font-display);
  font-weight: 600; font-size: 0.97rem;
  padding: 0.85rem 1.7rem;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.25s var(--ease-out), box-shadow 0.25s, background 0.25s, border-color 0.25s;
  white-space: nowrap;
}
.btn svg { width: 17px; height: 17px; transition: transform 0.25s var(--ease-out); }
.btn:hover svg { transform: translateX(3px); }

.btn-primary {
  background: var(--grad-brand);
  color: #04101a;
  box-shadow: 0 8px 30px -8px rgba(59, 130, 246, 0.55);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 40px -8px rgba(59, 130, 246, 0.7); }

.btn-ghost {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border-strong);
  backdrop-filter: blur(8px);
}
.btn-ghost:hover { border-color: var(--cyan); color: var(--cyan); transform: translateY(-2px); }

.btn-sm { padding: 0.55rem 1.15rem; font-size: 0.88rem; }

/* ---------- Header / nav ---------- */
.site-header {
  position: fixed; inset: 0 0 auto; z-index: 100;
  transition: background 0.3s, border-color 0.3s, backdrop-filter 0.3s;
  border-bottom: 1px solid transparent;
}
.site-header.scrolled {
  background: rgba(5, 7, 15, 0.78);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom-color: var(--border);
}
.nav-wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.5rem; height: var(--nav-h);
}

/* ---------- AI banner (global, sits above the nav) ---------- */
.ai-banner {
  height: var(--banner-h);
  display: flex; align-items: center;
  background:
    linear-gradient(90deg, rgba(34, 211, 238, 0.14), rgba(59, 130, 246, 0.10) 50%, rgba(139, 92, 246, 0.16)),
    rgba(5, 7, 15, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.ai-banner-inner {
  display: flex; align-items: center; justify-content: center;
  gap: 1.2rem; min-width: 0;
}
.ai-banner-msg {
  margin: 0; display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: var(--font-mono); font-size: 0.76rem; letter-spacing: 0.02em;
  color: var(--text-muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0;
}
.ai-banner-msg b { color: var(--text); font-weight: 600; }
.ai-banner-msg svg {
  flex: none; width: 13px; height: 13px; color: var(--cyan);
  filter: drop-shadow(0 0 6px rgba(34, 211, 238, 0.8));
}
.ai-banner-link {
  flex: none; display: inline-flex; align-items: center; gap: 0.3rem;
  font-family: var(--font-mono); font-size: 0.76rem; font-weight: 600;
  color: var(--cyan); white-space: nowrap;
}
.ai-banner-link svg { width: 12px; height: 12px; transition: transform 0.25s var(--ease-out); }
.ai-banner-link:hover svg { transform: translateX(3px); }
@media (max-width: 760px) {
  .ai-banner-detail { display: none; }
  /* Tighten the row so message + link fit on one centered line on phones */
  .ai-banner-inner { gap: 0.7rem; }
  .ai-banner-msg, .ai-banner-link { font-size: 0.7rem; }
}
/* Very small phones: trim the decorative icon so the line still fits, centered */
@media (max-width: 350px) {
  .ai-banner-inner { gap: 0.5rem; }
  .ai-banner-msg, .ai-banner-link { font-size: 0.66rem; }
  .ai-banner-msg svg { display: none; }
}

.brand { display: inline-flex; align-items: center; gap: 0.7rem; color: var(--text); }
.brand-logo { height: 34px; width: auto; }
.site-footer .brand-logo { height: 30px; }

.nav-links { display: flex; align-items: center; gap: 0.25rem; list-style: none; margin: 0; padding: 0; }
.nav-links > li { position: relative; }
.nav-links a, .nav-links button.nav-toggle-svc {
  display: inline-flex; align-items: center; gap: 0.35rem;
  font-family: var(--font-body); font-size: 0.94rem; font-weight: 500;
  color: var(--text-muted);
  padding: 0.55rem 0.85rem; border-radius: 10px;
  background: none; border: none; cursor: pointer;
  transition: color 0.2s, background 0.2s;
}
/* Keep top-level items on one line — but never the dropdown's descriptions */
.nav-links > li > a, .nav-links button.nav-toggle-svc { white-space: nowrap; }
.nav-links a:hover, .nav-links button.nav-toggle-svc:hover,
.nav-links a[aria-current="page"] { color: var(--text); background: var(--surface-2); }
.nav-links .caret { width: 14px; height: 14px; transition: transform 0.25s; }
.nav-links li.open .caret { transform: rotate(180deg); }

.dropdown {
  position: absolute; top: calc(100% + 10px); left: -0.85rem; transform: translateY(8px);
  width: 560px; max-width: calc(100vw - 2rem);
  background: rgba(10, 14, 28, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 0.8rem;
  display: grid; grid-template-columns: 1fr 1fr; gap: 0.25rem;
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity 0.22s var(--ease-out), transform 0.22s var(--ease-out), visibility 0.22s;
  box-shadow: var(--shadow-card);
}
.nav-links li.open .dropdown {
  opacity: 1; visibility: visible; pointer-events: auto;
  transform: translateY(0);
}
.nav-links a.nav-ai { color: var(--text); font-weight: 600; }
.nav-links a.nav-ai svg {
  width: 14px; height: 14px; color: var(--cyan);
  filter: drop-shadow(0 0 6px rgba(34, 211, 238, 0.7));
}
.dropdown a.dd-ai {
  grid-column: 1 / -1;
  background: linear-gradient(90deg, rgba(34, 211, 238, 0.08), rgba(139, 92, 246, 0.09));
  border: 1px solid rgba(34, 211, 238, 0.22);
}
.dropdown a.dd-ai:hover { border-color: rgba(34, 211, 238, 0.45); background: linear-gradient(90deg, rgba(34, 211, 238, 0.12), rgba(139, 92, 246, 0.13)); }
.tag-new {
  display: inline-block; margin-left: 0.45rem; padding: 0.08rem 0.5rem;
  font-family: var(--font-mono); font-size: 0.6rem; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.1em;
  color: #04101a; background: var(--grad-brand); border-radius: 999px;
  vertical-align: 2px;
}
.dropdown a {
  display: flex; gap: 0.8rem; align-items: flex-start;
  padding: 0.75rem 0.85rem; border-radius: 12px;
}
.dropdown a:hover { background: var(--surface-2); }
.dropdown .icon {
  flex: none; width: 36px; height: 36px; border-radius: 9px;
  display: grid; place-items: center;
  background: rgba(34, 211, 238, 0.09);
  border: 1px solid rgba(34, 211, 238, 0.2);
  color: var(--cyan);
}
.dropdown .icon svg { width: 18px; height: 18px; }
.dropdown b { display: block; color: var(--text); font-weight: 600; font-size: 0.92rem; }
.dropdown small { color: var(--text-faint); font-size: 0.8rem; line-height: 1.45; display: block; margin-top: 2px; }

.nav-cta { display: flex; align-items: center; gap: 0.9rem; }
.nav-phone {
  font-family: var(--font-mono); font-size: 0.85rem; color: var(--text-muted);
  transition: color 0.2s;
  white-space: nowrap;
}
.nav-phone:hover { color: var(--cyan); }

/* Mobile nav */
.nav-burger {
  display: none;
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
  width: 42px; height: 42px; cursor: pointer; color: var(--text);
  place-items: center;
}
.nav-burger svg { width: 20px; height: 20px; }

@media (max-width: 1180px) { .nav-phone { display: none; } }
@media (max-width: 960px) {
  .nav-links, .nav-cta .btn, .nav-phone { display: none; }
  .nav-burger { display: grid; }
  .mobile-nav {
    position: fixed; inset: var(--header-offset) 0 0; z-index: 99;
    background: rgba(5, 7, 15, 0.97);
    backdrop-filter: blur(20px);
    padding: 1.5rem;
    overflow-y: auto;
    display: none;
  }
  .mobile-nav.open { display: block; }
  .mobile-nav a {
    display: block; color: var(--text); font-family: var(--font-display);
    font-size: 1.15rem; font-weight: 500; padding: 0.8rem 0.4rem;
    border-bottom: 1px solid var(--border);
  }
  .mobile-nav .mobile-group { color: var(--text-faint); font-family: var(--font-mono); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.12em; margin: 1.4rem 0 0.3rem; }
  .mobile-nav .btn { margin-top: 1.5rem; width: 100%; }
}
@media (min-width: 961px) { .mobile-nav { display: none !important; } }

/* ---------- Backgrounds / atmosphere ---------- */
.bg-grid {
  position: absolute; inset: 0; z-index: -2; overflow: hidden;
  background-image:
    linear-gradient(rgba(148, 163, 210, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 210, 0.05) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, black 30%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, black 30%, transparent 78%);
}
.orb {
  position: absolute; border-radius: 50%; filter: blur(90px); z-index: -1;
  opacity: 0.5; pointer-events: none;
}
.orb-cyan { background: rgba(34, 211, 238, 0.24); width: 480px; height: 480px; }
.orb-violet { background: rgba(139, 92, 246, 0.26); width: 520px; height: 520px; }
.orb-blue { background: rgba(59, 130, 246, 0.22); width: 440px; height: 440px; }

@keyframes drift {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(40px, -30px) scale(1.08); }
}
.orb { animation: drift 14s ease-in-out infinite; }
.orb:nth-of-type(3) { animation-delay: -7s; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: calc(var(--header-offset) + clamp(4rem, 9vw, 7.5rem)) 0 clamp(4rem, 8vw, 6.5rem);
  overflow: hidden;
}
.hero-grid {
  display: grid; grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(2.5rem, 5vw, 5rem); align-items: center;
}
@media (max-width: 960px) { .hero-grid { grid-template-columns: 1fr; } }

.hero .lede { font-size: clamp(1.05rem, 1.6vw, 1.22rem); color: var(--text-muted); max-width: 540px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: 2rem; }

.badge-pill {
  display: inline-flex; align-items: center; gap: 0.55rem;
  font-family: var(--font-mono); font-size: 0.78rem;
  color: var(--text-muted);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.42rem 0.95rem;
  margin-bottom: 1.6rem;
  backdrop-filter: blur(8px);
}
.badge-pill .dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--mint);
  box-shadow: 0 0 10px var(--mint);
  animation: pulse 2.2s ease-in-out infinite;
}
@keyframes pulse { 50% { opacity: 0.35; } }

.hero-meta {
  display: flex; flex-wrap: wrap; gap: 1.4rem 1.9rem; margin-top: 2.6rem;
  padding-top: 1.8rem; border-top: 1px solid var(--border);
}
.hero-meta .stat b {
  display: block; font-family: var(--font-display); font-size: 1.5rem;
  font-weight: 700; letter-spacing: -0.02em; color: var(--text);
}
.hero-meta .stat b span { font: inherit; color: inherit; }
.hero-meta .stat > span { font-size: 0.8rem; color: var(--text-faint); }

/* Terminal card */
.terminal {
  background: rgba(8, 11, 24, 0.85);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card), var(--shadow-glow-cyan);
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: 0.84rem;
  backdrop-filter: blur(12px);
}
.terminal-bar {
  display: flex; align-items: center; gap: 0.45rem;
  padding: 0.8rem 1.1rem;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.025);
}
.terminal-bar i { width: 11px; height: 11px; border-radius: 50%; display: block; }
.terminal-bar i:nth-child(1) { background: #ff5f57; }
.terminal-bar i:nth-child(2) { background: #febc2e; }
.terminal-bar i:nth-child(3) { background: #28c840; }
.terminal-bar span { margin-left: auto; color: var(--text-faint); font-size: 0.74rem; }
.terminal-body { padding: 1.3rem 1.4rem; line-height: 1.9; color: var(--text-muted); }
.terminal-body .ln { display: block; white-space: pre-wrap; }
.terminal-body .prompt { color: var(--mint); }
.terminal-body .cmd { color: var(--text); }
.terminal-body .out { color: var(--text-faint); }
.terminal-body .ok { color: var(--mint); }
.terminal-body .hl { color: var(--cyan); }
.caret-blink {
  display: inline-block; width: 8px; height: 15px; background: var(--cyan);
  vertical-align: -2px; animation: blink 1.1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* ---------- Cards ---------- */
.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.8rem;
  transition: transform 0.3s var(--ease-out), border-color 0.3s, background 0.3s, box-shadow 0.3s;
  overflow: hidden;
}
.card::before {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(500px circle at var(--mx, 50%) var(--my, 0%), rgba(34, 211, 238, 0.08), transparent 45%);
  opacity: 0; transition: opacity 0.35s;
  pointer-events: none;
}
.card:hover { transform: translateY(-4px); border-color: var(--border-strong); box-shadow: var(--shadow-card); }
.card:hover::before { opacity: 1; }

.card-icon {
  width: 46px; height: 46px; border-radius: 12px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.14), rgba(139, 92, 246, 0.14));
  border: 1px solid rgba(34, 211, 238, 0.25);
  color: var(--cyan);
  margin-bottom: 1.2rem;
}
.card-icon svg { width: 22px; height: 22px; }
.card h3 { margin-bottom: 0.5rem; }
.card p { color: var(--text-muted); font-size: 0.95rem; margin-bottom: 0; }
.card .card-link {
  display: inline-flex; align-items: center; gap: 0.4rem;
  margin-top: 1.15rem; font-weight: 600; font-size: 0.9rem; color: var(--cyan);
}
.card .card-link svg { width: 15px; height: 15px; transition: transform 0.25s var(--ease-out); }
.card:hover .card-link svg { transform: translateX(4px); }

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.4rem; }
@media (max-width: 960px) { .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid-3, .grid-2 { grid-template-columns: 1fr; } }

/* ---------- Process timeline ---------- */
.process { display: grid; gap: 0; position: relative; }
.process-step {
  display: grid; grid-template-columns: 64px 1fr; gap: 1.4rem;
  padding: 1.6rem 0;
  position: relative;
}
.process-step:not(:last-child)::after {
  content: "";
  position: absolute; left: 31px; top: 82px; bottom: -14px; width: 2px;
  background: linear-gradient(180deg, rgba(34, 211, 238, 0.4), rgba(139, 92, 246, 0.15));
}
.process-num {
  width: 64px; height: 64px; border-radius: 18px;
  display: grid; place-items: center;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  font-family: var(--font-mono); font-size: 1rem; color: var(--cyan);
  box-shadow: inset 0 0 24px rgba(34, 211, 238, 0.07);
  flex: none;
}
.process-step h3 { margin-bottom: 0.35rem; }
.process-step p { color: var(--text-muted); margin: 0; max-width: 640px; }

/* ---------- Testimonials ---------- */
.tcard {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.8rem;
  display: flex; flex-direction: column; gap: 1.2rem;
  break-inside: avoid;
  transition: border-color 0.3s, transform 0.3s var(--ease-out);
}
.tcard:hover { border-color: var(--border-strong); transform: translateY(-3px); }
.tcard .stars { display: flex; gap: 3px; color: #fbbf24; }
.tcard .stars svg { width: 15px; height: 15px; }
.tcard blockquote { margin: 0; color: var(--text-muted); font-size: 0.95rem; }
.tcard footer { display: flex; align-items: center; gap: 0.85rem; margin-top: auto; }
.avatar {
  width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center; flex: none;
  font-family: var(--font-display); font-weight: 700; font-size: 0.85rem;
  color: #04101a;
  background: var(--grad-brand);
}
.tcard footer b { display: block; font-size: 0.93rem; }
.tcard footer span { color: var(--text-faint); font-size: 0.8rem; }

.masonry { columns: 3 320px; column-gap: 1.4rem; }
.masonry > * { margin-bottom: 1.4rem; }

/* ---------- Logo / cert strip ---------- */
.chip-row { display: flex; flex-wrap: wrap; gap: 0.7rem; }
.chip {
  font-family: var(--font-mono); font-size: 0.8rem;
  color: var(--text-muted);
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 999px;
  padding: 0.45rem 1rem;
  transition: color 0.2s, border-color 0.2s;
}
.chip:hover { color: var(--cyan); border-color: rgba(34, 211, 238, 0.4); }

/* ---------- Portfolio ---------- */
.pcard {
  display: flex; flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform 0.35s var(--ease-out), border-color 0.3s, box-shadow 0.35s;
}
.pcard:hover { transform: translateY(-5px); border-color: var(--border-strong); box-shadow: var(--shadow-card); }
.pcard-visual {
  position: relative; aspect-ratio: 16 / 9.4;
  display: grid; place-items: center;
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}
.pcard-visual::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 26px 26px;
}
.pcard-visual .pmark {
  position: relative;
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(1.5rem, 2.6vw, 2rem); letter-spacing: -0.02em;
  color: rgba(255, 255, 255, 0.92);
  text-shadow: 0 4px 30px rgba(0, 0, 0, 0.4);
  padding: 0 1.5rem; text-align: center;
}
.pcard-visual .ptag {
  position: absolute; top: 14px; left: 14px;
  font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.1em; text-transform: uppercase;
  background: rgba(5, 7, 15, 0.55); color: rgba(255,255,255,0.85);
  border: 1px solid rgba(255, 255, 255, 0.18);
  padding: 0.28rem 0.7rem; border-radius: 999px;
  backdrop-filter: blur(6px);
}
.pcard-body { padding: 1.6rem 1.7rem 1.7rem; display: flex; flex-direction: column; flex: 1; }
.pcard-body h3 { margin-bottom: 0.45rem; }
.pcard-body p { color: var(--text-muted); font-size: 0.93rem; flex: 1; }
.pcard-body .card-link {
  display: inline-flex; align-items: center; gap: 0.4rem;
  margin-top: 1.1rem; font-weight: 600; font-size: 0.9rem; color: var(--cyan);
}
.pcard-body .card-link svg { width: 15px; height: 15px; }

/* gradient themes for portfolio visuals */
.pv-1 { background: linear-gradient(135deg, #0e7490 0%, #1e3a8a 60%, #312e81 100%); }
.pv-2 { background: linear-gradient(135deg, #7f1d1d 0%, #9a3412 55%, #78350f 100%); }
.pv-3 { background: linear-gradient(135deg, #065f46 0%, #115e59 55%, #1e3a8a 100%); }
.pv-4 { background: linear-gradient(135deg, #581c87 0%, #6d28d9 55%, #1e40af 100%); }
.pv-5 { background: linear-gradient(135deg, #164e63 0%, #155e75 55%, #065f46 100%); }
.pv-6 { background: linear-gradient(135deg, #713f12 0%, #854d0e 55%, #92400e 100%); }
.pv-7 { background: linear-gradient(135deg, #1e3a8a 0%, #0e7490 55%, #0f766e 100%); }
.pv-8 { background: linear-gradient(135deg, #3b0764 0%, #86198f 55%, #9d174d 100%); }
.pv-9 { background: linear-gradient(135deg, #0f172a 0%, #334155 55%, #0e7490 100%); }

/* ---------- Credentials ---------- */
.cred-chip { position: absolute; top: 1.6rem; right: 1.6rem; }
.cred-title { padding-right: 8rem; }
@media (max-width: 700px) {
  .cred-chip { position: static; display: inline-block; margin-bottom: 0.95rem; }
  .cred-title { padding-right: 0; }
}

/* ---------- FAQ ---------- */
.faq { max-width: 800px; margin-inline: auto; }
.faq details {
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: var(--radius);
  margin-bottom: 0.8rem;
  overflow: hidden;
  transition: border-color 0.25s;
}
.faq details[open] { border-color: rgba(34, 211, 238, 0.35); }
.faq summary {
  cursor: pointer; list-style: none;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1.1rem 1.4rem;
  font-family: var(--font-display); font-weight: 600; font-size: 1.02rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary .faq-icon {
  flex: none; width: 26px; height: 26px; border-radius: 8px;
  display: grid; place-items: center;
  border: 1px solid var(--border-strong);
  color: var(--cyan);
  transition: transform 0.3s var(--ease-out), background 0.3s;
}
.faq summary .faq-icon svg { width: 13px; height: 13px; }
.faq details[open] summary .faq-icon { transform: rotate(45deg); background: rgba(34, 211, 238, 0.12); }
.faq .faq-a { padding: 0 1.4rem 1.25rem; color: var(--text-muted); font-size: 0.96rem; }

/* ---------- CTA band ---------- */
.cta-band {
  position: relative;
  border: 1px solid var(--border-strong);
  border-radius: 28px;
  padding: clamp(2.6rem, 6vw, 4.5rem) clamp(1.6rem, 5vw, 4rem);
  text-align: center;
  overflow: hidden;
  background:
    radial-gradient(600px 300px at 20% 0%, rgba(34, 211, 238, 0.14), transparent 60%),
    radial-gradient(600px 300px at 80% 100%, rgba(139, 92, 246, 0.16), transparent 60%),
    var(--bg-elevated);
}
.cta-band h2 { max-width: 620px; margin-inline: auto; }
.cta-band p { color: var(--text-muted); max-width: 520px; margin: 0 auto 2rem; }
.cta-band .hero-actions { justify-content: center; margin-top: 0; }

/* ---------- Feature split ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2.5rem, 5vw, 4.5rem); align-items: center; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } }
.checklist { list-style: none; padding: 0; margin: 1.4rem 0 0; display: grid; gap: 0.85rem; }
.checklist li { display: flex; gap: 0.75rem; align-items: flex-start; color: var(--text-muted); }
.checklist li svg { flex: none; width: 20px; height: 20px; color: var(--mint); margin-top: 2px; }
.checklist li b { color: var(--text); }

/* ---------- Forms ---------- */
.form-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(1.6rem, 4vw, 2.4rem);
}
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }
.field { display: flex; flex-direction: column; gap: 0.42rem; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 0.87rem; font-weight: 600; color: var(--text); }
.field input, .field select, .field textarea {
  font-family: var(--font-body); font-size: 0.95rem;
  color: var(--text);
  color-scheme: dark; /* native widgets (select popup, autofill) render dark */
  background: rgba(5, 7, 15, 0.6);
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  padding: 0.8rem 1rem;
  transition: border-color 0.2s, box-shadow 0.2s;
  width: 100%;
}
.field textarea { resize: vertical; min-height: 130px; }
.field input::placeholder, .field textarea::placeholder { color: var(--text-faint); opacity: 1; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: rgba(148, 163, 210, 0.42); }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.15);
}
.field select {
  -webkit-appearance: none; /* Safari fallback */
  appearance: none;
  cursor: pointer;
  padding-right: 2.75rem; /* keep text clear of the chevron */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2398a2bf' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 14px 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
}
.field select:focus {
  /* chevron picks up the accent while the control is open/focused */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2322d3ee' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
}
/* Required selects are :invalid until a real choice is made — mute the
   "Select one…" placeholder to match input placeholder styling */
.field select:invalid { color: var(--text-faint); }
.field select option {
  color: var(--text);
  background-color: var(--bg-elevated); /* dark option list in Firefox */
  padding: 0.5rem 0.75rem;
}
.field select option:disabled { color: var(--text-faint); }
.form-note { font-size: 0.82rem; color: var(--text-faint); }
.form-msg { display: none; margin-top: 1rem; padding: 0.9rem 1.1rem; border-radius: 12px; font-size: 0.92rem; }
.form-msg.ok { display: block; background: rgba(52, 211, 153, 0.1); border: 1px solid rgba(52, 211, 153, 0.35); color: var(--mint); }
.form-msg.err { display: block; background: rgba(248, 113, 113, 0.08); border: 1px solid rgba(248, 113, 113, 0.35); color: #f87171; }

.contact-info { display: grid; gap: 1rem; }
.contact-line { display: flex; gap: 0.95rem; align-items: flex-start; }
.contact-line .icon {
  flex: none; width: 42px; height: 42px; border-radius: 12px;
  display: grid; place-items: center;
  background: rgba(34, 211, 238, 0.09); border: 1px solid rgba(34, 211, 238, 0.22);
  color: var(--cyan);
}
.contact-line .icon svg { width: 19px; height: 19px; }
.contact-line b { display: block; font-family: var(--font-display); font-size: 0.97rem; }
.contact-line a, .contact-line span { color: var(--text-muted); font-size: 0.93rem; }
.contact-line a:hover { color: var(--cyan); }

/* ---------- Page hero (interior) ---------- */
.page-hero {
  position: relative;
  padding: calc(var(--header-offset) + clamp(3.5rem, 7vw, 5.5rem)) 0 clamp(3rem, 6vw, 4.5rem);
  overflow: hidden;
}
.page-hero .lede { font-size: clamp(1.02rem, 1.5vw, 1.18rem); color: var(--text-muted); max-width: 640px; }
.page-hero.center { text-align: center; }
.page-hero.center .lede { margin-inline: auto; }
.page-hero.center .eyebrow { justify-content: center; }
.page-hero.center .hero-actions { justify-content: center; }

.rating-line {
  display: inline-flex; align-items: center; gap: 0.6rem; margin-top: 1.8rem;
  font-size: 0.9rem; color: var(--text-muted);
}
.rating-line .stars { display: inline-flex; gap: 2px; color: #fbbf24; }
.rating-line .stars svg { width: 15px; height: 15px; }
.rating-line b { color: var(--text); }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  background: linear-gradient(180deg, transparent, rgba(10, 14, 28, 0.8));
  padding: clamp(3rem, 6vw, 4.5rem) 0 2rem;
  margin-top: clamp(3rem, 7vw, 5rem);
}
.footer-grid {
  display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.3fr;
  gap: 2.4rem;
  padding-bottom: 2.6rem;
  border-bottom: 1px solid var(--border);
}
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-grid h4 {
  font-family: var(--font-mono); font-size: 0.76rem; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.14em; color: var(--text-faint);
  margin-bottom: 1.1rem;
}
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.6rem; }
.footer-grid ul a { color: var(--text-muted); font-size: 0.92rem; transition: color 0.2s; }
.footer-grid ul a:hover { color: var(--cyan); }
.footer-about p { color: var(--text-muted); font-size: 0.92rem; max-width: 300px; margin-top: 1rem; }
.footer-bottom {
  display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; align-items: center;
  padding-top: 1.8rem;
  color: var(--text-faint); font-size: 0.84rem;
}
.footer-bottom .mono { font-size: 0.78rem; }

/* ---------- Reveal animations ---------- */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
  transition-delay: var(--d, 0s);
}
.reveal.in { opacity: 1; transform: none; }

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

/* ==========================================================================
   AI-first components (GTN-2)
   ========================================================================== */

/* ---------- Featured service card (spans full grid row) ---------- */
.card-featured {
  grid-column: 1 / -1;
  display: grid; grid-template-columns: auto 1fr auto; gap: 1.6rem; align-items: center;
  border-color: rgba(34, 211, 238, 0.3);
  background:
    radial-gradient(520px 200px at 0% 0%, rgba(34, 211, 238, 0.1), transparent 60%),
    radial-gradient(520px 200px at 100% 100%, rgba(139, 92, 246, 0.12), transparent 60%),
    var(--surface);
}
.card-featured .card-icon { margin-bottom: 0; }
.card-featured h3 { display: flex; align-items: center; flex-wrap: wrap; gap: 0.2rem; }
.card-featured .card-link { margin-top: 0; white-space: nowrap; }
@media (max-width: 720px) {
  .card-featured { grid-template-columns: 1fr; gap: 1rem; }
  .card-featured .card-icon { margin-bottom: 0.2rem; }
}

/* ---------- AI advantage band (interior pages) ---------- */
.ai-band {
  position: relative;
  display: grid; grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(1.8rem, 4vw, 3.2rem); align-items: center;
  border: 1px solid rgba(34, 211, 238, 0.25);
  border-radius: 28px;
  padding: clamp(2rem, 4.5vw, 3.2rem);
  overflow: hidden;
  background:
    radial-gradient(600px 260px at 0% 0%, rgba(34, 211, 238, 0.12), transparent 60%),
    radial-gradient(600px 260px at 100% 100%, rgba(139, 92, 246, 0.14), transparent 60%),
    var(--bg-elevated);
}
.ai-band h2 { margin-bottom: 0.55rem; }
.ai-band .muted { max-width: 560px; }
.ai-band .checklist { margin-top: 1.2rem; }
.ai-band .hero-actions { margin-top: 1.6rem; }
@media (max-width: 900px) { .ai-band { grid-template-columns: 1fr; } }

/* ---------- Velocity comparison bars ---------- */
.velocity { display: grid; gap: 1.05rem; }
.velocity .vrow { display: grid; gap: 0.4rem; }
.velocity .vlabel {
  display: flex; justify-content: space-between; align-items: baseline; gap: 1rem;
  font-family: var(--font-mono); font-size: 0.76rem; color: var(--text-faint);
}
.velocity .vlabel b { color: var(--text-muted); font-weight: 500; }
.velocity .vrow.lead .vlabel b { color: var(--text); }
.velocity .vrow.lead .vlabel span { color: var(--cyan); }
.velocity .vtrack {
  height: 10px; border-radius: 999px; overflow: hidden;
  background: var(--surface-2); border: 1px solid var(--border);
}
.velocity .vfill {
  display: block; height: 100%; border-radius: inherit;
  width: 0; background: var(--border-strong);
  transition: width 1.2s var(--ease-out) 0.35s;
}
.velocity .vfill.brand { background: var(--grad-brand); box-shadow: 0 0 18px rgba(34, 211, 238, 0.5); }
.reveal.in .velocity .vfill { width: var(--w, 100%); }
.velocity .vfoot { font-family: var(--font-mono); font-size: 0.74rem; color: var(--text-faint); margin: 0.4rem 0 0; }
.velocity .vfoot b { color: var(--mint); font-weight: 600; }
@media (prefers-reduced-motion: reduce) { .velocity .vfill { width: var(--w, 100%); } }

/* ---------- Guardrail cards ---------- */
.guardrail-icon {
  background: linear-gradient(135deg, rgba(52, 211, 153, 0.14), rgba(34, 211, 238, 0.12));
  border-color: rgba(52, 211, 153, 0.3);
  color: var(--mint);
}
.card .guard-tag {
  display: inline-flex; align-items: center; gap: 0.4rem;
  margin-top: 1.05rem;
  font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.06em;
  color: var(--mint);
}
.card .guard-tag svg { width: 13px; height: 13px; flex: none; }

/* ---------- Stat band (AI page) ---------- */
.stat-band {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.4rem;
  text-align: center;
  border-block: 1px solid var(--border);
  padding: 2rem 0;
}
.stat-band .stat > b {
  display: block; font-family: var(--font-display); font-size: clamp(1.9rem, 3.4vw, 2.6rem);
  font-weight: 700; letter-spacing: -0.02em;
  background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.stat-band .stat > b span { font: inherit; color: inherit; }
.stat-band .stat > span { font-size: 0.88rem; color: var(--text-muted); }
@media (max-width: 860px) { .stat-band { grid-template-columns: repeat(2, 1fr); } }
