@import url('https://fonts.googleapis.com/css2?family=Anton&family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
  --brand-primary: #145d9a;
  --brand-primary-dark: #0e3f6d;
  --brand-primary-light: #e6eef8;
  --brand-red: #e61341;
  --brand-red-dark: #b80f33;
  --brand-yellow: #f7de10;
  --brand-yellow-dark: #c5b200;
  --accent-pink: #ff5c93;

  --bg: #f8fafc;
  --bg-card: #ffffff;
  --text-main: #0f172a;
  --text-muted: #64748b;

  --font-heading: 'Anton', sans-serif;
  --font-body: 'Outfit', sans-serif;

  --radius: 14px;
  --maxw: 1120px;
}

* { box-sizing: border-box; }

/* Without this, 100vw (used below to line up the hero text with the centered
   .container) includes the scrollbar's width while the centered container's
   own layout doesn't — a few pixels of drift between the two. This keeps
   them in exact agreement always. */
html { scrollbar-gutter: stable; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text-main);
  background: var(--bg);
  line-height: 1.6;
}

h1, h2, h3, .logo { font-family: var(--font-heading); font-weight: 400; letter-spacing: 0.02em; }

img { max-width: 100%; display: block; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

a { color: inherit; }

/* Header */
header.site {
  position: sticky;
  top: 0;
  z-index: 20;
  background: #fff;
  border-bottom: 1px solid rgba(0,0,0,0.08);
}
header.site .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  padding-bottom: 12px;
}
.logo { display: flex; flex-direction: column; gap: 2px; font-size: 1.15rem; text-decoration: none; }
.logo-img { height: 28px; width: auto; flex-shrink: 0; }
.logo-sub { display: flex; align-items: baseline; gap: 5px; }
.logo-sep { color: var(--text-muted); font-weight: 300; font-size: 0.75rem; }
.logo-project { font-family: var(--font-body); font-weight: 600; font-size: 0.75rem; color: var(--text-muted); text-decoration: none; transition: color .15s ease; }
.header-actions { display: flex; align-items: center; gap: 18px; }
.icon-link { display: flex; color: var(--text-muted); transition: color .15s ease; }
.icon-link:hover { color: var(--brand-primary); }
.logo-project:hover { color: var(--brand-primary); text-decoration: underline; }
nav.site-nav ul { list-style: none; display: flex; gap: 28px; margin: 0; padding: 0; }
nav.site-nav a { text-decoration: none; font-weight: 600; font-size: 0.95rem; }
nav.site-nav a:hover { color: var(--brand-primary); }
.btn {
  display: inline-block;
  padding: 12px 26px;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease;
}
.btn-primary { background: var(--brand-red); color: #fff; box-shadow: 0 6px 16px rgba(230,19,65,.35); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 20px rgba(230,19,65,.45); }
.btn-outline { background: transparent; border: 2px solid var(--text-main); color: var(--text-main); }
.btn-outline:hover { border-color: var(--brand-primary); color: var(--brand-primary); }

/* Hero */
.hero {
  position: relative;
  display: flex;
  align-items: stretch;
  overflow: hidden;
  background: var(--brand-primary-dark);
  padding: 0; /* override the generic `section { padding: 70px 0 }` rule below —
                 without this the hero got a 70px gap under the header for free */
}
.hero-panel {
  position: relative;
  z-index: 3;
  flex-shrink: 0;
  max-width: 640px;
  display: flex;
  align-items: flex-start;
  padding-top: 26px;
  padding-bottom: 20px;
  padding-right: clamp(24px, 4vw, 56px);
  /* Match the exact left inset of `.container` (max-width + centering) so the
     hero text starts at precisely the same x as the header logo and every
     other section's content, at any viewport width — not a guessed fixed
     number that only happens to line up at one screen size.
     This MUST be margin, not padding: padding adds to the panel's own box
     and, on wide screens where this offset grows past the panel's width,
     squeezed hero-content down to nothing and wrapped every word onto its
     own line. Margin pushes the whole (still normal-width) panel over
     instead, and .hero's own background is the same colour so there's no
     visible seam in the gap this leaves. */
  margin-left: max(24px, calc((100vw - var(--maxw)) / 2 + 24px));
  background: var(--brand-primary-dark);
}
.hero-content {
  color: #fff;
  max-width: 460px;
}
.hero-stats {
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,.15);
}
.hero-stats .stat strong { display: block; font-size: 1.15rem; color: var(--brand-yellow); font-family: var(--font-heading); font-weight: 400; }
.hero-stats .stat span { font-size: 0.78rem; opacity: 0.75; }
/* The source video is a genuine 16:9 recording (confirmed via YouTube's
   thumbnail — a 16:9 clip letterboxed into the legacy 4:3 thumbnail slot).
   Giving this box that exact ratio means the iframe fills it edge-to-edge
   with zero cropping and zero letterboxing — no guessing, no "cover" math.
   max-height/max-width together (not max-height alone) keep it from
   ballooning on wide/short windows *without* breaking the ratio — capping
   only one axis let flex:1 keep growing the other and made YouTube itself
   pillarbox the feed, which was an earlier bug here. */
.hero-video-col {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  max-width: calc(620px * 16 / 9);
  /* Push this to the right edge on its own (rather than via `.hero`'s
     justify-content, which was shoving hero-panel's margin-based alignment
     off-grid too whenever this hit max-width and left slack space) — an
     auto margin here only ever affects this element, never hero-panel. */
  margin-left: auto;
  /* Don't let the flex row's stretch behavior override the aspect-ratio: if the
     text panel needs more height than a true 16:9 box at this width, the panel
     just gets extra (same-colour) blue background around it instead of the
     video getting squashed out of ratio. */
  align-self: flex-start;
}
.hero-video-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 620px;
  overflow: hidden;
  background: #000;
}
.hero-video-wrap iframe {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  border: 0;
}
.hero-eyebrow { color: var(--brand-yellow); font-weight: 700; letter-spacing: 1px; text-transform: uppercase; font-size: 0.8rem; }
.hero h1 { font-size: clamp(1.6rem, 2.8vw, 2.3rem); margin: 8px 0 10px; line-height: 1.1; }
.hero p.lead { font-size: 0.95rem; margin-bottom: 14px; max-width: 46ch; opacity: 0.92; }
.hero-cta { display: flex; gap: 16px; flex-wrap: wrap; }
.hero-cta .btn-outline { border-color: #fff; color: #fff; }
.hero-cta .btn-outline:hover { background: #fff; color: var(--text-main); }
.hero-sound-toggle {
  /* Overlaid on the video itself (top-left, away from YouTube's own top-right
     mute/CC/settings icons and its bottom-right logo badge) rather than
     placed under it — anything outside the video's own box makes the hero
     section taller than the video, which is exactly what we don't want. */
  position: absolute;
  top: 80px; left: 12px;
  z-index: 2;
  background: rgba(15,23,42,.65);
  border: 1px solid rgba(255,255,255,.3);
  color: #fff; font-size: 0.8rem; font-weight: 600;
  padding: 8px 16px; border-radius: 999px;
  display: flex; align-items: center; gap: 6px;
  transition: background .2s ease, border-color .2s ease;
}
.hero-sound-toggle:hover { background: rgba(15,23,42,.85); border-color: #fff; }

/* Section base */
section { padding: 70px 0; }
.section-title { text-align: center; margin-bottom: 12px; font-size: clamp(1.6rem, 3vw, 2.2rem); }
.section-sub { text-align: center; max-width: 60ch; margin: 0 auto 44px; opacity: 0.85; }

/* Story */
.story .container { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 48px; align-items: center; }
.story-media { aspect-ratio: 1/1; border-radius: var(--radius); background: #d9dee6; width: 100%; height: 100%; object-fit: cover; }
.story blockquote { font-size: 1.15rem; font-style: italic; border-left: 4px solid var(--brand-primary); padding-left: 20px; margin: 24px 0; }

/* Manifesto — Daniel's own voice, in text and audio. Dark, quiet, no card
   chrome — meant to read as a personal statement, not another content block. */
#manifest { background: var(--text-main); color: #fff; }
.manifest-container { max-width: 980px; }
.manifest-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 48px;
  align-items: center;
  margin-bottom: 32px;
}
.manifest-text { text-align: left; }
.manifest-photo { position: relative; }
.manifest-photo img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: 0 16px 40px rgba(0,0,0,.35);
}
.manifest-photo .manifest-social-link {
  position: absolute;
  right: 14px; bottom: 14px;
  background: rgba(15,23,42,.65);
  backdrop-filter: blur(2px);
}
.manifest-quote-mark {
  font-family: var(--font-heading);
  font-size: 5rem;
  line-height: 1;
  color: var(--brand-yellow);
  opacity: 0.85;
}
.manifest-quote {
  margin: 0 0 28px;
  font-size: clamp(1.4rem, 3vw, 2rem);
  line-height: 1.4;
  font-weight: 600;
}
.manifest-attribution {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 16px;
}
.manifest-attribution-text { text-align: left; }
/* Two different, vivid colours (rather than one muted tone for both lines)
   so "Daniel" and his role/duration don't blend into one grey block and
   the whole line stands out against the dark background. */
.manifest-attribution strong { display: block; font-size: 1.1rem; color: var(--brand-yellow); }
.manifest-attribution span { display: block; font-size: 0.88rem; font-weight: 600; color: var(--accent-pink); }
.manifest-social-link { border-color: rgba(255,255,255,.4); color: #fff; }
.manifest-social-link:hover { background: #fff; color: var(--text-main); }
.manifest-audio {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 20px;
}
.manifest-audio-label { margin: 0 0 14px; font-size: 0.9rem; opacity: 0.85; }
.manifest-audio audio { width: 100%; }
.manifest-transcript { text-align: left; }
.manifest-transcript summary {
  cursor: pointer;
  text-align: center;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--brand-yellow);
  padding: 8px 0;
}
.manifest-transcript p { font-size: 0.95rem; line-height: 1.7; opacity: 0.85; margin: 0 0 16px; }

/* "Na co zbieramy?" — deliberately on strong, contrasting brand colour so it
   reads as a distinct block between the light "Historia" and tan "Filmy"
   sections either side of it, instead of blurring into them. */
#cel { background: var(--brand-primary); }
#cel .section-title, #cel .section-sub { color: #fff; }
#cel .section-sub { opacity: 0.85; }
.goal-card {
  background: #fff;
  color: var(--text-main);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.06);
  max-width: 640px;
  margin: 0 auto 44px;
}
.progress-track { background: var(--brand-primary-light); border-radius: 999px; height: 18px; overflow: hidden; margin: 14px 0; }
.progress-fill { background: linear-gradient(90deg, var(--brand-yellow-dark), var(--brand-yellow)); height: 100%; width: 0%; transition: width 1.2s ease; }
.progress-numbers { display: flex; justify-content: space-between; font-weight: 700; }
.goal-list { columns: 2; gap: 24px; margin-top: 24px; padding-left: 20px; }
.goal-list li { break-inside: avoid; margin-bottom: 8px; }

/* Video switcher — YouTube's own playlist side-panel turned out to not
   reliably render at all in real browsers (confirmed: single video, no way
   to switch), so this is a self-built player + clickable list instead,
   driven by the YouTube IFrame API (same mechanism as the hero video). */
.video-switcher {
  display: flex;
  gap: 20px;
  max-width: 1100px;
  margin: 0 auto;
}
.video-switcher-player {
  flex: 1;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 12px 32px rgba(0,0,0,.12);
  background: #000;
}
.video-switcher-player iframe { width: 100%; height: 100%; border: 0; }
.video-switcher-list {
  list-style: none;
  margin: 0; padding: 0;
  width: 300px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 440px; /* roughly matches the player's height at this layout's widths */
  overflow-y: auto;
}
.video-switcher-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 6px;
  border: 2px solid transparent;
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  text-align: left;
  font: inherit;
  transition: border-color .15s ease, background .15s ease;
}
.video-switcher-item:hover { background: var(--brand-primary-light); }
.video-switcher-item.is-active { border-color: var(--brand-primary); background: var(--brand-primary-light); }
.video-switcher-item img { width: 84px; aspect-ratio: 16/9; object-fit: cover; border-radius: 6px; flex-shrink: 0; }
.video-switcher-item span { font-size: 0.82rem; font-weight: 600; line-height: 1.3; }
.section-note { text-align: center; font-size: 0.78rem; opacity: 0.55; margin: 16px auto 0; max-width: 60ch; }

/* Gallery — fixed column counts (not auto-fill) so the count of photos we
   actually have divides evenly and the last row is never left half-empty.
   2 columns on mobile, 4 on desktop; both divide 8 with no remainder. */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.gallery-item {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 6px 16px rgba(0,0,0,.08);
  border: 0;
  outline: none;
  padding: 0;
  margin: 0;
  background: #000;
  -webkit-appearance: none;
  appearance: none;
  font: inherit;
  cursor: pointer;
  /* Buttons carry user-agent-default border/padding/appearance that varies
     enough across browsers that overriding individual properties isn't
     reliable — the visible frame around gallery photos in production was
     exactly this leaking through. Absolutely positioning the <img> below,
     rather than trusting the button's own box for sizing, sidesteps it. */
}
.gallery-item img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .3s ease;
}
.gallery-item:hover img { transform: scale(1.06); }

/* Lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(10,10,15,.94);
  display: flex; align-items: center; justify-content: center;
}
.lightbox[hidden] { display: none; }
.lightbox-img { max-width: 88vw; max-height: 86vh; border-radius: 8px; box-shadow: 0 20px 60px rgba(0,0,0,.5); }
.lightbox-close, .lightbox-nav {
  position: absolute;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.25);
  color: #fff;
  border-radius: 999px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s ease;
}
.lightbox-close:hover, .lightbox-nav:hover { background: rgba(255,255,255,.22); }
.lightbox-close { top: 20px; right: 20px; width: 44px; height: 44px; font-size: 1.6rem; line-height: 1; }
.lightbox-nav { top: 50%; transform: translateY(-50%); width: 52px; height: 52px; font-size: 1.2rem; }
.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }
@media (max-width: 640px) {
  .lightbox-nav { width: 44px; height: 44px; }
  .lightbox-prev { left: 8px; }
  .lightbox-next { right: 8px; }
  .lightbox-close { top: 10px; right: 10px; }
}

/* Kontakt (Trenerowo contact card + Bwengula Arts Academy fan page — the
   most established, most credible public presence for this campaign) */
.facebook-section { background: #f4e9db; }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
.contact-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: 0 8px 20px rgba(0,0,0,.06);
}
.contact-card h3 { margin: 0 0 18px; font-size: 1.15rem; font-family: var(--font-body); font-weight: 700; }
.contact-list { list-style: none; padding: 0; margin: 0 0 22px; display: flex; flex-direction: column; gap: 10px; }
.contact-list a { font-weight: 600; text-decoration: none; }
.contact-list a:hover { color: var(--brand-primary); text-decoration: underline; }
.contact-list span { opacity: 0.65; font-size: 0.85rem; }
.contact-card .foot-social a { color: var(--text-main); }
.contact-card .foot-social a:hover { color: var(--brand-primary); }
.facebook-embed-wrap { display: flex; flex-direction: column; align-items: center; gap: 24px; }
.facebook-embed { width: 100%; max-width: 500px; overflow: hidden; border-radius: var(--radius); box-shadow: 0 12px 32px rgba(0,0,0,.1); }
.facebook-embed iframe { width: 100%; border: 0; display: block; }
.btn-facebook { background: #1877f2; color: #fff; box-shadow: 0 6px 16px rgba(24,119,242,.35); }
.btn-facebook:hover { transform: translateY(-2px); box-shadow: 0 10px 20px rgba(24,119,242,.45); }

/* Blog */
.blog-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; }
.blog-card { background: #fff; border-radius: var(--radius); padding: 24px; box-shadow: 0 8px 20px rgba(0,0,0,.05); }
.blog-date { font-size: 0.8rem; color: var(--brand-primary); font-weight: 700; text-transform: uppercase; }
.blog-card h3 { margin: 10px 0; font-size: 1.1rem; font-family: var(--font-body); font-weight: 700; }
.blog-card p { font-size: 0.92rem; opacity: 0.8; margin: 0 0 14px; }
.blog-card a.read-more { font-weight: 700; font-size: 0.85rem; color: var(--brand-red); text-decoration: none; }

/* CTA band */
.cta-band { background: var(--brand-primary); color: #fff; text-align: center; }
.cta-band h2 { margin-top: 0; }
.cta-band p { max-width: 60ch; margin: 0 auto 28px; opacity: 0.95; }
.cta-band .btn-primary { background: var(--brand-yellow); color: var(--text-main); box-shadow: none; }

/* Footer */
footer.site { background: var(--brand-primary-dark); color: #fff; padding: 48px 0 24px; }
footer.site .container { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 24px; }
footer.site .foot-col h4 { margin: 0 0 10px; color: var(--brand-yellow); font-family: var(--font-body); font-size: 0.95rem; }
footer.site .foot-col ul { list-style: none; padding: 0; margin: 0; }
footer.site .foot-col li { margin-bottom: 6px; font-size: 0.9rem; opacity: 0.85; }
footer.site .foot-col a:hover { color: var(--brand-yellow); }
.foot-social { display: flex; flex-direction: column; gap: 10px; }
.foot-social a {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.9rem; font-weight: 600; opacity: 0.9;
  transition: opacity .15s ease, color .15s ease;
}
.foot-social a:hover { opacity: 1; color: var(--brand-yellow); }
footer .bottom { text-align: center; margin-top: 32px; font-size: 0.8rem; opacity: 0.6; }
/* .bottom ma tez klase .container, wiec dziedziczy display:flex z reguly wyzej
   i uklada dzieci w rzedzie. Tu chcemy dwie linie jedna pod druga. */
footer.site .bottom { display: block; }
footer .bottom .credits { margin-top: 8px; opacity: 1; font-size: 0.82rem; }
footer .bottom .credits a {
  color: var(--brand-yellow); font-weight: 600; text-decoration: none;
  border-bottom: 1px solid rgba(255,255,255,.35); padding-bottom: 1px;
  transition: border-color .15s ease;
}
footer .bottom .credits a:hover { border-bottom-color: var(--brand-yellow); }

@media (max-width: 860px) {
  .story .container { grid-template-columns: 1fr; }
  .story-media { order: -1; }
  nav.site-nav { display: none; }
  .goal-list { columns: 1; }
  .hero { flex-direction: column; min-height: 0; justify-content: flex-start; }
  .hero-panel { max-width: none; width: 100%; margin-left: 0; padding: 44px 24px; }
  .hero-video-col { flex: none; align-self: stretch; max-width: none; margin-left: 0; align-items: flex-end; padding: 16px 24px; }
  .hero-video-wrap { aspect-ratio: 16 / 9; max-height: none; }
  .contact-grid { grid-template-columns: 1fr; }
  .video-switcher { flex-direction: column; }
  .video-switcher-list { width: 100%; max-height: none; flex-direction: row; overflow-x: auto; overflow-y: visible; }
  .video-switcher-item { width: 220px; flex-shrink: 0; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .manifest-grid { grid-template-columns: 1fr; gap: 24px; }
  .manifest-photo { order: -1; max-width: 260px; margin: 0 auto; }
  .manifest-text { text-align: center; }
  .manifest-attribution { justify-content: center; }
  .manifest-attribution-text { text-align: center; }
}
