/* ============================================================
   AI MASTER CLASS — for Internauts (v3 brand)
   Light-only. Purple ink, olive/green accents on off-white surface.
   ============================================================ */

:root {
  /* Surfaces */
  --color-bg: #f5f5f5;
  --color-surface: #ffffff;
  --color-surface-2: #ffffff;
  --color-surface-offset: #ececec;
  --color-surface-offset-2: #e0e0e0;
  --color-surface-code: #2a1740;      /* code blocks on brand purple */
  --color-divider: #dadada;
  --color-border: #c9c1d3;             /* subtle warm-purple border */

  /* Text — deep purple as body ink */
  --color-text: #432261;
  --color-text-muted: #6f5981;
  --color-text-faint: #9c8ba9;
  --color-text-inverse: #f5f5f5;

  /* Primary — bright green as fill (paired with dark purple text) */
  --color-primary: #00ff00;            /* fills only — never text on white */
  --color-primary-hover: #00e600;
  --color-primary-active: #00cc00;
  --color-primary-highlight: #e6ffe6;  /* very pale green wash for chips */
  --color-primary-ink: #432261;        /* text color used on top of primary fills */

  /* Secondary — olive green, works as text on light bg (AA large) or fill */
  --color-secondary: #638d32;
  --color-secondary-hover: #547628;
  --color-secondary-active: #3f5b1e;
  --color-secondary-highlight: #e8f0d8;

  /* Semantic */
  --color-success: #638d32;
  --color-warning: #a35b12;
  --color-error:   #a12c4a;

  /* Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-full: 9999px;

  /* Transitions */
  --transition-interactive: 180ms cubic-bezier(0.16, 1, 0.3, 1);

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(67, 34, 97, 0.06);
  --shadow-md: 0 4px 14px rgba(67, 34, 97, 0.10);
  --shadow-lg: 0 20px 40px rgba(67, 34, 97, 0.14);

  /* Content widths */
  --content-narrow: 680px;
  --content-default: 1040px;
  --content-wide: 1240px;

  /* Type scale */
  --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --text-sm: clamp(0.875rem, 0.8rem + 0.35vw, 1rem);
  --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --text-lg: clamp(1.125rem, 1rem + 0.75vw, 1.5rem);
  --text-xl: clamp(1.5rem, 1.2rem + 1.25vw, 2.25rem);
  --text-2xl: clamp(2rem, 1.2rem + 2.5vw, 3.5rem);
  --text-3xl: clamp(2.5rem, 1rem + 4vw, 5rem);
  --text-hero: clamp(3rem, 0.5rem + 7vw, 7.5rem);

  /* Spacing */
  --space-1: 0.25rem; --space-2: 0.5rem; --space-3: 0.75rem;
  --space-4: 1rem;    --space-5: 1.25rem; --space-6: 1.5rem;
  --space-8: 2rem;    --space-10: 2.5rem; --space-12: 3rem;
  --space-16: 4rem;   --space-20: 5rem;   --space-24: 6rem;
  --space-32: 8rem;

  /* Fonts */
  --font-display: 'Instrument Serif', 'Iowan Old Style', Georgia, serif;
  --font-body: 'Inter', 'Helvetica Neue', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', ui-monospace, monospace;
}

/* ---------- Reset & base ---------- */
*,*::before,*::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
  scroll-padding-top: 6rem;
}

body {
  min-height: 100dvh;
  line-height: 1.6;
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--color-text);
  background-color: var(--color-bg);
  font-feature-settings: "ss01", "cv11";
}

img, picture, video, canvas, svg { display: block; max-width: 100%; height: auto; }
ul[role="list"], ol[role="list"] { list-style: none; }
input, button, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: none; }

h1, h2, h3, h4, h5, h6 {
  text-wrap: balance; line-height: 1.1;
  letter-spacing: -0.01em; color: var(--color-text);
}
p, li, figcaption { text-wrap: pretty; }

/* Links: olive is legible on light bg (AA large) — for body links */
a { color: var(--color-secondary); text-decoration: none; text-underline-offset: 2px; }
a:hover { color: var(--color-secondary-hover); text-decoration: underline; }

::selection { background: var(--color-primary); color: var(--color-primary-ink); }

:focus-visible {
  outline: 2px solid var(--color-secondary);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

@media (prefers-reduced-motion: reduce) {
  *,*::before,*::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

a, button, [role="button"], input, textarea, select {
  transition:
    color var(--transition-interactive),
    background var(--transition-interactive),
    border-color var(--transition-interactive),
    box-shadow var(--transition-interactive),
    transform var(--transition-interactive);
}

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border-width: 0;
}
