/*
  Umschuldo design tokens
  -----------------------
  Single source of truth for colour, fonts, type scale, spacing and motion.
  Nothing else in the project may define a colour or a font family.
  See /brand/BRAND.md for the rules behind these values.
*/

/* ── Fonts (self-hosted, latin subset, SIL OFL – licences in /assets/fonts/) ── */
@font-face {
  font-family: "Sora";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../assets/fonts/sora-500.woff2") format("woff2");
}
@font-face {
  font-family: "Sora";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../assets/fonts/sora-700.woff2") format("woff2");
}
@font-face {
  font-family: "Instrument Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../assets/fonts/instrument-sans-400.woff2") format("woff2");
}
@font-face {
  font-family: "Instrument Sans";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../assets/fonts/instrument-sans-500.woff2") format("woff2");
}
@font-face {
  font-family: "Instrument Sans";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../assets/fonts/instrument-sans-700.woff2") format("woff2");
}

:root {
  /* ── Colour: the complete palette ─────────────────────────────────────── */
  --brand: #4A2BE0;        /* Umschuldo Violett – signature colour, hero, primary buttons */
  --brand-dark: #3418B8;   /* hover / pressed */
  --ink: #15123B;          /* main text, footer background */
  --tint: #F4F2FF;         /* light section background (calculator) */
  --lavender: #CFC6FF;     /* small highlights on violet only (check marks, hover) */
  --white: #FFFFFF;
  --line: rgba(21, 18, 59, 0.12); /* 1px dividers */

  /* Same colours, only with alpha – no new hues. */
  --ink-soft: rgba(21, 18, 59, 0.72);       /* secondary text */
  --line-strong: rgba(21, 18, 59, 0.56);    /* form control borders (3:1 against the page) */
  --line-inverse: rgba(255, 255, 255, 0.24);/* 1px dividers on --brand and --ink */
  --white-soft: rgba(255, 255, 255, 0.88);  /* secondary text on --brand */
  --white-muted: rgba(255, 255, 255, 0.76); /* secondary text on --ink */

  /* ── Fonts ────────────────────────────────────────────────────────────── */
  --font-display: "Sora", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Instrument Sans", "Helvetica Neue", Arial, sans-serif;

  /* ── Type scale (round 2: compact) ─────────────────────────────────────
     H1 56/34, H2 36/26, H3 20/18, body 16, small 13–14. Mobile values are the
     defaults; larger screens override them in the media queries below. ───── */
  --fs-xs: 0.8125rem;     /* 13  hints, disclaimer, small print */
  --fs-sm: 0.875rem;      /* 14  nav, secondary text */
  --fs-md: 0.9375rem;     /* 15  labels */
  --fs-base: 1rem;        /* 16  body */
  --fs-lead: 1rem;        /* 16  subline (18 on desktop) */
  --fs-h3: 1.125rem;      /* 18  → 20 */
  --fs-h2: 1.625rem;      /* 26  → 36 */
  --fs-h1: 2.125rem;      /* 34  → 56 */
  --fs-num: 1.5rem;       /* 24  calculator results (fluid inside the panel) */
  --fs-step: 2.5rem;      /* 40  step numerals */

  --lh-body: 1.55;
  --lh-head: 1.15;
  --lh-tight: 1.05;
  --tr-display: -0.03em;
  --tr-head: -0.025em;

  /* ── Spacing: 8 px grid ───────────────────────────────────────────────── */
  --s-1: 0.5rem;   /*   8 */
  --s-2: 1rem;     /*  16 */
  --s-3: 1.5rem;   /*  24 */
  --s-4: 2rem;     /*  32 */
  --s-5: 2.5rem;   /*  40 */
  --s-6: 3rem;     /*  48 */
  --s-8: 4rem;     /*  64 */
  --s-9: 4.5rem;   /*  72 */
  --s-10: 5rem;    /*  80 */

  --gutter: var(--s-2);
  --section-pad: var(--s-6);   /* 48 mobile → 72 desktop */
  --container: 70rem;          /* 1120 */
  --control-h: 3rem;           /* 48 – buttons */
  --overlap: var(--s-3);       /* how far the calculator panel overlaps the hero: 24 mobile → 80 desktop */

  /* ── Shape, elevation and motion ──────────────────────────────────────── */
  --radius: 4px;               /* the radius everywhere … */
  --radius-panel: 8px;         /* … except the one calculator panel */
  --shadow-panel: 0 24px 48px rgba(21, 18, 59, 0.18); /* calculator panel */
  --shadow-panel-up: 0 -24px 48px rgba(21, 18, 59, 0.18); /* same shadow for a panel pinned to the bottom (cookie sheet) */
  --scrim: rgba(21, 18, 59, 0.5);                      /* backdrop behind the cookie settings */
  --t-fast: 150ms;
  --t-med: 200ms;
  --t-number: 250ms;           /* soft number change, max 300 */
  --ease: cubic-bezier(0.2, 0, 0, 1);

  /* Focus ring colour – overridden on violet and ink backgrounds. */
  --focus: var(--brand);
}

@media (min-width: 768px) {
  :root {
    --gutter: var(--s-4);
    --section-pad: var(--s-9);
    --fs-lead: 1.125rem;     /* 18 */
    --fs-h3: 1.25rem;        /* 20 */
    --fs-h2: 2.25rem;        /* 36 */
    --fs-h1: 2.75rem;        /* 44 (tablet) */
  }
}

@media (min-width: 960px) {
  :root {
    --overlap: var(--s-10);  /* 80 */
    /* two-column hero: 56 once the container reaches 1120, scaled down before that */
    --fs-h1: clamp(2.5rem, (100vw - 6rem) * 0.0495, 3.5rem);
  }
}

@media (min-width: 1216px) {
  :root {
    --gutter: var(--s-6);
  }
}
