/* Leadi: közös arculati alap.
   Minden méret a Tailwind típusskálán, minden térköz a spacing-létrán ül.
   Betűk: az adverr.hu rendszere. Címsor: Archivo Black nagybetűvel; szöveg és felület: Manrope;
   kiemelés a címeken belül: Fraunces dőlt; napló és domain: rendszer-egyenszélességű betű. */

@import url("https://fonts.googleapis.com/css2?family=Archivo+Black&family=Fraunces:ital,wght@1,400;1,600&family=Manrope:wght@400;500;600;700;800&display=swap");

:root {
  color-scheme: light;

  /* Papír, tinta, réz */
  --papir: #F6F4EE;
  --felulet: #FFFFFF;
  --felulet-2: #FBFAF7;
  --vonal: #E4E0D5;
  --vonal-eros: #CFC9BA;
  --tinta: #17160F;
  --tinta-2: #45433B;
  --halvany: #6E6B5F;

  /* Az egyetlen kiemelőszín: réz. Rajta tinta színű szöveg (8,3:1). */
  --rez: #E2A63B;
  --rez-hover: #D6982A;
  --rez-sotet: #8A5A0E;
  --rez-halvany: #F7E7C4;

  /* Állapotszínek, mindig szöveggel vagy jellel együtt */
  --jo: #1E7A4C;
  --jo-hatter: #E3F1E8;
  --figyel: #8F5400;
  --figyel-hatter: #F8ECD6;
  --rossz: #B3261E;
  --rossz-hatter: #F8E1DE;

  --gorbe: cubic-bezier(0.32, 0.72, 0, 1);
  --ido: 700ms;

  --betu: "Manrope", system-ui, sans-serif;
  --cim: "Archivo Black", "Helvetica Neue", system-ui, sans-serif;
  --serif: "Fraunces", Georgia, serif;
  --mono: "SF Mono", Menlo, Consolas, monospace;

  --arnyek-1: 0 1px 2px rgba(23, 22, 15, 0.06);
  --arnyek-2: 0 8px 24px rgba(23, 22, 15, 0.08), 0 1px 2px rgba(23, 22, 15, 0.06);
  --arnyek-3: 0 24px 64px rgba(23, 22, 15, 0.16), 0 2px 8px rgba(23, 22, 15, 0.08);
}

*,
*::before,
*::after { box-sizing: border-box; }

/* A rejtett elem akkor is rejtve marad, ha az osztálya display értéket ad neki */
[hidden] { display: none !important; }

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

body {
  margin: 0;
  background: var(--papir);
  color: var(--tinta);
  font-family: var(--betu);
  font-size: 16px;
  line-height: 24px;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }
button, input, textarea, select { font: inherit; color: inherit; }
a { color: inherit; }
h1, h2, h3, h4, p { margin: 0; }
h1, h2, h3, h4 {
  font-family: var(--cim);
  font-weight: 400; /* az Archivo Black egyetlen, eleve nagyon vastag vágás */
  text-transform: uppercase;
  letter-spacing: -0.02em;
  line-height: 1.02;
  text-wrap: balance;
}
/* Kiemelés a címeken belül: Fraunces dőlt, kisbetűvel, mint az adverr.hu-n */
h1 em, h2 em, h3 em, h4 em, .kiemelt-szo {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  text-transform: none;
  letter-spacing: -0.01em;
}
p, li { text-wrap: pretty; }

/* Típusskála */
.t-xs { font-size: 12px; line-height: 16px; }
.t-sm { font-size: 14px; line-height: 20px; }
.t-base { font-size: 16px; line-height: 24px; }
.t-lg { font-size: 18px; line-height: 28px; }
.t-xl { font-size: 20px; line-height: 28px; }
.t-2xl { font-size: 24px; line-height: 32px; }
.t-3xl { font-size: 30px; line-height: 36px; }
.t-4xl { font-size: 36px; line-height: 40px; }
.t-5xl { font-size: 48px; line-height: 1; }
.t-6xl { font-size: 60px; line-height: 1; }
.t-7xl { font-size: 72px; line-height: 1; }

.mono { font-family: var(--mono); }
.halvany { color: var(--halvany); }
.felkover { font-weight: 600; }
.szamok { font-variant-numeric: tabular-nums; }

.rejtett {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.ugras-tartalomra {
  position: absolute;
  left: 16px; top: -64px;
  z-index: 100;
  padding: 8px 12px;
  border-radius: 8px;
  background: var(--tinta);
  color: var(--felulet);
  font-size: 14px; line-height: 20px; font-weight: 600;
  text-decoration: none;
  transition: top var(--ido) var(--gorbe);
}
.ugras-tartalomra:focus { top: 16px; }

:focus-visible {
  outline: 2px solid var(--tinta);
  outline-offset: 2px;
}

/* Gombok: 8px függőleges, 12px vízszintes belső tér, 16px félkövér felirat */
.gomb {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid transparent;
  font-size: 16px; line-height: 24px; font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition:
    background-color var(--ido) var(--gorbe),
    border-color var(--ido) var(--gorbe),
    transform var(--ido) var(--gorbe),
    box-shadow var(--ido) var(--gorbe),
    opacity var(--ido) var(--gorbe);
}
.gomb:active { transform: scale(0.98); }
.gomb[disabled], .gomb[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.45;
  transform: none;
}
.gomb--fo { background: var(--rez); color: var(--tinta); }
.gomb--fo:hover:not([disabled]) { background: var(--rez-hover); }
.gomb--tinta { background: var(--tinta); color: var(--felulet); }
.gomb--tinta:hover:not([disabled]) { background: #2E2C23; }
.gomb--keret { background: var(--felulet); border-color: var(--vonal-eros); color: var(--tinta); }
.gomb--keret:hover:not([disabled]) { border-color: var(--tinta); }
.gomb--szoveg { background: transparent; color: var(--tinta-2); padding: 8px; }
.gomb--szoveg:hover:not([disabled]) { color: var(--tinta); background: rgba(23, 22, 15, 0.05); }
.gomb--kicsi { font-size: 14px; line-height: 20px; padding: 4px 12px; border-radius: 8px; }
.gomb--nagy { padding: 12px 24px; }
.gomb .ph { font-size: 18px; }

/* Mezők */
.mezo {
  width: 100%;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid var(--vonal-eros);
  background: var(--felulet);
  font-size: 16px; line-height: 24px;
  transition: border-color var(--ido) var(--gorbe), box-shadow var(--ido) var(--gorbe);
}
.mezo::placeholder { color: #8C897D; }
.mezo:hover { border-color: #B9B2A1; }
.mezo:focus { outline: none; border-color: var(--tinta); box-shadow: 0 0 0 4px rgba(226, 166, 59, 0.28); }
.mezo[aria-invalid="true"] { border-color: var(--rossz); }
textarea.mezo { resize: vertical; min-height: 80px; }

.mezo-cim { display: block; margin-bottom: 8px; font-size: 14px; line-height: 20px; font-weight: 600; }
.mezo-hiba { margin-top: 8px; color: var(--rossz); font-size: 14px; line-height: 20px; }

/* Kártya */
.kartya {
  background: var(--felulet);
  border: 1px solid var(--vonal);
  border-radius: 16px;
  box-shadow: var(--arnyek-1);
}

/* Címke */
.cimke {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 6px;
  border: 1px solid var(--vonal);
  background: var(--felulet-2);
  color: var(--tinta-2);
  font-size: 12px; line-height: 16px; font-weight: 500;
  white-space: nowrap;
}
.cimke--jo { background: var(--jo-hatter); border-color: transparent; color: var(--jo); }
.cimke--figyel { background: var(--figyel-hatter); border-color: transparent; color: var(--figyel); }
.cimke--rossz { background: var(--rossz-hatter); border-color: transparent; color: var(--rossz); }
.cimke--rez { background: var(--rez-halvany); border-color: transparent; color: var(--rez-sotet); }

/* Vázlat betöltéshez: a valódi elrendezés alakjában */
.vaz {
  position: relative;
  overflow: hidden;
  background: #ECE9E0;
  border-radius: 6px;
}
.vaz::after {
  content: "";
  position: absolute; inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.55), transparent);
  animation: vaz-fenyes 1600ms var(--gorbe) infinite;
}
@keyframes vaz-fenyes { to { transform: translateX(100%); } }

/* Görgetésre megjelenés: lassú, nehéz felúszás */
.feltunik {
  opacity: 0;
  transform: translateY(64px);
  filter: blur(12px);
  transition:
    opacity 800ms var(--gorbe),
    transform 800ms var(--gorbe),
    filter 800ms var(--gorbe);
}
.feltunik.lathato { opacity: 1; transform: none; filter: none; }

/* Felugró ablak */
.ablak-hatter {
  position: fixed; inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 16px;
  /* az adverr sütisávja alatt ne tűnjön el az ablak alja (kozos.js: --suti-sav) */
  padding-bottom: calc(16px + var(--suti-sav, 0px));
  background: rgba(23, 22, 15, 0.32);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity var(--ido) var(--gorbe);
  overflow-y: auto;
  overscroll-behavior: contain;
}
.ablak-hatter.nyitva { opacity: 1; }
.ablak {
  position: relative;
  width: 100%;
  max-width: 560px;
  max-height: calc(100vh - 32px - var(--suti-sav, 0px));
  max-height: calc(100dvh - 32px - var(--suti-sav, 0px));
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--felulet);
  border-radius: 24px;
  box-shadow: var(--arnyek-3);
  transform: translateY(24px) scale(0.98);
  transition: transform var(--ido) var(--gorbe);
}
.ablak-hatter.nyitva .ablak { transform: none; }
.ablak-bezar {
  position: absolute; top: 16px; right: 16px;
  z-index: 2;
  display: grid; place-items: center;
  width: 40px; height: 40px;
  border: 0; border-radius: 12px;
  background: transparent;
  color: var(--tinta-2);
  cursor: pointer;
  transition: background-color var(--ido) var(--gorbe);
}
.ablak-bezar:hover { background: rgba(23, 22, 15, 0.06); }
.ablak-bezar .ph { font-size: 20px; }
body.ablak-nyitva { overflow: hidden; }

/* Súgóbuborék */
.sugo {
  position: absolute;
  z-index: 60;
  max-width: 320px;
  padding: 12px;
  border-radius: 12px;
  background: var(--tinta);
  color: var(--felulet);
  font-size: 14px; line-height: 20px;
  box-shadow: var(--arnyek-2);
  pointer-events: none;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 300ms var(--gorbe), transform 300ms var(--gorbe);
}
.sugo.lathato { opacity: 1; transform: none; }
.sugo b { display: block; margin-bottom: 4px; color: var(--rez); font-weight: 600; }

/* Logó */
.logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--cim);
  font-size: 18px; line-height: 28px; font-weight: 400;
  letter-spacing: -0.01em;
  text-decoration: none;
  color: var(--tinta);
}
.logo svg { width: 28px; height: 28px; flex: none; }

/* Favicon doboz */
.ikon-doboz {
  display: grid;
  place-items: center;
  flex: none;
  overflow: hidden;
  background: var(--felulet-2);
  border: 1px solid var(--vonal);
  border-radius: 6px;
  color: var(--tinta-2);
  font-weight: 600;
}
.ikon-doboz img { width: 100%; height: 100%; object-fit: contain; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
  }
  .feltunik { opacity: 1; transform: none; filter: none; }
}
