/* =========================================================
   YouTube po 50+ — arkusz stylów (wersja 1 / prototyp)
   Paleta: niebieski + żółty marker
   ========================================================= */

/* ---------- Zmienne ---------- */
:root {
  /* Tła */
  --bg: #f6f7f9;            /* tło strony */
  --surface: #ffffff;       /* karty, formularz, jasne bloki */
  --bg-tint: #e3eaf8;       /* tło sekcji wyróżnionych */

  /* Tekst */
  --text: #14213d;          /* tekst główny i nagłówki */
  --text-muted: #4a5568;    /* tekst pomocniczy, opisy, etykiety */

  /* Linie */
  --line: #d9dee7;
  --field-border: #c3cad6;
  --field-border-hover: #8a94a6;
  --field-placeholder: #646c7e; /* kontrast 5,3:1 na białym */

  /* Akcenty */
  --accent: #2b59c3;        /* niebieski: przycisk główny, linki, etykiety sekcji */
  --accent-hover: #224aa6;
  --marker: #ffd400;        /* żółty marker — TYLKO jako tło pod tekstem --text */

  /* Ciemne sekcje (pasek nawigacji, stopka) */
  --dark: #14213d;
  --on-dark: #c3cce0;       /* tekst */
  --on-dark-strong: #ffffff;/* nagłówki, logo */
  --on-dark-link: #8fb0ff;
  --on-dark-accent: #ffd400;/* na ciemnym tle żółty może być tekstem */

  /* Błędy formularza */
  --error: #b42318;
  --error-soft: #fdecea;

  /* Fokus klawiatury */
  --focus: #14213d;
  --focus-on-dark: #ffd400;

  /* Typografia */
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-display: "Anton", "Impact", "Arial Narrow", sans-serif;
  --fs-base: 1.125rem;      /* 18 px — minimum dla tekstu podstawowego */
  --fs-lead: clamp(1.25rem, 1.1rem + 0.6vw, 1.45rem);
  --fs-h1: clamp(2.75rem, 1.5rem + 4vw, 4.75rem);
  --fs-h2: clamp(2.25rem, 1.6rem + 2.6vw, 3.75rem);
  --fs-h3: 1.25rem;

  /* Odstępy */
  --container: 72rem;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --section-y: clamp(4.5rem, 3rem + 6vw, 8rem);
  --radius: 14px;
  --radius-sm: 10px;
  --header-h: 4.5rem;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 1rem);
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: var(--fs-base);
  font-weight: 400;
  line-height: 1.6;
  font-feature-settings: "cv11", "ss01"; /* czytelniejsze cyfry i litery w Inter */
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Nagłówki h1–h2: Anton, wielkie litery — jak na miniaturach */
h1, h2 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;         /* Anton ma jedną grubość */
  /* Ogonki Ę/Ą w Antonie schodzą 0,31 em pod linię, wielkie litery mają 0,86 em.
     1,28 zostawia ok. 0,1 em odstępu między ogonkiem a literą w kolejnej linii. */
  line-height: 1.28;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  text-wrap: balance;
}
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }

/* h3: Inter Bold */
h3 {
  margin: 0;
  font-size: var(--fs-h3);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

p { margin: 0 0 1.1em; text-wrap: pretty; }
p:last-child { margin-bottom: 0; }

img { max-width: 100%; height: auto; display: block; }

a { color: var(--accent); text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { color: var(--accent-hover); text-decoration-thickness: 2px; }

/* Fokus: granat, wyraźnie inny niż niebieskie przyciski */
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: 4px;
}
.site-footer :focus-visible,
.skip-link:focus-visible { outline-color: var(--focus-on-dark); }

/* Żółty marker — tło pod ciemnym tekstem */
.marker {
  background: var(--marker);
  color: var(--text);
  padding: 0 0.14em;
  border-radius: 0.08em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

/* W nagłówkach Anton (line-height 1) marker musi być blokiem,
   inaczej jego tło zachodzi na linię powyżej */
h1 .marker,
h2 .marker {
  display: inline-block;
  line-height: 1.05;
  padding: 0.06em 0.12em 0.02em;
  margin-top: 0.08em;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -100px;
  z-index: 100;
  padding: 0.75rem 1rem;
  background: var(--dark);
  color: var(--on-dark-strong);
  font-weight: 600;
  border-radius: var(--radius-sm);
}
.skip-link:focus { top: 1rem; color: var(--on-dark-strong); }

/* ---------- Elementy wspólne ---------- */
.eyebrow {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0 0 1.1rem;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.badge {
  display: inline-block;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  background: var(--marker);
  color: var(--text);
  font-size: 0.9375rem;     /* 15 px */
  letter-spacing: 0.04em;
}

.lead {
  font-size: var(--fs-lead);
  line-height: 1.6;
  color: var(--text-muted);
  max-width: 40ch;
}

.prose { max-width: 40rem; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.25rem;
  padding: 0.85rem 1.6rem;
  border: 2px solid transparent;
  border-radius: 999px;
  font: inherit;
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.button-primary { background: var(--accent); color: #fff; }
.button-primary:hover { background: var(--accent-hover); color: #fff; }
.button-secondary { background: transparent; color: var(--text); border-color: var(--text); }
.button-secondary:hover { background: var(--text); color: #fff; }

.text-link {
  display: inline-flex;
  align-items: center;
  min-height: 3.25rem;
  padding-inline: 0.25rem;
  font-weight: 600;
}

/* ---------- Nagłówek / nawigacja (jasny pasek) ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg);
  color: var(--text);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-h);
}

.logo {
  display: inline-block;
  line-height: 2.75rem; /* wysokość klikalna 44 px */
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
  text-decoration: none;
}
.logo:hover { color: var(--text); }

.nav-list {
  display: flex;
  gap: 0.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.nav-list a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding: 0 0.9rem;
  border-radius: 999px;
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
}
.nav-list a:hover { background: var(--bg-tint); color: var(--text); }

.nav-toggle {
  display: none;
  align-items: center;
  gap: 0.6rem;
  min-height: 2.75rem;
  padding: 0 1rem;
  border: 1px solid var(--field-border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 1.0625rem;
  font-weight: 600;
  cursor: pointer;
}
.nav-toggle-bars,
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  display: block;
  width: 18px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
}
.nav-toggle-bars { position: relative; }
.nav-toggle-bars::before,
.nav-toggle-bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle-bars::before { top: -6px; }
.nav-toggle-bars::after { top: 6px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { top: 0; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after { top: 0; transform: rotate(-45deg); }

/* ---------- Hero ---------- */
.hero { padding-block: clamp(3rem, 2rem + 5vw, 6.5rem) clamp(4rem, 3rem + 5vw, 7rem); }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) min(30rem, 42%);
  gap: clamp(2.5rem, 4vw, 4rem);
  align-items: center;
}

.hero h1 { margin-bottom: 1.75rem; }
.h1-main { display: block; }
.h1-sub {
  display: block;
  margin-top: 0.3em;
  font-size: 0.68em;      /* druga część nagłówka — ok. 2/3 głównej linii */
}
.hero .lead { margin-bottom: 1.5rem; }

.hero-audience {
  max-width: 40ch;
  margin-bottom: 2.25rem;
  padding-left: 1rem;
  border-left: 3px solid var(--accent);
  color: var(--text);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.75rem;
}

/* ---------- Zdjęcia / placeholdery ----------
   Zdjęcie (img) leży na placeholderze. Gdy pliku brak,
   img jest usuwany (onerror) i widać placeholder. */
.photo {
  position: relative;
  margin: 0;
  overflow: hidden;
  border-radius: var(--radius);
}
.photo-hero { aspect-ratio: 4 / 5; }
.photo-story { aspect-ratio: 4 / 3; }

.photo img,
.photo-placeholder {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: var(--radius);
}
.photo img { object-fit: cover; }

.photo-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 1.5rem;
  background: var(--surface);
  border: 2px dashed var(--field-border);
  color: var(--text-muted);
  text-align: center;
  font-weight: 600;
}
.photo-placeholder small { font-size: 0.9375rem; font-weight: 400; }

/* ---------- Sekcje ---------- */
.section { padding-block: var(--section-y); }
.section-tinted { background: var(--bg-tint); }

.section-head { margin-bottom: 2.5rem; max-width: 46rem; }

/* O projekcie — tekst po lewej, zasady w karcie po prawej */
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 26rem);
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: end;
}
.about-main .section-head { margin-bottom: 2rem; }

.principles {
  margin: 0;
  padding: 0.5rem 2rem;
  list-style: none;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.principles li { padding-block: 1.5rem; }
.principles li + li { border-top: 1px solid var(--line); }
.principles h3 { margin-bottom: 0.4rem; }
.principles p { color: var(--text-muted); line-height: 1.6; }

/* Moja droga */
.story-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: center;
}
.story-text h2 { margin-bottom: 1.75rem; }
.signature {
  margin-top: 1.75rem;
  font-weight: 700;
  font-size: 1.2rem;
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
  margin: clamp(3rem, 6vw, 5rem) 0 0;
  padding: 0;
  list-style: none;
}
.steps li {
  padding: 1.75rem;
  background: var(--surface);
  border-radius: var(--radius);
}
.step-num {
  display: block;
  margin-bottom: 0.75rem;
  font-family: var(--font-display);
  font-size: 2.5rem;
  line-height: 1.05;
  letter-spacing: 0.01em;
  color: var(--accent);
}
.steps h3 { margin-bottom: 0.4rem; }
.steps p { color: var(--text-muted); }

/* Kanał — karty filmów */
.section-head h2 + .section-intro { margin-top: 1.25rem; }
.section-intro { color: var(--text-muted); max-width: 40rem; }

.video-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.video-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  text-decoration: none;
  transition: border-color 0.15s ease;
}
.video-card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;       /* obcina czarne pasy miniatury 4:3 */
  background: var(--line);
}
.video-card h3 {
  padding: 1.25rem 1.5rem 1.5rem;
  font-size: 1.125rem;
  line-height: 1.4;
}
.video-card:hover { border-color: var(--accent); color: var(--text); }
.video-card:hover h3 { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.2em; }
.video-card:focus-visible { border-radius: var(--radius); }

.channel-action { margin-top: 2.5rem; }

/* Konsultacje */
.consult-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 26rem);
  grid-template-areas:
    "text list"
    "cta  list";
  grid-template-rows: auto 1fr;
  column-gap: clamp(2.5rem, 6vw, 5rem);
  align-items: start;
}
.consult-text { grid-area: text; }
.consult-grid .list-block { grid-area: list; }
.consult-grid .consult-cta { grid-area: cta; }

.consult-note {
  margin-top: 2rem;
  padding-left: 1.25rem;
  border-left: 3px solid var(--field-border);
}
.consult-note h3 { margin-bottom: 0.4rem; }
.consult-note p { color: var(--text-muted); }

.list-block {
  padding: 1.75rem;
  background: var(--surface);
  border-radius: var(--radius);
}
.list-block h3 { margin-bottom: 1rem; }

.check-list {
  margin: 0;
  padding: 0;
  list-style: none;
}
.check-list li {
  position: relative;
  padding-left: 1.6rem;
  margin-bottom: 0.6rem;
  line-height: 1.6;
}
.check-list li:last-child { margin-bottom: 0; }
.check-list li::before {
  content: "";
  position: absolute;
  left: 0.15rem;
  top: 0.55em;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--accent);
}

.consult-cta { margin-top: 2.25rem; }

/* Kontakt / formularz */
.contact-grid {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: start;
}
.contact-intro h2 { margin-bottom: 1.25rem; }
.contact-intro p { color: var(--text-muted); }

.contact-form {
  display: grid;
  gap: 1.5rem;
  padding: clamp(1.5rem, 4vw, 2.5rem);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.field { display: grid; gap: 0.5rem; }
.field label { font-weight: 600; font-size: 1.0625rem; line-height: 1.4; }
.optional { font-weight: 400; color: var(--text-muted); }

.field input,
.field textarea {
  width: 100%;
  min-height: 3.25rem;
  padding: 0.8rem 1rem;
  border: 1.5px solid var(--field-border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 1.125rem; /* ≥16 px — iOS nie powiększa pola przy fokusie */
  line-height: 1.5;
  transition: border-color 0.15s ease;
}
.field textarea { resize: vertical; min-height: 9rem; }
.field input::placeholder,
.field textarea::placeholder { color: var(--field-placeholder); }
.field input:hover,
.field textarea:hover { border-color: var(--field-border-hover); }
.field input:focus-visible,
.field textarea:focus-visible { border-color: var(--text); }
.field input[aria-invalid="true"],
.field textarea[aria-invalid="true"] { border-color: var(--error); }

.form-note { font-size: 1rem; color: var(--text-muted); line-height: 1.55; }

.contact-form .button { justify-self: start; }

.form-status {
  padding: 1rem 1.25rem;
  border-radius: var(--radius-sm);
  background: var(--bg-tint);
  line-height: 1.55;
}
.form-status.is-error { background: var(--error-soft); color: var(--error); }

/* ---------- Stopka (ciemna) ---------- */
.site-footer {
  padding-block: 3.5rem;
  background: var(--dark);
  color: var(--on-dark);
  font-size: 1rem;
}
.footer-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1.5rem 2rem;
  align-items: start;
}
.footer-logo { margin: 0; font-weight: 700; font-size: 1.2rem; color: var(--on-dark-strong); }
.footer-logo .accent { color: var(--on-dark-accent); }
.footer-author { margin: 0.25rem 0 0; }
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.footer-links a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  font-weight: 600;
  color: var(--on-dark-link);
}
.footer-links a:hover { color: var(--on-dark-strong); }
.footer-legal {
  grid-column: 1 / -1;
  margin: 1rem 0 0;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  font-size: 0.95rem;
}

/* =========================================================
   Responsywność
   ========================================================= */

/* Tablet */
@media (max-width: 960px) {
  .hero-grid,
  .about-grid,
  .story-grid,
  .consult-grid,
  .contact-grid { grid-template-columns: 1fr; }

  .photo-hero { max-width: 26rem; }
  .photo-story { max-width: 36rem; }


  .consult-grid {
    grid-template-areas: "text" "list" "cta";
    grid-template-rows: auto;
    row-gap: 2.5rem;
  }
  .consult-grid .consult-cta { margin-top: 0; }
}

/* Telefon: menu zwijane */
@media (max-width: 760px) {
  :root { --header-h: 4rem; }

  .nav-toggle { display: inline-flex; }

  /* Bez JS menu pozostaje widoczne pod logo */
  .site-nav { display: block; }
  .js .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
  }
  .js .site-nav.is-open { display: block; }
  .js .nav-list {
    flex-direction: column;
    gap: 0;
    padding: 0.5rem var(--gutter) 1rem;
  }
  .js .nav-list a {
    width: 100%;
    min-height: 3.25rem;
    padding: 0 0.75rem;
    font-size: 1.125rem;
    border-radius: var(--radius-sm);
  }

  .steps,
  .video-grid { grid-template-columns: 1fr; }

  html:not(.js) .nav-toggle { display: none; }
  html:not(.js) .header-inner { flex-wrap: wrap; padding-block: 0.75rem; }
  html:not(.js) .nav-list { flex-wrap: wrap; }
}

/* Mały telefon */
@media (max-width: 480px) {
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .button,
  .channel-action .button,
  .consult-cta .button,
  .contact-form .button { width: 100%; }
  .hero-actions .text-link { justify-content: center; }

  .footer-inner { grid-template-columns: 1fr; }
}

/* Ograniczenie ruchu */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
