/* ==========================================================================
   Hello AI Blog — egyetlen stíluslap
   Brand: hello-ai-brand-style skill (Bungee + JetBrains Mono, terrakotta)
   Itt van MINDEN dizájn. Cikkfájlt dizájn miatt soha ne szerkessz.
   ========================================================================== */

:root {
  /* Brand tokenek — ezeket ne írd át */
  --hai-bg-light:            #F9F7F4;
  --hai-bg-accent:           #F7C9A8;
  --hai-bg-dark:             #1C1917;
  --hai-text-primary-light:  #1C1917;
  --hai-text-secondary-light:#645C50;
  --hai-text-primary-dark:   #F9F7F4;
  --hai-text-secondary-dark: #C0B6A5;
  --hai-primary:             #C67139;
  --hai-accent:              #F6A06B;
  --hai-font-display: 'Bungee', sans-serif;
  --hai-font-body: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  /* Aktív (light) séma */
  --bg:        var(--hai-bg-light);
  --bg-soft:   #F2EFEA;
  --text:      var(--hai-text-primary-light);
  --text-soft: var(--hai-text-secondary-light);
  --rule:      #E2DCD2;
  --cta-bg:    var(--hai-bg-accent);
  --cta-text:  var(--hai-text-primary-light);
  --cta-rule:  transparent;

  --radius:    16px;     /* gombok, inputok, dobozok, képek — egységes lekerekítés */
  --radius-sm:  8px;     /* inline elemek, ahol a 16px belevágna a szövegbe */

  --measure: 60rem;      /* 960px — cikk szövegoszlop */
  --page:    60rem;      /* 960px — lista, fejléc, lábléc (a cikkel egy vonalban) */
  --gap:     clamp(3rem, 8vw, 6rem);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg:        var(--hai-bg-dark);
    --bg-soft:   #262220;
    --text:      var(--hai-text-primary-dark);
    --text-soft: var(--hai-text-secondary-dark);
    --rule:      #38322E;
    /* Dark témában nincs peach blokk-háttér a brandben:
       a CTA blokk kerettel különül el, a szöveg világos marad. */
    --cta-bg:    transparent;
    --cta-text:  var(--hai-text-primary-dark);
    --cta-rule:  var(--hai-primary);
  }
}

:root[data-theme="dark"] {
  --bg: var(--hai-bg-dark); --bg-soft: #262220;
  --text: var(--hai-text-primary-dark); --text-soft: var(--hai-text-secondary-dark);
  --rule: #38322E; --cta-bg: transparent;
  --cta-text: var(--hai-text-primary-dark); --cta-rule: var(--hai-primary);
}

/* --------------------------------------------------------------- alapok */

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--hai-font-body);
  font-size: 1rem;
  line-height: 1.75;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.wrap { width: 100%; max-width: var(--page); margin-inline: auto; padding-inline: 1.5rem; }
.wrap--narrow { max-width: var(--measure); }

a { color: inherit; text-decoration-color: var(--hai-primary); text-underline-offset: .25em; text-decoration-thickness: 1px; }
a:hover { color: var(--hai-primary); }

:focus-visible { outline: 2px solid var(--hai-primary); outline-offset: 3px; }

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--hai-primary); color: var(--hai-bg-light);
  padding: .75rem 1.25rem; font-family: var(--hai-font-display); font-size: .8rem;
  border-radius: var(--radius);
}
.skip:focus { left: 1rem; top: 1rem; }

/* ------------------------------------------------------------- fejléc */

.site-head {
  border-bottom: 1px solid var(--rule);
  padding-block: 1.25rem;
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px);
}
.site-head__inner { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; }

.logo {
  font-family: var(--hai-font-display);
  font-size: 1.125rem;
  letter-spacing: .01em;
  text-decoration: none;
  color: var(--text);
  white-space: nowrap;
}
.logo:hover { color: var(--hai-primary); }
.logo span { color: var(--hai-primary); }

.site-nav { display: flex; align-items: center; gap: 1.5rem; font-size: .8125rem; }
.site-nav a { text-decoration: none; color: var(--text-soft); }
.site-nav a:hover { color: var(--hai-primary); }
.site-nav .btn { color: var(--hai-bg-light); }

@media (max-width: 40rem) {
  .site-nav { gap: 1rem; font-size: .75rem; }
  .site-nav .nav-hide { display: none; }
}

/* -------------------------------------------------------------- gombok */

.btn {
  display: inline-block;
  background: var(--hai-primary);
  color: var(--hai-bg-light);
  font-family: var(--hai-font-display);
  font-size: .8125rem;
  line-height: 1.3;
  padding: .8em 1.4em;
  border: 0; border-radius: var(--radius);
  text-decoration: none;
  cursor: pointer;
  transition: background .15s ease, transform .15s ease;
}
.btn:hover { background: #A85C2C; color: var(--hai-bg-light); transform: translateY(-1px); }
.btn:active { transform: none; }
.btn--full { width: 100%; text-align: center; }

/* --------------------------------------------------------------- hero */

.hero { padding-block: var(--gap) calc(var(--gap) * .7); border-bottom: 1px solid var(--rule); }
.hero h1 {
  font-family: var(--hai-font-display);
  font-size: clamp(1.75rem, 6vw, 3rem);
  line-height: 1.15;
  margin: 0 0 1.25rem;
  max-width: 18ch;
}
.hero p { color: var(--text-soft); font-size: 1rem; max-width: 52ch; margin: 0; }

/* -------------------------------------------------------- cikk lista */

.eyebrow {
  font-family: var(--hai-font-display);
  font-size: .6875rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--hai-primary);
  margin: 0 0 .5rem;
}

.post-list { list-style: none; margin: 0; padding: 0; }
.post-list > li { border-bottom: 1px solid var(--rule); }

.post-card { display: block; padding-block: 2rem; text-decoration: none; }
.post-card:hover { color: inherit; }
.post-card__meta {
  display: flex; flex-wrap: wrap; gap: .5rem 1rem;
  font-size: .75rem; color: var(--text-soft); margin-bottom: .625rem;
}
.post-card__cat { color: var(--hai-primary); }
.post-card h2 {
  font-family: var(--hai-font-body);
  font-weight: 700;
  font-size: clamp(1.125rem, 2.6vw, 1.4375rem);
  line-height: 1.35;
  margin: 0 0 .625rem;
  max-width: 34ch;
  transition: color .15s ease;
}
.post-card:hover h2 { color: var(--hai-primary); }
.post-card p { margin: 0; color: var(--text-soft); font-size: .9375rem; max-width: 62ch; }

/* ------------------------------------------------------------- cikk */

.article { padding-block: var(--gap) 0; }

.article__head { margin-bottom: 2.5rem; }
.article__meta {
  display: flex; flex-wrap: wrap; gap: .5rem 1rem;
  font-size: .75rem; color: var(--text-soft); margin-bottom: 1rem;
}
.article__meta .cat { color: var(--hai-primary); }

.article h1 {
  font-family: var(--hai-font-display);
  font-size: clamp(1.5rem, 4.6vw, 2.25rem);
  line-height: 1.2;
  margin: 0 0 1.25rem;
}

/* Kiemelt válaszdoboz — a cikk első bekezdése, önállóan idézhető.
   Ez a GEO/AI-idézés szempontjából a legfontosabb blokk. */
.answer {
  border-left: 3px solid var(--hai-primary);
  padding: .25rem 0 .25rem 1.5rem;
  margin: 0 0 2.5rem;
  font-size: 1.125rem;
  line-height: 1.8;
}
.answer p { margin: 0; }

.prose { font-size: 1rem; line-height: 1.85; }
.prose > * { margin-block: 0; }
.prose > * + * { margin-top: 1.5rem; }

.prose h2 {
  max-width: 40ch;
  /* Kérdés formájú, hosszú alcím -> JetBrains Mono, nem Bungee.
     A Bungee csak rövid, plakátszerű szövegre való (brand szabály). */
  font-family: var(--hai-font-body);
  font-weight: 700;
  font-size: 1.3125rem;
  line-height: 1.4;
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
  scroll-margin-top: 5rem;
}
.prose h3 {
  font-family: var(--hai-font-body);
  font-weight: 700; font-size: 1rem;
  margin-top: 2rem; line-height: 1.5;
}
.prose ul, .prose ol { padding-left: 1.25rem; }
.prose li + li { margin-top: .5rem; }
.prose li::marker { color: var(--hai-primary); }
.prose strong { font-weight: 700; }
.prose blockquote {
  margin: 2rem 0; padding-left: 1.25rem;
  border-left: 3px solid var(--rule);
  color: var(--text-soft); font-style: normal;
}
.prose code {
  background: var(--bg-soft); padding: .15em .5em;
  border-radius: var(--radius-sm); font-size: .875em;
}
.prose pre {
  background: var(--bg-soft); padding: 1.25rem; border-radius: var(--radius);
  overflow-x: auto; font-size: .8125rem; line-height: 1.6;
  border: 1px solid var(--rule);
}
.prose pre code { background: none; padding: 0; }
.prose img { max-width: 100%; height: auto; border-radius: var(--radius); }

.prose table { width: 100%; border-collapse: collapse; font-size: .875rem; display: block; overflow-x: auto; }
.prose th, .prose td { text-align: left; padding: .75rem .875rem; border-bottom: 1px solid var(--rule); vertical-align: top; }
.prose th { font-weight: 700; white-space: nowrap; }
.prose tbody tr:last-child td { border-bottom: 0; }

/* --------------------------------------------------------- CTA blokk */

.cta {
  background: var(--cta-bg);
  color: var(--cta-text);
  border: 1px solid var(--cta-rule);
  border-radius: var(--radius);
  padding: clamp(1.5rem, 4vw, 2.25rem);
  margin-block: 3rem;
}
.cta__title {
  font-family: var(--hai-font-display);
  font-size: 1.0625rem; line-height: 1.35;
  margin: 0 0 .625rem;
}
.cta p { margin: 0 0 1.25rem; font-size: .875rem; line-height: 1.65; }

/* A Beehiiv beágyazott űrlap helye. A min-height azért kell, hogy a script
   betöltése ne ugráltassa a szöveget (layout shift). */
.cta__form { min-height: 3.5rem; }
.cta__form > div { width: 100% !important; max-width: 100% !important; }
.cta__form iframe { width: 100%; max-width: 100%; border: 0; display: block; }
.cta__note { font-size: .6875rem; color: color-mix(in srgb, var(--cta-text) 70%, transparent); margin: .875rem 0 0; }

/* ------------------------------------------------------------- lábléc */

.site-foot {
  border-top: 1px solid var(--rule);
  margin-top: var(--gap);
  padding-block: 2.5rem 3.5rem;
  font-size: .8125rem;
  color: var(--text-soft);
}
.site-foot__inner { display: flex; flex-wrap: wrap; gap: 1.5rem; justify-content: space-between; }
.site-foot nav { display: flex; flex-wrap: wrap; gap: 1.25rem; }
.site-foot a { text-decoration: none; }
.site-foot a:hover { color: var(--hai-primary); }
.site-foot__legal { font-size: .75rem; }

/* ------------------------------------------------------- reszponzív */

/* A széles, 1280px-es sorhoz nagyobb betű és sorköz kell. Keskeny
   kijelzőn ugyanez már túl nagy: a sor 20-25 karakterre esne vissza,
   ami épp olyan rossz olvasni, mint a túl hosszú sor. */
@media (max-width: 48rem) {
  .prose { font-size: .9375rem; line-height: 1.75; }
  .answer { font-size: 1rem; line-height: 1.7; padding-left: 1.125rem; }
  .prose h2 { font-size: 1.1875rem; margin-top: 2.5rem; }
  .prose h3 { font-size: .9375rem; }
  :root { --gap: clamp(2rem, 8vw, 3rem); }
}

@media (max-width: 30rem) {
  .wrap { padding-inline: 1rem; }
}

/* ------------------------------------------------ szerző / vissza link */

.byline {
  display: flex; align-items: baseline; gap: .625rem; flex-wrap: wrap;
  border-top: 1px solid var(--rule);
  margin-top: 3rem; padding-top: 1.5rem;
  font-size: .8125rem; color: var(--text-soft);
}
.byline strong { color: var(--text); font-weight: 700; }

.back { display: inline-block; margin-top: 2rem; font-size: .8125rem; color: var(--text-soft); text-decoration: none; }
.back:hover { color: var(--hai-primary); }
