/**
 * hajasgabor.com — közös dizájnrendszer (theme.css)
 *
 * Design tokenek + base reset + nav + footer + utility osztályok
 * Minden oldal ezt használja alapként. A page-specifikus CSS az inline
 * <style>-ban marad, de a core design nyelv innen jön.
 *
 * Loadolás: <link rel="stylesheet" href="/static/theme.css"> a <head>-be
 * (közvetlenül a Google Fonts link UTÁN).
 */

/* ══════════════════════════════════════════════════════════════
   DESIGN TOKENS — szín, spacing, shadow, font
   ══════════════════════════════════════════════════════════════ */
:root {
  /* Paper palette — editorial cream background */
  --paper:       #faf6ef;
  --paper-warm:  #f3ede1;
  --surface:     #ffffff;

  /* Ink — text hierarchy */
  --ink:         #1f1d1a;
  --ink-soft:    #554e44;
  --ink-faint:   #6b6459;

  /* Brand accents */
  --accent:      #3f5d44;                      /* tea green — brand primary */
  --accent-soft: rgba(63, 93, 68, 0.08);
  --accent-warm: #b8855a;                      /* warm tan — secondary */
  --accent-2:    #1e5864;                      /* teal — tertiary (adat) */

  /* Borders */
  --border:        rgba(31, 29, 26, 0.08);
  --border-strong: rgba(31, 29, 26, 0.16);

  /* Shadows */
  --shadow-soft: 0 1px 2px rgba(31,29,26,.04), 0 8px 24px -12px rgba(31,29,26,.1);
  --shadow-lift: 0 2px 4px rgba(31,29,26,.06), 0 20px 40px -20px rgba(31,29,26,.2);

  /* Layout */
  --container:    1180px;
  --container-narrow: 720px;
  --nav-height:   64px;
  --pad-x:        28px;
  --pad-x-mobile: 20px;

  /* Animation */
  --ease-out: cubic-bezier(.2, .8, .3, 1);
  --t-fast: 120ms;
  --t-base: 180ms;
  --t-slow: 280ms;
}

/* ══════════════════════════════════════════════════════════════
   BASE RESET
   ══════════════════════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
img, svg, video { max-width: 100%; display: block; height: auto; }
button { font-family: inherit; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--ink); }

/* Focus — akadálymentes de nem csúnya */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Selection */
::selection { background: rgba(63, 93, 68, 0.18); color: var(--ink); }

/* ══════════════════════════════════════════════════════════════
   LAYOUT PRIMITIVES
   ══════════════════════════════════════════════════════════════ */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--pad-x);
}
.container-narrow {
  max-width: var(--container-narrow);
  margin: 0 auto;
  padding: 0 var(--pad-x);
}
@media (max-width: 640px) {
  .container, .container-narrow {
    padding: 0 var(--pad-x-mobile);
  }
}

/* ══════════════════════════════════════════════════════════════
   NAVIGATION — sticky top bar
   ══════════════════════════════════════════════════════════════ */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 246, 239, 0.82);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  border-bottom: 1px solid var(--border);
}
.site-nav .inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 14px var(--pad-x);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: var(--nav-height);
}
.site-nav .brand {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.015em;
  color: var(--ink);
  text-decoration: none;
  transition: opacity var(--t-base) var(--ease-out);
  flex-shrink: 0;
}
.site-nav .brand em {
  font-style: italic;
  color: var(--accent);
  font-weight: 500;
}
.site-nav .brand:hover { opacity: 0.82; color: var(--ink); }

.site-nav .nav-links {
  display: flex;
  gap: 2px;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
}
.site-nav .nav-links a {
  display: inline-block;
  padding: 8px 14px;
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.003em;
  border-radius: 100px;
  transition: background var(--t-fast) var(--ease-out),
              color var(--t-fast) var(--ease-out);
  white-space: nowrap;
}
.site-nav .nav-links a:hover {
  color: var(--ink);
  background: var(--accent-soft);
}
.site-nav .nav-links a.active {
  color: var(--accent);
  background: var(--accent-soft);
  font-weight: 600;
}

/* Mobil: kisebb nav, görgethető link sor */
@media (max-width: 640px) {
  .site-nav .inner {
    padding: 12px var(--pad-x-mobile);
    gap: 12px;
    flex-direction: column;
    align-items: stretch;
  }
  .site-nav .brand {
    font-size: 18px;
    text-align: center;
  }
  .site-nav .nav-links {
    justify-content: center;
    gap: 4px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .site-nav .nav-links::-webkit-scrollbar { display: none; }
  .site-nav .nav-links a {
    padding: 7px 12px;
    font-size: 13.5px;
  }
}

/* ══════════════════════════════════════════════════════════════
   FOOTER — közös, 2 stílusban
     .site-footer       → teljes footer, 3 oszlop
     .site-footer.minimal → 1 soros változat (reader/chapter pages)
   ══════════════════════════════════════════════════════════════ */
.site-footer {
  margin-top: 80px;
  padding: 56px 0 32px;
  background: var(--paper-warm);
  border-top: 1px solid var(--border);
  font-size: 14px;
  color: var(--ink-soft);
}
.site-footer .inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--pad-x);
  display: grid;
  grid-template-columns: 1.4fr 2fr;
  gap: 48px;
  align-items: start;
}
@media (max-width: 820px) {
  .site-footer .inner {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}
.site-footer .foot-brand {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 10px;
  letter-spacing: -0.015em;
}
.site-footer .foot-brand em {
  font-style: italic;
  color: var(--accent);
  font-weight: 500;
}
.site-footer .foot-tag {
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 42ch;
  margin: 0;
}
.site-footer .foot-links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
@media (max-width: 560px) {
  .site-footer .foot-links {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }
}
.site-footer .foot-col h4 {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 0 0 14px;
}
.site-footer .foot-col a,
.site-footer .foot-col span {
  display: block;
  font-size: 13.5px;
  color: var(--ink-soft);
  text-decoration: none;
  margin-bottom: 7px;
  transition: color var(--t-fast) var(--ease-out);
}
.site-footer .foot-col a:hover {
  color: var(--accent);
}
.site-footer .foot-bottom {
  max-width: var(--container);
  margin: 40px auto 0;
  padding: 20px var(--pad-x) 0;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 12.5px;
  color: var(--ink-faint);
}
.site-footer .foot-bottom a {
  color: var(--ink-faint);
  text-decoration: none;
}
.site-footer .foot-bottom a:hover { color: var(--accent); }

/* Minimal változat — olvasási oldalakhoz */
.site-footer.minimal {
  margin-top: 64px;
  padding: 28px 0;
  text-align: center;
}
.site-footer.minimal .inner {
  display: block;
  font-size: 12.5px;
  color: var(--ink-faint);
}
.site-footer.minimal .foot-bottom {
  display: none;
}

/* ══════════════════════════════════════════════════════════════
   UTILITY — közös kisebb elemek
   ══════════════════════════════════════════════════════════════ */

/* Eyebrow kiemelt feliratok */
.eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

/* Pill / chip — kategória szűrőkhöz, badge-ekhez */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 100px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  color: var(--ink-soft);
  font-size: 12.5px;
  font-weight: 500;
  text-decoration: none;
  transition: background var(--t-fast) var(--ease-out),
              color var(--t-fast) var(--ease-out),
              border-color var(--t-fast) var(--ease-out);
}
.pill:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.pill.active {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}

/* Button — primary CTA */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  background: var(--ink);
  color: var(--paper);
  border: none;
  border-radius: 100px;
  font-family: inherit;
  font-size: 14.5px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background var(--t-base) var(--ease-out),
              transform var(--t-fast) var(--ease-out);
}
.btn-primary:hover {
  background: var(--accent);
  transform: translateY(-1px);
  color: var(--paper);
}
.btn-primary:active { transform: translateY(0); }

/* Breadcrumb (visible, nem csak JSON-LD) */
.breadcrumb {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 12.5px;
  color: var(--ink-faint);
  margin: 0 0 18px;
  list-style: none;
  padding: 0;
}
.breadcrumb li { display: inline-flex; align-items: center; gap: 8px; }
.breadcrumb li:not(:last-child)::after {
  content: '›';
  color: var(--border-strong);
  margin-left: 2px;
}
.breadcrumb a {
  color: var(--ink-faint);
  text-decoration: none;
  transition: color var(--t-fast) var(--ease-out);
}
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb li:last-child {
  color: var(--ink-soft);
  font-weight: 500;
}

/* Print: nav/footer elrejtve, csak tartalom */
@media print {
  .site-nav, .site-footer { display: none !important; }
  body { background: white; color: black; }
}
