/* =============================================================================
   PITCO Quizzes — Shared Foundation
   Reset, brand tokens and base typography extracted from the PITCO website.
   Quiz pages and reports own their layout; no website navigation is included.
   ============================================================================= */

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

* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

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

input,
button,
textarea,
select { font: inherit; color: inherit; }

button { background: none; border: 0; cursor: pointer; }

ul[class],
ol[class] { list-style: none; padding: 0; }

a { color: inherit; }


/* =============================================================================
   2. CUSTOM PROPERTIES
   ============================================================================= */
:root {
  /* --- Color: surfaces --- */
  --c-bg:          #ffffff;
  --c-bg-alt:      #f5f7fa;
  --c-bg-dark:     #071323;
  --c-bg-dark-2:   #0c1e38;

  /* --- Color: ink --- */
  --c-ink:         #1d1d1f;
  --c-ink-2:       #515154;
  --c-ink-3:       #86868b;   /* large text only — fails AA for body copy */
  --c-on-dark:     #f5f5f7;
  --c-on-dark-2:   rgba(245, 245, 247, 0.66);  /* large text only */

  /* --- Color: brand --- */
  --c-accent:        #2EA3F2;
  --c-accent-hover:  #1B8CD6;
  --c-accent-ink:    #1B76B5;   /* AA-safe accent for small text on light (4.9:1) */
  --c-gold:          #F0C815;
  --c-gold-hover:    #d9b40c;

  /* --- Color: lines --- */
  --c-line:        rgba(0, 0, 0, 0.10);
  --c-line-dark:   rgba(255, 255, 255, 0.14);

  /* --- Typography: families --- */
  --f-display: "Space Grotesk", "Helvetica Neue", Arial, sans-serif;
  --f-body:    "Inter", "Helvetica Neue", Arial, sans-serif;
  --f-mono:    "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* --- Typography: clamp() scale --- */
  --t-eyebrow: clamp(0.75rem, 0.72rem + 0.12vw, 0.84rem);
  --t-body:    clamp(1rem, 0.96rem + 0.22vw, 1.19rem);
  --t-lead:    clamp(1.25rem, 1.06rem + 0.85vw, 1.75rem);
  --t-h3:      clamp(1.5rem, 1.22rem + 1.25vw, 2.25rem);
  --t-h2:      clamp(2rem, 1.42rem + 2.6vw, 3.5rem);
  --t-h1:      clamp(2.75rem, 1.62rem + 5vw, 5.5rem);
  --t-mega:    clamp(3.5rem, 1.4rem + 9.4vw, 8rem);

  /* --- Radii --- */
  --r-sm:   8px;
  --r-md:   14px;
  --r-lg:   22px;
  --r-xl:   32px;
  --r-pill: 999px;

  /* --- Elevation (two shadows only) --- */
  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.06), 0 8px 24px rgba(0, 0, 0, 0.06);
  --shadow-2: 0 8px 24px rgba(0, 0, 0, 0.10), 0 32px 64px rgba(0, 0, 0, 0.14);

  /* --- Spacing (8px scale) --- */
  --sp-1: 0.5rem;
  --sp-2: 1rem;
  --sp-3: 1.5rem;
  --sp-4: 2rem;
  --sp-5: 3rem;
  --sp-6: 4rem;
  --sp-7: 6rem;
  --section-pad: clamp(5rem, 8vw, 10rem);

  /* --- Layout --- */
  --w-max:   1200px;
  --w-wide:  1440px;
  --w-text:  680px;
  --gutter:  clamp(1.25rem, 4vw, 2.5rem);
  --nav-h:   58px;

  /* --- Motion --- */
  --ease-out:  cubic-bezier(0.16, 1, 0.3, 1);
  --dur-fast:  150ms;
  --dur-mid:   300ms;
  --dur-slow:  500ms;
}

/* =============================================================================
   3. GLOBAL
   ============================================================================= */
body {
  font-family: var(--f-body);
  font-size: var(--t-body);
  font-weight: 400;
  line-height: 1.6;
  color: var(--c-ink);
  background: var(--c-bg);
}

h1, h2, h3, h4 {
  font-family: var(--f-display);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.02em;
  text-wrap: balance;
  color: var(--c-ink);
}

h1 { font-size: var(--t-h1); }
h2 { font-size: var(--t-h2); }
h3 { font-size: var(--t-h3); }
h4 { font-size: var(--t-lead); }

/* Weight 700 reserved for the largest display sizes only (verdict §2). */
.h1--bold,
h1.is-bold { font-weight: 700; }

p { line-height: 1.6; }

a {
  text-decoration: none;
  transition: color var(--dur-fast) var(--ease-out);
}

strong { font-weight: 600; }

::selection {
  background: var(--c-accent);
  color: #fff;
}

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

/* Skip link */
.skip-link {
  position: absolute;
  top: -100px;
  left: var(--gutter);
  z-index: 1000;
  padding: 0.75rem 1.25rem;
  background: var(--c-ink);
  color: #fff;
  border-radius: var(--r-sm);
  font-weight: 600;
  transition: top var(--dur-fast) var(--ease-out);
}
.skip-link:focus { top: 0.75rem; }

@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;
    scroll-behavior: auto !important;
  }
}
