/* =========================================================
   maxedu — strona główna (rejestr brandowy)
   Hero w terakocie z motywem kratki zeszytu, choreografia
   wejścia, scroll-reveals. Sekcje o zmiennym rytmie.
   ========================================================= */

/* ---------- Hero ---------- */
.hero {
  background:
    /* kratka zeszytu — sygnatura marki */
    linear-gradient(oklch(1 0 0 / 0.055) 1px, transparent 1px),
    linear-gradient(90deg, oklch(1 0 0 / 0.055) 1px, transparent 1px),
    var(--brand);
  background-size: 34px 34px, 34px 34px, auto;
  color: oklch(0.99 0.004 45);
  overflow: hidden;
}
.hero-in {
  display: grid; grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(24px, 5vw, 64px);
  align-items: center;
  padding-block: clamp(56px, 9vw, 120px);
}
.hero h1 {
  font-size: clamp(2.4rem, 5.4vw, 4.2rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: oklch(0.99 0.004 45);
  margin-bottom: 0.4em;
}
.hero .lead {
  font-size: clamp(1.0625rem, 1.6vw, 1.25rem);
  line-height: 1.55;
  color: oklch(0.97 0.012 45);
  max-width: 54ch;
  margin-bottom: 1.6em;
}
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.hero-note {
  margin-top: 18px; font-size: 0.9375rem; color: oklch(0.95 0.02 45);
  display: flex; gap: 18px; flex-wrap: wrap;
}
.hero-note span { display: inline-flex; align-items: center; gap: 7px; }
.hero-note svg { flex: none; }

/* pływająca kompozycja artefaktów produktu */
.hero-art { position: relative; min-height: 360px; }
.art-card {
  position: absolute;
  background: var(--bg); color: var(--ink);
  border-radius: var(--r-l);
  box-shadow: var(--shadow-2);
  padding: 18px 20px;
}
.art-offer { top: 6%; right: 4%; width: min(300px, 88%); }
.art-offer .art-title { font-family: var(--f-serif); font-weight: 600; font-size: 1.06rem; line-height: 1.3; margin-bottom: 8px; }
.art-offer .art-meta { display: flex; gap: 7px; flex-wrap: wrap; margin-bottom: 12px; }
.art-offer .art-row { display: flex; align-items: center; gap: 10px; }
.art-offer .art-name { font-weight: 600; font-size: 0.9375rem; }
.art-offer .art-price { margin-left: auto; font-weight: 700; font-size: 1.15rem; color: var(--brand-strong); }
.art-offer .art-price small { font-weight: 600; color: var(--muted); font-size: 0.8rem; }

.art-slots { bottom: 22%; left: 0; width: min(250px, 78%); }
.art-slots .art-label { font-size: 0.84rem; font-weight: 700; color: var(--muted); margin-bottom: 9px; }
.art-slots .art-times { display: flex; gap: 7px; flex-wrap: wrap; }
.art-slots .t {
  padding: 5px 11px; border-radius: var(--r-s);
  border: 1.5px solid var(--line-strong);
  font-size: 0.9rem; font-weight: 600;
}
.art-slots .t-on { background: var(--accent); border-color: var(--accent); color: oklch(0.97 0.01 180); }
.art-slots .t-off { color: var(--muted); text-decoration: line-through; }

.art-confirm {
  bottom: 2%; right: 12%;
  display: flex; align-items: center; gap: 10px;
  font-weight: 700; font-size: 0.95rem;
  padding: 13px 18px;
}
.art-confirm .dot {
  width: 26px; height: 26px; border-radius: 50%; flex: none;
  background: var(--ok); color: oklch(0.97 0.02 155);
  display: inline-flex; align-items: center; justify-content: center;
}

@media (max-width: 900px) {
  .hero-in { grid-template-columns: 1fr; }
  .hero-art { min-height: 300px; max-width: 460px; }
}
@media (max-width: 480px) {
  .hero-art { min-height: 330px; }
  .art-offer { right: 0; }
}

/* ---------- Choreografia hero (tylko gdy js + pełny ruch) ---------- */
@media (prefers-reduced-motion: no-preference) {
  html.anim .hero .stagger {
    opacity: 0;
    translate: 0 26px;
    animation: hero-rise 0.9s var(--ease-out) forwards;
  }
  html.anim .hero .stagger:nth-child(1) { animation-delay: 0.05s; }
  html.anim .hero .stagger:nth-child(2) { animation-delay: 0.18s; }
  html.anim .hero .stagger:nth-child(3) { animation-delay: 0.31s; }
  html.anim .hero .stagger:nth-child(4) { animation-delay: 0.44s; }

  html.anim .art-card { opacity: 0; animation: art-in 1s var(--ease-out) forwards; }
  html.anim .art-offer { animation-delay: 0.5s; }
  html.anim .art-slots { animation-delay: 0.72s; }
  html.anim .art-confirm { animation-delay: 0.95s; }

  /* delikatne unoszenie po wejściu */
  html.anim .art-offer { --float-d: 7s; }
  html.anim .art-slots { --float-d: 8.5s; }
  html.anim .art-confirm { --float-d: 6s; }
  html.anim .hero-art:hover .art-card { animation-play-state: paused, running; }
}

@keyframes hero-rise {
  to { opacity: 1; translate: 0 0; }
}
@keyframes art-in {
  from { opacity: 0; translate: 0 34px scale(0.97); }
  to { opacity: 1; translate: 0 0 scale(1); }
}
@keyframes art-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-9px); }
}
@media (prefers-reduced-motion: no-preference) {
  html.anim .art-card.floating { animation: art-in 1s var(--ease-out) forwards, art-float var(--float-d, 7s) ease-in-out 1.6s infinite; }
}

/* ---------- Scroll reveals (dodawane przez JS) ---------- */
.reveal-pending { opacity: 0; translate: 0 28px; }
.reveal-pending.in {
  opacity: 1; translate: 0 0;
  transition: opacity 0.7s var(--ease-out), translate 0.7s var(--ease-out);
}
.reveal-pending[data-delay="1"].in { transition-delay: 0.1s; }
.reveal-pending[data-delay="2"].in { transition-delay: 0.2s; }
.reveal-pending[data-delay="3"].in { transition-delay: 0.3s; }

/* ---------- Pasek przedmiotów ---------- */
.subjects-strip {
  padding-block: clamp(20px, 3vw, 30px);
  border-bottom: 1px solid var(--line);
}
.subjects-strip-in { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.subjects-strip .strip-label { font-weight: 700; font-size: 0.9375rem; color: var(--muted); margin-right: 4px; }
.subject-link {
  display: inline-flex; padding: 7px 16px;
  border: 1.5px solid var(--line-strong); border-radius: var(--r-pill);
  color: var(--ink); text-decoration: none; font-weight: 600; font-size: 0.9375rem;
  transition: border-color var(--t-fast) var(--ease-out), background var(--t-fast) var(--ease-out);
}
.subject-link:hover { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-strong); }

/* ---------- Sekcje ---------- */
.section { padding-block: clamp(48px, 8vw, 96px); }
.section-title { font-size: clamp(1.75rem, 3.4vw, 2.5rem); margin-bottom: 0.35em; }
.section-lead { color: var(--muted); font-size: 1.125rem; max-width: 58ch; margin-bottom: 2em; }

/* Jak to działa — przełącznik + kroki */
.howto-tabs { display: inline-flex; gap: 6px; background: var(--surface); border-radius: var(--r-pill); padding: 5px; margin-bottom: 34px; }
.howto-tab {
  border: none; background: transparent; cursor: pointer;
  padding: 9px 22px; border-radius: var(--r-pill);
  font-weight: 700; font-size: 0.9857rem; color: var(--muted);
  transition: background var(--t-fast) var(--ease-out), color var(--t-fast) var(--ease-out);
}
.howto-tab[aria-selected="true"] { background: var(--ink); color: var(--dark-ink); }
.howto-tab:hover:not([aria-selected="true"]) { color: var(--ink); }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(20px, 3vw, 36px); }
@media (max-width: 820px) { .steps { grid-template-columns: 1fr; max-width: 460px; } }
.step { position: relative; padding-top: 8px; }
.step-num {
  font-family: var(--f-serif); font-weight: 700;
  font-size: clamp(2.6rem, 4.5vw, 3.6rem); line-height: 1;
  color: var(--brand); margin-bottom: 10px;
}
.step h3 { font-size: 1.25rem; margin-bottom: 0.35em; }
.step p { color: var(--muted); font-size: 1rem; margin: 0; }

/* Dlaczego maxedu — ciemna sekcja, asymetryczne kafle */
.why { background: var(--dark); color: var(--dark-ink); }
.why .section-title { color: var(--dark-ink); }
.why .section-lead { color: var(--dark-muted); }
.why-grid {
  display: grid; gap: 18px;
  grid-template-columns: repeat(12, 1fr);
}
.why-tile {
  border: 1px solid oklch(0.36 0.025 38);
  border-radius: var(--r-l);
  padding: clamp(20px, 3vw, 30px);
}
.why-tile h3 { font-size: 1.3rem; color: var(--dark-ink); margin-bottom: 0.4em; }
.why-tile p { color: var(--dark-muted); font-size: 1rem; margin: 0; }
.why-tile-hero {
  grid-column: span 7;
  background: var(--dark-soft); border-color: transparent;
  display: flex; flex-direction: column; justify-content: center;
}
.why-tile-hero h3 { font-size: clamp(1.5rem, 2.6vw, 2rem); max-width: 22ch; }
.why-tile-hero .why-big { color: oklch(0.75 0.14 45); font-weight: 700; }
.why-tile:nth-child(2) { grid-column: span 5; }
.why-tile:nth-child(3) { grid-column: span 4; }
.why-tile:nth-child(4) { grid-column: span 4; }
.why-tile:nth-child(5) { grid-column: span 4; }
@media (max-width: 820px) {
  .why-grid { grid-template-columns: 1fr; }
  .why-tile, .why-tile-hero { grid-column: auto; }
}
.why-icon {
  width: 42px; height: 42px; border-radius: var(--r-m);
  background: oklch(0.99 0.004 45 / 0.08);
  display: inline-flex; align-items: center; justify-content: center;
  color: oklch(0.75 0.14 45);
  margin-bottom: 14px;
}

/* Dla korepetytorów — panel z tintem marki */
.tutors-panel {
  background:
    linear-gradient(oklch(1 0 0 / 0.5) 1px, transparent 1px),
    linear-gradient(90deg, oklch(1 0 0 / 0.5) 1px, transparent 1px),
    var(--brand-soft);
  background-size: 34px 34px, 34px 34px, auto;
  border-radius: var(--r-l);
  padding: clamp(28px, 5vw, 56px);
  display: grid; grid-template-columns: 1.2fr 0.8fr;
  gap: clamp(24px, 4vw, 48px);
  align-items: center;
}
@media (max-width: 820px) { .tutors-panel { grid-template-columns: 1fr; } }
.tutors-panel h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
.tutors-panel > div > p { color: oklch(0.38 0.06 40); }
.tutors-list { list-style: none; margin: 0 0 26px; padding: 0; display: grid; gap: 12px; }
.tutors-list li { display: flex; gap: 11px; align-items: flex-start; font-weight: 600; color: oklch(0.32 0.05 40); }
.tutors-list svg { flex: none; margin-top: 3px; color: var(--brand-strong); }
.tutors-side {
  background: var(--bg); border-radius: var(--r-l);
  padding: clamp(20px, 3vw, 30px);
  box-shadow: var(--shadow-1);
}
.tutors-side .ts-num { font-family: var(--f-serif); font-weight: 700; font-size: 2.4rem; color: var(--brand-strong); line-height: 1.1; }
.tutors-side .ts-label { color: var(--muted); font-weight: 600; font-size: 0.9375rem; }
.tutors-side hr { border: none; border-top: 1px solid var(--line); margin: 16px 0; }

/* CTA finał */
.final-cta {
  background:
    linear-gradient(oklch(1 0 0 / 0.055) 1px, transparent 1px),
    linear-gradient(90deg, oklch(1 0 0 / 0.055) 1px, transparent 1px),
    var(--brand);
  background-size: 34px 34px, 34px 34px, auto;
  border-radius: var(--r-l);
  color: oklch(0.99 0.004 45);
  text-align: center;
  padding: clamp(40px, 7vw, 80px) clamp(20px, 5vw, 60px);
}
.final-cta h2 {
  color: oklch(0.99 0.004 45);
  font-size: clamp(1.8rem, 3.8vw, 2.8rem);
  max-width: 22ch; margin-inline: auto;
}
.final-cta p { color: oklch(0.96 0.015 45); margin: 0.6em auto 1.8em; }
