/* ═══════════════════════════════════════════════════════════════════
   Palette — rebrand the whole site by editing these variables.
   All pairings below hold ≥ 4.5:1 contrast on their backgrounds.
   ═══════════════════════════════════════════════════════════════════ */
:root {
  --bg: #0a0f14;            /* page background */
  --surface: #101820;       /* cards, alt sections */
  --surface-2: #16212c;     /* raised elements, inputs */
  --border: #24313e;        /* hairlines */
  --text: #e8edf2;          /* body text on --bg: 15.8:1 */
  --text-muted: #9fb0bf;    /* secondary text on --bg: 8.0:1 */
  --accent: #38e8b0;        /* brand accent on --bg: 11.3:1 */
  --accent-strong: #22c795; /* hover shade */
  --on-accent: #04110c;     /* text on accent buttons: 10.9:1 */
  --danger: #ff8a80;        /* error text on --bg: 8.4:1 */
  --ok: #7fe0a7;            /* success text on --bg: 10.7:1 */

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --radius: 10px;
  --transition: 200ms ease;
  --container: 1120px;
}

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

html {
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  margin: 0;
  font-family: var(--font);
  /* Page color lives on <html> so the fixed matrix-rain canvas
     (z-index -1, added by effects.js) can show through. */
  background: transparent;
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent-strong); }

h1, h2, h3 { line-height: 1.15; margin: 0 0 0.5em; letter-spacing: -0.02em; }
h1 { font-size: clamp(2rem, 5vw, 3.4rem); font-weight: 800; }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 700; }
h3 { font-size: 1.15rem; font-weight: 700; }
p { margin: 0 0 1em; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}
.container.narrow { max-width: 720px; }
.center { text-align: center; }

/* ── Header ─────────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 64px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--text);
  letter-spacing: -0.01em;
}
.brand:hover { color: var(--accent); }
.site-nav { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.site-nav a {
  color: var(--text-muted);
  padding: 8px 12px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: color var(--transition), background var(--transition);
}
.site-nav a:hover { color: var(--text); background: var(--surface-2); }
.site-nav a.active { color: var(--text); }
.site-nav .nav-cta {
  color: var(--on-accent);
  background: var(--accent);
  margin-left: 6px;
}
.site-nav .nav-cta:hover { background: var(--accent-strong); color: var(--on-accent); }

/* ── Hero / page heads ──────────────────────────────────────────── */
.hero { padding: 96px 0 72px; border-bottom: 1px solid var(--border); }
.page-head { padding: 72px 0 24px; }
.eyebrow {
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.8rem;
  font-weight: 700;
  margin-bottom: 16px;
}
.lede { color: var(--text-muted); font-size: 1.15rem; max-width: 640px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }
.center-actions { justify-content: center; }

/* ── Buttons ────────────────────────────────────────────────────── */
.btn {
  display: inline-block;
  padding: 12px 22px;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 0.98rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background var(--transition), color var(--transition),
              border-color var(--transition), transform 150ms ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-strong); color: var(--on-accent); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

/* ── Sections / cards ───────────────────────────────────────────── */
.section { padding: 72px 0; }
.section-alt { background: var(--surface); border-block: 1px solid var(--border); }
.section-title { margin-bottom: 32px; }

.grid { display: grid; gap: 20px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  transition: border-color var(--transition), transform var(--transition);
}
.section-alt .card { background: var(--surface-2); }
.card:hover { border-color: var(--accent); transform: translateY(-2px); }
.card p { color: var(--text-muted); margin-bottom: 0; }
.card-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 18px;
  flex-shrink: 0;
}

/* ── Process ────────────────────────────────────────────────────── */
.process-step { padding: 8px 0; }
.step-num {
  display: inline-block;
  color: var(--accent);
  font-weight: 800;
  font-size: 0.9rem;
  letter-spacing: 0.1em;
  margin-bottom: 10px;
}
.process-step p { color: var(--text-muted); margin: 0; }

/* ── Stats / placeholders ───────────────────────────────────────── */
.stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}
.stat-value {
  display: block;
  font-size: 2rem;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: -0.02em;
}
.stat-label { color: var(--text-muted); font-size: 0.95rem; }
.stat-label em { font-style: normal; opacity: 0.75; }

.pricing-note { color: var(--text-muted); font-size: 0.9rem; }

/* ── CTA band ───────────────────────────────────────────────────── */
.cta-band { background: var(--surface); border-top: 1px solid var(--border); }
.cta-inner { text-align: center; max-width: 640px; }
.cta-inner p { color: var(--text-muted); }

/* ── Services detail / pricing ──────────────────────────────────── */
.service-detail {
  display: flex;
  gap: 24px;
  padding: 32px 0;
  border-bottom: 1px solid var(--border);
}
.service-detail:last-child { border-bottom: none; }
.service-detail p { color: var(--text-muted); }
.service-detail ul { color: var(--text-muted); margin: 0; padding-left: 20px; }
.service-detail li { margin-bottom: 6px; }

.pricing-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px;
  max-width: 640px;
}
.pricing-model {
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.85rem;
  color: var(--accent);
}
.pricing-figures {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  margin: 16px 0;
}
.pricing-plus { font-size: 1.6rem; color: var(--text-muted); font-weight: 300; }
.pricing-detail { color: var(--text-muted); }

/* ── Forms ──────────────────────────────────────────────────────── */
form { margin-top: 8px; }
.field { margin-bottom: 18px; display: flex; flex-direction: column; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
label { font-weight: 600; font-size: 0.92rem; margin-bottom: 6px; }
input, select, textarea {
  font: inherit;
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 11px 12px;
  width: 100%;
  transition: border-color var(--transition);
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
}
textarea { resize: vertical; }

.form-status {
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 18px;
  border: 1px solid var(--border);
  background: var(--surface-2);
}
.form-status-error { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 40%, var(--border)); }
.form-status-ok { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 40%, var(--border)); }
.contact-alt { color: var(--text-muted); margin-top: 24px; }
.form-consent { color: var(--text-muted); font-size: 0.85rem; margin-top: 14px; }

/* ── Legal pages ────────────────────────────────────────────────── */
.legal-content h2 { font-size: 1.25rem; margin-top: 2em; }
.legal-content h2:first-child { margin-top: 0; }
.legal-content p { color: var(--text-muted); }
.legal-content p a { overflow-wrap: anywhere; }

/* ── Footer ─────────────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 48px 0 24px;
  background: var(--surface);
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}
.footer-name { font-weight: 800; font-size: 1.05rem; }
.footer-tagline { color: var(--text-muted); margin: 6px 0 0; }
.footer-links { display: flex; gap: 48px; flex-wrap: wrap; }
.footer-links nav, .footer-socials { display: flex; flex-direction: column; gap: 8px; }
.footer-links a { color: var(--text-muted); font-size: 0.95rem; }
.footer-links a:hover { color: var(--accent); }
.footer-legal { margin-top: 36px; padding-top: 18px; border-top: 1px solid var(--border); }
.footer-legal p { color: var(--text-muted); font-size: 0.85rem; margin: 0 0 10px; }
.footer-legal p:last-child { margin-bottom: 0; }
.footer-disclaimer { opacity: 0.85; max-width: 860px; }

/* ── 404 ────────────────────────────────────────────────────────── */
.notfound { padding: 110px 0; }

/* ── Motion & effects (progressive enhancement via effects.js) ────
   The .fx class is added to <html> by /js/effects.js only when the
   visitor does NOT prefer reduced motion. Nothing here affects the
   no-JS or reduced-motion experience. */

.fx-matrix {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

.fx-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-strong));
  transform-origin: 0 50%;
  transform: scaleX(0);
  z-index: 50;
  pointer-events: none;
}

.site-header { transition: box-shadow var(--transition); }
.site-header.scrolled { box-shadow: 0 10px 32px rgba(0, 0, 0, 0.5); }

@media (prefers-reduced-motion: no-preference) {
  /* Hero entrance cascade */
  .fx .hero .eyebrow,
  .fx .hero h1,
  .fx .hero .lede,
  .fx .hero .hero-actions {
    opacity: 0;
    animation: fx-rise 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
  }
  .fx .hero h1 { animation-delay: 0.12s; }
  .fx .hero .lede { animation-delay: 0.24s; }
  .fx .hero .hero-actions { animation-delay: 0.36s; }

  @keyframes fx-rise {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: none; }
  }

  /* Floating accent glows behind the hero */
  .fx .hero { position: relative; overflow: hidden; }
  .fx .hero .container { position: relative; z-index: 1; }
  .fx .hero::before,
  .fx .hero::after {
    content: "";
    position: absolute;
    width: 540px;
    height: 540px;
    border-radius: 50%;
    background: radial-gradient(circle,
      color-mix(in srgb, var(--accent) 14%, transparent), transparent 65%);
    pointer-events: none;
  }
  .fx .hero::before {
    top: -240px;
    right: -140px;
    animation: fx-float 16s ease-in-out infinite alternate;
  }
  .fx .hero::after {
    bottom: -280px;
    left: -180px;
    animation: fx-float 21s ease-in-out infinite alternate-reverse;
  }
  @keyframes fx-float {
    from { transform: translate3d(0, 0, 0) scale(1); }
    to { transform: translate3d(50px, 36px, 0) scale(1.18); }
  }

  /* Headline underline draw (span injected by effects.js) */
  .hl { position: relative; }
  .hl::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -0.08em;
    height: 0.12em;
    border-radius: 3px;
    background: linear-gradient(90deg, var(--accent), var(--accent-strong));
    transform: scaleX(0);
    transform-origin: 0 50%;
    animation: fx-draw 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) 0.95s forwards;
  }
  @keyframes fx-draw { to { transform: scaleX(1); } }

  /* Scroll reveal */
  .fx [data-reveal] {
    opacity: 0;
    transform: translateY(26px);
    transition: opacity 0.6s ease, transform 0.65s cubic-bezier(0.2, 0.7, 0.2, 1);
    transition-delay: var(--fx-delay, 0s);
  }
  .fx [data-reveal].fx-in { opacity: 1; transform: none; }

  /* Cursor spotlight on cards (position vars set by effects.js) */
  .card, .stat, .pricing-card { position: relative; overflow: hidden; }
  .fx .card::after,
  .fx .stat::after,
  .fx .pricing-card::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0;
    background: radial-gradient(240px circle at var(--mx, 50%) var(--my, 50%),
      color-mix(in srgb, var(--accent) 13%, transparent), transparent 70%);
    transition: opacity 250ms ease;
  }
  .fx .card:hover::after,
  .fx .stat:hover::after,
  .fx .pricing-card:hover::after { opacity: 1; }

  /* Button click ripple */
  .btn { position: relative; overflow: hidden; }
  .fx-ripple {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    background: radial-gradient(circle,
      color-mix(in srgb, #ffffff 45%, transparent), transparent 65%);
    transform: translate(-50%, -50%) scale(0);
    animation: fx-ripple 600ms ease-out forwards;
  }
  @keyframes fx-ripple {
    to { transform: translate(-50%, -50%) scale(1); opacity: 0; }
  }

  /* Letter cascade for non-numeric stat values */
  .fx-letter {
    display: inline-block;
    opacity: 0;
    transform: translateY(0.6em);
    transition: opacity 0.4s ease, transform 0.5s cubic-bezier(0.2, 0.7, 0.2, 1);
    transition-delay: var(--fx-delay, 0s);
    white-space: pre;
  }
  .fx-in .fx-letter { opacity: 1; transform: none; }

  /* Confetti particles (animated via Web Animations API) */
  .fx-confetti {
    position: fixed;
    z-index: 100;
    pointer-events: none;
    border-radius: 2px;
  }

  /* 404 glitch */
  .glitch { position: relative; display: inline-block; }
  .glitch::before,
  .glitch::after {
    content: attr(data-text);
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    opacity: 0;
  }
  .glitch::before { color: var(--accent); animation: fx-glitch 2.6s infinite steps(1, end); }
  .glitch::after { color: var(--danger); animation: fx-glitch 3.4s infinite steps(1, end) reverse; }
  @keyframes fx-glitch {
    0%, 88% { opacity: 0; transform: none; }
    89% { opacity: 0.85; transform: translate(3px, -2px); }
    91% { opacity: 0.85; transform: translate(-3px, 1px); }
    93% { opacity: 0.85; transform: translate(2px, 2px); }
    95% { opacity: 0; transform: none; }
  }
}

/* ── Responsive ─────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .grid-3 { grid-template-columns: 1fr; }
  .service-detail { flex-direction: column; gap: 12px; }
}

@media (max-width: 560px) {
  .hero { padding: 64px 0 48px; }
  .section { padding: 52px 0; }
  .field-row { grid-template-columns: 1fr; gap: 0; }
  .header-inner { flex-direction: column; padding-block: 10px; }
  .pricing-card { padding: 24px; }
  .footer-links { gap: 28px; }
}
