:root {
  --ink: #14120f;
  --cream: #f4efe6;
  --muted: rgba(244, 239, 230, 0.72);
  --line: rgba(244, 239, 230, 0.38);
  --serif: "Palatino Linotype", Palatino, Georgia, serif;
  --sans: "Segoe UI", sans-serif;
  --gutter: clamp(20px, 4vw, 72px);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: auto; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--cream);
  font-family: var(--sans);
  font-weight: 400;
}
img, canvas { display: block; max-width: 100%; }
button, a { color: inherit; }

.skip {
  position: absolute;
  left: 12px;
  top: -40px;
  z-index: 20;
  background: var(--cream);
  color: var(--ink);
  padding: 8px 12px;
}
.skip:focus { top: 12px; }

/* ---------- Loader ---------- */
.loader {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  background: var(--ink);
  transition: opacity 0.7s var(--ease), visibility 0.7s;
}
html:not(.js) .loader { display: none; }
html.is-loaded .loader {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.loader__inner { width: min(280px, 70vw); text-align: center; }
.loader__kicker {
  margin: 0 0 18px;
  font-size: 11px;
  letter-spacing: 0.42em;
  text-indent: 0.42em;
  color: var(--muted);
}
.loader__title {
  margin: 0 0 28px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(40px, 6vw, 64px);
  letter-spacing: 0.04em;
}
.loader__line {
  height: 1px;
  background: var(--line);
  overflow: hidden;
}
.loader__line span {
  display: block;
  height: 100%;
  background: var(--cream);
  transform: scaleX(0);
  transform-origin: 0 50%;
}
.loader__count {
  margin: 14px 0 0;
  font-size: 12px;
  letter-spacing: 0.28em;
  color: var(--muted);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  height: 460vh;
  background: var(--ink);
}
.hero__pin {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100lvh;
  overflow: hidden;
}
.hero__poster,
.hero__canvas,
.hero__scrim {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.hero__poster { object-fit: cover; }
.hero__canvas {
  opacity: 0;
  transition: opacity 0.6s var(--ease);
}
.hero__canvas.is-live { opacity: 1; }
.hero__scrim {
  background: linear-gradient(to top, rgba(20, 18, 15, 0.78) 0%, rgba(20, 18, 15, 0.18) 46%, rgba(20, 18, 15, 0.42) 100%);
}

.hero__content {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.hero__brand {
  position: absolute;
  top: 28px;
  left: var(--gutter);
  margin: 0;
  font-size: 12px;
  letter-spacing: 0.34em;
}
.hero__intro,
.hero__chapter {
  position: absolute;
  left: var(--gutter);
  right: var(--gutter);
  bottom: clamp(88px, 12vh, 140px);
  max-width: 18em;
}
.hero__chapter { opacity: 0; visibility: hidden; }
.kicker {
  margin: 0 0 12px;
  font-size: 12px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--muted);
}
.hero__title,
.hero__line {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(36px, 5vw, 68px);
  line-height: 1.05;
}
.hero__line { font-style: italic; }

.hero__hint {
  position: absolute;
  right: var(--gutter);
  bottom: 36px;
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--muted);
}
.hero__hint i {
  position: relative;
  width: 64px;
  height: 1px;
  background: var(--line);
  overflow: hidden;
}
.hero__hint i::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--cream);
  transform: translate3d(-101%, 0, 0);
  animation: hint 2.6s var(--ease) infinite;
}
@keyframes hint {
  0% { transform: translate3d(-101%, 0, 0); }
  55%, 100% { transform: translate3d(101%, 0, 0); }
}

.hero__rail {
  position: absolute;
  right: var(--gutter);
  top: 50%;
  width: 1px;
  height: 120px;
  margin-top: -60px;
  background: var(--line);
}
.hero__rail-fill {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--cream);
  transform: scaleY(0);
  transform-origin: 50% 0;
}
.hero__readout {
  position: absolute;
  left: var(--gutter);
  bottom: 36px;
  margin: 0;
  font-size: 12px;
  letter-spacing: 0.22em;
  color: var(--muted);
}

.hero--static { height: 100vh; height: 100svh; }
.hero--static .hero__pin { position: relative; height: 100%; }
.hero--static .hero__chapter,
.hero--static .hero__hint,
.hero--static .hero__rail { display: none; }

@media (max-width: 820px) {
  .hero { height: 380vh; }
  .hero__rail { display: none; }
  .hero__hint { left: var(--gutter); right: auto; }
}

@media (prefers-reduced-motion: reduce) {
  .hero { height: 100vh; height: 100svh; }
  .hero__pin { position: relative; height: 100%; }
  .hero__chapter,
  .hero__hint,
  .hero__rail { display: none; }
  .hero__hint i::after { animation: none; }
}

/* ---------- Utószó ---------- */
.note {
  background: var(--cream);
  color: var(--ink);
  padding: clamp(72px, 12vh, 140px) var(--gutter);
}
.note__inner { max-width: 38rem; }
.note .kicker { color: #6d675e; }
.note h2 {
  margin: 0 0 16px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(32px, 4vw, 52px);
  line-height: 1.08;
}
.note p { margin: 0 0 12px; font-size: 17px; line-height: 1.55; }
.note a { color: inherit; }
