/* teachty.com — ten sam system co aplikacja: atrament, papier, pomarańczowa zakładka */

@font-face { font-family: 'Bricolage'; src: url('/static/fonts/bricolage-regular.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Bricolage'; src: url('/static/fonts/bricolage-semibold.woff2') format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Bricolage'; src: url('/static/fonts/bricolage-extrabold.woff2') format('woff2'); font-weight: 800; font-display: swap; }
@font-face { font-family: 'Phosphor'; src: url('/static/fonts/phosphor-fill.woff2') format('woff2'); font-display: block; }

:root {
  --ink: #1b1f3b;
  --card: #151830;
  --surface: #252a4b;
  --surface-high: #2e3459;
  --border: #363d66;
  --paper: #fff8ee;
  --muted: #a9acc6;
  --grey: #7e83a3;
  --orange: #ff6b2c;
  --gold: #ffc24b;
  --radius: 16px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: 'Bricolage', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.55;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--orange); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { font-weight: 800; line-height: 1.12; letter-spacing: -0.02em; margin: 0 0 0.5em; }
h1 { font-size: clamp(32px, 6vw, 54px); letter-spacing: -0.03em; }
h2 { font-size: clamp(24px, 3.6vw, 32px); }
h3 { font-size: 19px; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; border-radius: 6px; }

.container { width: min(1120px, 100% - 32px); margin-inline: auto; }
.center { text-align: center; }
.muted { color: var(--muted); margin: 0; font-size: 15px; }
.accent { color: var(--orange); }
.lead { font-size: clamp(17px, 2.2vw, 20px); color: var(--muted); max-width: 640px; }
.eyebrow {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--orange); margin: 0 0 10px;
}
.section { padding-block: 40px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.section-head h2 { margin: 0; }

/* Ikony Phosphor (te same co na okładkach w aplikacji) */
.ph { font-family: 'Phosphor'; font-style: normal; font-weight: normal; line-height: 1; display: inline-block; speak: never; }

/* Przyciski */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--orange); color: var(--ink); font-weight: 800;
  padding: 14px 22px; border-radius: 14px; text-decoration: none; font-size: 16px;
}
.btn:hover { text-decoration: none; filter: brightness(1.06); }
.btn-small { padding: 9px 14px; font-size: 15px; border-radius: 12px; }
.btn-ghost { background: transparent; color: var(--paper); border: 1.5px solid var(--border); }
.link-arrow { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; }
.play-badge {
  display: inline-flex; align-items: center; gap: 12px;
  background: var(--orange); color: var(--ink); text-decoration: none;
  padding: 11px 22px 11px 16px; border-radius: 14px;
  box-shadow: 0 6px 20px rgba(255, 107, 44, 0.28);
  transition: transform 0.15s ease, filter 0.15s ease;
}
.play-badge:hover { text-decoration: none; filter: brightness(1.06); transform: translateY(-1px); }
.play-badge:focus-visible { outline: 2px solid var(--paper); outline-offset: 3px; }
.play-badge-icon { font-size: 30px; }
.play-badge-text { display: flex; flex-direction: column; line-height: 1.1; }
.play-badge-text small { font-size: 12px; font-weight: 600; letter-spacing: 0.02em; opacity: 0.85; }
.play-badge-text strong { font-size: 19px; font-weight: 800; letter-spacing: -0.01em; }
.play-badge-small { padding: 9px 16px 9px 12px; box-shadow: none; }
.play-badge-small .play-badge-icon { font-size: 24px; }
.play-badge-small .play-badge-text strong { font-size: 16px; }

/* Nagłówek i stopka */
.site-header { position: sticky; top: 0; z-index: 10; background: rgba(27, 31, 59, 0.92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
.header-row { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.logo img { height: 32px; width: auto; }
.nav { display: flex; align-items: center; gap: 18px; font-weight: 700; }
.nav a:not(.btn) { color: var(--paper); }
.nav a[aria-current='page'] { color: var(--orange); }
.site-footer { border-top: 1px solid var(--border); margin-top: 40px; padding-top: 40px; color: var(--muted); font-size: 15px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 28px; }
.footer-grid h2 { font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--paper); margin-bottom: 12px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.footer-grid a { color: var(--muted); }
.footer-grid img { height: 30px; width: auto; margin-bottom: 12px; }
.footer-bottom { padding-block: 28px; font-size: 13px; color: var(--grey); }

/* Karty, chipy */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; }
.card p:last-child { margin-bottom: 0; }
.chips { list-style: none; padding: 0; margin: 0 0 12px; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 6px 14px; font-size: 15px; font-weight: 600; }
.chips-accent li { border-color: rgba(255, 107, 44, 0.45); }
.note, .more-label { color: var(--muted); font-size: 15px; }

/* Okładki — wierne odwzorowanie BookCover z aplikacji */
.cover {
  --w: 160px;
  position: relative; display: flex; flex-direction: column;
  aspect-ratio: 3 / 4; width: 100%; overflow: hidden; container-type: inline-size;
  border-radius: 14px; border: 1px solid rgba(255, 248, 238, 0.08);
  background: linear-gradient(var(--base), var(--deep));
  color: var(--paper); text-decoration: none;
  transition: transform 0.15s ease;
}
/* Margines na elemencie wewnętrznym: jednostki cqw liczą się od pola treści okładki */
.cover-inner { position: absolute; inset: 0; display: flex; flex-direction: column; padding: 9cqw 10cqw 9cqw 14cqw; }
a.cover:hover { transform: translateY(-3px); text-decoration: none; }
.cover-spine { position: absolute; left: 0; top: 0; bottom: 0; width: 7%; background: rgba(0, 0, 0, 0.18); }
.cover-ribbon {
  position: absolute; top: 0; right: 12%; width: 9%; height: 20cqw; background: var(--orange);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 72%, 0 100%);
}
.cover-epoch { font-size: 5.4cqw; font-weight: 800; letter-spacing: 0.75cqw; text-transform: uppercase; color: var(--light); white-space: nowrap; overflow: hidden; }
.cover-symbol { font-size: 34cqw; color: var(--light); margin: auto 0; align-self: center; }
.cover-title { font-size: calc(10.6cqw * var(--ts, 1)); font-weight: 800; line-height: 1.08; letter-spacing: -0.03em; overflow-wrap: break-word; }
.cover-author { margin-top: 3.5cqw; font-size: 6.6cqw; line-height: 1.2; color: rgba(255, 248, 238, 0.72); font-weight: 600; }
.cover-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }

/* Strona główna */
.hero { padding-block: 48px 24px; background: radial-gradient(ellipse at 80% 60%, rgba(255, 107, 44, 0.14), transparent 60%); }
.hero-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 40px; align-items: center; }
.hero-actions { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; margin-top: 26px; }
.hero-phone { display: flex; justify-content: center; }
.phone {
  width: min(280px, 72vw); padding: 9px; border-radius: 38px; background: #0d0f22;
  border: 1.5px solid var(--border); box-shadow: 0 30px 80px rgba(255, 107, 44, 0.16);
}
.phone img { border-radius: 30px; }
.features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 24px; }
.feature h3 { margin-top: 12px; }
.feature p { color: var(--muted); font-size: 16px; }
.feature-icon { font-size: 30px; color: var(--orange); }
.screens { display: flex; justify-content: center; gap: 22px; flex-wrap: wrap; margin-top: 24px; }
.screens .phone { width: min(250px, 70vw); }
.faq { max-width: 760px; }
.faq details { margin-top: 10px; padding: 0; }
.faq summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 12px; padding: 18px; font-weight: 800; font-size: 18px; }
.faq summary::-webkit-details-marker { display: none; }
.faq details[open] .faq-caret { transform: rotate(180deg); }
.faq details p { padding: 0 18px 18px; color: var(--muted); margin: 0; }
.faq-caret { color: var(--orange); transition: transform 0.2s; }
.final-cta { text-align: center; padding: 44px 20px; border-radius: 24px; background: linear-gradient(135deg, var(--surface), var(--card)); border: 1px solid var(--border); }
.final-cta .lead { margin-inline: auto; }

/* Lista lektur */
.page-hero { padding-block: 24px 8px; }
.toc { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.toc a { background: var(--surface); border: 1px solid var(--border); color: var(--paper); border-radius: 999px; padding: 7px 14px; font-weight: 700; font-size: 15px; }
.toc a:hover { border-color: var(--orange); text-decoration: none; }
.dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; margin-right: 10px; vertical-align: 0.12em; }

/* Strona lektury */
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 18px 0 0; margin: 0; font-size: 14px; color: var(--grey); }
.breadcrumbs li + li::before { content: '›'; margin-right: 6px; }
.breadcrumbs a { color: var(--muted); }
.book-hero { display: grid; grid-template-columns: 220px 1fr; gap: 32px; align-items: center; padding-block: 24px 8px; }
.cover-large { width: 220px; }
.h1-sub { display: block; font-size: 0.48em; color: var(--muted); letter-spacing: -0.01em; margin-top: 8px; }
.book-author { font-size: 20px; font-weight: 600; color: var(--paper); margin-bottom: 12px; }
.facts { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px 18px; color: var(--muted); font-size: 15px; font-weight: 600; }
.facts li { display: flex; align-items: center; gap: 6px; }
.facts .ph { color: var(--orange); }
.book-layout { display: grid; grid-template-columns: 1fr 300px; gap: 36px; align-items: start; }
.book-aside { position: sticky; top: 84px; display: grid; gap: 14px; padding-top: 40px; }
.prose { font-size: 18px; line-height: 1.7; }
.prose h2, .prose h3 { font-size: 20px; margin-top: 1.2em; }
.prose strong { font-weight: 800; }
.teaser-fade { position: relative; max-height: none; }
.teaser-fade::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 110px;
  background: linear-gradient(rgba(27, 31, 59, 0), var(--ink));
}
.app-cta {
  display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap;
  margin-top: 12px; padding: 22px; border-radius: 20px;
  background: linear-gradient(135deg, rgba(255, 107, 44, 0.16), rgba(255, 107, 44, 0.04));
  border: 1px solid rgba(255, 107, 44, 0.45);
}
.app-cta-title { font-size: 20px; font-weight: 800; line-height: 1.25; margin-bottom: 10px; }
.checks { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; color: var(--muted); font-size: 15px; }
.checks li { display: flex; align-items: center; gap: 8px; }
.checks .ph { color: var(--orange); font-size: 18px; }
.characters { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; margin-bottom: 14px; }
.character p { color: var(--muted); font-size: 16px; }
.facts-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.facts-grid .eyebrow .ph { font-size: 15px; }
.key-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 24px; margin: 0; }
.key-facts dt { font-size: 13px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-bottom: 2px; }
.key-facts dd { margin: 0; font-weight: 700; }
.author { display: flex; gap: 14px; align-items: center; }
.author img { width: 72px; height: 72px; object-fit: cover; border-radius: 14px; background: var(--surface-high); flex-shrink: 0; }
.author-name { font-weight: 800; font-size: 18px; margin: 0 0 4px; }
.sticky-cta .play-badge { margin-top: 4px; }
.related h2 { margin-bottom: 16px; }

/* Regulamin i polityka prywatności */
.legal { max-width: 820px; }
.legal-toc { margin: 8px 0 24px; padding: 18px 20px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.legal-toc ul { list-style: none; margin: 0; padding: 0; columns: 2; column-gap: 28px; font-size: 15px; }
.legal-toc li { margin-bottom: 6px; break-inside: avoid; }
.legal-toc a { color: var(--paper); }
.legal-section { padding: 22px 0; border-top: 1px solid var(--border); scroll-margin-top: 80px; }
.legal-section h2 { font-size: 21px; margin-bottom: 12px; }
.legal-section .para { color: var(--orange); margin-right: 4px; }
.legal-section p, .legal-section li { color: rgba(255, 248, 238, 0.86); font-size: 16px; line-height: 1.65; }
.legal-section ul { padding-left: 22px; margin: 0 0 1em; }
.legal-section li { margin-bottom: 6px; }
.legal-section li::marker { color: var(--orange); }
.legal-section strong { color: var(--paper); }
.in-app .legal { padding-bottom: 24px; }
.in-app .page-hero { padding-top: 20px; }

@media (max-width: 900px) {
  .hero-grid, .book-layout { grid-template-columns: 1fr; }
  .hero-phone { order: -1; }
  .hero-phone .phone { width: min(230px, 62vw); }
  .features { grid-template-columns: 1fr 1fr; }
  .book-aside { position: static; padding-top: 0; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  body { font-size: 16px; }
  .section { padding-block: 28px; }
  .book-hero { grid-template-columns: 1fr; gap: 20px; text-align: left; }
  .cover-large { width: 170px; }
  .features, .facts-grid { grid-template-columns: 1fr; }
  .key-facts { grid-template-columns: 1fr; gap: 10px; }
  .cover-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .prose { font-size: 17px; }
  .nav { gap: 12px; }
  .footer-grid { grid-template-columns: 1fr; }
  .legal-toc ul { columns: 1; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
