/* page-base.css — drop-in responsive foundation for any published page.
 *
 * Inline this into the page's <style>, then override the :root variables to
 * theme it (Snowball brand or a custom/client palette). It gives every page a
 * correct mobile + desktop baseline — fluid type, spacing, container width,
 * responsive grids, image scaling, table scroll, focus states, reduced motion —
 * so you never re-author this boilerplate and pages are responsive by default.
 *
 * Theme it by changing only the variables in the first :root block. */

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

:root {
  /* ---- Theme these per design ------------------------------------------- */
  --bg: #ffffff;
  --fg: #14151a;
  --muted: #5b6170;
  --accent: #022AFD;            /* Snowball Azul Tech (default) */
  --surface: #f6f7f8;
  --border: rgba(0,0,0,.10);
  --font-body: "Neurial Grotesk", Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-head: var(--font-body);
  --radius: 14px;
  --maxw: 1120px;               /* content column cap */

  /* ---- Fluid type scale (mobile -> desktop, no media queries needed) ----- */
  --step--1: clamp(.83rem, .80rem + .15vw, .94rem);
  --step-0:  clamp(1rem, .95rem + .25vw, 1.13rem);    /* body, >=16px on mobile */
  --step-1:  clamp(1.2rem, 1.1rem + .6vw, 1.6rem);
  --step-2:  clamp(1.5rem, 1.3rem + 1.1vw, 2.3rem);
  --step-3:  clamp(1.9rem, 1.5rem + 2.2vw, 3.3rem);
  --step-4:  clamp(2.3rem, 1.7rem + 3.6vw, 4.6rem);   /* hero headline */

  /* ---- Spacing scale ---------------------------------------------------- */
  --s-1:.5rem; --s-2:.75rem; --s-3:1rem; --s-4:1.5rem; --s-5:2.5rem; --s-6:4rem;
}

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.6;
  color: var(--fg);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;           /* safety net against accidental horizontal scroll */
}

img, picture, video, canvas, svg { display: block; max-width: 100%; height: auto; }
h1, h2, h3 { font-family: var(--font-head); line-height: 1.1; font-weight: 700; text-wrap: balance; }
h1 { font-size: var(--step-4); }
h2 { font-size: var(--step-2); }
h3 { font-size: var(--step-1); }
p, li { max-width: 70ch; }      /* readable line length (left-align body copy) */
a { color: var(--accent); }
.eyebrow { font-size: var(--step--1); text-transform: uppercase; letter-spacing: .12em; color: var(--muted); font-weight: 600; }
.muted { color: var(--muted); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---- Layout helpers ----------------------------------------------------- */
.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: clamp(1rem, 4vw, 2.5rem); }
section { padding-block: clamp(2.5rem, 6vw, 6rem); }
.stack > * + * { margin-top: var(--s-3); }
.grid { display: grid; gap: clamp(1rem, 3vw, 2rem); }
/* auto-collapsing columns: 2-up / 3-up on desktop, single column on phones */
.grid.cols-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); }

/* ---- Common components -------------------------------------------------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: var(--s-4); }
.btn  { display: inline-flex; align-items: center; justify-content: center; min-height: 44px;
        padding: .7rem 1.4rem; border-radius: var(--radius); background: var(--accent); color: #fff;
        font-weight: 600; text-decoration: none; border: 0; cursor: pointer; }
.btn--ghost { background: transparent; color: var(--accent); border: 1px solid var(--accent); }

/* tables never widen the page — they scroll inside their own box */
.table-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { border-collapse: collapse; width: 100%; }
th, td { padding: var(--s-2) var(--s-3); border-bottom: 1px solid var(--border); text-align: left; }

/* ---- Small screens & accessibility ------------------------------------- */
@media (max-width: 640px) {
  a, button, .btn { min-height: 44px; }   /* comfortable tap targets */
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important; animation-iteration-count: 1 !important;
    transition-duration: .001ms !important; scroll-behavior: auto !important;
  }
}
