﻿/* ============================================================================
   Biatorbágy.hu — Design tokens (Global Settings)
   Elementor megfeleltetés: Global Colors + Global Fonts.
   Komponens SOHA ne használjon helyi hexkódot — mindig ezekre hivatkozzon.
   ========================================================================== */

/* ───────── Webfontok (Poppins címsor + Inter törzs, latin-ext) ─────────
   A Google Fonts stíluslap a _PublicLayout <head>-jében <link>-ként töltődik (preconnect-tel), nem @import-tal:
   az @import a tokens.css letöltése UTÁN, sorban indult, ami a megjelenítést 0,7–1 mp-cel késleltette (4.M/6 jegyzőkönyv). */

/* ───────── Szín-tokenek (Elementor Global Colors) ───────── */
:root {
  /* Márka (Zöld / Zöld-sötét / Zöld-halvány) — 2026-09-25: vörös (#A12C2F) helyett zöld */
  --brand-500: #3FAE8C;   /* Zöld-világos — gradiens felső vége */
  --brand-600: #2A9474;   /* Zöld (Primary) — gomb, link, akcent */
  --brand-700: #1D7358;   /* Zöld-sötét — hover/aktív, lábléc */
  --brand-800: #155A45;   /* Zöld-mély — hover-gradiens alsó vége */
  --brand-50:  #E6F4EF;   /* Zöld-halvány — badge háttér, hover felület */
  --brand-200: #B9E0D1;   /* Zöld-200 — finom szegély hover */

  /* Márka-gradiens: gomboknál, CTA-nál és kiemelt UI-elemeknél ezt használjuk a sima szín helyett */
  --brand-gradient:       linear-gradient(160deg, var(--brand-500) 0%, var(--brand-600) 50%, var(--brand-700) 100%);
  --brand-gradient-glow:  radial-gradient(circle at 50% 45%, rgba(255, 255, 255, 0.12), transparent 60%),
                          linear-gradient(160deg, var(--brand-500) 0%, var(--brand-600) 50%, var(--brand-700) 100%);
  --brand-gradient-hover: linear-gradient(160deg, var(--brand-600) 0%, var(--brand-700) 50%, var(--brand-800) 100%);

  /* Akcent (Borostyán) */
  --accent-amber-500: #F5A425; /* Borostyán (Accent) — kiemelés, akcent CTA */
  --accent-amber-600: #D98A12; /* Borostyán-sötét — akcent hover */
  --accent-amber-50:  #FEF3E0; /* Borostyán-halvány — figyelemfelhívó háttér */

  /* Info (Kék) */
  --info-blue-600: #174A92;   /* Kék (Info) — hivatali címke, fókuszgyűrű */
  --info-blue-50:  #E8EEF7;   /* Kék-halvány — info háttér */

  /* Semleges: szöveg (Grafit / Halvány) */
  --ink-900: #1F272B;  /* Grafit (Text) — címsor, törzs, ikon */
  --ink-700: #3A4248;  /* Grafit-700 — másodlagos cím, erős meta */
  --ink-500: #5B636A;  /* Halvány — metaadat, dátum, segédszöveg */
  --ink-300: #AEB4B9;  /* Halvány-300 — letiltott, placeholder */

  /* Felület */
  --surface-white:  #FFFFFF;  /* Fehér — alap háttér, kártya */
  --surface-cream:  #FAF6EF;  /* Krém — meleg szekció-háttér */
  --surface-mist:   #F4F5F6;  /* Köd — hideg szekció-háttér, input */
  --surface-sunken: #EEEFF1;  /* Süllyesztett — beágyazott felület */

  /* Szegély */
  --border-default: #E6E2DA;  /* Szegély — kártya, elválasztó */
  --border-strong:  #D4D7DA;  /* Szegély-erős — input, hangsúlyos vonal */

  /* Szöveg sötét háttéren */
  --text-on-dark: #FFFFFF;    /* Fehér-szöveg */

  /* Státusz */
  --status-success:    #1B7A5A;
  --status-success-bg: #E4F3EC;
  --status-warning:    #B45309;
  --status-warning-bg: #FBF0E1;
  --status-error:      #B91C1C;
  --status-error-bg:   #FBEAEA;
  --status-info:       #174A92;
  --status-info-bg:    #E8EEF7;

  /* Szemantikus aliasok */
  --color-primary:       var(--brand-600);
  --color-primary-hover: var(--brand-700);
  --color-primary-gradient: var(--brand-gradient-glow);
  --color-accent:        var(--accent-amber-500);
  --text-body:           var(--ink-900);
  --text-secondary:      var(--ink-700);
  --text-muted:          var(--ink-500);
  --text-disabled:       var(--ink-300);
  --link-color:          var(--brand-600);
  --surface-page:        var(--surface-white);
  --surface-card:        var(--surface-white);
  --focus-ring:          var(--info-blue-600); /* 3px gyűrű, 2px offszet */
}

/* ───────── Tipográfia-tokenek (Elementor Global Fonts) ───────── */
:root {
  --font-scale: 1; /* akadálymentesítő A−/A+ állítja (html[data-font-step]) — minden szövegméret ezzel szorzódik */
  --font-heading: "Poppins", "Segoe UI", sans-serif;
  --font-body: "Inter", "Segoe UI", sans-serif;

  --text-display-size: calc(56px * var(--font-scale));  --text-display-lh: 1.1;  --text-display-ls: -0.02em; --text-display-weight: 700;
  --text-h1-size: 44px;       --text-h1-lh: 1.15;      --text-h1-ls: -0.01em;      --text-h1-weight: 700;
  --text-h2-size: 32px;       --text-h2-lh: 1.2;       --text-h2-ls: -0.01em;      --text-h2-weight: 700;
  --text-h3-size: 24px;       --text-h3-lh: 1.3;       --text-h3-ls: 0;            --text-h3-weight: 600;
  --text-h4-size: 20px;       --text-h4-lh: 1.35;      --text-h4-ls: 0;            --text-h4-weight: 600;
  --text-eyebrow-size: calc(13px * var(--font-scale));  --text-eyebrow-lh: 1.4;  --text-eyebrow-ls: 0.06em;  --text-eyebrow-weight: 600;
  --text-body-lg-size: calc(19px * var(--font-scale));  --text-body-lg-lh: 1.6;
  --text-body-size: calc(17px * var(--font-scale));     --text-body-lh: 1.6;
  --text-small-size: calc(14.5px * var(--font-scale));  --text-small-lh: 1.5;
  --text-caption-size: calc(13px * var(--font-scale));  --text-caption-lh: 1.45; --text-caption-ls: 0.01em;
  --text-button-size: calc(16px * var(--font-scale));   --text-button-lh: 1;     --text-button-ls: 0.01em;   --text-button-weight: 600;
}
@media (max-width: 767px) {
  :root {
    --text-display-size: calc(34px * var(--font-scale));
    --text-h1-size: 30px;
    --text-h2-size: 26px;
    --text-h3-size: 20px;
    --text-h4-size: 18px;
    --text-eyebrow-size: calc(12px * var(--font-scale));
    --text-body-lg-size: calc(17px * var(--font-scale));
    --text-body-size: calc(16px * var(--font-scale));
    --text-small-size: calc(14px * var(--font-scale));
    --text-caption-size: calc(12.5px * var(--font-scale));
  }
}

/* ───────── Térköz, rács, radius, árnyék, mozgás ───────── */
:root {
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;   /* kártya belső padding, rács-gap */
  --space-6: 32px;
  --space-7: 48px;   /* szekció padding mobil */
  --space-8: 64px;   /* szekció padding tablet */
  --space-9: 80px;   /* szekció padding desktop */
  --space-10: 96px;
  --space-11: 120px;

  --container-max: 1200px;
  --content-max: 760px;
  --page-margin: 24px;
  --grid-gap: var(--space-5);

  --radius-xs: 8px;
  --radius-sm: 10px;   /* gomb, input */
  --radius-md: 12px;   /* kép */
  --radius-lg: 16px;   /* kártya */
  --radius-pill: 999px;

  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 1px 2px rgba(15, 23, 42, 0.04), 0 6px 18px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 10px 30px rgba(15, 23, 42, 0.12);

  --motion-fast: 120ms;
  --motion-base: 200ms;
  --motion-slow: 320ms;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --hover-lift: translateY(-2px);
}
@media (max-width: 767px) {
  :root { --page-margin: 16px; }
}

/* ───────── Alap elem-stílusok ───────── */
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--text-body-size);
  line-height: var(--text-body-lh);
  font-weight: 400;
  color: var(--text-body);
  background: var(--surface-page);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--ink-900);
  margin: 0 0 var(--space-4);
  text-wrap: balance;
}
h1 { font-size: var(--text-h1-size); line-height: var(--text-h1-lh); letter-spacing: var(--text-h1-ls); font-weight: var(--text-h1-weight); }
h2 { font-size: var(--text-h2-size); line-height: var(--text-h2-lh); letter-spacing: var(--text-h2-ls); font-weight: var(--text-h2-weight); }
h3 { font-size: var(--text-h3-size); line-height: var(--text-h3-lh); font-weight: var(--text-h3-weight); }
h4 { font-size: var(--text-h4-size); line-height: var(--text-h4-lh); font-weight: var(--text-h4-weight); }

p { margin: 0 0 var(--space-4); text-wrap: pretty; }

a {
  color: var(--link-color);
  font-weight: 500;
  text-decoration: none;
  transition: color var(--motion-fast) var(--ease);
}
a:hover { text-decoration: underline; }

/* Látható fókuszgyűrű minden interaktív elemen (WCAG 2.1 AA) */
:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ───────── Szövegstílus-osztályok (text/* tokenek) ───────── */
.text-display { font-family: var(--font-heading); font-size: var(--text-display-size); line-height: var(--text-display-lh); letter-spacing: var(--text-display-ls); font-weight: var(--text-display-weight); color: var(--ink-900); }
.text-h1 { font-family: var(--font-heading); font-size: var(--text-h1-size); line-height: var(--text-h1-lh); letter-spacing: var(--text-h1-ls); font-weight: var(--text-h1-weight); color: var(--ink-900); }
.text-h2 { font-family: var(--font-heading); font-size: var(--text-h2-size); line-height: var(--text-h2-lh); letter-spacing: var(--text-h2-ls); font-weight: var(--text-h2-weight); color: var(--ink-900); }
.text-h3 { font-family: var(--font-heading); font-size: var(--text-h3-size); line-height: var(--text-h3-lh); font-weight: var(--text-h3-weight); color: var(--ink-900); }
.text-h4 { font-family: var(--font-heading); font-size: var(--text-h4-size); line-height: var(--text-h4-lh); font-weight: var(--text-h4-weight); color: var(--ink-900); }
.text-eyebrow { font-family: var(--font-heading); font-size: var(--text-eyebrow-size); line-height: var(--text-eyebrow-lh); letter-spacing: var(--text-eyebrow-ls); font-weight: var(--text-eyebrow-weight); text-transform: uppercase; color: var(--brand-600); }
.text-body-lg { font-family: var(--font-body); font-size: var(--text-body-lg-size); line-height: var(--text-body-lg-lh); font-weight: 400; }
.text-body { font-family: var(--font-body); font-size: var(--text-body-size); line-height: var(--text-body-lh); font-weight: 400; }
.text-small { font-family: var(--font-body); font-size: var(--text-small-size); line-height: var(--text-small-lh); font-weight: 500; color: var(--ink-500); }
.text-caption { font-family: var(--font-body); font-size: var(--text-caption-size); line-height: var(--text-caption-lh); letter-spacing: var(--text-caption-ls); font-weight: 500; color: var(--ink-500); }
.text-button { font-family: var(--font-heading); font-size: var(--text-button-size); line-height: var(--text-button-lh); letter-spacing: var(--text-button-ls); font-weight: var(--text-button-weight); }

/* ───────── Mozgás kikapcsolása (akadálymentesség) ───────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ───────── Akadálymentesítés: betűméret-lépcsők (A− / A+) és nagy kontraszt ─────────
   A frontend.js a <html> elemre teszi: data-font-step="-1|1|2" és a .a11y-contrast osztályt, localStorage-ban megőrizve. */
html[data-font-step="-1"] { --font-scale: 0.9; }
html[data-font-step="1"]  { --font-scale: 1.15; }
html[data-font-step="2"]  { --font-scale: 1.3; }

html.a11y-contrast {
  --brand-500: #0F4A38;
  --brand-600: #0F4A38;
  --brand-700: #093026;
  --brand-800: #093026;
  --brand-50:  #FFFFFF;
  --brand-200: #0F4A38;
  --brand-gradient: #0F4A38; --brand-gradient-glow: #0F4A38; --brand-gradient-hover: #093026;
  --accent-amber-500: #7A4A00;
  --accent-amber-600: #4D2E00;
  --accent-amber-50:  #FFFFFF;
  --info-blue-600: #002A6B;
  --info-blue-50:  #FFFFFF;
  --ink-900: #000000;
  --ink-700: #000000;
  --ink-500: #1A1A1A;
  --ink-300: #4D4D4D;
  --surface-cream:  #FFFFFF;
  --surface-mist:   #FFFFFF;
  --surface-sunken: #FFFFFF;
  --border-default: #000000;
  --border-strong:  #000000;
  --status-success: #004D2E; --status-success-bg: #FFFFFF;
  --status-warning: #5C2A00; --status-warning-bg: #FFFFFF;
  --status-error:   #7A0000; --status-error-bg:   #FFFFFF;
  --status-info:    #002A6B; --status-info-bg:    #FFFFFF;
  --shadow-sm: none; --shadow-md: none; --shadow-lg: none;
}
html.a11y-contrast a { text-decoration: underline; }
html.a11y-contrast *:focus-visible { outline: 3px solid #000; outline-offset: 2px; }
html.a11y-contrast .panel, html.a11y-contrast .bia-card, html.a11y-contrast .bia-person, html.a11y-contrast .bia-doc { border: 1px solid #000; }
