/* =========================================================
   YourWebDesignAgency — base.css
   Design tokens, reset, typography, layout primitives.
   Every value here is taken 1:1 from the original stylesheet.
   Derived values are marked with "derived:" and explained.
   See DESIGN-SYSTEM.md for the full documentation.
   ========================================================= */

/* ---------- Fonts (self-hosted, no external requests) ---------- */
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('../fonts/space-grotesk-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('../fonts/space-grotesk-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308,
    U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113,
    U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 100 800;
  font-display: swap;
  src: url('../fonts/jetbrains-mono-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 100 800;
  font-display: swap;
  src: url('../fonts/jetbrains-mono-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308,
    U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113,
    U+2C60-2C7F, U+A720-A7FF;
}

/* =========================================================
   TOKENS
   ========================================================= */
:root {
  /* --- Surfaces --- */
  --bg: #06070a;
  --bg-alt: #08090d;
  --bg-header: rgba(8, 9, 13, 0.82);   /* derived: --bg-alt at 82% for the sticky header */

  /* --- Fills (white overlays, six steps as used in the original) --- */
  --fill-1: rgba(255, 255, 255, 0.03);
  --fill-2: rgba(255, 255, 255, 0.045);
  --fill-3: rgba(255, 255, 255, 0.05);
  --fill-4: rgba(255, 255, 255, 0.06);
  --fill-5: rgba(255, 255, 255, 0.1);
  --fill-solid: rgba(255, 255, 255, 0.9);   /* active switch / filter chip */
  --panel: var(--fill-2);

  /* --- Glass gradients (the 150deg angle is constant across the design) --- */
  --glass: linear-gradient(150deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.015));
  --glass-mid: linear-gradient(150deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02));
  --glass-strong: linear-gradient(150deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.02));

  /* --- Lines --- */
  --panel-line: rgba(255, 255, 255, 0.5);
  --line-bright: rgba(255, 255, 255, 0.7);
  --line-strong: rgba(255, 255, 255, 0.55);
  --line-med-2: rgba(255, 255, 255, 0.4);
  --line-med: rgba(255, 255, 255, 0.35);
  --line-med-3: rgba(255, 255, 255, 0.3);
  --line-soft-2: rgba(255, 255, 255, 0.28);
  --line-soft: rgba(255, 255, 255, 0.1);
  --line-hair: rgba(255, 255, 255, 0.08);

  /* --- Text --- */
  --text: #eef1f6;
  --text-2: #cfd6e2;
  --muted: #a7b0bf;
  --muted-2: #9aa3b2;
  --muted-3: #98a2b1;
  --muted-4: #8f99a9;
  --dim: #6f7889;
  --dim-2: #4d5566;
  --pure: #ffffff;
  --on-light: #0a0b0f;

  /* --- Accent --- */
  --accent: #6ea3f2;
  --accent-bright: #9ac2ff;
  --accent-deep: #2d5aa8;
  --accent-glow: rgba(74, 124, 214, 0.55);

  /* --- Blue tints (derived: --accent 110,163,242 at the same opacity steps
     as the white --fill-* / --line-* scale, so quiet surfaces read as blue-grey
     instead of grey without introducing a second hue. See DESIGN-SYSTEM.md §6) --- */
  --tint-fill: rgba(110, 163, 242, 0.06);
  --tint-fill-2: rgba(110, 163, 242, 0.1);
  --tint-line: rgba(110, 163, 242, 0.22);
  --tint-line-strong: rgba(110, 163, 242, 0.42);
  --shadow-lift: 0 22px 44px -28px rgba(45, 90, 168, 0.9);

  /* --- Status (derived, see DESIGN-SYSTEM.md §6) ---
     --accent is hsl(217, 83%, 69%). Rotating the hue to 12deg while keeping
     saturation and lightness gives a warm counterpart in the same contrast
     class (7.4:1 on --bg). Used only for form validation errors. */
  --danger: #f2836e;
  --danger-bright: #ffb0a0;

  /* --- Type --- */
  --font: 'Space Grotesk', 'Segoe UI', Helvetica, Arial, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Consolas, monospace;

  /* --- Radii --- */
  --radius-pill: 999px;
  --radius-panel: 22px;
  --radius-panel-sm: 20px;
  --radius-card: 18px;
  --radius-md: 14px;
  --radius-btn: 12px;
  --radius-sm: 10px;
  --radius-xs: 9px;

  /* --- Shadows --- */
  --shadow-card: 0 36px 70px -36px rgba(45, 90, 168, 0.85);
  --shadow-panel: 0 40px 80px -40px rgba(45, 90, 168, 0.9);
  --shadow-panel-lg: 0 48px 90px -44px rgba(45, 90, 168, 0.9);
  --shadow-btn: 0 24px 50px -24px rgba(255, 255, 255, 0.5);
  --shadow-btn-hover: 0 28px 60px -24px rgba(255, 255, 255, 0.65);
  --shadow-drop: 0 30px 60px -30px #000;

  /* --- Containers --- */
  --wrap: 1240px;
  --wrap-narrow: 1080px;
  --wrap-faq: 860px;
  --wrap-text: 820px;
  --wrap-thanks: 720px;
  --wrap-header: 1400px;

  /* --- Spacing (values switch at the 900px breakpoint, exactly as before) --- */
  --pad-x: 48px;
  --sec-y: 70px;
  --sec-yb: 20px;
  --head-y: 26px;
  --hero-yt: 76px;
  --hero-yb: 40px;
  --foot-yt: 56px;
  --foot-yb: 40px;
  --gap: 24px;

  /* --- Motion --- */
  --t: 0.18s ease;
}

@media (max-width: 900px) {
  :root {
    --pad-x: 24px;
    --sec-y: 52px;
    --sec-yb: 16px;
    --head-y: 20px;
    --hero-yt: 48px;
    --hero-yb: 30px;
    --foot-yt: 44px;
    --foot-yb: 32px;
  }
}

/* =========================================================
   RESET / BASE
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  /* The closed mobile nav panel sits just off the right edge. `clip` removes it
     from the scrollable area without creating a scroll container — which is why
     it is used instead of `hidden`: `hidden` here would break the sticky header. */
  overflow-x: clip;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;   /* fallback for browsers without overflow: clip */
  overflow-x: clip;
}

a { color: var(--accent); text-decoration: none; transition: color var(--t); }
a:hover { color: var(--accent-bright); }
img, svg { max-width: 100%; }
h1, h2, h3, h4 { margin: 0; letter-spacing: -0.025em; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }

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

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  padding: 12px 18px; background: var(--pure); color: var(--on-light);
  border-radius: 0 0 var(--radius-sm) 0; font-weight: 600;
}
.skip-link:focus { left: 0; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  clip: rect(0 0 0 0); clip-path: inset(50%);
  overflow: hidden; white-space: nowrap;
}

/* =========================================================
   LAYOUT PRIMITIVES
   ========================================================= */
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--pad-x); }
.wrap-narrow { max-width: var(--wrap-narrow); margin: 0 auto; padding: 0 var(--pad-x); }

.section { position: relative; z-index: 1; padding: var(--sec-y) 0 var(--sec-yb); }
.section-alt { background: var(--bg-alt); border-block: 1px solid var(--line-hair); }

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--gap);
  flex-wrap: wrap;
  margin-bottom: 28px;
}
.section-head h2 {
  position: relative;
  font-size: clamp(26px, 3.4vw, 32px);
  font-weight: 600;
  padding-left: 18px;
}
/* A blue rule beside every section title — the one place where the accent
   appears on all pages, so the palette reads as blue rather than grey. */
.section-head h2::before {
  content: '';
  position: absolute;
  left: 0; top: 0.16em; bottom: 0.16em;
  width: 3px;
  border-radius: 3px;
  background: linear-gradient(180deg, var(--accent-bright), var(--accent-deep));
  box-shadow: 0 0 14px var(--accent-glow);
}
.section-head p { font-size: 16px; line-height: 1.6; color: var(--muted-2); max-width: 640px; margin-top: 10px; }

.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--dim);
}
.eyebrow-accent { color: var(--accent-bright); }

/* "See everything on the full page" link under a section */
.link-more { margin-top: 22px; font-size: 15px; font-weight: 600; }
.link-more a {
  color: var(--accent);
  display: inline-block;
  transition: color var(--t), transform var(--t);
}
.link-more a:hover { color: var(--accent-bright); transform: translateX(4px); }

/* =========================================================
   ANIMATIONS
   ========================================================= */
@keyframes lick { 0%, 100% { opacity: 0.5; } 50% { opacity: 0.9; } }
@keyframes floatY { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }
@keyframes riseIn { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: translateY(0); } }
@keyframes barIn { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes softIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
@keyframes ping {
  0% { transform: scale(1); opacity: 0.55; }
  70%, 100% { transform: scale(2.6); opacity: 0; }
}

/* Scroll reveal — the class is only added by main.js when the browser supports
   IntersectionObserver and the user has not asked for reduced motion. */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity 0.55s ease, transform 0.55s ease; }
.reveal.is-in { opacity: 1; transform: none; }

/* The accent rule beside a section title draws itself once the section arrives. */
.reveal .section-head h2::before { transform: scaleY(0); transform-origin: top; transition: transform 0.5s ease 0.12s; }
.reveal.is-in .section-head h2::before { transform: scaleY(1); }

/* Staggered children — main.js adds .is-staggered and the --i index only when
   the reveal machinery is actually running, so without JS nothing is hidden.
   Deliberately an animation, not a transition: these elements already own a
   transition for their hover lift, and a second one would overwrite it. The
   `backwards` fill holds the start frame during the delay and then hands the
   element back to its normal styles, so hovering still works afterwards. */
.is-staggered > * { opacity: 0; }
.reveal.is-in .is-staggered > *,
.is-staggered.is-in > * {
  opacity: 1;
  animation: riseIn 0.55s ease backwards;
  animation-delay: calc(var(--i, 0) * 70ms);
}

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; }
  /* The global reset shortens durations but not delays — a staggered delay
     would still hold the start frame, so the animation is dropped outright. */
  .is-staggered > * { opacity: 1; }
  .reveal.is-in .is-staggered > *,
  .is-staggered.is-in > * { animation: none; }
  .reveal .section-head h2::before { transform: none; }
  .badge-dot::after { animation: none; opacity: 0; }
}

/* =========================================================
   AMBIENT BACKGROUND (aura blobs)
   ========================================================= */
.aura { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.aura span { position: absolute; border-radius: 50%; display: block; }
.aura-1 {
  left: -8%; top: -12%; width: 780px; height: 620px; filter: blur(60px);
  background: radial-gradient(50% 50% at 50% 50%, rgba(60, 112, 205, 0.7), rgba(38, 60, 122, 0.4) 55%, transparent 74%);
}
.aura-2 {
  right: -12%; top: 10%; width: 680px; height: 560px; filter: blur(70px);
  background: radial-gradient(50% 50% at 50% 50%, rgba(122, 168, 240, 0.45), rgba(48, 70, 136, 0.3) 58%, transparent 76%);
}
.aura-3 {
  left: 20%; top: 62%; width: 900px; height: 520px; filter: blur(80px);
  background: radial-gradient(50% 50% at 50% 50%, rgba(52, 98, 187, 0.5), rgba(32, 52, 108, 0.28) 55%, transparent 75%);
}
.aura-fade {
  position: absolute; inset: 0; border-radius: 0;
  background: linear-gradient(180deg, rgba(6, 7, 10, 0.2), rgba(6, 7, 10, 0.7) 60%, var(--bg));
}

/* =========================================================
   PRINT
   ========================================================= */
@media print {
  .aura, .nav, .btn, .site-header, .breadcrumbs, .cta-band { display: none; }
  body { background: #fff; color: #000; }
}
