/* ============================================================
   BASE — reset, global typography, bilingual toggle, utilities
   ============================================================ */

/* --- Reset ------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: 1.7;
  color: var(--color-text-primary);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* --- Background noise texture ------------------------------ */
/* Subtle grain overlay — purely decorative, no pointer events */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
  opacity: 0.035;
  pointer-events: none;
  z-index: 9990;
}

img, svg {
  display: block;
  max-width: 100%;
}

a {
  color: var(--color-accent);
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-base);
}
a:hover { color: var(--color-accent-hover); text-decoration: underline; }

ul, ol { list-style: none; }

hr {
  border: none;
  border-top: none;
  margin: 0;
}

/* --- Focus ------------------------------------------------- */
:focus-visible {
  outline: 2px solid var(--color-border-focus);
  outline-offset: 2px;
}
:focus:not(:focus-visible) { outline: none; }

/* --- Skip link --------------------------------------------- */
.skip-link {
  position: fixed;
  top: var(--space-4);
  left: var(--space-4);
  z-index: 9999;
  padding: var(--space-2) var(--space-4);
  background: var(--color-accent);
  color: var(--color-white);
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  font-weight: 500;
  border-radius: var(--radius-md);
  text-decoration: none;
  transform: translateY(-200%);
  transition: transform var(--duration-fast) var(--ease-base);
}
.skip-link:focus { transform: translateY(0); }

/* --- Bilingual toggle -------------------------------------- */
/* English content is hidden by default; HU is visible. */
[data-lang="en"] { display: none; }

html[lang="en"] [data-lang="en"] { display: revert; }
html[lang="en"] [data-lang="hu"] { display: none; }

/* Inline spans inside headings and paragraphs */
span[data-lang="en"]                      { display: none; }
html[lang="en"] span[data-lang="en"]      { display: inline; }
html[lang="en"] span[data-lang="hu"]      { display: none; }

/* --- Typography -------------------------------------------- */
h1, h2, h3 {
  font-family: var(--font-serif);
  font-weight: 400;
  letter-spacing: -0.01em;
  color: var(--color-text-primary);
}
h4, h5, h6 {
  font-family: var(--font-sans);
  font-weight: 500;
}

p + p { margin-top: var(--space-4); }

strong { font-weight: 500; }

/* --- Utility containers ------------------------------------ */
.container {
  width: 100%;
  max-width: var(--max-width-wide);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.container--narrow {
  max-width: var(--max-width-content);
}

/* --- Section base ------------------------------------------ */
.section {
  padding-block: var(--space-16);
}
@media (min-width: 768px) {
  .section { padding-block: var(--space-24); }
}

.section-heading {
  font-size: var(--text-2xl);
  margin-bottom: var(--space-8);
}
@media (min-width: 768px) {
  .section-heading { font-size: var(--text-3xl); }
}
