/* Strona główna czyjto.app (templates/home.html): pierwszy ekran z porównaniem, drogi, kroki, morelowe zakończenie.
   Brief i umowa kierunku: .impeccable/surfaces/templates-home-html.md. Wymaga brand.css. */

/* Pierwszy ekran */
.hero { padding-bottom: 2rem; }
.hero h1 { margin: 0.4rem 0 1.6rem; font: 800 clamp(2.6rem, 6.6vw, 6rem)/0.93 var(--display); letter-spacing: -0.04em; text-wrap: balance; }
.hero-row { display: grid; grid-template-columns: 2fr 1fr; gap: clamp(1.5rem, 3vw, 3rem); align-items: stretch; }
.side-info { display: flex; flex-direction: column; justify-content: center; gap: 2rem; }
.side-info .lead { margin: 0; font-size: 1.25rem; color: var(--muted); max-width: 34ch; }
.side-info .ctas { flex-direction: column; }
.side-info .btn { width: 100%; }
.sample { margin: 0.9rem 0 0; color: var(--muted); font-size: 0.9rem; }

/* Porównanie: plakat na słupie i strona zwierzaka w telefonie, suwak odsłania „po” */
.compare { --h: clamp(380px, 61vh, 560px); position: relative; height: var(--h); margin: 0; border-radius: 28px; overflow: hidden; background: #2e3a35; --cut: 50%; }
/* Plakat stoi na środku lewej połowy, telefon na środku prawej: przy suwaku w połowie oba są widoczne w całości */
.compare .side { position: absolute; inset: 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); align-items: center; }
.compare .side > * { grid-row: 1; }
.compare .before > * { grid-column: 1; justify-self: center; }
.compare .after > * { grid-column: 2; justify-self: center; }
/* Prawdziwy słup ze zszywkami po starych ogłoszeniach (CC0, static/img/home/CREDITS.md), lekko przygaszony pod plakatem */
.compare .before { background: linear-gradient(rgb(20 18 14 / 0.28), rgb(20 18 14 / 0.28)), url("../img/home/slup.webp") center / cover; }
.poster { position: relative; width: 270px; height: 360px; padding: 18px; background: #f1efe9; color: #111; transform: rotate(-4deg); box-shadow: 0 0.6rem 1.2rem rgb(0 0 0 / 0.35); }
.poster b { display: block; font: 900 34px/1 system-ui, sans-serif; letter-spacing: -0.02em; }
.poster img { display: block; width: 100%; height: 150px; margin-top: 10px; object-fit: cover; filter: contrast(1.25); }
.poster small { display: block; margin-top: 8px; font: 700 14px system-ui, sans-serif; color: #333; }
.poster .tabs { position: absolute; left: 0; right: 0; bottom: 0; height: 60px; display: flex; border-top: 2px dashed #666; }
.poster .tabs span { flex: 1; border-right: 2px dashed #666; }
.poster .tabs span:nth-child(odd) { visibility: hidden; }
.compare .after { background: radial-gradient(70% 90% at 60% 55%, var(--forest-600), var(--ground)); clip-path: inset(0 0 0 var(--cut)); }
.compare .handle { position: absolute; top: 0; bottom: 0; left: var(--cut); width: 4px; margin-left: -2px; background: var(--accent); pointer-events: none; }
.compare .handle::after { content: ""; position: absolute; top: 50%; left: 50%; width: 56px; height: 56px; margin: -28px; border-radius: 50%;
  background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231f160f' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 6l-6 6 6 6M15 6l6 6-6 6'/%3E%3C/svg%3E") center / 26px no-repeat;
  box-shadow: 0 0.4rem 0.9rem rgb(0 0 0 / 0.3); }
.compare input { position: absolute; inset: 0; z-index: 3; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; }
.compare:has(input:focus-visible) { outline: 3px solid var(--signal); outline-offset: 3px; }
.compare .cap { position: absolute; bottom: 18px; z-index: 2; padding: 0.5rem 0.9rem; border-radius: 999px; font-weight: 700; font-size: 0.95rem; }
.compare .cap.b { left: 18px; background: #f1efe9; color: #222; }
.compare .cap.a { right: 18px; background: var(--ink); color: var(--ground); }
.compare .after .phone { width: auto; height: calc(var(--h) - 8rem); }  /* zostaje miejsce na podpis „Po” pod telefonem */

/* Telefon z przykładową stroną zwierzaka: domyślny układ „pełny ekran” z pet.css (motyw rudy, tło las) w miniaturze */
.phone { position: relative; width: 230px; aspect-ratio: 300 / 620; border-radius: 40px; padding: 10px; background: #0d0f12;
  box-shadow: 0 1.6rem 3rem rgb(0 0 0 / 0.32), inset 0 0 0 2px rgb(255 255 255 / 0.08); }
.phone .screen { position: relative; height: 100%; overflow: hidden; border-radius: 31px; background: var(--ground); color: var(--ink); font-family: var(--display); }
.phone .screen::after {  /* cieniowanie pod imieniem, jak na stronie: przechodzi w leśne tło */
  content: ""; position: absolute; inset: auto 0 0; z-index: 1; height: 58%; pointer-events: none;
  background: linear-gradient(to bottom, rgb(15 61 51 / 0), rgb(15 61 51 / 0.86) 42%, rgb(15 61 51 / 0.96));
}
.phone .notch { position: absolute; top: 7px; left: 50%; z-index: 3; width: 74px; height: 20px; margin-left: -37px; border-radius: 20px; background: #0d0f12; }
.phone .photo { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; object-position: 71% 30%; }
.phone .pills { position: absolute; top: 34px; left: 10px; z-index: 2; display: flex; gap: 5px; }
.phone .pills span { display: inline-flex; align-items: center; padding: 4px 9px; border-radius: 99px; background: rgb(255 255 255 / 0.95); color: #10241e; font: 800 10px/1.2 var(--display); }
.phone .pills .brand { letter-spacing: -0.04em; }
.phone .pills .brand svg { width: 0.62em; height: 0.82em; margin-left: 0.03em; fill: #1f6b55; }
.phone .pills .state { background: var(--accent); color: var(--on-accent); }
.phone .intro { position: absolute; left: 12px; right: 12px; bottom: 64px; z-index: 2; }
.phone .name { font: 800 34px/0.95 var(--display); letter-spacing: -0.04em; text-shadow: 0 1px 10px rgb(0 0 0 / 0.35); }
.phone .chips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.phone .chips span { padding: 4px 9px; border-radius: 99px; background: rgb(255 248 239 / 0.18); font: 700 10px/1.2 var(--display); }
.phone .bar { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 8px 8px 12px; background: var(--forest-900); border-top: 1px solid var(--line); }
.phone .act { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 40px; border: 2.5px solid var(--accent); border-radius: 99px; font: 800 11.5px/1.1 var(--display); text-align: center; }
.phone .act small { font: 600 10px/1.2 var(--display); }
.phone .call { background: var(--accent); color: var(--on-accent); }
.phone .alt { border-color: rgb(255 248 239 / 0.42); }

/* Rozdziały: linia przez całą szerokość z pinezką na środku, pod nią wyśrodkowane hasło */
.chapter { padding-top: clamp(5rem, 10vw, 8rem); }
.chapter-head { margin-bottom: clamp(2.2rem, 5vw, 3.6rem); text-align: center; }
.divider { display: flex; align-items: center; gap: 1.2rem; margin-bottom: 2rem; }
.divider::before, .divider::after { content: ""; flex: 1; height: 2px; background: var(--line); }
.divider svg { flex: none; width: 28px; height: 38px; fill: var(--signal); }
.chapter-head h2 { max-width: 16ch; margin: 0 auto; font: 800 clamp(2.6rem, 6.2vw, 5.8rem)/0.95 var(--display); letter-spacing: -0.04em; text-wrap: balance; }

/* Drogi: co chcesz zrobić */
.paths { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.paths li { border-bottom: 1px solid var(--line); }
.paths a { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 1rem 2rem; padding: 1.8rem 0.4rem; text-decoration: none;
  transition: background-color 0.25s, padding 0.25s cubic-bezier(0.16, 1, 0.3, 1); }
.paths .q { color: var(--muted); font-weight: 500; }  /* pytanie i odpowiedź w jednym zdaniu, bez małego napisu nad nagłówkiem */
.paths .do { font: 800 clamp(1.6rem, 3vw, 2.4rem)/1.1 var(--display); letter-spacing: -0.03em; }
.paths .arrow { display: grid; place-items: center; width: 3.2rem; height: 3.2rem; border-radius: 50%; border: 2px solid var(--line); transition: background-color 0.25s, border-color 0.25s, transform 0.25s cubic-bezier(0.16, 1, 0.3, 1); }
.paths .arrow svg { width: 1.3rem; height: 1.3rem; fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.paths a:hover { background: rgb(255 248 239 / 0.04); padding-inline: 1.2rem; }
.paths a:hover .arrow { background: var(--accent); border-color: var(--accent); color: var(--on-accent); transform: translateX(4px); }

/* Jak to działa: cztery kroki */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem; counter-reset: step; }
.steps li { position: relative; padding-top: 4.2rem; counter-increment: step; }
.steps li::before { content: counter(step); position: absolute; top: 0; left: 0; font: 800 3.4rem/1 var(--display); color: var(--accent); letter-spacing: -0.04em; }
.steps li::after { content: ""; position: absolute; top: 1.6rem; left: 3rem; right: -1.4rem; height: 2px; background: var(--line); }
.steps li:last-child::after { display: none; }
.steps b { display: block; margin-bottom: 0.4rem; font-size: 1.3rem; line-height: 1.2; }
.steps span { color: var(--muted); }

/* Zakończenie: morelowe, wyróżnia zakup */
.chapter.end { margin-top: clamp(5rem, 10vw, 8rem); padding-block: clamp(5rem, 10vw, 8rem); background: var(--accent); color: var(--on-accent); text-align: center; }
.chapter.end .divider::before, .chapter.end .divider::after { background: rgb(31 22 15 / 0.22); }
.chapter.end .divider svg { fill: var(--forest-900); }
.chapter.end em { color: var(--forest-900); }
.chapter.end .lead { max-width: 44ch; margin: 0 auto 2rem; font-size: 1.3rem; color: var(--accent-ink); }
.chapter.end .ctas { justify-content: center; }
.chapter.end .btn-main { background: var(--forest-900); color: var(--ink); }
.chapter.end .btn-ghost { color: var(--on-accent); }
.chapter.end :focus-visible { outline-color: var(--forest-900); }

@media (max-width: 900px) {
  .hero-row { grid-template-columns: 1fr; }
  .compare { height: 460px; }
  /* Na wąskim ekranie plakat jest pomniejszony w całości, a telefon ma własne, czytelne rozmiary tekstu
     (bez zmniejszania transformacją, żeby przyciski na stronie zwierzaka dało się przeczytać) */
  .compare .before .poster { transform: rotate(-4deg) scale(0.5); }
  .compare .after .phone { width: 170px; height: auto; padding: 7px; border-radius: 30px; justify-self: end; margin-right: 12px; }
  .compare .handle::after { width: 44px; height: 44px; margin: -22px; background-size: 20px; }
  .compare .after .phone .screen { border-radius: 24px; }
  .compare .after .phone .notch { top: 5px; width: 54px; height: 15px; margin-left: -27px; }
  .compare .after .phone .pills { top: 24px; left: 7px; }
  .compare .after .phone .pills span { padding: 3px 7px; font-size: 9px; }
  .compare .after .phone .intro { left: 9px; right: 9px; bottom: 52px; }
  .compare .after .phone .name { font-size: 25px; }
  .compare .after .phone .chips { margin-top: 5px; gap: 4px; }
  .compare .after .phone .chips span { padding: 3px 7px; font-size: 9.5px; }
  .compare .after .phone .bar { gap: 4px; padding: 6px 6px 9px; }
  .compare .after .phone .act { min-height: 34px; font-size: 10.5px; border-width: 2px; }
  .compare .after .phone .act small { font-size: 9.5px; }
  .steps { grid-template-columns: 1fr 1fr; } .steps li::after { display: none; }
}
@media (max-width: 560px) {
  .steps { grid-template-columns: 1fr; }
  .compare .cap { font-size: 0.8rem; } .compare .cap.b { top: 14px; bottom: auto; }
}
