/* ==========================================================================
   Rétegmű – arculati tokenek (design tokens) · 2.0 „Adatlap” irány, jelzősárga
   Forrás: docs/design/design-concepts.md (2. irány), mockup: docs/design/concepts/2-adatlap.html
   Kontraszt: python docs/design/contrast-check.py („2 Adatlap · Jelzősárga” és „Éjszakai műhely”).
   Használat: a komponensekben csak a szemantikus változókat (--color-*) használd,
   a nyers palettát (--palette-*) ne közvetlenül.
   ========================================================================== */

/* ---- Saját tárhelyről betöltött betűk (OFL 1.1, lásd web/fonts/) ---------- */
@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  src: url("../fonts/archivo-latin-ext-wdth-normal.woff2") format("woff2-variations"),
       url("../fonts/archivo-latin-ext-wdth-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  src: url("../fonts/archivo-latin-wdth-normal.woff2") format("woff2-variations"),
       url("../fonts/archivo-latin-wdth-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "JetBrains Mono"; font-style: normal; font-display: swap; font-weight: 400;
  src: url("../fonts/jetbrains-mono-latin-ext-400-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "JetBrains Mono"; font-style: normal; font-display: swap; font-weight: 400;
  src: url("../fonts/jetbrains-mono-latin-400-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "JetBrains Mono"; font-style: normal; font-display: swap; font-weight: 600;
  src: url("../fonts/jetbrains-mono-latin-ext-600-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "JetBrains Mono"; font-style: normal; font-display: swap; font-weight: 600;
  src: url("../fonts/jetbrains-mono-latin-600-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  /* ---- Nyers paletta ---------------------------------------------------- */
  --palette-graphite-950: #000000;
  --palette-graphite-900: #17191C; /* „Grafit” – szöveg, sötét felületek, keretek */
  --palette-steel-600: #555C64;    /* „Acél” – másodlagos szöveg, űrlapkeret */
  --palette-steel-300: #C5C9CC;    /* „Vonal” – halvány keret, elválasztó */
  --palette-steel-200: #C9CED2;    /* logó rétegei, 3D modell */
  --palette-sheet-100: #E3E5E2;    /* süllyesztett felület, fotóhely */
  --palette-sheet-50:  #F2F3F0;    /* „Rajzlap” – oldalháttér */
  --palette-white:     #FFFFFF;

  --palette-signal-500: #FFC21A;   /* „Jelzősárga” – fő CTA, összegsor; csak grafit szöveggel */
  --palette-signal-600: #E6A800;   /* jelzősárga hover */
  --palette-signal-50:  #FFF4D1;   /* kiválasztott elem halvány háttere */

  --palette-blue-700: #0050B8;     /* fókuszgyűrű */
  --palette-green-700: #1B6E3A;
  --palette-red-700:   #A4161A;
  --palette-amber-700: #8A5A00;

  /* Éjszakai műhely (sötét mód) */
  --palette-night-900: #141619;
  --palette-night-800: #1F2226;
  --palette-night-700: #2A2E33;
  --palette-night-500: #3A3F45;
  --palette-night-300: #A3ABB4;
  --palette-night-100: #E6E8EA;

  /* ---- Szemantikus színek – világos mód (alapértelmezett) --------------- */
  color-scheme: light; /* a tulajdonos döntése: mindig világos háttér, a rendszer sötét módjától függetlenül */

  --color-bg: var(--palette-sheet-50);
  --color-surface: var(--palette-white);
  --color-surface-raised: var(--palette-white);
  --color-surface-sunken: var(--palette-sheet-100);
  --color-text: var(--palette-graphite-900);
  --color-text-muted: var(--palette-steel-600);
  --color-text-inverse: var(--palette-white);
  --color-heading: var(--palette-graphite-900);

  --color-border: var(--palette-steel-300);
  --color-border-strong: var(--palette-steel-600);   /* űrlapmezők kerete (6,77:1) */
  --color-rule: var(--palette-graphite-900);         /* vastag szerkezeti vonal */

  /* Elsődleges = grafit: sötét gomb, kiválasztás, számozás */
  --color-primary: var(--palette-graphite-900);
  --chart-series-1: #2a78d6; /* diagram: 1. sorozat (kék) – színvak-biztos párban a 2.-kal (dataviz validator) */
  --chart-series-2: #eb6834; /* diagram: 2. sorozat (narancs) */
  --color-primary-hover: var(--palette-graphite-950);
  --color-primary-contrast: var(--palette-white);
  --color-primary-subtle: var(--palette-signal-50);

  /* Akcentus = jelzősárga: fő CTA („Tovább a rendeléshez”), összegsor, aktív menüpont */
  --color-accent: var(--palette-signal-500);
  --color-accent-hover: var(--palette-signal-600);
  --color-accent-contrast: var(--palette-graphite-900);
  --color-accent-subtle: var(--palette-signal-50);

  --color-link: var(--palette-graphite-900);
  --color-link-hover: var(--palette-graphite-950);
  --color-focus: var(--palette-blue-700);

  --color-success: var(--palette-green-700);
  --color-danger: var(--palette-red-700);
  --color-warning: var(--palette-amber-700);
  --color-success-subtle: #E4F1E8;
  --color-danger-subtle: #FBE9E9;
  --color-warning-subtle: #FDF3DC;

  /* Logó / grafika / 3D */
  --color-brand-ink: var(--palette-graphite-900);
  --color-brand-layer: var(--palette-steel-200);
  --color-brand-nozzle: var(--palette-signal-500);

  /* ---- Tipográfia ------------------------------------------------------- */
  --font-heading: "Archivo", "Arial Narrow", "Roboto Condensed", "Segoe UI", system-ui, sans-serif;
  --font-body: "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;
  --heading-stretch: 75%;      /* keskeny címbetű (Archivo wdth tengely) */
  --heading-transform: uppercase;

  --font-weight-regular: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 800;

  /* Típusskála: 1,25-ös arány, 16 px alap; a nagy címsorok folyékonyan skálázódnak */
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5625rem;
  --text-3xl: clamp(1.75rem, 1.4rem + 1.5vw, 2.1rem);
  --text-4xl: clamp(2rem, 1.5rem + 2.2vw, 2.75rem);
  --text-5xl: clamp(2.4rem, 1.6rem + 3.6vw, 4rem);   /* hero */

  --leading-tight: 1.0;
  --leading-snug: 1.25;
  --leading-normal: 1.5;
  --tracking-tight: 0.005em;
  --tracking-normal: 0;
  --tracking-wide: 0.04em;

  /* ---- Térközök (4 px-es rács) ------------------------------------------ */
  --space-0: 0;
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4rem;
  --space-9: 6rem;

  --container-max: 77.5rem;  /* 1240 px */
  --container-narrow: 46rem;
  --tap-target-min: 44px;

  /* ---- Lekerekítés: az Adatlap irány szögletes ------------------------- */
  --radius-sm: 0;
  --radius-md: 0;
  --radius-lg: 0;
  --radius-xl: 0;
  --radius-pill: 999px;   /* csak állapotpontokhoz */

  /* ---- Árnyék: nincs, a vonalak tagolnak -------------------------------- */
  --shadow-sm: none;
  --shadow-md: none;
  --shadow-lg: 0 8px 32px rgb(23 25 28 / 0.22); /* csak lebegő elemekhez (párbeszédablak, mobilmenü) */
  --focus-ring: 0 0 0 3px var(--color-focus);
  --focus-outline-width: 3px;
  --focus-outline-offset: 2px;

  /* ---- Mozgás ----------------------------------------------------------- */
  --duration-fast: 120ms;
  --duration-base: 180ms;
  --duration-slow: 320ms;
  --duration-unfold: 650ms; /* egyetlen kivétel: a kalkulátor kinyílása (docs/guidelines/animaciok.md) */
  --easing-out: cubic-bezier(0.16, 1, 0.3, 1);
  --easing-standard: cubic-bezier(0.2, 0, 0, 1);

  /* ---- Rétegsorrend ----------------------------------------------------- */
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-modal: 1000;
  --z-toast: 1100;
}

/* ---- Sötét mód: a rendszer sötét módját szándékosan NEM követjük (mindig világos háttér).
 *      A sötét paletta megmarad kézi kapcsolóként, ha később kellene: <html data-theme="dark">. */
:root[data-theme="dark"] {
  color-scheme: dark;
  --color-bg: var(--palette-night-900);
  --color-surface: var(--palette-night-800);
  --color-surface-raised: var(--palette-night-800);
  --color-surface-sunken: var(--palette-night-700);
  --color-text: var(--palette-night-100);
  --color-text-muted: var(--palette-night-300);
  --color-text-inverse: var(--palette-night-900);
  --color-heading: var(--palette-night-100);
  --color-border: var(--palette-night-500);
  --color-border-strong: var(--palette-night-300);
  --color-rule: var(--palette-night-100);
  --color-primary: var(--palette-night-100);
  --chart-series-1: #3987e5;
  --chart-series-2: #d95926;
  --color-primary-hover: var(--palette-white);
  --color-primary-contrast: var(--palette-night-900);
  --color-primary-subtle: #2E2A1C;
  --color-accent: var(--palette-signal-500);
  --color-accent-hover: #FFD45C;
  --color-accent-contrast: var(--palette-night-900);
  --color-accent-subtle: #2E2A1C;
  --color-link: var(--palette-night-100);
  --color-link-hover: var(--palette-white);
  --color-focus: #7DB3FF;
  --color-success: #5DD38A;
  --color-danger: #FF8A80;
  --color-warning: #F5C451;
  --color-success-subtle: #14301F;
  --color-danger-subtle: #3A1A18;
  --color-warning-subtle: #352A10;
  --color-brand-ink: var(--palette-night-700);
  --color-brand-layer: var(--palette-night-300);
  --shadow-lg: 0 8px 32px rgb(0 0 0 / 0.5);
}

:root[data-theme="light"] {
  color-scheme: light;
}

/* ---- Csökkentett mozgás ------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  :root {
    --duration-fast: 0ms;
    --duration-base: 0ms;
    --duration-slow: 0ms;
    --duration-unfold: 0ms;
  }
}
