/*
 * Design tokens – generated from Figma BO_Branding (r2k8M1JJ8n8zUGQQg02834).
 * Collections: 1 · Primitives, 2 · Semantic (Light default, Dark via [data-theme="dark"]),
 * 6 · Layout (Desktop default, Mobile ≤ 600px), text + effect styles.
 * Project colors (3/4 · Project Colors) are NOT here – they come from the panel as --project-*.
 */

:root {
  /* ---------- 1 · Primitives ---------- */

  /* color core */
  --color-core-surface-paper: #f9f6f2;
  --color-core-surface-linen: #dacbb7;
  --color-core-surface-moor-black: #1d1f1a;
  --color-core-surface-night: #111210; /* footer: a step below the dark sections */
  --color-core-device-bezel: #212121;  /* phone frame around portrait screenshots */
  --color-core-tone-chalk: #e8e4df;
  --color-core-tone-fog: #c4c1b9;
  --color-core-tone-stone: #898581;
  --color-core-tone-graphite: #2c2e28;

  /* color signal */
  --color-signal-coral: #cd3d28;
  --color-signal-coral-intense: #bc2b16;

  /* space (binding scale) */
  --space-0: 0;
  --space-2: 0.125rem;
  --space-4: 0.25rem;
  --space-8: 0.5rem;
  --space-16: 1rem;
  --space-24: 1.5rem;
  --space-32: 2rem;
  --space-48: 3rem;
  --space-64: 4rem;
  --space-96: 6rem;
  --space-128: 8rem;
  --space-256: 16rem;

  /* radius */
  --radius-0: 0;
  --radius-2: 2px;
  --radius-4: 4px;
  --radius-8: 8px;
  --radius-16: 16px;
  --radius-24: 24px;
  --radius-32: 32px;
  --radius-pill: 999px;

  /* font */
  --font-grotesk: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;

  /* ---------- 2 · Semantic (mode Light) ---------- */
  --color-surface-base: var(--color-core-surface-paper);
  --color-surface-raised: var(--color-core-tone-chalk);
  --color-surface-inverse: var(--color-core-surface-moor-black);
  --color-surface-warm: var(--color-core-surface-linen);
  --color-text-primary: var(--color-core-surface-moor-black);
  --color-text-secondary: var(--color-core-tone-graphite);
  --color-text-tertiary: var(--color-core-tone-stone);
  --color-text-accent: var(--color-core-surface-moor-black);
  --color-border-subtle: var(--color-core-tone-fog);
  --color-interactive-primary: var(--color-signal-coral);
  --color-interactive-primary-hover: var(--color-signal-coral-intense);
  --color-interactive-hover: var(--color-core-tone-chalk);
  --color-fixed-light: var(--color-core-surface-paper);
  --color-fixed-dark: var(--color-core-surface-moor-black);

  /* ---------- 6 · Layout (mode Desktop) ---------- */
  --layout-margin: 7.5rem;   /* 120 */
  --layout-section: 8rem;    /* 128 */
  --layout-block: 6rem;      /* 96 */
  --layout-gap-l: 3rem;      /* 48 */
  --layout-gap-m: 1.5rem;    /* 24 */
  --layout-gap-s: 1rem;      /* 16 */
  --layout-content: 75rem;   /* 1200 */
  --layout-max: 90rem;       /* 1440 */

  /* ---------- Text styles ---------- */
  /* Fluid between 600px (Mobile/*) and 1440px (Heading/*, Text/*) */
  --font-size-display: clamp(3.5rem, 12.381vw - 1.1429rem, 10rem);
  --font-size-h1: clamp(2.5rem, 6.6667vw, 6rem);
  --font-size-h2: clamp(2.125rem, 2.619vw + 1.1429rem, 3.5rem);
  --font-size-h3: clamp(1.5rem, 0.9524vw + 1.1429rem, 2rem);
  --font-size-lead: clamp(1.1875rem, 0.5952vw + 0.9643rem, 1.5rem);
  --font-size-body: clamp(1rem, 0.2381vw + 0.9107rem, 1.125rem);
  --font-size-small: 0.9375rem;  /* 15 */
  --font-size-button: 1.25rem;   /* 20 */

  --line-height-display: 0.9;
  --line-height-h1: 0.94;
  --line-height-h2: 1;
  --line-height-h3: 1.1;
  --line-height-lead: 1.32;
  --line-height-body: 1.45;
  --line-height-small: 1.3;
  --line-height-button: 1;

  --letter-spacing-display: -0.06em;
  --letter-spacing-h1: -0.05em;
  --letter-spacing-h2: -0.04em;
  --letter-spacing-h3: -0.03em;
  --letter-spacing-lead: -0.02em;
  --letter-spacing-body: -0.01em;
  --letter-spacing-small: -0.01em;
  --letter-spacing-button: -0.02em;

  /* ---------- Effect styles ---------- */
  --shadow-button: 4px 2px 9px 0 rgb(0 0 0 / 0.1), 14px 10px 17px 0 rgb(0 0 0 / 0.09);
  --shadow-button-hover: 6px 4px 14px 0 rgb(29 31 26 / 0.14), 18px 14px 24px 0 rgb(29 31 26 / 0.12);
  --shadow-float: 0 6px 10px 0 rgb(0 0 0 / 0.1);
  --shadow-overlay: 0 12px 20px 0 rgb(0 0 0 / 0.18);
  --color-overlay-scrim: rgb(44 46 40 / 0.35); /* graphite 35 %, not in Figma yet */
  --shadow-bubble: 3px 4px 11px 0 rgb(0 0 0 / 0.1), 11px 15px 19px 0 rgb(0 0 0 / 0.09),
    25px 35px 26px 0 rgb(0 0 0 / 0.05), 45px 62px 31px 0 rgb(0 0 0 / 0.01);

  /* ---------- Motion ---------- */
  --ease-out-soft: cubic-bezier(0.2, 0.9, 0.3, 1);
  --ease-calm: cubic-bezier(0.33, 1, 0.68, 1); /* hover on tiles: no jolt at the start (Leoš) */
  --ease-pop: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* 2 · Semantic (mode Light) – forces light inside a dark scope (e.g. menu pill on dark heroes) */
[data-theme="light"] {
  --color-surface-base: var(--color-core-surface-paper);
  --color-surface-raised: var(--color-core-tone-chalk);
  --color-surface-inverse: var(--color-core-surface-moor-black);
  --color-text-primary: var(--color-core-surface-moor-black);
  --color-text-secondary: var(--color-core-tone-graphite);
  --color-text-accent: var(--color-core-surface-moor-black);
  --color-border-subtle: var(--color-core-tone-fog);
}

/* 2 · Semantic (mode Dark) – footer, dark heroes, any [data-theme="dark"] scope */
[data-theme="dark"] {
  --color-surface-base: var(--color-core-surface-moor-black);
  --color-surface-raised: var(--color-core-tone-graphite);
  --color-surface-inverse: var(--color-core-surface-paper);
  --color-text-primary: var(--color-core-surface-paper);
  --color-text-secondary: var(--color-core-tone-fog);
  --color-text-accent: var(--color-signal-coral);
  --color-border-subtle: var(--color-core-tone-stone);
}

/* 6 · Layout (tablet, between Figma's Mobile and Desktop modes: values from the spacing scale) */
@media (min-width: 601px) and (max-width: 1023px) {
  :root {
    --layout-margin: 3rem;     /* 48 */
    --layout-section: 6rem;    /* 96 */
    --layout-block: 4rem;      /* 64 */
    --layout-gap-l: 2rem;      /* 32 */
  }
}

/* small desktops: a bit less side margin so content keeps its width */
@media (min-width: 1024px) and (max-width: 1279px) {
  :root {
    --layout-margin: 4rem;     /* 64 */
  }
}

/* 6 · Layout (mode Mobile) */
@media (max-width: 600px) {
  :root {
    --layout-margin: 1.25rem;  /* 20 */
    --layout-section: 4rem;    /* 64 */
    --layout-block: 3rem;      /* 48 */
    --layout-gap-l: 1.5rem;    /* 24 */
    --layout-gap-m: 1rem;      /* 16 */
    --layout-gap-s: 1rem;      /* 16 */
  }
}
