/* ==========================================================
   Apostolskie — wspólny arkusz stylów
   ========================================================== */

:root {
  --mist: #edf2f7;
  --paper: #fafcfe;
  --line: #d6e0e9;
  --ink: #10283a;
  --muted: #4a6070;
  --deep: #0f4462;
  --deep-2: #0a3450;
  --sky: #5aa6d6;
  --abyss: #06141f;
  --sand: #f3e7d9;
  --umber: #3a2a1e;
  --amber: #9a5f2e;

  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
  --header-h: 72px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--deep); }
p { margin: 0 0 1em; }

h1, h2, h3 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.012em;
  text-wrap: balance;
}

[id] { scroll-margin-top: calc(var(--header-h) + 12px); }

:focus-visible {
  outline: 3px solid var(--sky);
  outline-offset: 3px;
  border-radius: 4px;
}

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

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute;
  left: 12px; top: -100px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 8px;
  background: var(--deep);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus { top: 12px; }

.muted { color: var(--muted); }

/* ---------- Nagłówek ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 252, 254, 0.9);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid rgba(214, 224, 233, 0.7);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: var(--header-h);
}

.logo { display: inline-flex; flex: none; }
.logo img { height: 42px; width: auto; }

.site-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.site-nav a {
  color: var(--ink);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: color 0.2s;
}
.site-nav a:hover { color: var(--deep); }

.site-nav .nav-cta {
  padding: 10px 20px;
  border-radius: 999px;
  background: var(--deep);
  color: #fff;
  transition: background-color 0.2s;
}
.site-nav .nav-cta:hover { background: var(--deep-2); color: #fff; }

.menu-toggle { display: none; }

@media (max-width: 820px) {
  :root { --header-h: 64px; }

  .logo img { height: 36px; }

  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    margin-right: -10px;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: var(--ink);
    cursor: pointer;
  }

  .menu-toggle span,
  .menu-toggle span::before,
  .menu-toggle span::after {
    display: block;
    width: 22px;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
    transition: transform 0.2s ease, background-color 0.2s;
  }
  .menu-toggle span { position: relative; }
  .menu-toggle span::before,
  .menu-toggle span::after { content: ""; position: absolute; left: 0; }
  .menu-toggle span::before { top: -7px; }
  .menu-toggle span::after { top: 7px; }

  .nav-open .menu-toggle span { background: transparent; }
  .nav-open .menu-toggle span::before { transform: translateY(7px) rotate(45deg); }
  .nav-open .menu-toggle span::after { transform: translateY(-7px) rotate(-45deg); }

  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 4px var(--gutter) 20px;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 20px 30px rgba(16, 40, 58, 0.08);
  }
  .nav-open .site-nav { display: flex; }

  .site-nav a {
    padding: 15px 2px;
    border-bottom: 1px solid var(--line);
    font-size: 1.05rem;
  }
  .site-nav .nav-cta {
    margin-top: 16px;
    padding: 14px;
    border-bottom: 0;
    text-align: center;
  }
}

/* ---------- Przyciski ---------- */

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  min-height: 50px;
  padding: 0 26px;
  border: 1.5px solid transparent;
  border-radius: 999px;
  font: 600 1rem/1.2 var(--sans);
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}

.btn-primary { background: var(--deep); color: #fff; }
.btn-primary:hover { background: var(--deep-2); }

.btn-outline { background: transparent; border-color: currentColor; color: var(--deep); }
.btn-outline:hover { background: rgba(15, 68, 98, 0.06); }

.btn-light { background: #fff; color: var(--deep); }
.btn-light:hover { background: #dfeaf3; }

.btn-outline-light { background: transparent; border-color: rgba(255, 255, 255, 0.5); color: #fff; }
.btn-outline-light:hover { background: rgba(255, 255, 255, 0.1); border-color: #fff; }

@media (max-width: 520px) {
  .actions .btn { flex: 1 1 100%; }
}

/* ---------- Okładka książki ---------- */

.cover {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 70 / 100;
  overflow: hidden;
  border-radius: 3px 6px 6px 3px;
  background: #0b2a40;
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.2),
    0 28px 50px -14px rgba(6, 20, 31, 0.5);
}
.cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 50%;
}
/* delikatny grzbiet, żeby okładka wyglądała jak książka */
.cover::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(90deg,
    rgba(255, 255, 255, 0.16) 0,
    rgba(0, 0, 0, 0.14) 1.4%,
    rgba(255, 255, 255, 0.06) 3%,
    transparent 6%);
}

/* ---------- Hero strony głównej ---------- */

.hero {
  background:
    radial-gradient(1100px 560px at 88% -12%, #d6e7f4 0%, transparent 62%),
    linear-gradient(180deg, var(--mist) 0%, var(--paper) 100%);
  overflow: hidden;
}

.hero .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  align-items: center;
  gap: clamp(40px, 6vw, 80px);
  padding-block: clamp(48px, 9vw, 112px);
}

.hero h1 {
  font-size: clamp(2.5rem, 5.6vw, 4.6rem);
  margin-bottom: 24px;
}

.lead {
  max-width: 34em;
  font-size: clamp(1.08rem, 1.6vw, 1.25rem);
  line-height: 1.7;
  color: var(--muted);
  margin-bottom: 32px;
}

.hero-note {
  margin: 28px 0 0;
  font-size: 0.95rem;
  color: var(--muted);
}
.hero-note a { font-weight: 600; }

.hero-books {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  align-items: center;
  justify-self: center;
  width: 100%;
  max-width: 500px;
  padding-block: 6%;
}
.hero-books .cover { grid-row: 1; }
.hero-books .book-back {
  grid-column: 6 / 13;
  transform: rotate(4deg) translateY(-7%);
}
.hero-books .book-front {
  grid-column: 1 / 9;
  z-index: 1;
  transform: rotate(-3deg) translateY(7%);
}

@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero-books { max-width: 340px; }
}

/* ---------- Sekcje książek ---------- */

.band-deep {
  position: relative;
  color: #dbe7f0;
  background:
    radial-gradient(900px 440px at 28% -5%, rgba(90, 166, 214, 0.38), transparent 65%),
    linear-gradient(180deg, #0e3a57 0%, #08243a 55%, var(--abyss) 100%);
}
.band-deep h1,
.band-deep h2,
.band-deep h3 { color: #fff; }
.band-deep .muted { color: #a7bfd0; }

.band-sand {
  color: var(--umber);
  background: linear-gradient(180deg, var(--sand) 0%, #f8f0e7 100%);
}
.band-sand h1,
.band-sand h2,
.band-sand h3 { color: var(--umber); }
.band-sand .muted { color: #6b5443; }
.band-sand .btn-primary { background: var(--umber); }
.band-sand .btn-primary:hover { background: #26190f; }
.band-sand .btn-outline { color: var(--umber); }
.band-sand .btn-outline:hover { background: rgba(58, 42, 30, 0.06); }

.book-feature {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  align-items: center;
  gap: clamp(36px, 6vw, 88px);
  padding-block: clamp(56px, 9vw, 120px);
}
.book-feature .feature-media { display: flex; justify-content: center; }
.book-feature .cover { max-width: 360px; }
.book-feature.reverse { grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr); }
.book-feature.reverse .feature-media { order: 2; }

.book-title { font-size: clamp(2.3rem, 4.6vw, 3.6rem); }
.book-sub {
  margin: 10px 0 24px;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.25rem, 2.1vw, 1.6rem);
  line-height: 1.3;
}
.book-feature p { max-width: 36em; }
.book-feature .actions { margin-top: 32px; }

.status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  font-size: 0.92rem;
  font-weight: 600;
}
.status::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}
.band-deep .status { color: #86dcae; }
.band-sand .status { color: var(--amber); }

@media (max-width: 860px) {
  .book-feature,
  .book-feature.reverse { grid-template-columns: 1fr; }
  .book-feature.reverse .feature-media { order: 0; }
  .book-feature .cover { max-width: 260px; }
}

/* ---------- Sekcje ogólne ---------- */

.section { padding-block: clamp(64px, 9vw, 120px); }

.section-title {
  font-size: clamp(2.1rem, 4.2vw, 3.2rem);
  margin-bottom: 22px;
}

.prose { max-width: 40em; }
.prose p { color: var(--muted); }
.prose strong { color: var(--ink); }

/* ---------- Wsparcie ---------- */

.support .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(36px, 6vw, 88px);
  align-items: start;
}

.aims {
  list-style: none;
  margin: 0 0 32px;
  padding: 0;
  border-top: 1px solid var(--line);
}
.aims li {
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}
.aims strong {
  display: block;
  margin-bottom: 4px;
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 500;
}
.aims span { color: var(--muted); }

.thanks {
  margin: 24px 0 0;
  font-size: 0.95rem;
  color: var(--muted);
}

@media (max-width: 860px) {
  .support .wrap { grid-template-columns: 1fr; }
}

/* ---------- O autorze ---------- */

.about { background: var(--mist); }
.about .wrap {
  display: grid;
  grid-template-columns: minmax(0, 0.75fr) minmax(0, 1.25fr);
  gap: clamp(36px, 6vw, 88px);
  align-items: center;
}
.about-photo {
  width: 100%;
  max-width: 420px;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 20px;
  background: var(--line);
}
.about-photo img { width: 100%; height: 100%; object-fit: cover; }

.pull-quote {
  margin: 32px 0 0;
  padding-left: 22px;
  border-left: 2px solid var(--sky);
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.3rem, 2.3vw, 1.65rem);
  line-height: 1.4;
  color: var(--deep);
}

@media (max-width: 860px) {
  .about .wrap { grid-template-columns: 1fr; }
  .about-photo { max-width: 240px; }
}

/* ---------- Stopka ---------- */

.site-footer {
  padding-block: 56px 40px;
  background: var(--ink);
  color: #c3d2de;
  font-size: 0.95rem;
}
.footer-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 28px;
}
.footer-brand {
  margin: 0 0 6px;
  font-family: var(--serif);
  font-size: 1.6rem;
  color: #fff;
}
.footer-brand + p { margin: 0; }
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
}
.footer-nav a { color: #fff; text-decoration: none; font-weight: 600; }
.footer-nav a:hover { text-decoration: underline; }
.copyright {
  margin: 40px 0 0;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.875rem;
  color: #8ea3b3;
}

/* ==========================================================
   Podstrona: Podaj swoją dłoń
   ========================================================== */

.rhythm {
  list-style: none;
  margin: 44px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 32px;
  counter-reset: step;
}
.rhythm li {
  counter-increment: step;
  padding-top: 18px;
  border-top: 2px solid var(--deep);
}
.rhythm li::before {
  content: counter(step);
  display: block;
  margin-bottom: 12px;
  font-family: var(--serif);
  font-size: 2.4rem;
  line-height: 1;
  color: var(--sky);
}
.rhythm h3 { font-size: 1.4rem; margin-bottom: 8px; }
.rhythm p { margin: 0; color: var(--muted); font-size: 1rem; }

.closing-line {
  margin: 48px 0 0;
  font-family: var(--serif);
  font-size: clamp(1.4rem, 2.6vw, 1.9rem);
  line-height: 1.3;
  color: var(--deep);
}

@media (max-width: 960px) {
  .rhythm { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 24px; }
}
@media (max-width: 520px) {
  .rhythm { grid-template-columns: 1fr; gap: 28px; }
}

/* fragment jako strona książki */
.excerpt { background: var(--mist); }
.excerpt .section-title { text-align: center; }
.book-page {
  max-width: 680px;
  margin: 40px auto 0;
  padding: clamp(28px, 6vw, 64px);
  border-radius: 6px;
  background: #fff;
  box-shadow:
    0 1px 2px rgba(16, 40, 58, 0.06),
    0 30px 60px -30px rgba(16, 40, 58, 0.28);
}
.page-note {
  margin-bottom: 32px;
  text-align: center;
  font-size: 0.875rem;
  color: var(--muted);
}
.page-day {
  margin-bottom: 14px;
  text-align: center;
  font-family: var(--serif);
  font-size: 1.15rem;
  color: var(--muted);
}
.verse {
  margin: 0 0 10px;
  text-align: center;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.5rem, 3.4vw, 2.1rem);
  line-height: 1.3;
  color: var(--deep);
}
.verse-ref {
  margin-bottom: 40px;
  text-align: center;
  font-size: 0.95rem;
  color: var(--muted);
}
.page-body p {
  font-family: var(--serif);
  font-size: 1.15rem;
  line-height: 1.78;
}
.task {
  margin-top: 32px;
  padding: 22px 24px;
  border-radius: 10px;
  background: var(--mist);
}
.task h3 {
  margin-bottom: 8px;
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0;
}
.task p { margin: 0; }

/* wybór wersji */
.versions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin-top: 40px;
}
.version {
  display: flex;
  flex-direction: column;
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}
.version h3 { font-size: 1.7rem; margin-bottom: 10px; }
.version p { flex: 1; color: var(--muted); }
.version .where { margin: 14px 0 0; flex: none; font-size: 0.9rem; }
.version .btn { align-self: flex-start; }

@media (max-width: 720px) {
  .versions { grid-template-columns: 1fr; }
  .version { padding: 24px; }
  .version .btn { align-self: stretch; }
}

/* okno wyboru sklepu */
.store-dialog {
  width: min(520px, calc(100% - 32px));
  max-height: calc(100% - 32px);
  padding: 0;
  border: 0;
  border-radius: 20px;
  background: #fff;
  color: var(--ink);
  box-shadow: 0 30px 80px rgba(6, 20, 31, 0.35);
}
.store-dialog::backdrop {
  background: rgba(6, 20, 31, 0.6);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}
.dialog-inner { padding: 28px; }
.dialog-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 10px;
}
.dialog-head h2 { font-size: 1.7rem; }
.dialog-close {
  flex: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: var(--mist);
  color: var(--ink);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}
.dialog-close:hover { background: var(--line); }
.stores {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 22px;
}
.store {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 22px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--ink);
  text-align: center;
  text-decoration: none;
  transition: border-color 0.2s, background-color 0.2s;
}
.store:hover { border-color: var(--sky); background: #f5f9fc; }
.store img { height: 34px; width: auto; max-width: 140px; object-fit: contain; }
.store span { font-size: 0.9rem; line-height: 1.45; color: var(--muted); }
.store strong { display: block; color: var(--ink); }

@media (max-width: 520px) {
  .store-dialog {
    width: 100%;
    max-width: 100%;
    margin: auto 0 0;
    border-radius: 20px 20px 0 0;
  }
  .dialog-inner { padding: 24px 20px calc(24px + env(safe-area-inset-bottom)); }
  .stores { grid-template-columns: 1fr; }
  .store { flex-direction: row; justify-content: flex-start; text-align: left; padding: 16px; }
  .store img { width: 96px; height: 30px; }
}

/* pasek zakupu na telefonach */
.buy-bar { display: none; }

@media (max-width: 760px) {
  .buy-bar {
    display: flex;
    gap: 10px;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 40;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    background: rgba(250, 252, 254, 0.95);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border-top: 1px solid var(--line);
    transform: translateY(110%);
    transition: transform 0.25s ease;
  }
  .buy-bar.is-visible { transform: none; }
  .buy-bar .btn { flex: 1; min-height: 48px; padding: 0 12px; }
  .has-buy-bar .site-footer { padding-bottom: 112px; }
}

/* ==========================================================
   Podstrona: Podejdź bliżej
   ========================================================== */

.hero-sand {
  background: linear-gradient(180deg, #f4e3cf 0%, #f5ebe0 60%, var(--paper) 100%);
}

.band-umber {
  background: var(--umber);
  color: #f3e7d9;
}
.statement {
  margin: 0;
  padding-block: clamp(72px, 12vw, 150px);
  text-align: center;
  font-family: var(--serif);
  font-size: clamp(2.1rem, 6.4vw, 4.6rem);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.points {
  list-style: none;
  margin: 36px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 40px;
  max-width: 900px;
}
.points li {
  padding: 18px 0 18px 28px;
  border-bottom: 1px solid var(--line);
  position: relative;
}
.points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 29px;
  width: 12px;
  height: 2px;
  background: var(--amber);
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(32px, 6vw, 88px);
  align-items: start;
}

.support-cta {
  text-align: center;
}
.support-cta .prose { margin-inline: auto; }
.support-cta .actions { justify-content: center; margin-top: 32px; }

@media (max-width: 760px) {
  .points { grid-template-columns: 1fr; }
  .split { grid-template-columns: 1fr; }
}

/* ---------- Ograniczenie ruchu ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    transition: none !important;
    animation: none !important;
  }
}
