/* ============================================================
   Gyermekeink jövőjéért — stíluslap

   Az egész oldal négy szabályból vezethető le:
   1. ÉL ÉS FÉNY  — minden keret --edge, minden emelés --lift-*.
   2. HÁROM FELÜLET — emelt lap / mélyedés / festett ív. Nincs negyedik.
   3. EGY SÁV, KÉT VÁGÁS — 12 oszlop, csak 4/8 és 6/6 (plusz 6/3/3).
   4. EGY GESZTUS — minden hover és fókusz ugyanaz a 2px emelkedés.
   ============================================================ */

:root {
  /* Tinta */
  --ink-900: #0f1e28;
  --ink-800: #142632;
  --ink-700: #192e3b;
  --ink: var(--ink-700);
  --muted: #606c73;

  /* Papír */
  --paper: #f6f5f1;
  --paper-lift: #fbfaf7;
  --surface: #fff;
  --well: #f0eee9;
  --field: #f4f2ed;

  /* Akcent */
  --accent: #ad4b31;
  --accent-hover: #913d27;
  --sand: #e2c9ba;
  --sand-hover: #f0ddd2;
  /* Csak a lebegő kapcsolat gombé. */
  --gold: #fbe996;
  --gold-edge: #e2c35a;

  /* Él */
  --edge: rgb(25 46 59 / 0.10);
  --edge-invert: rgb(255 255 255 / 0.16);
  --edge-invert-strong: rgb(255 255 255 / 0.28);
  --field-edge: #b9c2c0;

  /* Fény */
  --lift-1: 0 1px 2px rgb(20 38 50 / 0.05), 0 2px 6px rgb(20 38 50 / 0.045);
  --lift-2: 0 1px 2px rgb(20 38 50 / 0.05), 0 4px 10px -2px rgb(20 38 50 / 0.06),
            0 18px 36px -10px rgb(20 38 50 / 0.12);
  /* A lapél árnyéka rövid és halvány: a rögzült fejléc alatt a korábbi, mélyebb
     árnyék szürke csíknak látszott. */
  --lift-edge: 0 -6px 18px -10px rgb(20 38 50 / 0.12);

  /* Sötét felületen ülő szöveg — mérve: .92 = 4,91:1 terrakottán, 12,1:1 navyn */
  --on-dark: rgb(255 255 255 / 0.92);
  --on-dark-soft: rgb(255 255 255 / 0.78);

  /* Fókusz — a sötét felületeken homokszín, mert az accent ott 1:1 lenne */
  --focus: var(--accent);
  --focus-invert: var(--sand);

  --danger: #9c2f26;
  --danger-soft: #fbeceb;

  /* Betű */
  --font: 'Poppins', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
  /* Az alcímek (a címek alatti bevezető mondatok) dőlt serif betűje. */
  --font-sub: 'Lora', Georgia, 'Times New Roman', serif;
  --t-xs: 0.75rem;
  --t-sm: 0.8125rem;
  --t-ui: 0.9375rem;
  --t-md: 1rem;
  --ls-display: -0.05em;
  --ls-heading: -0.035em;
  --ls-ui: -0.01em;

  /* Térköz — minden érték a 4px-es rácson */
  --s1: 4px;
  --s2: 8px;
  --s3: 12px;
  --s4: 16px;
  --s5: 24px;
  --s6: 32px;
  --s7: 48px;
  --s8: 64px;
  --s9: 96px;

  --section-pad: var(--s9);
  --lapel-pad: var(--s8);
  --gutter: var(--s5);
  --seam: var(--s7);
  --header-h: 96px;

  /* Sáv */
  --w-wide: 1280px;
  --w-mid: 1120px;
  --w-text: 720px;

  --radius-xs: 8px;
  --radius-sm: 12px;
  --radius: 16px;
  --radius-lg: 24px;
  --radius-pill: 999px;

  /* Mozgás */
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --t-fast: 140ms;
  --t-base: 240ms;
  --t-slow: 520ms;
  --t-image: 700ms;

  /* Szemcse a festett íveken */
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='.5'/%3E%3C/svg%3E");
}

/* ---------- Alapok ---------- */

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(72px + var(--s4));
  scrollbar-gutter: stable;
  accent-color: var(--accent);
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 var(--t-md)/1.75 var(--font);
  -webkit-font-smoothing: antialiased;
}

body:has(dialog[open]) { overflow: hidden; }

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { color: inherit; cursor: pointer; }
button, a { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p { margin: 0; }

h1, h2, h3 {
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: var(--ls-heading);
  text-wrap: balance;
}

h2 { font-size: clamp(1.875rem, 1.2rem + 2vw, 2.75rem); }

p { text-wrap: pretty; }

::selection { background: var(--sand); color: var(--ink); }
input { caret-color: var(--accent); }
::placeholder { color: var(--muted); opacity: 1; }

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgb(255 255 255 / 0.55);
}

/* Sötét felületen a homok a látható fókuszszín (az accent ott 1:1 lenne). */
.hero, .site-header, .mobile-nav, .planner-guide, .support-photo,
.contact-section, .site-footer { --focus: var(--focus-invert); }

[hidden] { display: none !important; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.icon {
  width: 18px;
  height: 18px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.container {
  width: min(var(--w-wide), 100% - var(--s8));
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  top: -100px;
  left: var(--s5);
  z-index: 100;
  padding: var(--s3);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
}

.skip-link:focus { top: var(--s5); }

/* ---------- A szekciónyitó: ez az oldal keresztülmenő eleme ---------- */

/* Az oldalról beúszó elemek a kiinduló helyzetükben kilógnak a sávból; a vágás miatt
   ettől mobilon sem lesz oldalra görgethető az oldal. */
main { counter-reset: section -1; overflow-x: clip; }
.hero, .about-section, .calculator-section, .services, .cases, .knowledge,
.contact-section { counter-increment: section; }

.eyebrow {
  display: flex;
  align-items: center;
  gap: var(--s2);
  margin: 0;
  color: var(--accent);
  font-size: var(--t-sm);
  font-weight: 600;
  line-height: 20px;
  letter-spacing: 0.06em;
}

.eyebrow::before {
  content: '';
  flex: none;
  width: 24px;
  height: 2px;
  background: currentColor;
}

/* A szekciók eyebrow-ja a számot hordozza a vonal helyett. */
.section-head .eyebrow::before,
.hero-eyebrow::before {
  content: counter(section, decimal-leading-zero) ' – ';
  width: auto;
  height: auto;
  background: none;
  font-variant-numeric: tabular-nums;
}

.section-head {
  display: grid;
  gap: var(--s3);
  max-width: var(--w-text);
  margin-bottom: var(--s7);
}

.section-head-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--s7);
  max-width: none;
}

.section-head-row > div { max-width: var(--w-text); }
.section-head-row > div > * + * { margin-top: var(--s3); }

/* Alcím: a Poppins címek alatt dőlt serif, így elválik a folyószövegtől. */
.section-lead, .hero-description {
  font-family: var(--font-sub);
  font-style: italic;
  font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.1875rem);
  line-height: 1.6;
}

.section-lead { color: var(--muted); }

.contact-section .eyebrow { color: var(--sand); }
.contact-section .section-lead { color: var(--on-dark-soft); }

/* A terrakotta világosabb, mint a navy, ezért ott a tompított szövegnek és a
   hivatkozásnak erősebb fehérre van szüksége, hogy AA fölött maradjon. */
.planner-guide { --on-dark-soft: rgb(255 255 255 / 0.90); }
.planner-guide .link-arrow { color: var(--surface); }

/* ---------- Gombok és hivatkozások: ötféléből kettő ---------- */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s2);
  min-height: 48px;
  padding: var(--s3) var(--s5);
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  font-size: var(--t-ui);
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: var(--ls-ui);
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease),
              transform var(--t-base) var(--ease), box-shadow var(--t-base) var(--ease);
}

.button-accent { background: var(--accent); color: var(--surface); }
.button-light { background: var(--sand); color: var(--ink); }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  align-self: flex-start;
  padding: 0;
  border: 0;
  background: none;
  color: var(--accent);
  font-size: var(--t-ui);
  font-weight: 500;
  letter-spacing: var(--ls-ui);
  text-align: left;
  transition: color var(--t-fast) var(--ease), gap var(--t-base) var(--ease);
}

.link-arrow .icon { transition: transform var(--t-base) var(--ease); }

.support-photo .link-arrow, .contact-section .link-arrow { color: var(--sand); }
.support-photo .support-content > p { color: var(--on-dark); }

.text-link {
  font-size: var(--t-ui);
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 6px;
  text-decoration-thickness: 1px;
  text-decoration-color: color-mix(in srgb, currentColor 45%, transparent);
  transition: text-decoration-color var(--t-fast) var(--ease);
}

.icon-tile {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid var(--edge-invert);
  border-radius: var(--radius-sm);
  background: rgb(255 255 255 / 0.10);
}

.icon-tile .icon { width: 24px; height: 24px; }

/* ---------- Fejléc ---------- */

.site-header {
  position: absolute;
  inset: 0 0 auto;
  z-index: 40;
  color: var(--surface);
}

/* A videó világos képkockáin a nav 4,6:1-re esett; ez a réteg 9,8:1-re viszi. */
.site-header::before {
  content: '';
  position: absolute;
  inset: 0 0 auto;
  z-index: -1;
  height: 180px;
  background: linear-gradient(180deg, rgb(15 30 40 / 0.62), rgb(15 30 40 / 0.18) 60%, transparent);
  pointer-events: none;
  transition: opacity var(--t-base) var(--ease);
}

.site-header.is-stuck {
  position: fixed;
  background: rgb(246 245 241 / 0.88);
  backdrop-filter: blur(14px) saturate(1.1);
  border-bottom: 1px solid var(--edge);
  color: var(--ink);
  animation: header-drop var(--t-base) var(--ease) both;
}

.site-header.is-stuck::before { opacity: 0; }
.site-header.is-stuck .brand-mark { color: var(--accent); }
.site-header.is-stuck .menu-toggle { border-color: var(--edge); color: var(--ink); }
.site-header.is-stuck .header-inner { min-height: 72px; }
.site-header.is-stuck { --focus: var(--accent); }

@keyframes header-drop {
  from { transform: translateY(-100%); }
  to { transform: none; }
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s5);
  min-height: var(--header-h);
  transition: min-height var(--t-base) var(--ease);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--s3);
  min-width: 0;
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.brand-mark {
  width: 32.5px;
  height: 26px;
  flex: none;
  color: var(--sand);
  transition: color var(--t-base) var(--ease);
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: var(--s6);
  font-size: var(--t-ui);
}

.desktop-nav a, .desktop-nav button {
  position: relative;
  padding: var(--s1) 0;
  border: 0;
  background: none;
  font-size: inherit;
  letter-spacing: var(--ls-ui);
}

.desktop-nav a::after, .desktop-nav button::after {
  content: '';
  position: absolute;
  inset: auto 0 0;
  height: 2px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--t-base) var(--ease);
}

.header-contact { min-height: 44px; padding: var(--s2) var(--s4); }

.menu-toggle { display: none; }

.mobile-nav {
  display: grid;
  grid-template-rows: 0fr;
  margin-inline: var(--s6);
  transition: grid-template-rows var(--t-base) var(--ease);
}

.mobile-nav-inner { overflow: hidden; }
.mobile-nav.is-open { grid-template-rows: 1fr; }

/* ---------- Nyitókép ---------- */

.hero {
  position: relative;
  isolation: isolate;
  min-height: max(680px, min(880px, 94svh));
  background: var(--ink-800);
  color: var(--surface);
}

.hero-media, .hero-shade {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
}

.hero-media img, .hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* A márka terrakottája a nyitóképen is megjelenik, hogy a hero és a kalkulátor
   ne két külön világ legyen. */
.hero-media::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgb(173 75 49 / 0.12);
  mix-blend-mode: soft-light;
  pointer-events: none;
}

.hero-video {
  opacity: 0;
  pointer-events: none;
  transition: opacity 1.2s var(--ease);
}

.hero-video.is-playing { opacity: 1; }

.hero-shade {
  background:
    linear-gradient(90deg, rgb(15 30 40 / 0.88) 0%, rgb(15 30 40 / 0.58) 44%,
                    rgb(20 38 50 / 0.28) 74%, rgb(20 38 50 / 0.12) 100%),
    radial-gradient(120% 95% at 0% 60%, rgb(15 30 40 / 0.55), transparent 62%),
    rgb(20 38 50 / 0.20);
}

.hero-content {
  display: flex;
  flex-direction: column;
  min-height: inherit;
  padding-top: calc(var(--header-h) + var(--s8));
  padding-bottom: calc(var(--s6) + var(--seam));
}

.hero-copy { max-width: var(--w-text); margin-top: auto; }
.hero-eyebrow { color: var(--sand); margin-bottom: var(--s4); }

h1 {
  font-size: clamp(2.5rem, 1.5rem + 3.4vw, 4.25rem);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: var(--ls-display);
}

h1 span { display: block; color: var(--sand); font-weight: 400; }

.hero-description {
  max-width: 520px;
  margin-top: var(--s5);
  color: var(--on-dark);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s5) var(--s6);
  margin-top: var(--s6);
}

/* A korábbi 134px-es üres sáv helyén most három ellenőrizhető állítás áll. */
.hero-facts {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s4) var(--s7);
  margin: auto 0 0;
  padding: var(--s6) 0 var(--s5);
  list-style: none;
  color: var(--on-dark-soft);
  font-size: var(--t-sm);
  line-height: 20px;
}

.hero-facts li { display: flex; align-items: center; gap: var(--s2); }

.hero-facts li::before {
  content: '';
  flex: none;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--sand);
}

.hero-scroll {
  display: inline-flex;
  align-self: flex-start;
  align-items: center;
  gap: var(--s3);
  padding: var(--s3) var(--s5) var(--s3) var(--s3);
  border: 1px solid var(--edge-invert-strong);
  border-radius: var(--radius-pill);
  font-size: var(--t-sm);
  transition: background var(--t-base) var(--ease), border-color var(--t-base) var(--ease);
}

.hero-scroll .icon { transition: transform var(--t-base) var(--ease); }

/* ---------- A lapél: minden szekció ráfekszik az előzőre ---------- */

.about-section, .calculator-section, .services, .cases, .knowledge, .contact-section, .site-footer {
  position: relative;
  margin-top: calc(var(--seam) * -1);
  /* A lapél élétől a szekciónyitóig csak ennyi a hely — korábban a varrat és a
     szekciótérköz összeadódott, és üres sáv nyílt a cím fölött. */
  padding-top: var(--lapel-pad);
  padding-bottom: var(--section-pad);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  box-shadow: 0 -1px 0 rgb(255 255 255 / 0.9), var(--lift-edge);
}

.contact-section, .site-footer {
  border-top: 1px solid var(--edge-invert);
  box-shadow: var(--lift-edge);
}

/* Fénypólus: a felület bal felső sarkából világosodik, ez adja az „egy ív papír” érzetet. */
.calculator-section {
  background: radial-gradient(120% 70% at 12% 0%, var(--paper-lift), var(--paper) 58%);
}

.services, .knowledge { background: radial-gradient(120% 70% at 12% 0%, #fff, #fbfaf8 60%); }

.contact-section { background: var(--ink-700); color: var(--surface); }
.site-footer { background: var(--ink-900); color: var(--surface); padding-bottom: var(--s6); }

/* A festett íveken szemcse ül — ettől lesz anyaga a felületnek. */
.planner-guide, .contact-section, .site-footer {
  position: relative;
  isolation: isolate;
}

.planner-guide::before, .contact-section::before, .site-footer::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: var(--grain);
  background-size: 160px 160px;
  mix-blend-mode: soft-light;
  opacity: 0.22;
  border-radius: inherit;
  pointer-events: none;
}

/* ---------- Bemutatkozó ---------- */

.about-section { background: radial-gradient(120% 70% at 12% 0%, #fff, #fbfaf8 60%); }

.about-layout {
  display: grid;
  grid-template-columns: 5fr 7fr;
  grid-template-areas: 'portrait main';
  gap: var(--s8);
  align-items: center;
}

.about-main { grid-area: main; }
.about-portrait { grid-area: portrait; max-width: 460px; margin: 0; }

.about-portrait picture {
  display: block;
  border-radius: var(--radius-lg);
  box-shadow: var(--lift-2);
  overflow: clip;
}

.about-portrait img {
  width: 100%;
  /* A fekvő képből négyzet: így az izzó és a „Gyermektartásdíj jogszabályok” kötet
     is teljes egészében látszik. */
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: 76% 50%;
}

.about-main .section-head { margin-bottom: var(--s5); }
.about-copy > p:not(.about-note) { color: var(--muted); }
.about-copy > p + p { margin-top: var(--s4); }
.about-note { margin-top: var(--s4); font-weight: 500; }

/* ---------- Akiknek segítettünk ---------- */

.cases { background: radial-gradient(120% 70% at 12% 0%, var(--paper-lift), var(--paper) 58%); }

/* Az alcím mellett néhány rajzolt arc: az esetek névtelenek, ezért illusztráció. */
.lead-people { display: flex; align-items: center; gap: var(--s4); }
.avatar-stack { display: flex; flex: none; }

.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  box-shadow: 0 0 0 2px var(--paper-lift), var(--lift-1);
}

.avatar + .avatar { margin-left: calc(var(--s3) * -1); }

/* Minden eset egy sáv: alul a hozzá illő fénykép, fölötte fehér fátyol, így a kép
   csak halványan dereng át. A fátyol a szöveg alatt a legsűrűbb. */
.case-list {
  display: grid;
  gap: var(--s5);
  margin: 0;
  padding: 0;
  list-style: none;
}

.case {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: 3fr 5fr 4fr;
  gap: var(--s7);
  padding: var(--s7);
  border: 1px solid var(--edge);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--lift-1);
  overflow: clip;
  view-timeline-name: --case;
}

/* A fátyol alatt a kép sötét pontjai is átütnek, ezért itt a tompított szöveg és az
   akcent egy árnyalattal mélyebb — mérve a valódi képpontokon, így marad AA fölött. */
.case { --muted: #4e5a61; }
.case-after .case-label { color: var(--accent-hover); }

.case-bg {
  position: absolute;
  inset: -8% 0;
  z-index: -2;
  width: 100%;
  height: 116%;
  object-fit: cover;
  object-position: center 40%;
}

.case::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, rgb(255 255 255 / 0.95) 0%, rgb(255 255 255 / 0.91) 55%,
                              rgb(255 255 255 / 0.84) 100%);
}

.case-num {
  display: block;
  color: var(--accent);
  font-size: clamp(2rem, 1.5rem + 1.5vw, 2.75rem);
  font-weight: 400;
  line-height: 1;
  letter-spacing: var(--ls-display);
}

.case-tag { margin-top: var(--s4); font-size: var(--t-ui); font-weight: 500; }

.case-label { color: var(--muted); font-size: var(--t-sm); font-weight: 500; line-height: 20px; }

.case-before h3 { margin-top: var(--s2); font-size: clamp(1.25rem, 1rem + 0.7vw, 1.5rem); }
.case-before > p:last-child { margin-top: var(--s3); color: var(--muted); }
.case-after > p:last-child { margin-top: var(--s2); }

/* ---------- Kalkulátor ---------- */

.calculator-layout {
  display: grid;
  grid-template-columns: 4fr 8fr;
  max-width: var(--w-mid);
  margin-inline: auto;
  border: 1px solid var(--edge);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--lift-2);
  overflow: clip;
}

.planner-guide {
  display: flex;
  flex-direction: column;
  padding: var(--s7) var(--s6);
  background: var(--accent);
  color: var(--on-dark);
}

.planner-icon { width: 32px; height: 32px; margin-bottom: var(--s6); color: var(--sand); }

.planner-guide h3 { font-size: 1.5rem; color: var(--surface); }
.planner-guide > p:not(.planner-privacy) { margin-top: var(--s4); color: var(--on-dark); }

.planner-steps {
  margin: var(--s6) 0;
  padding: 0;
  list-style: none;
}

.planner-steps li {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--s4);
  padding: var(--s4) 0;
  color: var(--on-dark-soft);
  transition: color var(--t-base) var(--ease);
}

/* A lépéseket lerajzolódó vonal köti össze, ahogy haladunk. */
.planner-steps li + li::before {
  content: '';
  position: absolute;
  top: calc(var(--s4) * -1);
  left: 18px;
  width: 1px;
  height: var(--s4);
  background: var(--edge-invert-strong);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform var(--t-slow) var(--ease);
}

.planner-steps .is-current::before, .planner-steps .is-complete::before { transform: none; }

.planner-dot {
  position: relative;
  display: grid;
  place-items: center;
  flex: none;
  width: 36px;
  height: 36px;
  border: 1px solid var(--edge-invert-strong);
  border-radius: 50%;
  font-size: var(--t-xs);
  font-weight: 500;
  transition: background var(--t-base) var(--ease), border-color var(--t-base) var(--ease),
              color var(--t-base) var(--ease);
}

.planner-dot > span { display: inline-block; inline-size: 2ch; text-align: center; }

.planner-check {
  position: absolute;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0;
  transform: scale(0.7);
  transition: opacity var(--t-base) var(--ease), transform var(--t-base) var(--ease);
}

.planner-text { min-width: 0; }
.planner-text strong { display: block; font-size: var(--t-ui); font-weight: 500; line-height: 24px; }
.planner-text small { display: block; font-size: var(--t-xs); line-height: 20px; }

.planner-steps .is-current { color: var(--surface); }

.planner-steps .is-current .planner-dot {
  border-color: var(--sand);
  background: var(--sand);
  color: var(--ink);
}

.planner-steps .is-complete { color: var(--surface); }
.planner-steps .is-complete .planner-dot { border-color: var(--surface); }
.planner-steps .is-complete .planner-dot > span { opacity: 0; }
.planner-steps .is-complete .planner-check { opacity: 1; transform: none; }

.planner-privacy {
  display: flex;
  align-items: center;
  gap: var(--s2);
  margin-top: auto;
  color: var(--on-dark-soft);
  font-size: var(--t-xs);
  line-height: 20px;
}

.planner-privacy .icon { width: 15px; height: 15px; }

.calculator-card {
  min-width: 0;
  padding: var(--s6);
  background: var(--surface);
  scroll-margin-top: calc(72px + var(--s5));
  transition: opacity var(--t-base) var(--ease), transform var(--t-base) var(--ease),
              min-height var(--t-base) var(--ease);
}

.calculator-card.is-swapping { opacity: 0; transform: translateY(8px); }

.calculator-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s5);
  padding-bottom: var(--s4);
  margin-bottom: var(--s5);
  border-bottom: 1px solid var(--edge);
}

.card-eyebrow::before { display: none; }

.step-indicator {
  min-width: 5ch;
  color: var(--muted);
  font-size: var(--t-sm);
  line-height: 20px;
  text-align: right;
  white-space: nowrap;
}

.calculator-card h3 { font-size: 1.5rem; }
.calculator-card h3:focus { outline: 0; }

.form-intro { margin: var(--s2) 0 var(--s6); color: var(--muted); font-size: var(--t-ui); }

.planner-disclaimer {
  display: flex;
  align-items: center;
  gap: var(--s3);
  max-width: var(--w-mid);
  margin: var(--s6) auto 0;
  padding: var(--s4) var(--s5);
  border: 1px solid var(--edge);
  border-radius: var(--radius);
  background: var(--well);
  box-shadow: inset 0 1px 2px rgb(20 38 50 / 0.045);
  color: var(--muted);
  font-size: var(--t-sm);
  line-height: 20px;
}

.planner-disclaimer .icon { width: 18px; height: 18px; }

/* ---------- Űrlap ---------- */

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: end;
  gap: var(--s5) var(--s4);
}

label {
  display: flex;
  flex-direction: column;
  gap: var(--s2);
  font-size: var(--t-ui);
  font-weight: 500;
  line-height: 24px;
  letter-spacing: var(--ls-ui);
}

select, input {
  width: 100%;
  min-width: 0;
  min-height: 52px;
  padding: var(--s3) var(--s4);
  border: 1px solid var(--edge);
  border-radius: var(--radius-sm);
  background: var(--field);
  box-shadow: inset 0 1px 2px rgb(20 38 50 / 0.045);
  color: var(--ink);
  font-size: var(--t-ui);
  font-weight: 400;
  transition: border-color var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
}

select:focus, input:focus { background: var(--surface); }
select[aria-invalid='true'] { border-color: var(--danger); }

select {
  appearance: none;
  padding-right: var(--s7);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M2.5 5.5 8 11l5.5-5.5' fill='none' stroke='%23606c73' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right var(--s4) center;
  background-size: 14px;
}

input[type=number] { appearance: textfield; -moz-appearance: textfield; }
input::-webkit-inner-spin-button, input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }

.gender-field { min-width: 0; margin: 0; padding: 0; border: 0; }

.gender-field legend {
  margin-bottom: var(--s2);
  padding: 0;
  font-size: var(--t-ui);
  font-weight: 500;
  line-height: 24px;
  letter-spacing: var(--ls-ui);
}

.segmented-options {
  display: flex;
  gap: var(--s1);
  padding: var(--s1);
  border: 1px solid var(--edge);
  border-radius: var(--radius-sm);
  background: var(--field);
  box-shadow: inset 0 1px 2px rgb(20 38 50 / 0.045);
}

.segmented-options label { position: relative; flex: 1; cursor: pointer; }

.segmented-options input {
  position: absolute;
  width: 1px;
  height: 1px;
  min-height: 0;
  padding: 0;
  opacity: 0;
}

.segmented-options span {
  display: grid;
  place-items: center;
  min-height: 44px;
  border-radius: var(--radius-xs);
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}

.segmented-options input:checked + span { background: var(--accent); color: var(--surface); }
.segmented-options input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

.money-field { position: relative; display: block; }
.money-field input { padding-right: var(--s8); font-variant-numeric: tabular-nums; }

.money-field > span {
  position: absolute;
  top: 50%;
  right: var(--s4);
  transform: translateY(-50%);
  color: var(--muted);
  font-size: var(--t-sm);
  pointer-events: none;
}

.calculator-submit { width: 100%; min-height: 56px; margin-top: var(--s6); }

.form-privacy {
  margin-top: var(--s3);
  color: var(--muted);
  font-size: var(--t-xs);
  line-height: 20px;
  text-align: center;
}

.form-error {
  margin-top: var(--s4);
  padding: var(--s3) var(--s4);
  border: 1px solid color-mix(in srgb, var(--danger) 25%, transparent);
  border-radius: var(--radius-sm);
  background: var(--danger-soft);
  color: var(--danger);
  font-size: var(--t-ui);
  line-height: 24px;
}

.back-button { margin: var(--s4) auto 0; color: var(--muted); }
.back-button .icon { order: -1; }

/* Élő összegsor a költségmezők alatt */
.cost-live {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s4);
  margin-top: var(--s5);
  padding-top: var(--s4);
  border-top: 1px solid var(--edge);
  color: var(--muted);
  font-size: var(--t-ui);
}

.cost-live output { color: var(--ink); font-weight: 500; font-variant-numeric: tabular-nums; }

/* ---------- Eredmény ---------- */

.result-context { margin-top: var(--s2); color: var(--muted); font-size: var(--t-sm); line-height: 20px; }

.result-label {
  margin-top: var(--s5);
  color: var(--muted);
  font-size: var(--t-sm);
  line-height: 20px;
}

.result-exact {
  margin-bottom: var(--s5);
  color: var(--muted);
  font-size: var(--t-sm);
  line-height: 20px;
}

.result-exact strong { color: var(--ink); font-weight: 500; font-variant-numeric: tabular-nums; }

.result-total {
  margin: var(--s2) 0 var(--s3);
  font-size: clamp(2rem, 1.4rem + 2.4vw, 3rem);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: var(--ls-display);
  font-variant-numeric: tabular-nums;
}

.result-total > span { color: var(--muted); font-size: var(--t-md); font-weight: 400; letter-spacing: var(--ls-ui); }

.cost-breakdown {
  margin: 0;
  padding: var(--s2) var(--s4);
  border: 1px solid var(--edge);
  border-radius: var(--radius);
  background: var(--well);
  box-shadow: inset 0 1px 2px rgb(20 38 50 / 0.045);
  font-size: var(--t-ui);
}

.cost-breakdown > div {
  position: relative;
  display: flex;
  justify-content: space-between;
  gap: var(--s4);
  padding-block: var(--s3);
  border-top: 1px solid var(--edge);
}

.cost-breakdown > div:first-child { border-top: 0; }

/* Arányjelző: a sor alatt a tétel részesedése az összegből. */
.cost-breakdown > div::after {
  content: '';
  position: absolute;
  inset: auto 0 0 0;
  height: 2px;
  width: calc(var(--share, 0) * 100%);
  background: var(--accent);
  opacity: 0.55;
  transform-origin: left;
  animation: share-in var(--t-slow) var(--ease) both;
  animation-delay: calc(var(--row-i, 0) * 60ms);
}

@keyframes share-in { from { transform: scaleX(0); } to { transform: none; } }

.cost-breakdown dt { color: var(--muted); }
.cost-breakdown dd { margin: 0; font-weight: 500; font-variant-numeric: tabular-nums; white-space: nowrap; }

.result-note { margin-top: var(--s4); color: var(--muted); font-size: var(--t-sm); line-height: 20px; }

/* ---------- Szolgáltatások ---------- */

.support-grid {
  display: grid;
  grid-template-columns: 6fr 3fr 3fr;
  gap: var(--gutter);
}

.support-card {
  --pad: var(--s6);
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: var(--pad);
  border-radius: var(--radius-lg);
  isolation: isolate;
  overflow: clip;
  transition: transform var(--t-base) var(--ease), box-shadow var(--t-base) var(--ease);
}

.support-content { margin-top: auto; padding-top: var(--s6); }
.support-content h3 { font-size: clamp(1.375rem, 1.1rem + 0.8vw, 1.625rem); }
.support-content > p { margin-top: var(--s3); }
.support-content .link-arrow { margin-top: var(--s5); }

.support-photo { min-height: 520px; background: var(--ink-700); color: var(--on-dark); }

.support-photo > img {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 33%;
  transition: transform var(--t-image) var(--ease);
}

.support-photo::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  /* A sötétítés a márka navyjába fut, nem a majdnem fekete ink-900-ba: így a kártya
     világosabb, a szöveg alatt mégis AA fölött marad a kontraszt. */
  background: linear-gradient(180deg, rgb(25 46 59 / 0.28) 0%, rgb(25 46 59 / 0) 26%,
                              rgb(25 46 59 / 0.76) 54%, rgb(25 46 59 / 0.96) 90%);
}

.support-photo h3 { color: var(--surface); }

/* A világosabb sötétítés mellett a fotó teteje is világos lehet; a csempe saját navy
   fátylat kap, hogy a fehér ikon minden képen kivehető maradjon. */
.support-photo .icon-tile {
  background: rgb(25 46 59 / 0.42);
  backdrop-filter: blur(6px);
}

/* Ennél a fotónál a lényeg, a kezek és a csipeszes iratok, a kép alján van, ahol a
   többi kártyán már a szöveg áll, és a sötétítés eltakarná. Itt ezért a kép a szöveg
   fölé kerül, és alul beleolvad a sötét alapba. */
.support-photo-top { background: var(--ink-700); }
.support-photo-top::after { content: none; }

.support-photo-top > img {
  position: relative;
  inset: auto;
  flex: 1 0 auto; /* kitölti a helyet a szövegig, a képarány csak a legkisebb magasság */
  width: calc(100% + 2 * var(--pad));
  max-width: none;
  height: auto;
  margin: calc(-1 * var(--pad)) calc(-1 * var(--pad)) 0;
  aspect-ratio: 4 / 3;
  object-position: 45% 50%;
  mask-image: linear-gradient(180deg, #000 60%, transparent);
}

.support-photo-top .icon-tile { position: absolute; top: var(--pad); left: var(--pad); }
.support-photo-top .support-content { padding-top: var(--s4); }

.service-note { margin-top: var(--s6); color: var(--muted); font-size: var(--t-sm); line-height: 20px; }

/* ---------- Tudástár ---------- */

/* A vezetőcikk teljes szélességben fekszik (kép | szöveg), a két rövidebb alatta
   egymás mellett. Egymás fölé rakva a jobb oszlop mindig magasabb lenne, mint a
   vezetőcikk, és a kártyájában üres sáv nyílna. */
.reading-grid { display: grid; gap: var(--gutter); }

.reading-feature, .reading-note {
  display: flex;
  flex-direction: column;
  min-width: 0;
  border: 1px solid var(--edge);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--lift-1);
  text-align: left;
  transition: transform var(--t-base) var(--ease), box-shadow var(--t-base) var(--ease);
}

.reading-feature {
  flex-direction: row;
  align-items: stretch;
  min-height: 380px;
  padding: 0;
  overflow: clip;
}
.reading-note { --card-pad: var(--s6); padding: var(--card-pad); overflow: clip; }

.reading-note .reading-image {
  margin: calc(var(--card-pad) * -1) calc(var(--card-pad) * -1) var(--s5);
  aspect-ratio: 16 / 9;
}

.reading-image {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: clip;
}

.reading-feature .reading-image { flex: 0 0 56%; aspect-ratio: auto; }

.reading-image img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 38%;
  transition: transform var(--t-image) var(--ease);
}

.reading-feature-copy {
  display: flex;
  flex-direction: column;
  flex: 1;
  justify-content: center;
  padding: var(--s7);
}

.reading-side { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gutter); }

.article-title {
  display: block;
  margin-top: var(--s3);
  font-size: clamp(1.25rem, 1rem + 0.8vw, 1.625rem);
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: var(--ls-heading);
  text-wrap: balance;
}

.article-summary { display: block; margin-top: var(--s3); color: var(--muted); }

.reading-more { margin-top: var(--s5); }

/* ---------- Kapcsolat ---------- */

.contact-panel {
  display: grid;
  grid-template-columns: 6fr 6fr;
  gap: var(--s7);
  align-items: start;
}

.contact-intro { color: var(--on-dark-soft); }

/* A két elérhetőség maga a gomb: nincs külön ablak, amely ugyanezt megismételné. */
.contact-list { display: grid; gap: var(--s3); margin: 0; padding: 0; list-style: none; }

.contact-list a {
  display: flex;
  align-items: center;
  gap: var(--s4);
  padding: var(--s4) var(--s5);
  border: 1px solid var(--edge-invert);
  border-radius: var(--radius);
  background: rgb(255 255 255 / 0.06);
  transition: background var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease),
              transform var(--t-base) var(--ease);
}

.contact-list .icon { width: 22px; height: 22px; color: var(--sand); }

.contact-list span {
  min-width: 0;
  font-size: 1.125rem;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: var(--ls-ui);
  overflow-wrap: anywhere;
}

.contact-list small {
  display: block;
  color: var(--on-dark-soft);
  font-size: var(--t-xs);
  font-weight: 400;
  line-height: 20px;
  letter-spacing: 0;
}

/* ---------- Lebegő kapcsolat gomb ---------- */

/* A bal alsó sarokban, görgetés után jelenik meg; kattintásra fölötte nyílik a hívás és az
   e-mail. A tároló maga nem fogja meg a kattintást, csak a gombok, így a zárt sor helyén az
   oldal kattintható marad. */
.quick-contact {
  position: fixed;
  left: var(--s5);
  bottom: max(var(--s5), env(safe-area-inset-bottom));
  z-index: 30;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--s4);
  opacity: 0;
  transform: translateY(48px);
  pointer-events: none;
  transition: opacity var(--t-slow) var(--ease), transform var(--t-slow) var(--ease);
}

.quick-contact.is-shown { opacity: 1; transform: none; }
.quick-contact.is-shown .quick-contact-toggle { pointer-events: auto; }

.quick-contact-options {
  display: flex;
  gap: var(--s3);
  margin: 0;
  padding: 0;
  list-style: none;
  opacity: 0;
  transform: translateY(16px);
  pointer-events: none;
  transition: opacity var(--t-base) var(--ease), transform var(--t-base) var(--ease);
}

.quick-contact.is-open .quick-contact-options { opacity: 1; transform: none; pointer-events: auto; }

.quick-contact-options a {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgb(255 255 255 / 0.97);
  backdrop-filter: blur(8px);
  box-shadow: var(--lift-2);
  color: var(--ink);
  transition: transform var(--t-base) var(--ease), background var(--t-fast) var(--ease);
}

.quick-contact-options .icon { width: 20px; height: 20px; }
.quick-contact-options .icon-brand { width: 22px; height: 22px; fill: currentColor; stroke: none; }

/* Márkaszínek. A WhatsApp zöldje (#25D366) fehéren csak 2:1 lenne, ezért egy árnyalattal
   mélyebb, így 3:1 fölött marad; a Viber lilája eredetiben is átmegy. */
.quick-contact-options .is-whatsapp { color: #1da851; }
.quick-contact-options .is-viber { color: #7360f2; }

.quick-contact-toggle {
  display: flex;
  align-items: center;
  gap: var(--s3);
  padding: 0;
  border: 0;
  border-radius: var(--radius-pill);
  background: none;
  color: var(--ink);
}

.quick-contact-disc {
  position: relative;
  display: grid;
  place-items: center;
  flex: none;
  width: 60px;
  height: 60px;
  border: 1px solid var(--gold-edge);
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 10px 28px -6px rgb(190 150 20 / 0.55), 0 2px 6px rgb(20 38 50 / 0.14);
  transition: transform var(--t-base) var(--ease);
}

.quick-contact-disc .icon { width: 26px; height: 26px; stroke-width: 1.75; }

/* Lüktető gyűrű: megjelenéskor háromszor, utána megáll. */
.quick-contact-disc::after {
  content: '';
  position: absolute;
  inset: -1px;
  border: 2px solid var(--gold-edge);
  border-radius: 50%;
  opacity: 0;
  pointer-events: none;
}

.quick-contact.is-shown:not(.is-open) .quick-contact-disc::after {
  animation: quick-ping 1600ms cubic-bezier(0, 0, 0.2, 1) 400ms 3;
}

@keyframes quick-ping {
  from { opacity: 0.9; transform: scale(1); }
  to { opacity: 0; transform: scale(1.7); }
}

.quick-contact-label {
  position: relative;
  padding: var(--s2) var(--s4);
  border-radius: var(--radius-xs);
  background: var(--surface);
  box-shadow: var(--lift-2);
  font-size: var(--t-md);
  font-weight: 500;
  line-height: 24px;
  letter-spacing: var(--ls-ui);
  transition: opacity var(--t-base) var(--ease), transform var(--t-base) var(--ease);
}

/* A buborék csücske a gomb felé mutat. */
.quick-contact-label::before {
  content: '';
  position: absolute;
  top: 50%;
  left: -5px;
  width: 12px;
  height: 12px;
  border-radius: 2px;
  background: inherit;
  transform: translateY(-50%) rotate(45deg);
}

.quick-contact.is-open .quick-contact-label { opacity: 0; transform: translateX(-12px); }

/* Egérrel a felirat csak rámutatáskor jön elő; érintőképernyőn végig látszik. */
@media (hover: hover) and (min-width: 768px) {
  .quick-contact-disc { width: 64px; height: 64px; }
  .quick-contact-label { opacity: 0; transform: translateX(-12px); }

  .quick-contact:not(.is-open) .quick-contact-toggle:is(:hover, :focus-visible) .quick-contact-label {
    opacity: 1;
    transform: none;
  }
}

/* ---------- Lábléc ---------- */

.footer-main {
  display: grid;
  grid-template-columns: 4fr 4fr 4fr;
  gap: var(--s6);
  align-items: center;
  padding-bottom: var(--s7);
}

.footer-main > p { color: var(--on-dark-soft); font-size: var(--t-ui); }

.footer-main nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s3) var(--s6);
  font-size: var(--t-ui);
}

.footer-main nav button {
  padding: 0;
  border: 0;
  background: none;
  font-size: inherit;
  text-align: left;
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s5);
  padding-top: var(--s5);
  border-top: 1px solid var(--edge-invert);
  color: var(--on-dark-soft);
  font-size: var(--t-sm);
  line-height: 20px;
}

.footer-bottom > div { display: flex; align-items: center; gap: var(--s5); }
.footer-bottom button { padding: 0; border: 0; background: none; font-size: inherit; }
.footer-bottom a { display: inline-flex; align-items: center; gap: var(--s2); }
.footer-bottom .icon { width: 14px; height: 14px; }

/* ---------- Olvasóablak ---------- */

dialog {
  grid-template-rows: auto 1fr;
  width: 640px;
  max-width: calc(100% - var(--s6));
  max-height: 85dvh;
  padding: 0;
  border: 1px solid var(--edge);
  border-radius: var(--radius-lg);
  background: var(--paper);
  box-shadow: var(--lift-2);
  color: var(--ink);
  opacity: 0;
  transform: translateY(8px) scale(0.98);
  overflow: clip;
  transition: opacity var(--t-base) var(--ease), transform var(--t-base) var(--ease),
              overlay var(--t-base) allow-discrete, display var(--t-base) allow-discrete;
}

dialog[open] { display: grid; opacity: 1; transform: none; }

@starting-style {
  dialog[open] { opacity: 0; transform: translateY(8px) scale(0.98); }
}

dialog::backdrop { background: rgb(15 30 40 / 0.62); backdrop-filter: blur(8px); }

.dialog-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s4);
  padding: var(--s5) var(--s5) var(--s4) var(--s7);
  border-bottom: 1px solid var(--edge);
}

.dialog-eyebrow::before { display: none; }

.dialog-close {
  display: grid;
  place-items: center;
  flex: none;
  width: 40px;
  height: 40px;
  border: 1px solid var(--edge);
  border-radius: 50%;
  background: var(--surface);
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}

#dialog-content {
  min-height: 0;
  padding: var(--s6) var(--s7) var(--s7);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.dialog-image {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  margin-block: var(--s5);
  border-radius: var(--radius);
  object-fit: cover;
}

#dialog-content h2 { font-size: 1.625rem; }
#dialog-content h3 { margin-top: var(--s5); font-size: 1.0625rem; }
#dialog-content p { margin-block: var(--s4); color: var(--muted); }
#dialog-content ul, #dialog-content ol { padding-left: var(--s5); color: var(--muted); }
#dialog-content li { margin-bottom: var(--s3); }
#dialog-content strong { color: var(--ink); }
#dialog-content a:not(.button) { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; overflow-wrap: anywhere; }
#dialog-content .button { margin-top: var(--s3); }

.dialog-source {
  margin-top: var(--s6);
  padding-top: var(--s4);
  border-top: 1px solid var(--edge);
  font-size: var(--t-sm);
  line-height: 20px;
}

.article-index { display: grid; gap: var(--s2); margin-top: var(--s5); }

.article-index button {
  padding: var(--s4);
  border: 1px solid var(--edge);
  border-radius: var(--radius);
  background: var(--surface);
  font-size: var(--t-md);
  font-weight: 500;
  letter-spacing: var(--ls-ui);
  text-align: left;
  transition: border-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease),
              transform var(--t-base) var(--ease), box-shadow var(--t-base) var(--ease);
}

/* ---------- Egy gesztus: minden hover és fókusz ugyanaz ---------- */

@media (hover: hover) {
  .button:is(:hover, :focus-visible) { transform: translateY(-2px); box-shadow: var(--lift-2); }
  .button-accent:is(:hover, :focus-visible) { background: var(--accent-hover); }
  .button-light:is(:hover, :focus-visible) { background: var(--sand-hover); }

  .link-arrow:is(:hover, :focus-visible) .icon { transform: translateX(4px); }
  .text-link:is(:hover, :focus-visible) { text-decoration-color: currentColor; }

  .desktop-nav :is(a, button):is(:hover, :focus-visible)::after,
  .desktop-nav :is(a, button)[aria-current]::after { transform: none; }

  .hero-scroll:is(:hover, :focus-visible) {
    background: rgb(255 255 255 / 0.12);
    border-color: var(--surface);
  }

  .hero-scroll:is(:hover, :focus-visible) .icon { transform: translateY(3px); }

  .reading-feature:is(:hover, :focus-visible),
  .reading-note:is(:hover, :focus-visible),
  .article-index button:is(:hover, :focus-visible),
  .support-card:has(.link-arrow:is(:hover, :focus-visible)) {
    transform: translateY(-2px);
    box-shadow: var(--lift-2);
  }

  .reading-feature:is(:hover, :focus-visible) .reading-image img,
  .reading-note:is(:hover, :focus-visible) .reading-image img,
  .support-photo:has(.link-arrow:is(:hover, :focus-visible)) > img { transform: scale(1.04); }

  .reading-feature:is(:hover, :focus-visible) .link-arrow .icon,
  .reading-note:is(:hover, :focus-visible) .link-arrow .icon { transform: translateX(4px); }

  .article-index button:is(:hover, :focus-visible) { border-color: var(--accent); color: var(--accent); }
  .dialog-close:is(:hover, :focus-visible) { background: var(--ink); color: var(--surface); }
  .back-button:is(:hover, :focus-visible) { color: var(--accent); }
  .quick-contact-toggle:is(:hover, :focus-visible) .quick-contact-disc,
  .quick-contact-options a:is(:hover, :focus-visible) { transform: translateY(-2px); }
  .quick-contact-options a:is(:hover, :focus-visible) { background: var(--surface); }

  .contact-list a:is(:hover, :focus-visible) {
    transform: translateY(-2px);
    border-color: var(--edge-invert-strong);
    background: rgb(255 255 255 / 0.10);
  }
  .footer-main nav :is(a, button):is(:hover, :focus-visible),
  .footer-bottom :is(a, button):is(:hover, :focus-visible) { color: var(--sand); }
  select:hover, input:hover { border-color: var(--field-edge); }
  .segmented-options span:hover { background: rgb(173 75 49 / 0.08); }
}

:is(.link-arrow, .reading-note, .reading-feature, .article-index button,
    .menu-toggle, .dialog-close, .button):active {
  transform: scale(0.99);
  transition-duration: var(--t-fast);
}

/* ---------- Mozgás ---------- */

@media (prefers-reduced-motion: no-preference) {
  .motion-ready [data-reveal] {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity var(--t-slow) var(--ease), transform var(--t-slow) var(--ease);
    transition-delay: calc(var(--reveal-i, 0) * 90ms);
  }

  .motion-ready .section-head[data-reveal] { transform: translateY(16px); }
  .motion-ready .contact-panel[data-reveal] { transform: none; }
  .motion-ready [data-reveal].is-visible { opacity: 1; transform: none; }

  /* A nyitókép belépője nem a .motion-ready-től függ, különben az első
     képkockákon megvillanna a végállapot. */
  .hero-eyebrow, .hero-copy h1, .hero-description, .hero-actions, .hero-facts, .hero-scroll {
    animation: hero-rise 640ms var(--ease) both;
  }

  .hero-copy h1 { animation-delay: 60ms; }
  .hero-description { animation-delay: 140ms; }
  .hero-actions { animation-delay: 220ms; }
  .hero-facts { animation-delay: 320ms; }
  .hero-scroll { animation-delay: 400ms; }

  @keyframes hero-rise {
    from { opacity: 0; transform: translateY(18px); }
    to { opacity: 1; transform: none; }
  }
}

/* Beúszás: a bemutatkozó kép balról, a szolgáltatás-kártyák jobbról érkeznek egymás után,
   a bennük ülő fotó pedig közben a helyére kicsinyedik. */
@media (prefers-reduced-motion: no-preference) {
  .motion-ready [data-reveal='left'] { transform: translateX(-64px); }
  .motion-ready [data-reveal='right'] { transform: translateX(64px); }

  .motion-ready :is([data-reveal='left'], [data-reveal='right']) {
    transition-duration: 900ms;
    transition-delay: calc(var(--reveal-i, 0) * 150ms);
  }

  .motion-ready .about-portrait.is-visible img,
  .motion-ready .support-photo.is-visible > img {
    animation: image-settle 1600ms var(--ease) backwards;
    animation-delay: calc(var(--reveal-i, 0) * 150ms);
  }

  @keyframes image-settle { from { transform: scale(1.16); } }

  /* Az alcím melletti arcok egyenként pattannak be. */
  .motion-ready .section-head.is-visible .avatar {
    animation: avatar-pop 560ms cubic-bezier(0.34, 1.56, 0.64, 1) backwards;
    animation-delay: 380ms;
  }

  .motion-ready .section-head.is-visible .avatar:nth-child(2) { animation-delay: 480ms; }
  .motion-ready .section-head.is-visible .avatar:nth-child(3) { animation-delay: 580ms; }
  .motion-ready .section-head.is-visible .avatar:nth-child(4) { animation-delay: 680ms; }

  @keyframes avatar-pop { from { opacity: 0; transform: translateX(-12px) scale(0.5); } }
}

/* Kalkulátor: amikor beér, a keret kétszer felfénylik és egy fénycsík fut végig a
   terrakotta oldalon. A gomb akkor villan fel kétszer, amikor maga is képernyőre ér,
   és csak ha a látogató még nem nyúlt az űrlaphoz. Minden villanás 5 mp alatt véget ér,
   így nem kell hozzá leállító gomb. */
@media (prefers-reduced-motion: no-preference) {
  .planner-guide { overflow: clip; }

  .planner-guide::after, .calculator-submit::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    transform: translateX(-100%);
    pointer-events: none;
  }

  .planner-guide::after {
    background: linear-gradient(105deg, transparent 28%, rgb(255 255 255 / 0.38) 48%,
                                rgb(255 255 255 / 0.08) 58%, transparent 72%);
  }

  .motion-ready .calculator-layout.is-visible {
    animation: calc-flash 1100ms var(--ease) 500ms 2;
  }

  .motion-ready .calculator-layout.is-visible .planner-guide::after {
    animation: glint 1300ms var(--ease) 700ms both;
  }

  .calculator-submit { position: relative; isolation: isolate; overflow: hidden; }

  .calculator-submit::after {
    background: linear-gradient(105deg, transparent 32%, rgb(255 255 255 / 0.38) 50%, transparent 68%);
  }

  .motion-ready .calculator-card:not(.is-engaged) .calculator-submit.is-shining {
    animation: button-pulse 2000ms var(--ease) 300ms 2;
  }

  .motion-ready .calculator-card:not(.is-engaged) .calculator-submit.is-shining::after {
    animation: shine 2000ms var(--ease) 300ms 2;
  }

  @keyframes calc-flash {
    from { box-shadow: var(--lift-2), 0 0 0 0 rgb(173 75 49 / 0.45); }
    to { box-shadow: var(--lift-2), 0 0 0 18px rgb(173 75 49 / 0); }
  }

  @keyframes glint { to { transform: translateX(100%); } }

  @keyframes shine {
    0% { transform: translateX(-100%); }
    45%, 100% { transform: translateX(100%); }
  }

  @keyframes button-pulse {
    from { box-shadow: 0 0 0 0 rgb(173 75 49 / 0.45); }
    60%, to { box-shadow: 0 0 0 12px rgb(173 75 49 / 0); }
  }
}

/* Az esetek mozgása: a háttérkép gördítés közben lassabban halad, mint a sáv,
   az eredmény pedig a kiindulás után úszik be. */
@media (prefers-reduced-motion: no-preference) {
  .motion-ready .case .case-after {
    transition: opacity var(--t-slow) var(--ease), transform var(--t-slow) var(--ease);
    transition-delay: calc(var(--reveal-i, 0) * 90ms + 240ms);
  }

  .motion-ready .case:not(.is-visible) .case-after { opacity: 0; transform: translateX(-12px); }

  @supports (animation-timeline: view()) {
    .case-bg {
      animation: case-drift linear both;
      animation-timeline: --case;
    }

    @keyframes case-drift {
      from { transform: translateY(-6%) scale(1.04); }
      to { transform: translateY(6%) scale(1.04); }
    }
  }
}

/* ---------- Tördelés ---------- */

@media (max-width: 1100px) {
  :root { --section-pad: var(--s8); --lapel-pad: var(--s7); --gutter: var(--s4); }

  .container { width: calc(100% - var(--s7)); }
  .desktop-nav { gap: var(--s5); }
  .support-card { --pad: var(--s5); }
  .contact-panel { gap: var(--s6); }
  .footer-main { gap: var(--s5); }
}

/* A fejléc 980 px alatt vált mobilmenüre: 861 és ~975 px között az asztali menü
   már nem fért el egy sorban. */
@media (max-width: 980px) {
  .header-inner { gap: var(--s4); }
  .desktop-nav { display: none; }
  .header-contact { margin-left: auto; }

  .menu-toggle {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border: 1px solid var(--edge-invert-strong);
    border-radius: 50%;
    background: transparent;
    color: var(--surface);
    transition: border-color var(--t-base) var(--ease), color var(--t-base) var(--ease);
  }

  .menu-toggle .icon { width: 20px; height: 20px; }

  .mobile-nav { margin-inline: var(--s5); color: var(--surface); }

  .mobile-nav-panel {
    display: flex;
    flex-direction: column;
    margin-top: var(--s2);
    padding: var(--s3) var(--s5) var(--s4);
    border-radius: var(--radius);
    /* Világos keret: a sötét panel a hero fölött nyílik ki, e nélkül
       elmosódik a háttérrel és nehéz kivenni, hol kezdődik. */
    border: 1px solid rgb(255 255 255 / 0.55);
    background: var(--ink-700);
    box-shadow: var(--lift-2);
    /* Fekvő telefonon a rögzült fejléc alatt a panel nem férne ki: görgethető marad. */
    max-height: calc(100vh - var(--header-h) - var(--s2) - var(--s4));
    max-height: calc(100dvh - var(--header-h) - var(--s2) - var(--s4));
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .mobile-nav-panel > * {
    padding: var(--s3) 0;
    border: 0;
    background: none;
    font-size: var(--t-md);
    text-align: left;
  }
}

@media (max-width: 860px) {
  :root { --header-h: 80px; }

  .hero { min-height: 680px; }

  .section-head-row { display: block; }
  .section-head-row .link-arrow { margin-top: var(--s5); }

  /* Egy oszlopban előbb a szöveg, alatta a kép. */
  .about-layout { grid-template-columns: 1fr; grid-template-areas: 'main' 'portrait'; gap: var(--s6); }
  .about-portrait { max-width: 420px; }

  .case { grid-template-columns: 1fr 1fr; gap: var(--s5) var(--s6); padding: var(--s6); }
  .case-meta { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--s1) var(--s3); }
  .case-num { font-size: 1.75rem; }
  .case-tag { margin-top: 0; }

  .support-grid { grid-template-columns: 1fr 1fr; }
  .support-photo { grid-column: 1 / -1; min-height: 440px; }
  .support-photo .support-content { max-width: 440px; }
  .support-photo-top > img { aspect-ratio: 2 / 1; object-position: 45% 40%; }
  .support-photo::after {
    background: linear-gradient(90deg, rgb(25 46 59 / 0.9) 0%, rgb(25 46 59 / 0.8) 62%, rgb(25 46 59 / 0.22) 100%);
  }

  .calculator-layout { grid-template-columns: 1fr; }

  .planner-guide {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 var(--s6);
    padding: var(--s6);
  }

  .planner-icon { display: none; }
  .planner-guide h3, .planner-guide > p:not(.planner-privacy) { grid-column: 1; }
  .planner-steps { grid-column: 2; grid-row: 1 / 3; align-self: center; margin: 0; }
  .planner-privacy { grid-column: 1 / -1; margin-top: var(--s5); }

  .reading-feature { flex-direction: column; min-height: 0; }
  .reading-feature .reading-image { flex: none; aspect-ratio: 16 / 9; }
  .reading-feature-copy { justify-content: flex-start; padding: var(--s6); }

  .contact-panel { grid-template-columns: 1fr; gap: var(--s5); }

  .footer-main { grid-template-columns: 1fr 1fr; }
  .footer-main > p { display: none; }
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: var(--s3); }
  .footer-bottom > div { width: 100%; }
  .footer-bottom a { margin-left: auto; }
}

@media (max-width: 620px) {
  :root { --section-pad: var(--s7); --lapel-pad: 40px; --seam: var(--s5); --header-h: 72px; }

  .container { width: calc(100% - var(--s6)); }

  .brand { font-size: 1.0625rem; gap: var(--s2); }
  .header-contact { display: none; }
  .menu-toggle { margin-left: auto; }
  .mobile-nav { margin-inline: var(--s4); }

  .hero { min-height: 640px; }

  /* Kisebb képernyőn a cím a felvétel világos égboltjára kerül, ezért felül erősebb a
     sötétítés. Mérve a videó minden másodpercén: a címke és a homokszínű sor is 4,5:1
     fölött marad. */
  .hero-shade {
    background:
      linear-gradient(180deg, rgb(15 30 40 / 0.72) 0%, rgb(15 30 40 / 0.66) 42%,
                      rgb(15 30 40 / 0.5) 62%, rgb(15 30 40 / 0.76) 100%),
      rgb(20 38 50 / 0.22);
  }

  .hero-media img, .hero-video { object-position: 64% 28%; }
  .hero-description { max-width: 400px; margin-top: var(--s4); }
  .hero-actions { flex-direction: column; align-items: stretch; gap: var(--s3); margin-top: var(--s5); }
  .hero-actions .text-link { padding-top: var(--s2); text-align: center; }
  .hero-facts { flex-direction: column; gap: var(--s3); padding-block: var(--s5) var(--s4); }
  .hero-scroll { font-size: var(--t-xs); }

  .section-head { margin-bottom: var(--s6); }
  .planner-guide { display: block; padding: var(--s5); }
  .planner-guide h3 { font-size: 1.375rem; }
  .planner-steps { margin: var(--s5) 0 0; }
  .planner-privacy { margin-top: var(--s4); }
  .calculator-card { padding: var(--s5); }
  .calculator-card h3 { font-size: 1.3125rem; }

  .form-grid { grid-template-columns: 1fr; gap: var(--s5); }
  select, input { font-size: var(--t-md); }

  .about-portrait { max-width: none; }
  .about-portrait img { aspect-ratio: 4 / 3; object-position: 58% 50%; }

  .case { grid-template-columns: 1fr; gap: var(--s4); padding: var(--s5); }
  .case::after { background: rgb(255 255 255 / 0.92); }
  .lead-people { gap: var(--s3); }
  .avatar { width: 34px; height: 34px; }
  .avatar + .avatar { margin-left: calc(var(--s2) * -1 - 2px); }

  .support-grid { grid-template-columns: 1fr; }
  .support-card { --pad: var(--s5); }
  .support-photo { min-height: 480px; }
  .support-photo-top > img { aspect-ratio: 4 / 3; object-position: 45% 50%; }
  .support-photo::after {
    background: linear-gradient(180deg, rgb(25 46 59 / 0.25), rgb(25 46 59 / 0) 22%,
                                rgb(25 46 59 / 0.86) 52%, rgb(25 46 59 / 0.96));
  }

  .reading-note { --card-pad: var(--s5); }
  .reading-feature-copy { padding: var(--s5); }
  .reading-side { grid-template-columns: 1fr; }

  .footer-main { grid-template-columns: 1fr; gap: var(--s5); padding-bottom: var(--s5); }
  .footer-main nav { gap: var(--s3) var(--s5); }
  .footer-bottom > div { flex-wrap: wrap; gap: var(--s4); }

  .dialog-bar { padding: var(--s4) var(--s4) var(--s3) var(--s5); }
  #dialog-content { padding: var(--s5); }
  #dialog-content h2 { font-size: 1.375rem; }
}

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