/* ============================================================
   MÉDÉSZ.com — styles.css v4
   IZeN Academic Press, Budapest · 2026
   Teljesen újraírt verzió
   ============================================================ */

/* ---------- TOKENS ---------- */
:root {
  --bg:        #1C1510;
  --bg-2:      #231A14;
  --gold:      #C9A96E;
  --text:      #F5EFE6;
  --meta:      #8B7355;
  --divider:   #3D2E1E;

  --f-hero: "Cormorant Garamond", Georgia, serif;
  --f-body: "Inter", system-ui, sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, monospace;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  --r-card:  6px;
  --r-panel: 10px;
}

/* ---------- RESET ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 100px; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--f-body);
  font-weight: 300;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
ul, ol { list-style: none; }
::selection { background: rgba(201,169,110,.28); color: var(--text); }

/* ---------- HOVER ILLUMINATION — editorial focus ---------- */
/*
   Az egész oldal enyhén tompább alapállapotban.
   Hoverkor az elem "életre kel" — subtle gold lift.
   Nem glow, nem neon. Csak fókusz.
*/
.hoverable {
  opacity: .72;
  transition: opacity .35s ease, color .35s ease, text-shadow .35s ease;
}
.hoverable:hover {
  opacity: 1;
  text-shadow: 0 0 12px rgba(201,169,110,.15);
}
/* Nav linkek, footer linkek, citáció superscriptek */
.nav-list a,
.footer-legal button,
.source-link,
.contact-email,
.meta-links a {
  opacity: .72;
  transition: opacity .35s ease, color .35s ease;
}
.nav-list a:hover,
.footer-legal button:hover,
.source-link:hover,
.contact-email:hover,
.meta-links a:hover {
  opacity: 1;
  color: var(--gold);
}
/* Stat cellák — hover illumination */
.stat-cell {
  transition: background .35s ease, opacity .35s ease;
}
.stat-grid:hover .stat-cell { opacity: .72; }
.stat-grid:hover .stat-cell:hover { opacity: 1; background: rgba(201,169,110,.03); }
/* Táblázat sorok */
.editorial-table tbody tr {
  transition: background .3s ease, opacity .3s ease;
}
.editorial-table tbody:hover tr { opacity: .72; }
.editorial-table tbody:hover tr:hover { opacity: 1; background: rgba(201,169,110,.04); }
/* L1 szekció fejlécek */
.section-title, .lead {
  transition: opacity .35s ease;
}
/* Timeline elemek */
.timeline li {
  transition: opacity .3s ease;
}
.timeline:hover li { opacity: .65; }
.timeline:hover li:hover { opacity: 1; }

/* ---------- SCROLLBAR ---------- */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: rgba(201,169,110,.28); border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: rgba(201,169,110,.5); }
@supports (scrollbar-color: auto) {
  html { scrollbar-color: rgba(201,169,110,.28) #1C1510; }
}

/* ---------- SKIP LINK ---------- */
.skip-link {
  position: fixed; top: -100px; left: 24px; z-index: 9999;
  background: var(--gold); color: var(--bg);
  padding: 12px 20px; border-radius: var(--r-card);
  font-size: 13px; font-weight: 600; letter-spacing: .04em;
  transition: top .2s;
}
.skip-link:focus { top: 16px; }

/* ---------- FOCUS ---------- */
:focus-visible {
  outline: 2px solid rgba(201,169,110,.88);
  outline-offset: 4px;
  border-radius: 6px;
}

/* ---------- LAYOUT ---------- */
.wrap { width: 100%; max-width: 1440px; margin-inline: auto; padding-inline: 48px; }
@media (max-width: 768px) { .wrap { padding-inline: 24px; } }

.section { padding-block: 96px; position: relative; z-index: 10; }
.bg-secondary { background: var(--bg-2); }
@media (max-width: 1023px) { .section { padding-block: 72px; } }
@media (max-width: 640px)  { .section { padding-block: 48px; } }

.divider { height: 1px; background: var(--divider); opacity: .55; }

/* ---------- TYPOGRAPHY ---------- */
.eyebrow {
  font-family: var(--f-body); font-size: 12px; font-weight: 600;
  letter-spacing: .16em; text-transform: uppercase; color: var(--gold);
  display: inline-flex; align-items: center; gap: 12px;
}
.eyebrow::before {
  content: ""; width: 28px; height: 1px;
  background: var(--gold); opacity: .6; flex-shrink: 0;
}
.section-title {
  font-family: var(--f-hero); font-weight: 500;
  font-size: clamp(24px, 4vw, 40px);
  line-height: 1.08; letter-spacing: -.02em;
  margin-top: 16px;
}
.lead {
  font-family: var(--f-hero); font-weight: 400;
  font-size: clamp(20px, 2.8vw, 30px);
  line-height: 1.35; letter-spacing: -.01em;
}
.body-text {
  font-size: clamp(16px, 1.5vw, 18px);
  line-height: 1.78; font-weight: 300;
  opacity: .86;
}
.body-text + .body-text { margin-top: 20px; }
.gold { color: var(--gold); }
.accent { color: var(--gold); font-style: italic; }
.meta-label {
  font-family: var(--f-mono); font-size: 12px;
  letter-spacing: .08em; color: var(--meta);
  text-transform: uppercase;
}

/* ---------- NAVBAR ---------- */
.nav-wrap {
  display: flex; align-items: center;
  justify-content: space-between; gap: 32px;
}
.wordmark {
  font-family: var(--f-hero); font-weight: 600;
  font-size: 22px; letter-spacing: .18em;
  text-transform: uppercase; white-space: nowrap;
  flex-shrink: 0;
  opacity: .72;
  transition: opacity .35s ease;
}
.wordmark:hover { opacity: 1; }
.nav-list {
  display: flex; align-items: center; gap: 32px;
}
.nav-list a {
  font-family: var(--f-body); font-size: 13px; font-weight: 500;
  letter-spacing: .12em; text-transform: uppercase;
  position: relative; padding-block: 6px;
  transition: opacity .3s ease, color .3s ease;
}
.nav-list a::after {
  content: ""; position: absolute; left: 0; bottom: 0;
  height: 1px; width: 0; background: var(--gold);
  transition: width .3s var(--ease);
}
.nav-list a.active { color: var(--gold); opacity: 1; }
.nav-list a.active::after { width: 100%; }
.lang-row {
  display: flex; align-items: center; gap: 2px; flex-shrink: 0;
}
.lang-row button {
  font-family: var(--f-mono); font-size: 12px; letter-spacing: .06em;
  padding: 6px 9px; border-radius: 4px;
  opacity: .5; transition: opacity .3s ease, background .3s ease;
}
.lang-row button:hover { opacity: .85; }
.lang-row button.active { opacity: 1; color: var(--gold); }
.lang-sep { opacity: .25; font-size: 11px; margin-inline: 2px; }

/* Burger — hidden desktop */
.burger { display: none; }

@media (max-width: 1023px) {
  .burger {
    display: flex; flex-direction: column;
    gap: 5px; padding: 8px; z-index: 200; flex-shrink: 0;
  }
  .burger span {
    display: block; width: 24px; height: 1.5px;
    background: var(--text);
    transform-origin: center;
    will-change: transform, opacity;
    transition: transform .4s var(--ease), opacity .3s ease;
  }
  .burger.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
  .burger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
  .burger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

  .nav-drawer {
    position: fixed; inset: 0;
    background: rgba(20,15,11,.97);
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    display: flex; flex-direction: column;
    align-items: center; justify-content: center; gap: 32px;
    padding: 64px 24px;
    transform: translateY(-100%);
    will-change: transform;
    transition: transform .5s var(--ease);
    z-index: 150;
  }
  .nav-drawer.open { transform: translateY(0); }

  .nav-list { flex-direction: column; gap: 28px; text-align: center; }
  .nav-list a { font-size: 20px; }
  .lang-row { margin-top: 8px; }
}
@media (min-width: 1024px) {
  .nav-drawer {
    display: flex; align-items: center; gap: 32px;
    position: static; transform: none; background: none;
    backdrop-filter: none; padding: 0; z-index: auto;
  }
}

/* Scrolled navbar */
.navbar.scrolled {
  border-bottom: 1px solid var(--divider);
}

/* ---------- REVEAL ANIMATION ---------- */
.reveal {
  opacity: 0; transform: translateY(20px);
  will-change: opacity, transform;
  transition: opacity .8s var(--ease), transform .8s var(--ease);
}
.reveal.visible { opacity: 1; transform: none; will-change: auto; }
.stagger > *:nth-child(1) { transition-delay: .00s; }
.stagger > *:nth-child(2) { transition-delay: .08s; }
.stagger > *:nth-child(3) { transition-delay: .16s; }
.stagger > *:nth-child(4) { transition-delay: .24s; }
.stagger > *:nth-child(5) { transition-delay: .32s; }

/* ---------- SECTION HEAD ---------- */
.section-head { max-width: 820px; margin-bottom: 64px; }
.section-head .body-text { margin-top: 16px; }

/* ---------- S01 — PROBLÉMA ---------- */
.split {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 64px; align-items: start;
}
@media (max-width: 1023px) { .split { grid-template-columns: 1fr; gap: 40px; } }
.side-num {
  font-family: var(--f-hero); font-size: clamp(64px, 8vw, 96px);
  color: var(--gold); line-height: 1; letter-spacing: 0;
  opacity: .35;
}
.side-label {
  font-family: var(--f-mono); font-size: 11px;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--meta); line-height: 1.7; margin-top: 8px;
}

/* ---------- S02 — VESZTESÉG ---------- */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px; background: var(--divider);
  border: 1px solid var(--divider);
  border-radius: var(--r-card);
  overflow: hidden;
  margin-top: 48px;
}
@media (max-width: 768px) { .stat-grid { grid-template-columns: 1fr; } }

.stat-cell {
  background: var(--bg-2);
  padding: 40px 32px;
  position: relative;
}
.stat-country {
  font-family: var(--f-mono); font-size: 11px;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--meta);
}
.stat-number {
  font-family: var(--f-hero); font-weight: 600;
  font-size: clamp(36px, 5.5vw, 64px);
  line-height: 1.05; letter-spacing: -.02em;
  color: var(--gold); margin-block: 12px 2px;
  font-variant-numeric: tabular-nums;
}
.stat-unit {
  font-family: var(--f-mono); font-size: 11px;
  color: var(--meta); letter-spacing: .08em;
  text-transform: uppercase; margin-bottom: 8px;
}
.stat-cat {
  font-size: 13px; color: var(--meta);
  letter-spacing: .04em; margin-bottom: 20px;
}
/* Forrás gomb */
.stat-source {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--f-mono); font-size: 11px;
  letter-spacing: .08em; text-transform: uppercase;
  color: var(--gold); opacity: .7;
  transition: opacity .3s ease;
  padding: 0;
}
.stat-source:hover { opacity: 1; }
.stat-source .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--gold); flex-shrink: 0;
  transition: transform .3s ease;
}
.stat-cell.open .stat-source .dot { transform: rotate(45deg) scale(1.3); }
.stat-source-chev {
  font-size: 16px; line-height: 1;
  transition: transform .3s ease;
}
.stat-cell.open .stat-source-chev { transform: rotate(45deg); }

/* Citation panel */
.citation-panel {
  max-height: 0; overflow: hidden;
  transition: max-height .5s var(--ease), padding .4s ease;
}
.stat-cell.open .citation-panel {
  max-height: 400px;
  padding-top: 20px;
}
.citation-panel h4 {
  font-family: var(--f-body); font-size: 13px;
  font-weight: 600; letter-spacing: .04em;
  color: var(--gold); margin-bottom: 8px;
}
.citation-panel .cite-note {
  font-size: 13px; line-height: 1.65;
  color: var(--text); opacity: .72;
  margin-bottom: 12px;
}
.citation-panel ul { display: flex; flex-direction: column; gap: 6px; }
.source-link {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; line-height: 1.5;
  transition: opacity .3s ease, color .3s ease;
}
.source-link .arrow {
  font-size: 11px; color: var(--gold); flex-shrink: 0;
}
.source-plain {
  font-size: 12px; color: var(--meta);
  letter-spacing: .02em; margin-top: 2px;
}

/* Szintézis */
.loss-synthesis {
  margin-top: 48px; max-width: 820px;
  font-family: var(--f-hero); font-size: clamp(18px, 2.2vw, 24px);
  line-height: 1.55; opacity: .9;
}
.loss-synthesis p + p { margin-top: 16px; }
.loss-synthesis .conclude {
  font-size: clamp(20px, 2.6vw, 28px);
  color: var(--gold); margin-top: 24px;
  font-weight: 500;
}
.loss-synthesis strong { color: var(--text); font-weight: 600; }

/* ---------- S03 — TÁBLÁZAT ---------- */
.editorial-table {
  width: 100%; border-collapse: collapse;
  table-layout: fixed;
  border-radius: var(--r-card);
  overflow: hidden;
  margin-top: 32px;
}
.editorial-table thead th {
  font-family: var(--f-body); font-size: 12px;
  font-weight: 600; letter-spacing: .12em;
  text-transform: uppercase; color: var(--gold);
  padding: 20px; text-align: left;
  border-bottom: 1px solid rgba(201,169,110,.15);
  background: var(--bg-2);
}
.editorial-table tbody td {
  padding: 20px; font-size: 15px; line-height: 1.6;
  vertical-align: top;
  border-bottom: 1px solid rgba(201,169,110,.07);
  background: var(--bg);
}
.editorial-table tbody tr.is-medesz td {
  color: var(--gold); font-weight: 500;
  background: rgba(201,169,110,.04);
  border-top: 1px solid rgba(201,169,110,.2);
}
.col-approach { font-weight: 500; }
@media (max-width: 640px) {
  .editorial-table, .editorial-table thead,
  .editorial-table tbody, .editorial-table tr,
  .editorial-table th, .editorial-table td {
    display: block;
  }
  .editorial-table thead { display: none; }
  .editorial-table td { padding: 12px 16px; }
}

/* ---------- S04 — MI A MÉDÉSZet? — csak tipográfia ---------- */
.define-stack {
  display: flex; flex-direction: column;
  gap: 48px; max-width: 820px;
  margin-top: 48px;
}
.lvl { position: relative; padding-left: 28px; }
.lvl::before {
  content: ""; position: absolute; left: 0; top: 8px;
  width: 12px; height: 1px; background: var(--gold); opacity: .5;
}
.lvl-tag {
  font-family: var(--f-mono); font-size: 11px;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--meta); display: block; margin-bottom: 16px;
}
.lvl p {
  font-family: var(--f-hero);
  font-size: clamp(18px, 2.4vw, 26px);
  line-height: 1.5; font-weight: 400;
  opacity: .9;
}
.lvl p + p { margin-top: 12px; }
.l2-text, .l3-text {
  font-family: var(--f-body); font-size: clamp(15px, 1.4vw, 17px);
  line-height: 1.75; opacity: .78;
}
.l2-text + .l2-text, .l3-text + .l3-text { margin-top: 10px; }

/* ---------- S05 — AUDIT ---------- */
.audit-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px; align-items: start;
  margin-top: 48px;
}
@media (max-width: 1023px) { .audit-grid { grid-template-columns: 1fr; gap: 40px; } }

.signal-list {
  display: flex; flex-direction: column; gap: 0;
}
.signal-list li {
  display: flex; align-items: baseline; gap: 16px;
  padding-block: 16px;
  border-bottom: 1px solid rgba(201,169,110,.1);
  font-size: clamp(17px, 2vw, 22px);
  font-family: var(--f-hero); font-weight: 400;
  transition: opacity .3s ease, color .3s ease;
}
.signal-list:hover li { opacity: .65; }
.signal-list:hover li:hover { opacity: 1; color: var(--text); }
.signal-list .idx {
  font-family: var(--f-mono); font-size: 11px;
  color: var(--gold); opacity: .6; flex-shrink: 0;
  letter-spacing: .06em;
}
.fracture {
  padding: 32px;
  background: rgba(201,169,110,.04);
  border: 1px solid rgba(201,169,110,.12);
  border-radius: var(--r-card);
}

/* ---------- S06 — KI A MÉDÉSZ ---------- */
.who-statement { max-width: 820px; margin-top: 32px; }
.equation {
  margin-top: 40px;
  display: flex; flex-direction: column; gap: 0;
  border: 1px solid var(--divider); border-radius: var(--r-card);
  overflow: hidden; max-width: 480px;
}
.eq-row {
  display: flex; align-items: center;
  padding: 16px 24px; gap: 24px;
  border-bottom: 1px solid var(--divider);
  transition: background .3s ease;
}
.eq-row:last-child { border-bottom: none; }
.eq-row:hover { background: rgba(201,169,110,.04); }
.eq-k {
  font-family: var(--f-hero); font-size: 20px;
  color: var(--gold); font-weight: 500;
  min-width: 140px; flex-shrink: 0;
}
.eq-v {
  font-size: 14px; color: var(--meta);
  letter-spacing: .04em;
}

/* ---------- S07 — TUDOMÁNY ---------- */
.science-grid {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 64px; align-items: start;
  margin-top: 48px;
}
@media (max-width: 1100px) { .science-grid { grid-template-columns: 1fr; gap: 40px; } }

.portrait-frame {
  position: relative;
  border-radius: var(--r-card);
  overflow: hidden;
  aspect-ratio: 4/5;
  background: var(--bg-2);
}
.portrait-img {
  width: 100%; height: 100%;
  object-fit: cover;
  /* warm editorial treatment */
  filter: saturate(.8) contrast(1.05) brightness(.96);
  transition: filter .5s ease;
}
.portrait-frame:hover .portrait-img {
  filter: saturate(.9) contrast(1.05) brightness(.99);
}
.portrait-meta { margin-top: 20px; }
.portrait-meta .p-name {
  font-family: var(--f-hero); font-size: 22px;
  font-weight: 500; letter-spacing: -.01em;
}
.portrait-meta .p-role {
  font-size: 13px; color: var(--meta);
  line-height: 1.6; margin-top: 4px;
}

/* ORCID hover */
.orcid-row {
  display: inline-flex; align-items: center; gap: 10px;
  margin-top: 16px; cursor: pointer;
  position: relative;
}
.orcid-row .meta-label { color: var(--gold); }
.orcid-id {
  font-family: var(--f-mono); font-size: 13px;
  color: var(--text); opacity: .8;
  transition: opacity .3s ease;
}
.orcid-row:hover .orcid-id { opacity: 1; color: var(--gold); }
.orcid-panel {
  position: absolute; left: 0; top: calc(100% + 12px);
  width: 300px; z-index: 50;
  background: rgba(28,21,16,.97);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(201,169,110,.18);
  border-radius: var(--r-panel);
  padding: 20px;
  box-shadow: 0 20px 60px rgba(0,0,0,.45);
  opacity: 0; transform: translateY(8px);
  pointer-events: none;
  transition: opacity .35s var(--ease), transform .35s var(--ease);
}
.orcid-row:hover .orcid-panel,
.orcid-row:focus-within .orcid-panel {
  opacity: 1; transform: translateY(0); pointer-events: auto;
}
.orcid-panel .op-name {
  font-family: var(--f-hero); font-size: 16px; font-weight: 500;
  margin-bottom: 4px;
}
.orcid-panel .op-role {
  font-size: 12px; color: var(--meta); margin-bottom: 12px; line-height: 1.5;
}
.orcid-panel .op-areas {
  display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px;
}
.orcid-panel .op-areas span {
  font-size: 11px; padding: 3px 8px;
  background: rgba(201,169,110,.1);
  border: 1px solid rgba(201,169,110,.2);
  border-radius: 3px; color: var(--gold);
}
.orcid-panel .op-stats {
  display: flex; gap: 20px; margin-bottom: 14px;
}
.orcid-panel .op-stats div {
  display: flex; flex-direction: column; gap: 2px;
}
.orcid-panel .op-stats b {
  font-family: var(--f-hero); font-size: 22px;
  color: var(--gold); font-weight: 600;
}
.orcid-panel .op-stats small {
  font-size: 11px; color: var(--meta);
  letter-spacing: .04em; text-transform: uppercase;
}
.orcid-panel .profile-link {
  font-family: var(--f-mono); font-size: 12px;
  color: var(--gold); opacity: .8;
  transition: opacity .3s ease;
}
.orcid-panel .profile-link:hover { opacity: 1; }

.science-body .body-text + .body-text { margin-top: 20px; }
.meta-links {
  display: flex; flex-direction: column; gap: 10px;
  margin-top: 32px;
}
.meta-links a {
  display: flex; align-items: center; gap: 10px;
  font-size: 14px; line-height: 1.5;
}
.meta-links .meta-label { font-size: 11px; }

.gde { margin-top: 40px; }
.gde h4 {
  font-family: var(--f-body); font-size: 12px;
  font-weight: 600; letter-spacing: .12em;
  text-transform: uppercase; color: var(--gold);
  margin-bottom: 16px;
}
.gde ul { display: flex; flex-direction: column; gap: 10px; }
.gde li {
  font-size: 14px; line-height: 1.65;
  padding-left: 16px; position: relative; opacity: .82;
}
.gde li::before {
  content: "—"; position: absolute; left: 0;
  color: var(--gold); opacity: .5;
}

/* ---------- S08 — VALIDÁCIÓ ---------- */
.validate-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px; align-items: start;
  margin-top: 48px;
}
@media (max-width: 1023px) { .validate-grid { grid-template-columns: 1fr; gap: 40px; } }

.reg-card {
  background: var(--bg);
  border: 1px solid var(--divider);
  border-radius: var(--r-card);
  padding: 32px;
}
.reg-card .inst {
  font-family: var(--f-mono); font-size: 11px;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--meta); margin-bottom: 20px;
}
.reg-card .reg-label {
  font-family: var(--f-mono); font-size: 11px;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--meta);
}
.reg-card .reg-number {
  font-family: var(--f-hero); font-size: clamp(48px, 8vw, 80px);
  font-weight: 700; color: var(--text); line-height: 1;
  letter-spacing: .02em; font-variant-numeric: tabular-nums;
  margin-block: 8px 4px;
}
.reg-card .reg-meta {
  font-size: 13px; line-height: 1.7;
  color: var(--meta); margin-bottom: 24px;
}
.cert-trigger {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--f-mono); font-size: 12px;
  letter-spacing: .08em; text-transform: uppercase;
  color: var(--gold); opacity: .8;
  border: 1px solid rgba(201,169,110,.3);
  border-radius: var(--r-card); padding: 10px 16px;
  transition: opacity .3s ease, background .3s ease, border-color .3s ease;
}
.cert-trigger:hover {
  opacity: 1; background: rgba(201,169,110,.06);
  border-color: rgba(201,169,110,.6);
}

.timeline {
  display: flex; flex-direction: column; gap: 0;
  border-left: 1px solid var(--divider);
  padding-left: 28px; margin-top: 8px;
}
.timeline li {
  position: relative; padding-block: 18px;
  border-bottom: 1px solid rgba(201,169,110,.07);
}
.timeline li:last-child { border-bottom: none; }
.timeline li::before {
  content: ""; position: absolute;
  left: -33px; top: 24px;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--divider); border: 1px solid var(--gold);
  opacity: .5;
}
.timeline li.ongoing::before { background: var(--gold); opacity: .8; }
.timeline .yr {
  font-family: var(--f-mono); font-size: 12px;
  color: var(--gold); letter-spacing: .06em;
  margin-bottom: 4px;
}
.timeline .ev {
  font-size: 14px; line-height: 1.6; color: var(--text); opacity: .82;
}

/* ---------- S09 — ARCHÍVUM ---------- */
.archive-filters {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-top: 32px; margin-bottom: 40px;
}
.archive-filters button {
  font-family: var(--f-mono); font-size: 11px;
  letter-spacing: .08em; text-transform: uppercase;
  padding: 8px 14px; border-radius: var(--r-card);
  border: 1px solid var(--divider); color: var(--meta);
  transition: background .3s ease, border-color .3s ease, color .3s ease;
}
.archive-filters button:hover {
  border-color: rgba(201,169,110,.4); color: var(--text);
}
.archive-filters button.active {
  background: rgba(201,169,110,.1);
  border-color: rgba(201,169,110,.4);
  color: var(--gold);
}
.archive-empty {
  padding: 64px 32px; text-align: center;
  border: 1px dashed var(--divider); border-radius: var(--r-card);
}
.archive-empty p {
  font-family: var(--f-hero);
  font-size: clamp(18px, 2.2vw, 24px);
  opacity: .7; margin-top: 8px;
}

/* ---------- S10 — KAPCSOLAT ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px; align-items: start;
  margin-top: 48px;
}
@media (max-width: 1023px) { .contact-grid { grid-template-columns: 1fr; gap: 40px; } }

.contact-directory { display: flex; flex-direction: column; }
.contact-item {
  display: flex; flex-direction: column; align-items: flex-start;
  padding-block: 20px;
  border-bottom: 1px solid rgba(201,169,110,.08);
  transition: opacity .3s ease;
}
.contact-item:first-child { padding-top: 0; }
.contact-item:last-child { border-bottom: none; }
.contact-directory:hover .contact-item { opacity: .65; }
.contact-directory:hover .contact-item:hover { opacity: 1; }
.contact-item-title {
  font-family: var(--f-hero); font-size: clamp(18px, 2.2vw, 24px);
  font-weight: 500; letter-spacing: -.01em;
}
.contact-item-desc {
  font-size: 13px; opacity: .65; line-height: 1.6;
  margin-top: 6px; max-width: 44ch;
}
.contact-email {
  font-family: var(--f-mono); font-size: 13px;
  color: var(--gold); margin-top: 10px;
  border-bottom: 1px solid rgba(201,169,110,.25);
  padding-bottom: 2px;
  transition: opacity .3s ease, border-color .3s ease;
}
.contact-email:hover { border-color: var(--gold); }

/* Kapcsolati form */
.contact-form { display: flex; flex-direction: column; gap: 0; }
.form-field { margin-bottom: 20px; }
.form-field label {
  display: block; font-family: var(--f-mono); font-size: 11px;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--meta); margin-bottom: 8px;
}
.form-field input, .form-field textarea {
  width: 100%; background: rgba(245,239,230,.025);
  border: 1px solid var(--divider);
  border-radius: var(--r-card); padding: 14px 16px;
  color: var(--text); font-family: var(--f-body); font-size: 15px;
  transition: border-color .3s ease, background .3s ease;
  -webkit-appearance: none;
}
.form-field input:focus, .form-field textarea:focus {
  outline: none;
  border-color: var(--gold);
  background: rgba(245,239,230,.04);
}
.form-field textarea { resize: vertical; min-height: 120px; }
/* honeypot hidden */
.hp-field { display: none !important; }
.form-submit {
  align-self: flex-start;
  padding: 14px 28px;
  background: var(--gold); color: var(--bg);
  border-radius: var(--r-card);
  font-weight: 600; font-size: 14px; letter-spacing: .04em;
  transition: opacity .3s ease, transform .2s ease;
}
.form-submit:hover { opacity: .88; }
.form-submit:active { transform: scale(.98); }
.form-submit:disabled { opacity: .5; cursor: not-allowed; }
.form-status {
  font-size: 13px; line-height: 1.6;
  margin-top: 14px; min-height: 18px;
}
.form-status.ok   { color: var(--gold); }
.form-status.err  { color: #e07070; }
.form-note {
  font-size: 12px; opacity: .5;
  margin-top: 10px; line-height: 1.6;
}

/* ---------- CLOSING ---------- */
.closing-body {
  max-width: 820px; margin-top: 32px;
}
.closing-body p {
  font-family: var(--f-hero);
  font-size: clamp(20px, 2.8vw, 30px);
  line-height: 1.45; margin-bottom: 20px;
  opacity: .88;
}
.closing-body p.conclude {
  color: var(--gold); opacity: 1;
  font-weight: 500;
}

/* ---------- FOOTER ---------- */
footer {
  background: var(--bg);
  border-top: 1px solid var(--divider);
  padding-top: 64px; padding-bottom: 48px;
  position: relative; z-index: 10;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr .8fr;
  gap: 64px;
}
@media (max-width: 1023px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: 40px; } }
@media (max-width: 640px)  { .footer-grid { grid-template-columns: 1fr; } }

.footer-wordmark {
  font-family: var(--f-hero); font-weight: 600;
  font-size: 20px; letter-spacing: .18em;
  text-transform: uppercase; margin-bottom: 16px;
}
.footer-col h5 {
  font-family: var(--f-mono); font-size: 11px;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--meta); margin-bottom: 16px;
}
.footer-col p, .footer-col a {
  font-size: 13px; line-height: 1.85; opacity: .72;
}
.footer-legal {
  display: flex; flex-direction: column; gap: 8px;
}
.footer-legal button {
  font-size: 13px; opacity: .72; text-align: left;
  transition: opacity .3s ease, color .3s ease;
}
.footer-legal button:hover { opacity: 1; color: var(--gold); }
.footer-bottom {
  margin-top: 64px; padding-top: 32px;
  border-top: 1px solid var(--divider);
  display: flex; flex-wrap: wrap;
  justify-content: space-between; gap: 16px;
}
.footer-bottom .a11y { font-size: 12px; opacity: .5; }
.footer-lang { display: flex; gap: 4px; }
.footer-lang button {
  font-family: var(--f-mono); font-size: 12px;
  opacity: .5; padding: 2px 6px;
  transition: opacity .3s ease, color .3s ease;
}
.footer-lang button.active { opacity: 1; color: var(--gold); }
.footer-lang button:hover { opacity: .85; }

/* ---------- MODALS ---------- */
.modal-bg {
  position: fixed; inset: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  background: rgba(10,8,6,.84);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  opacity: 0;
  transition: opacity .3s ease;
}
.modal-bg:not([hidden]) { opacity: 1; }
.modal-bg[hidden] { display: none; }

.modal-close {
  position: absolute; top: 18px; right: 20px;
  width: 40px; height: 40px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; opacity: .6;
  transition: opacity .3s ease;
}
.modal-close:hover { opacity: 1; }

/* Certificate */
.certificate-paper {
  background: #F5EFE6; color: #2A2018;
  max-width: 540px; width: 100%;
  border-radius: var(--r-panel);
  padding: clamp(28px, 5vw, 52px);
  box-shadow: 0 40px 120px rgba(0,0,0,.5);
  max-height: 90vh; overflow-y: auto;
  position: relative;
  animation: certIn .7s var(--ease) both;
}
@keyframes certIn {
  from { opacity: 0; transform: translateY(24px) scale(.98); }
  to   { opacity: 1; transform: none; }
}
.cert-seal {
  width: 52px; height: 52px; margin: 0 auto 16px;
  border: 1.5px solid #C9A96E; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--f-hero); font-size: 20px;
  color: #8B6B3A; font-weight: 600;
}
.cert-institution {
  font-family: var(--f-body); font-size: 11px;
  letter-spacing: .12em; text-transform: uppercase;
  color: #8B7355; text-align: center;
}
.cert-label {
  font-family: var(--f-mono); font-size: 11px;
  letter-spacing: .14em; text-transform: uppercase;
  color: #8B7355; text-align: center;
  margin-top: 20px;
}
.cert-number {
  font-family: var(--f-hero); font-size: clamp(44px, 10vw, 72px);
  font-weight: 700; color: #2A2018; text-align: center;
  line-height: 1; letter-spacing: .02em;
  font-variant-numeric: tabular-nums;
}
.certificate-paper table {
  width: 100%; border-collapse: collapse; margin-top: 20px;
}
.certificate-paper td {
  padding: 10px 0; font-size: 13px; vertical-align: top;
  border-bottom: 1px solid rgba(42,32,24,.1);
}
.certificate-paper td:first-child {
  font-family: var(--f-mono); font-size: 11px;
  letter-spacing: .06em; text-transform: uppercase;
  color: #8B7355; width: 42%; padding-right: 12px;
}
.cert-verify {
  display: inline-flex; gap: 6px; margin-top: 20px;
  font-family: var(--f-mono); font-size: 12px;
  color: #8B6B3A; text-decoration: none;
  border-bottom: 1px solid rgba(139,107,58,.3); padding-bottom: 3px;
}

/* Legal modal */
.legal-paper {
  background: var(--bg-2);
  border: 1px solid var(--divider);
  max-width: 620px; width: 100%;
  border-radius: var(--r-panel);
  padding: clamp(28px, 5vw, 48px);
  box-shadow: 0 40px 120px rgba(0,0,0,.45);
  max-height: 86vh; overflow-y: auto;
  position: relative;
  animation: certIn .6s var(--ease) both;
}
.legal-paper h3 {
  font-family: var(--f-hero);
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 500; margin-bottom: 24px; padding-right: 40px;
}
.legal-body { font-size: 14px; line-height: 1.8; opacity: .84; }
.legal-body p { margin-bottom: 12px; }
.legal-body strong { color: var(--gold); font-weight: 600; }
.legal-body a { color: var(--gold); }
.legal-body .kv {
  display: grid; grid-template-columns: 40% 1fr;
  gap: 4px 16px; margin-bottom: 16px;
}
.legal-body .kv dt {
  font-family: var(--f-mono); font-size: 11px;
  letter-spacing: .04em; text-transform: uppercase;
  color: var(--meta);
}
.legal-body .kv dd { font-size: 13px; }

/* ---------- TOAST ---------- */
#toast {
  position: fixed; bottom: 28px; right: 28px; z-index: 9999;
  padding: 14px 22px; border-radius: var(--r-card);
  font-size: 14px; font-weight: 600; letter-spacing: .02em;
  transform: translateY(64px); opacity: 0;
  transition: transform .4s var(--ease), opacity .4s ease;
  pointer-events: none; max-width: 320px;
}
#toast.show { transform: translateY(0); opacity: 1; }
#toast.success { background: var(--gold); color: var(--bg); }
#toast.error   { background: #c0392b; color: #fff; }

/* ---------- PRINT ---------- */
@media print {
  body { background: #fff; color: #1a1a1a; }
  .navbar, .grain, .burger, .lang-row,
  .hero-overlay, .archive-filters, form,
  .modal-bg, #toast { display: none !important; }
  section { padding-block: 24px; page-break-inside: avoid; }
  .gold, .stat-number, .reg-number, .section-title { color: #6b5226 !important; }
}

/* ---------- REDUCED MOTION ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; will-change: auto; }
}
