/* ============================================================
   Styld — Design Tokens
   Palette: navy ink + blue→teal brand gradient (per figma image 13)
   ============================================================ */
:root {
  /* ---- Type ---- */
  --font-display: "Bricolage Grotesque", "Plus Jakarta Sans", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body:    "Plus Jakarta Sans", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --font-num:     "Cabinet Grotesk", "Plus Jakarta Sans", system-ui, sans-serif;

  /* ---- Color ---- */
  --ink:        #0a1638;
  --ink-soft:   #5a6580;
  --ink-faint:  #8a93aa;
  --bg:         #ffffff;
  --bg-soft:    #f7f9fc;
  --border:     rgba(10, 22, 56, 0.10);
  --border-strong: rgba(10, 22, 56, 0.15);

  /* ---- Brand ---- */
  --brand-1:    #3A50BF;   /* blue */
  --brand-2:    #3A50BF;
  --brand-3:    #29ADB2;   /* teal */
  --brand-grad: linear-gradient(135deg, #3A50BF 0%, #29ADB2 100%);
  --brand-grad-soft: linear-gradient(135deg, rgba(58,80,191,0.10) 0%, rgba(41,173,178,0.10) 100%);

  /* ---- Accent ---- */
  --success:    #22c55e;

  /* ---- Layout ---- */
  --container: 1320px;
  --gutter:    clamp(1.25rem, 4vw, 3.5rem);
  --nav-h:     88px;

  /* ---- Radii ---- */
  --r-sm:   8px;
  --r-md:   14px;
  --r-lg:   24px;
  --r-pill: 999px;

  /* ---- Shadows ---- */
  --shadow-cta:    0 8px 22px -8px rgba(58, 80, 191, 0.45);
  --shadow-cta-h:  0 12px 28px -8px rgba(58, 80, 191, 0.65);
  --shadow-btn:    0 12px 28px -10px rgba(58, 80, 191, 0.55);
  --shadow-btn-h:  0 16px 32px -10px rgba(58, 80, 191, 0.70);

  /* ---- Motion ---- */
  --ease:   cubic-bezier(0.22, 1, 0.36, 1);
  --t-fast: 0.18s;
  --t-base: 0.28s;
  --t-slow: 0.45s;

  /* ---- Section rhythm (shared across every section) ---- */
  --sec-pad-y:    clamp(64px, 7vw, 100px);   /* top + bottom padding per section */
  --sec-head-mb:  clamp(32px, 4vw, 56px);    /* gap between heading block and section content */
  --eyebrow-mb:   18px;                       /* gap between eyebrow and h2 */
  --title-size:   clamp(2rem, 4vw, 3.25rem); /* section h2 size */
  --title-lh:     1.12;
  --title-track:  -0.022em;
}


/* ============================================================
   Reset
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  scroll-behavior: smooth;
  /* Offset for sticky nav so #anchor jumps don't hide under the navbar */
  scroll-padding-top: calc(var(--nav-h) + 12px);
}
html, body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* `clip` instead of `hidden` so descendant `position: sticky` keeps
     working — `overflow: hidden` creates a scroll container which kills
     sticky positioning. `clip` clips overflow without that side effect. */
  overflow-x: clip;
}
img, svg { display: block; max-width: 100%; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

/* Remove the iOS gray tap-flash on interactive elements */
a, button { -webkit-tap-highlight-color: transparent; }

/* ============================================================
   Tactile press feedback on every CTA button class. Scales down
   slightly on :active to feel responsive. Section-specific
   hover transforms layer on top of this — no conflicts.
   ============================================================ */
.btn-primary,
.btn-secondary,
.tiy__cta,
.pricing__cta,
.mab-cta__btn,
.itw__store-btn,
.site-nav__cta {
  transition: transform var(--t-fast) var(--ease),
              box-shadow var(--t-base) var(--ease),
              background var(--t-base) var(--ease),
              border-color var(--t-base) var(--ease),
              filter var(--t-base) var(--ease);
}
.btn-primary:active,
.btn-secondary:active,
.tiy__cta:active,
.pricing__cta:active,
.mab-cta__btn:active,
.itw__store-btn:active,
.site-nav__cta:active {
  transform: scale(0.98);
  transition-duration: 0.06s;
}

/* Global focus baseline — accessible keyboard navigation on every interactive element */
:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--brand-1);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Better text selection */
::selection {
  background: rgba(58, 80, 191, 0.18);
  color: var(--ink);
}

/* ============================================================
   Section reveal stagger — child elements appear in sequence when
   their parent .X is .is-in. Sections need to use these conventions:
   .X__eyebrow / .X__title / .X__sub / .X__body / .X__cta with
   `opacity: 0; transform: translateY(14px)` initially.
   Then each section's CSS adds the `.X.is-in .X__*` rules that
   reset opacity/transform; the delay is shared via this utility.
   ============================================================ */
.is-in [data-stagger="1"] { transition-delay: 0.05s; }
.is-in [data-stagger="2"] { transition-delay: 0.12s; }
.is-in [data-stagger="3"] { transition-delay: 0.20s; }
.is-in [data-stagger="4"] { transition-delay: 0.28s; }
.is-in [data-stagger="5"] { transition-delay: 0.36s; }
.is-in [data-stagger="6"] { transition-delay: 0.44s; }

/* CSS-only animation pause for off-screen sections (paired with
   scripts/shared/pause-offscreen.js). Saves CPU/battery on long pages. */
.is-paused, .is-paused *, .is-paused *::before, .is-paused *::after {
  animation-play-state: paused !important;
}

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

