/* Hallmark · macrostructure: Workbench (product-led, dark) · tone: luxury-technical
 * theme: Noir Gold (custom-tuned) · paper: oklch(14% 0.005 270) · accent: oklch(82% 0.11 85) gold
 * anchor hue: gold + cyan · display: Clash Display · body: Satoshi · mono: JetBrains Mono
 * Diversification: first Hallmark build in this project (no prior .hallmark/log.json)
 */

/* ── VotreSiteA100Euros, design tokens ───────────────────────────────────────
 * Dark premium surface, BRIGHT text. Every colour resolves through a token;
 * a raw hex in a component is a bug. Gold carries the identity, cyan is the
 * sharp second voice (rationed to states, links, and data), green/red are
 * semantic only.
 * ------------------------------------------------------------------------- */

:root {
  /* ── surfaces: tuned near-black, never pure black ──────────────────────── */
  --bg-base: oklch(13.5% 0.005 270);
  --bg-raised: oklch(17% 0.006 270);
  --bg-sunken: oklch(10.5% 0.004 270);
  --surface: oklch(20% 0.007 270);
  --surface-2: oklch(24% 0.008 270);
  --surface-hover: oklch(27% 0.009 270);
  --line: oklch(30% 0.008 270);
  --line-strong: oklch(40% 0.010 270);

  /* ── text (BRIGHT: a dark background needs luminous type) ──────────────── */
  --text: oklch(97% 0.004 270);
  --text-strong: oklch(100% 0 0);
  --text-muted: oklch(78% 0.008 270);
  --text-dim: oklch(64% 0.008 270);
  --text-inverse: oklch(14% 0.005 270);

  /* ── brand: gold carries the identity ──────────────────────────────────── */
  --gold: oklch(82% 0.11 85);
  --gold-bright: oklch(90% 0.12 88);
  --gold-deep: oklch(64% 0.10 78);
  --on-gold: oklch(18% 0.02 85);       /* text sitting ON gold: near-black, never white (white on gold fails AA) */
  --gold-wash: oklch(82% 0.11 85 / 0.12);
  --gold-line: oklch(82% 0.11 85 / 0.35);

  /* ── accent: cyan, rationed (links, live data, focus states) ───────────── */
  --cyan: oklch(82% 0.12 205);
  --cyan-bright: oklch(90% 0.10 200);
  --cyan-wash: oklch(82% 0.12 205 / 0.12);

  /* ── semantic (only for meaning, never decoration) ─────────────────────── */
  --ok: oklch(84% 0.14 155);
  --ok-wash: oklch(84% 0.14 155 / 0.13);
  --warn: oklch(86% 0.13 75);
  --warn-wash: oklch(86% 0.13 75 / 0.13);
  --danger: oklch(72% 0.17 25);
  --danger-wash: oklch(72% 0.17 25 / 0.13);
  --info: oklch(80% 0.10 260);

  /* ── type ──────────────────────────────────────────────────────────────── */
  --font-display: "Clash Display", "Cabinet Grotesk", ui-sans-serif, sans-serif;
  --font-body: "Satoshi", ui-sans-serif, system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", monospace;

  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-md: 1.0625rem;   /* between base and lg: lead paragraphs that must not read as body */
  --text-lg: 1.125rem;
  --text-xl: 1.375rem;
  --text-2xl: 1.75rem;
  --text-3xl: 2.25rem;
  --text-4xl: 3rem;
  --text-display-s: 3.5rem;
  --text-display: 4.5rem;

  /* ── space (4pt scale) ─────────────────────────────────────────────────── */
  --space-2xs: 0.25rem;
  --space-xs: 0.5rem;
  --space-sm: 0.75rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4.5rem;
  --space-4xl: 6rem;
  --space-5xl: 8rem;

  /* ── radii (12 to 22 scale: premium, not sharp, not pill) ──────────────── */
  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-full: 999px;

  /* ── elevation ─────────────────────────────────────────────────────────── */
  --shadow-sm: 0 1px 2px oklch(0% 0 0 / 0.4);
  --shadow-md: 0 4px 16px oklch(0% 0 0 / 0.45);
  --shadow-lg: 0 12px 40px oklch(0% 0 0 / 0.5);
  --shadow-gold: 0 8px 32px oklch(82% 0.11 85 / 0.18);

  /* ── motion (house easings, shared with the fluid skill) ───────────────── */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  /* Entrances use --ease-out. There is deliberately no accelerating curve in the
     scale: motion that speeds up into its resting place reads as a stall. */
  --dur-fast: 140ms;
  --dur-base: 220ms;
  --dur-slow: 380ms;
  --dur-slower: 620ms;

  --container: 1240px;
  --container-narrow: 860px;
}

/* ── reset ────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html, body { overflow-x: clip; }
* { margin: 0; }

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

body {
  background: var(--bg-base);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg, video { display: block; max-width: 100%; height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ── typography ───────────────────────────────────────────────────────────── */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-style: normal;
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: var(--text-strong);
  overflow-wrap: anywhere;
  min-width: 0;
}
h1 { font-size: clamp(2.25rem, 5vw, var(--text-display)); }
h2 { font-size: clamp(1.75rem, 3.4vw, var(--text-3xl)); letter-spacing: -0.015em; }
h3 { font-size: clamp(1.15rem, 1.8vw, var(--text-xl)); }
h4 { font-size: var(--text-base); letter-spacing: 0; }

p { color: var(--text-muted); }
strong { color: var(--text-strong); font-weight: 600; }

.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 0.9em;
  letter-spacing: -0.01em;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--gold);
  display: block;
}

.lede { font-size: var(--text-lg); color: var(--text-muted); max-width: 62ch; }

/* ── layout ───────────────────────────────────────────────────────────────── */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--space-lg); }
.container-narrow { width: 100%; max-width: var(--container-narrow); margin-inline: auto; padding-inline: var(--space-lg); }
.section { padding-block: clamp(var(--space-2xl), 7vw, var(--space-4xl)); }
.stack > * + * { margin-top: var(--space-md); }
.grid { display: grid; gap: var(--space-lg); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr)); }

/* ── surfaces ─────────────────────────────────────────────────────────────── */
.card {
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
}
.card-sunken { background: var(--bg-sunken); }
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
}

/* ── buttons ──────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-weight: 600;
  font-size: var(--text-base);
  line-height: 1.2;
  cursor: pointer;
  text-align: center;
  transition: transform var(--dur-fast) var(--ease-out),
              background var(--dur-fast) var(--ease-out),
              border-color var(--dur-fast) var(--ease-out),
              box-shadow var(--dur-fast) var(--ease-out);
}
.btn:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--cyan-bright);
  outline-offset: 2px;
  border-radius: var(--radius-xs);
}
.btn-primary {
  background: var(--gold);
  color: var(--text-inverse);
  box-shadow: var(--shadow-gold);
}
.btn-primary:hover { background: var(--gold-bright); transform: translateY(-1px); text-decoration: none; }
.btn-primary:active { transform: translateY(1px); }
.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--line-strong);
}
.btn-ghost:hover { background: var(--surface-hover); border-color: var(--gold-line); text-decoration: none; }
.btn-quiet { background: var(--surface); color: var(--text-muted); border-color: var(--line); }
.btn-quiet:hover { background: var(--surface-hover); color: var(--text); text-decoration: none; }
.btn-lg { padding: 1rem 2rem; font-size: var(--text-lg); }
.btn-sm { padding: 0.45rem 0.9rem; font-size: var(--text-sm); }
.btn-danger { background: transparent; color: var(--danger); border-color: var(--danger); }
.btn-danger:hover { background: var(--danger-wash); text-decoration: none; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: 0.45; cursor: not-allowed; transform: none; }

/* ── forms ────────────────────────────────────────────────────────────────── */
.field { display: block; margin-bottom: var(--space-lg); }
.field > .label,
.field > label {
  display: block;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text);
  margin-bottom: var(--space-xs);
}
.field .help { font-size: var(--text-xs); color: var(--text-dim); margin-top: var(--space-2xs); display: block; }
.field .error { font-size: var(--text-xs); color: var(--danger); margin-top: var(--space-2xs); display: block; }

.input, .select, .textarea {
  width: 100%;
  background: var(--bg-sunken);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.7rem 0.9rem;
  color: var(--text);
  transition: border-color var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out);
}
.input::placeholder, .textarea::placeholder { color: var(--text-dim); }
.input:hover, .select:hover, .textarea:hover { border-color: var(--line-strong); }
.input:focus, .select:focus, .textarea:focus {
  border-color: var(--gold);
  background: var(--bg-raised);
  outline: none;
}
.input[aria-invalid="true"], .textarea[aria-invalid="true"] {
  border-color: var(--danger);
  background: var(--danger-wash);
}
.textarea { min-height: 7rem; resize: vertical; }
.select { appearance: none; background-image: none; cursor: pointer; }
.field-row { display: grid; gap: var(--space-lg); grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); }

/* ── chips / badges ───────────────────────────────────────────────────────── */
.chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2xs);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.3rem 0.65rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--line-strong);
  color: var(--text-muted);
  background: var(--surface);
  white-space: nowrap;
}
.chip-gold { border-color: var(--gold-line); color: var(--gold); background: var(--gold-wash); }
.chip-ok { border-color: transparent; color: var(--ok); background: var(--ok-wash); }
.chip-warn { border-color: transparent; color: var(--warn); background: var(--warn-wash); }
.chip-danger { border-color: transparent; color: var(--danger); background: var(--danger-wash); }
.chip-info { border-color: transparent; color: var(--info); background: oklch(80% 0.10 260 / 0.13); }

/* ── tables ───────────────────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-md); }
table.data { width: 100%; border-collapse: collapse; font-size: var(--text-sm); }
table.data th {
  text-align: left;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  font-weight: 500;
  padding: var(--space-sm) var(--space-md);
  border-bottom: 1px solid var(--line);
  background: var(--bg-sunken);
  white-space: nowrap;
}
table.data td {
  padding: var(--space-sm) var(--space-md);
  border-bottom: 1px solid var(--line);
  color: var(--text-muted);
  vertical-align: middle;
}
table.data tr:last-child td { border-bottom: none; }
table.data tbody tr:hover { background: var(--surface); }
table.data td strong { color: var(--text-strong); }
.num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; text-align: right; }

/* ── utility ──────────────────────────────────────────────────────────────── */
.text-muted { color: var(--text-muted); }
.text-dim { color: var(--text-dim); }
.text-gold { color: var(--gold); }
.text-cyan { color: var(--cyan); }
.text-ok { color: var(--ok); }
.text-danger { color: var(--danger); }
.text-center { text-align: center; }
.flex { display: flex; }
.flex-between { display: flex; align-items: center; justify-content: space-between; gap: var(--space-md); flex-wrap: wrap; }
.flex-center { display: flex; align-items: center; gap: var(--space-sm); }
.mt-0 { margin-top: 0; }
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }
.mb-md { margin-bottom: var(--space-md); }
.hairline { border-top: 1px solid var(--line); }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: var(--space-md); top: var(--space-md);
  background: var(--gold); color: var(--text-inverse);
  padding: 0.6rem 1rem; border-radius: var(--radius-sm); z-index: 100;
  /* Slide on transform, not on `top`: animating a layout property reflows the page
     on every frame, and it is invisible to a compositor. */
  transform: translateY(calc(-100% - var(--space-md) - 0.75rem));
  transition: transform var(--dur-fast) var(--ease-out);
}
.skip-link:focus { transform: translateY(0); }

/* ── reduced motion (same change, never later) ───────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
