/* ---------- Hero ---------- */
.hero {
  min-height: 100svh;
  display: flex; flex-direction: column;
  padding-top: calc(var(--header-h) + clamp(24px, 4vw, 64px));
  position: relative;
}
.hero__inner, .hero__bar { position: relative; z-index: 1; }

/* ---------- Scroll-story ---------- */
.hero__story { display: none; }
.story-pending .hero__inner, .story-pending .hero__bar { opacity: 0; }
/* pierwsza klatka historii („Śrem, ruszamy.”) widoczna od razu, zanim dojdzie GSAP: szybszy LCP */
.story-pending .story-text--1 { opacity: 1; }
.hero--story .hero__story, .story-pending .hero__story {
  display: block; position: absolute; left: 0; right: 0; top: 0; height: 100svh; z-index: 0; pointer-events: none;
}
.hero__scene { position: absolute; inset: 0; width: 100%; height: 100%; }
.story-text {
  position: absolute; left: var(--pad-x); right: var(--pad-x); margin: 0; max-width: none;
  font-family: var(--ff-display); font-weight: 700; text-transform: uppercase; line-height: 0.95;
  font-size: clamp(2.25rem, 1rem + 5vw, 5rem); opacity: 0;
}
.story-text--1 { top: calc(var(--header-h) + 24px); font-family: var(--ff-body); font-size: var(--fs-label); font-weight: 500; letter-spacing: 0.12em; color: var(--c-text-muted); display: flex; gap: 12px; align-items: center; }
.story-text--1::before { content: ""; width: 4px; height: 1.15em; background: var(--c-green); }
.story-text--2, .story-text--3 { bottom: 14vh; text-align: center; }
.story-hint {
  position: absolute; left: 0; right: 0; bottom: 24px; margin: 0 auto; max-width: none;
  display: flex; justify-content: center; align-items: center; gap: 8px;
  font-size: var(--fs-label); letter-spacing: 0.12em; text-transform: uppercase; color: var(--c-text-muted);
}
.hero__inner {
  flex: 1;
  display: grid; gap: 48px; align-content: center;
}
.hero__main { display: flex; flex-direction: column; gap: clamp(24px, 3vw, 36px); }
.hero__logo img { width: min(240px, 70vw); height: auto; }
@media (min-width: 768px) { .hero__logo img { width: clamp(380px, 34vw, 480px); } }
.hero__claim {
  font-family: var(--ff-display); font-weight: 700; text-transform: uppercase;
  font-size: var(--fs-display); line-height: 0.92; letter-spacing: -0.01em;
  max-width: none;
}
.hero__lead { color: var(--c-text-muted); max-width: 40ch; }
.hero__aside { align-self: center; }
.hero__bar { border-top: 1px solid var(--c-topo); margin-top: 48px; padding-block: 12px; }
.hero__bar .stopbar { color: var(--c-text-muted); }
.hero__bar-inner { display: flex; justify-content: space-between; align-items: center; gap: 24px; }
.hero__scroll {
  display: none; flex: none; align-items: center; gap: 8px; min-height: 48px;
  font-size: var(--fs-label); text-transform: uppercase; letter-spacing: 0.12em; color: var(--c-text-muted);
}
.hero__scroll:hover { color: var(--c-text); }

@media (max-width: 767px) {
  .hero__main .btn-row .btn { width: 100%; }
}
@media (min-width: 1024px) {
  .hero__inner { grid-template-columns: 7fr 5fr; gap: var(--gutter); }
  .hero__aside { justify-self: end; }
  .hero__scroll { display: inline-flex; }
}

/* ---------- O inicjatywie ---------- */
.about__title { max-width: 12ch; }
.about__text { display: grid; gap: 20px; margin-top: 40px; }
.pillars { display: grid; gap: 40px; margin-top: clamp(64px, 8vw, 112px); }
.pillar { position: relative; padding-top: 28px; border-top: 1px solid var(--c-border); }
.pillar::before {
  content: ""; position: absolute; top: -1px; left: 0; right: 0; height: 1px;
  background: var(--c-green); transform: scaleX(0); transform-origin: left;
  transition: transform 600ms var(--ease-move);
}
.pillar:hover::before { transform: scaleX(1); }
.pillar::after {
  content: ""; position: absolute; top: -10px; right: -10px; width: 20px; height: 20px;
  background: url("../svg/plus.svg") center / contain no-repeat;
}
.pillar__icon { width: 32px; height: 32px; color: var(--c-green-hover); margin-bottom: 20px; }
.pillar__title { margin-bottom: 12px; }

@media (min-width: 1024px) {
  .about__text { margin-left: 41.666%; }
  .pillars { grid-template-columns: repeat(3, 1fr); gap: var(--gutter); }
}

/* ---------- Najbliższy wieczorek ---------- */
.event h2 { margin-bottom: clamp(40px, 5vw, 64px); }
.event-card {
  display: grid;
  background-color: var(--c-surface);
  overflow: visible;
}
.event-card:hover::before { inset: -15px; }
.event-card__number {
  position: absolute; right: 24px; top: 0; z-index: 0;
  font-family: var(--ff-display); font-weight: 700; line-height: 1;
  font-size: clamp(120px, 18vw, 240px);
  color: transparent; -webkit-text-stroke: 1px var(--c-border);
  pointer-events: none; user-select: none;
}
.event-card__visual { position: relative; overflow: hidden; border-bottom: 1px solid var(--c-border); }
.event-card__visual img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4 / 5; }
.event-card__visual::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to bottom, transparent 55%, var(--c-surface)), linear-gradient(to right, transparent 80%, rgba(14, 14, 14, 0.6));
}
.event-card__body {
  position: relative; z-index: 1;
  display: flex; flex-direction: column; gap: 32px;
  padding: clamp(24px, 4vw, 56px);
}
.meta { display: grid; gap: 16px; font-size: 1.125rem; }
.meta li { display: flex; gap: 14px; align-items: flex-start; }
.meta .icon { color: var(--c-green-hover); margin-top: 2px; }
.event-card__actions .btn { flex: 1 1 auto; }

@media (min-width: 1024px) {
  .event-card { grid-template-columns: 5fr 7fr; }
  .event-card__visual { border-bottom: 0; border-right: 1px solid var(--c-border); }
}

.speaker { display: grid; gap: 32px; margin-top: clamp(64px, 8vw, 96px); }
.speaker__photo { max-width: 360px; }
.speaker__body { display: flex; flex-direction: column; gap: 16px; }
.speaker__body .label { margin-bottom: 0; }
.speaker__role { color: var(--c-green-hover); font-weight: 500; letter-spacing: 0.02em; }
@media (min-width: 768px) {
  .speaker { grid-template-columns: minmax(220px, 4fr) 8fr; gap: var(--gutter) 48px; }
}

/* ---------- Galeria prelegenta + lightbox ---------- */
.gallery { margin-top: clamp(64px, 8vw, 96px); }
.gallery h3 { margin-bottom: 24px; }
.gallery__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.gallery__item { display: block; overflow: hidden; border: 1px solid var(--c-border); }
.gallery__item img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform var(--t-enter) var(--ease-in), opacity var(--t-fast); }
.gallery__item:hover img, .gallery__item:focus-visible img { transform: scale(1.04); }
.gallery__item:focus-visible { outline: 2px solid var(--c-green-hover); outline-offset: 2px; }
@media (min-width: 768px) { .gallery__grid { grid-template-columns: repeat(4, 1fr); gap: 12px; } }

.lightbox { max-width: none; max-height: none; width: 100%; height: 100%; padding: 0; border: 0; background: transparent; }
.lightbox::backdrop { background: rgba(0, 0, 0, 0.92); }
.lightbox[open] { display: grid; place-items: center; }
.lightbox__img { max-width: calc(100vw - 32px); max-height: calc(100vh - 140px); object-fit: contain; pointer-events: none; }
.lightbox__btn {
  position: fixed; width: 48px; height: 48px;
  display: grid; place-items: center;
  background: var(--c-surface); border: 1px solid var(--c-border); color: var(--c-text);
  font-size: 1.5rem; line-height: 1; cursor: pointer;
}
.lightbox__btn:hover, .lightbox__btn:focus-visible { border-color: var(--c-green-hover); color: var(--c-green-hover); }
.lightbox__close { top: 16px; right: 16px; }
.lightbox__prev { bottom: 16px; left: calc(50% - 56px); }
.lightbox__next { bottom: 16px; left: calc(50% + 8px); }
@media (prefers-reduced-motion: reduce) { .gallery__item img { transition: none; } }

/* ---------- Jak wygląda wieczorek: oś-szlak ---------- */
.how h2 { margin-bottom: clamp(48px, 6vw, 80px); }
.trail { display: grid; gap: 48px; position: relative; padding-left: 40px; }
.trail::before {
  content: ""; position: absolute; left: 7px; top: 8px; bottom: 8px; width: 0;
  border-left: 2px dashed var(--c-border);
}
.trail__point { position: relative; display: flex; flex-direction: column; gap: 10px; }
.trail__pin {
  position: absolute; left: -40px; top: 2px;
  width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid var(--c-green); background: var(--c-bg);
}
.trail__pin::after { content: ""; position: absolute; inset: 3px; border-radius: 50%; background: var(--c-green); }
.trail__icon { width: 32px; height: 32px; color: var(--c-text-muted); }
.trail__time { font-family: var(--ff-mono); font-size: var(--fs-small); color: var(--c-green-hover); text-transform: uppercase; letter-spacing: 0.04em; }
.how__note { margin-top: clamp(48px, 6vw, 80px); color: var(--c-text-muted); }

@media (min-width: 1024px) {
  .trail { grid-template-columns: repeat(3, 1fr); gap: var(--gutter); padding-left: 0; padding-top: 48px; }
  .trail::before { left: 8px; right: 8px; top: 7px; bottom: auto; height: 0; width: auto; border-left: 0; border-top: 2px dashed var(--c-border); }
  .trail__pin { left: 0; top: -48px; }
}

/* ---------- Trasa: przystanki ---------- */
.route__lead { margin-top: 24px; }
.stops {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(260px, 80%);
  gap: var(--gutter);
  margin-block: clamp(40px, 5vw, 64px) 32px;
  overflow-x: auto; scroll-snap-type: x mandatory;
  padding-block: 12px 16px;
  margin-inline: calc(-1 * var(--pad-x)); padding-inline: var(--pad-x);
  scroll-padding-inline: var(--pad-x);
}
.stop {
  scroll-snap-align: start;
  position: relative;
  display: flex; flex-direction: column; gap: 8px;
  padding: 28px; border: 1px dashed var(--c-border);
  color: var(--c-text-muted);
}
.stop--active { border: 1px solid var(--c-green); color: var(--c-text); background: var(--c-surface); }
.stop__pin { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--c-border); margin-bottom: 8px; }
.stop--active .stop__pin { border-color: var(--c-green); background: var(--c-green); box-shadow: 0 0 0 6px rgba(7, 144, 30, 0.25); }
.stop__badge {
  position: absolute; top: 24px; right: 24px;
  padding: 4px 10px; background: var(--c-green); color: #000;
  font-size: 0.75rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
}
.stop__num { font-family: var(--ff-display); font-weight: 700; font-size: 3.5rem; line-height: 1; }
.stop:not(.stop--active) .stop__num { color: transparent; -webkit-text-stroke: 1px var(--c-text-subtle); }
.stop__date { font-family: var(--ff-mono); font-size: var(--fs-small); text-transform: uppercase; }
.stop--active .stop__date { color: var(--c-green-hover); }
@media (min-width: 1024px) {
  .stops { grid-auto-flow: row; grid-template-columns: repeat(3, 1fr); overflow: visible; margin-inline: 0; padding-inline: 0; }
}

/* ---------- Zostań prelegentem ---------- */
.call { border-block: 1px solid var(--c-topo); overflow: hidden; }
.call__inner { display: grid; gap: 40px; }
.call__body { display: flex; flex-direction: column; gap: 24px; }
.call__list-title { font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; font-size: var(--fs-small); margin-bottom: -8px; }
.checklist { display: grid; gap: 12px; }
.checklist li { display: flex; gap: 14px; color: var(--c-text-muted); }
.checklist li::before { content: ""; flex: none; width: 4px; height: 1.4em; margin-top: 0.1em; background: var(--c-green); }
@media (min-width: 1024px) {
  .call__inner { grid-template-columns: 5fr 7fr; gap: var(--gutter) 64px; }
}

/* ---------- Kto za tym stoi ---------- */
.organizer h2 { margin-bottom: clamp(40px, 5vw, 64px); }
.person { display: grid; gap: 32px; }
.person__photo { max-width: 400px; }
.person__body { display: flex; flex-direction: column; gap: 16px; align-self: center; }
.patrons { margin-top: clamp(56px, 7vw, 96px); padding-top: 32px; border-top: 2px dashed var(--c-border); }
.patrons__title { font-size: var(--fs-label); font-weight: 500; text-transform: uppercase; letter-spacing: 0.12em; color: var(--c-text-muted); margin-bottom: 24px; }
.patrons__list { display: flex; flex-wrap: wrap; gap: 16px 48px; }
.patron {
  display: inline-flex; align-items: center; min-height: 56px;
  font-family: var(--ff-display); font-weight: 700; font-size: 1.5rem; text-transform: uppercase;
  color: var(--c-text-muted); transition: color var(--t-fast);
}
.patron:hover { color: var(--c-text); }
@media (min-width: 768px) {
  .person { grid-template-columns: 5fr 7fr; gap: var(--gutter) 48px; }
}

/* ---------- Miejsce ---------- */
.venue__inner { display: grid; gap: 48px; }
.venue__text { display: flex; flex-direction: column; gap: 20px; align-items: flex-start; }
.venue__text .label { margin-bottom: 4px; }
.venue__map { margin: 0; }
@media (min-width: 1024px) {
  .venue__inner { grid-template-columns: 5fr 7fr; gap: var(--gutter) 64px; align-items: center; }
}

/* ---------- FAQ ---------- */
.faq__inner { display: grid; gap: 40px; }
@media (min-width: 1024px) {
  .faq__inner { grid-template-columns: 5fr 7fr; gap: var(--gutter) 64px; }
  .faq__inner > div:first-child { position: sticky; top: calc(var(--header-h) + 32px); align-self: start; }
}

/* ---------- Finał ---------- */
.final__inner { display: flex; flex-direction: column; align-items: flex-start; gap: 32px; }
.final__title { font-size: clamp(3.5rem, 1rem + 10vw, 10rem); line-height: 0.9; }
.final .stopbar { color: var(--c-text-muted); }

/* ---------- Stopka ---------- */
.footer { border-top: 1px solid var(--c-topo); padding-top: clamp(56px, 7vw, 96px); }
.footer__grid { display: grid; gap: 40px; }
.footer__brand { display: flex; flex-direction: column; gap: 20px; }
.footer__logo { width: 220px; height: auto; }
.footer__head { font-size: var(--fs-label); font-weight: 500; text-transform: uppercase; letter-spacing: 0.12em; color: var(--c-text-muted); margin-bottom: 12px; }
.footer__list a { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; }
.footer__list a:hover { color: var(--c-green-hover); }
.footer__bottom {
  display: flex; flex-wrap: wrap; gap: 8px 24px; align-items: center;
  margin-top: 56px; padding-block: 24px;
  border-top: 1px solid var(--c-topo);
  font-size: var(--fs-small); color: var(--c-text-muted);
}
.footer__bottom a, .footer__bottom button { min-height: 44px; display: inline-flex; align-items: center; }
.footer__bottom a:hover, .footer__bottom button:hover { color: var(--c-text); }
.footer__coords { margin-left: auto; font-family: var(--ff-mono); font-size: 0.8125rem; color: var(--c-text-muted); }
@media (min-width: 768px) {
  .footer__grid { grid-template-columns: 2fr 1fr 1fr 1fr; gap: var(--gutter); }
}

@media (max-width: 767px) {
  .event-card__actions .btn, .event-card__actions .cal, .call .btn { flex: 1 1 100%; padding-inline: 16px; }
  .event-card__actions .cal { padding: 0; }
  .cal > summary { width: 100%; }
}

/* ---------- Mapa dojazdu ---------- */
.venue__canvas { position: relative; overflow: hidden; }
.venue__map img { width: 100%; height: auto; }
.map-pin { position: absolute; left: 50%; top: 50%; width: 0; height: 0; }
.map-pin__dot {
  position: absolute; left: -9px; top: -9px; width: 18px; height: 18px; border-radius: 50%;
  background: var(--c-green); box-shadow: 0 0 0 3px #000;
}
.map-pin__dot::after {
  content: ""; position: absolute; inset: -3px; border-radius: 50%;
  border: 2px solid var(--c-green);
  animation: pin-pulse 2.4s var(--ease-move) infinite;
}
@keyframes pin-pulse { from { transform: scale(1); opacity: 0.9; } to { transform: scale(3.4); opacity: 0; } }
.map-pin__label {
  position: absolute; left: 20px; top: -34px; white-space: nowrap;
  padding: 6px 10px; background: var(--c-green); color: #000;
  font-size: 0.75rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase;
}
.venue__caption {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px 16px;
  padding: 12px 16px; border-top: 1px solid var(--c-border);
  font-size: 0.8125rem; color: var(--c-text-subtle);
}
.venue__caption a { text-decoration: underline; text-underline-offset: 3px; }
.venue__coords { font-family: var(--ff-mono); }

/* ---------- Zdjęcia atmosferyczne ---------- */
.photo { position: relative; display: block; overflow: hidden; }
.photo img { width: 100%; height: 100%; object-fit: cover; }
.photo::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  box-shadow: inset 0 0 60px 30px var(--c-bg);
}

.about__grid { display: grid; gap: 40px; margin-top: 40px; }
.about__grid .about__text { margin: 0; align-self: center; }
.about__grid .photo img { aspect-ratio: 3 / 2; }
@media (min-width: 1024px) {
  .about__grid { grid-template-columns: 5fr 7fr; gap: var(--gutter) 64px; }
}

.how__photos { display: grid; gap: var(--gutter); margin-bottom: clamp(48px, 6vw, 80px); }
.how__photos .photo img { aspect-ratio: 3 / 2; }
@media (min-width: 768px) { .how__photos { grid-template-columns: 1fr 1fr; } }

.call__photo { margin-top: 40px; max-width: 420px; }
.call__photo img { aspect-ratio: 4 / 5; }

.final { overflow: hidden; isolation: isolate; min-height: min(80vh, 760px); display: flex; align-items: center; }
.final__inner { position: relative; }
.final__bg { position: absolute; inset: 0; z-index: -1; }
.final__bg img { width: 100%; height: 100%; object-fit: cover; object-position: 75% 50%; }
.final__bg::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to right, var(--c-bg) 10%, rgba(0, 0, 0, 0.55) 55%, rgba(0, 0, 0, 0.1)),
              linear-gradient(to bottom, var(--c-bg), transparent 25%, transparent 75%, var(--c-bg));
}
@media (max-width: 767px) { .final__bg img { object-position: 86% 50%; } }

/* ---------- Ruch (tylko przy html.js-motion) ---------- */

/* Wejścia sekcji: etykieta → nagłówek słowo po słowie → treść; zieleń ostatnia */
.js-motion [data-reveal],
.js-motion .word {
  opacity: 0; transform: translateY(24px);
  transition: opacity var(--t-enter) var(--ease-in), transform var(--t-enter) var(--ease-in);
  transition-delay: calc(var(--d, 0) * 1ms);
}
.js-motion .word { display: inline-block; }
.js-motion .is-in[data-reveal],
.js-motion .is-in .word { opacity: 1; transform: none; }

/* Szlak „Jak wygląda wieczorek”: zielona linia wypełnia się przy scrollu (--p: 0…1) */
.trail::after {
  content: ""; position: absolute; left: 7px; top: 8px; bottom: 8px; width: 2px;
  background: var(--c-green); transform-origin: top;
  transform: scaleY(var(--p, 1));
}
@media (min-width: 1024px) {
  .trail::after { left: 8px; right: 8px; top: 7px; bottom: auto; width: auto; height: 2px; transform-origin: left; transform: scaleX(var(--p, 1)); }
}
.js-motion .trail__pin { border-color: var(--c-border); transition: border-color 300ms var(--ease-move); }
.js-motion .trail__pin::after { transform: scale(0); transition: transform 300ms var(--ease-in); }
.js-motion .trail__point.is-active .trail__pin { border-color: var(--c-green); }
.js-motion .trail__point.is-active .trail__pin::after { transform: scale(1); }
.js-motion .trail__icon { transition: color 300ms; }
.js-motion .trail__point.is-active .trail__icon { color: var(--c-text); }

/* Karty przystanków: hover = kreska rysuje się na zielono od lewej */
.stop::before {
  content: ""; position: absolute; left: -1px; right: -1px; top: -1px; height: 2px;
  background: var(--c-green); transform: scaleX(0); transform-origin: left;
  transition: transform 600ms var(--ease-move);
}
.stop:hover::before { transform: scaleX(1); }
.stop--active .stop__pin { animation: stop-pulse 2.4s var(--ease-move) infinite; }
@keyframes stop-pulse { 50% { box-shadow: 0 0 0 10px rgba(7, 144, 30, 0); } }

/* Warstwice: bardzo wolny dryf przy scrollu (--drift w px, ustawiane z JS) */
.topo::after { transform: translateY(calc(var(--drift, 0) * 1px)) scale(1.05); }

/* Róża wiatrów w „Zostań prelegentem” */
.call__inner { position: relative; }
.compass {
  position: absolute; z-index: -1; pointer-events: none;
  width: min(720px, 120vw); aspect-ratio: 1;
  right: -14%; bottom: -30%;
  color: var(--c-border);
  animation: compass-spin 240s linear infinite;
}
@keyframes compass-spin { to { transform: rotate(360deg); } }
@media (max-width: 1023px) { .compass { right: -40%; bottom: auto; top: -10%; opacity: 0.6; } }

/* ---------- Podstrony: 404, polityka prywatności ---------- */
.subpage main { padding-top: calc(var(--header-h) + var(--section-y) / 2); padding-bottom: var(--section-y); }
.notfound { min-height: 100svh; display: flex; align-items: center; }
.notfound__inner { display: flex; flex-direction: column; align-items: flex-start; gap: 28px; }
.notfound__title { font-size: var(--fs-display); line-height: 0.92; }
.legal__inner { max-width: calc(720px + 2 * var(--pad-x)); }
.legal__title { font-size: var(--fs-h2); line-height: 0.95; margin-bottom: 16px; }
.legal__body { margin-top: 48px; }
.legal__body h2 { font-size: var(--fs-h3); line-height: 1.1; margin: 40px 0 12px; }
.legal__body p, .legal__body li { color: var(--c-text-muted); }
.legal__body :is(p, li) + :is(p, li) { margin-top: 12px; }
.legal__body ul { padding-left: 1.25em; }
.legal__body strong { color: var(--c-text); }
