:root {
  --clay-ink: #3b2a20;
  --terracotta-accent: #b8603e;
  --sand-base: #f3e6d3;
  --olive-deep: #5e6b43;
  --cream-light: #fbf4ea;
  --clay-shadow: rgba(90, 50, 30, 0.28);
  --soft-radius: 18px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Nunito Sans", system-ui, sans-serif;
  font-size: clamp(1.125rem, 1.6vw, 1.4rem);
  line-height: 1.6;
  color: var(--clay-ink);
  background: var(--sand-base);
  overflow-x: hidden;
}

h1,
h2,
h3 {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 800;
  line-height: 1.1;
  color: var(--clay-ink);
}

h1 {
  font-size: clamp(2.6rem, 6vw, 5.5rem);
}

h2 {
  font-size: clamp(2rem, 4.2vw, 3.6rem);
}

h3 {
  font-size: 1.4rem;
}

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

:focus-visible {
  outline: 3px solid var(--olive-deep);
  outline-offset: 3px;
}

/* ---------- Екрани (layout B: фото на всю ширину + плашка) ---------- */

.palm-screen {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4rem 1.25rem;
  overflow: hidden;
  isolation: isolate;
}

.palm-bleed {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
}

.palm-screen-order {
  background:
    radial-gradient(circle at 15% 20%, rgba(184, 96, 62, 0.22), transparent 55%),
    radial-gradient(circle at 85% 80%, rgba(94, 107, 67, 0.22), transparent 55%),
    var(--cream-light);
}

.palm-panel {
  position: relative;
  max-width: 38rem;
  width: 100%;
  padding: clamp(1.75rem, 4vw, 3rem);
  background: rgba(251, 244, 234, 0.9);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border-radius: 32px 48px 32px 56px;
  box-shadow: 0 18px 40px var(--clay-shadow);
  display: grid;
  gap: 1.25rem;
}

.palm-kicker {
  font-size: 0.95rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--terracotta-accent);
  font-weight: 700;
}

.palm-subtitle {
  font-size: clamp(1.125rem, 1.6vw, 1.4rem);
}

/* ---------- Обкладинка (чистий CSS) ---------- */

.palm-cover-wrap {
  display: flex;
  justify-content: center;
  padding: 0.5rem 0;
}

.palm-cover {
  position: relative;
  width: min(220px, 60vw);
  aspect-ratio: 2 / 3;
  background: linear-gradient(160deg, #c86f4b 0%, #8f4a31 60%, #5d2e1d 100%);
  border-radius: 6px 16px 16px 6px;
  box-shadow: 12px 16px 30px rgba(59, 42, 32, 0.4), inset 10px 0 0 rgba(0, 0, 0, 0.18);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1.25rem 1.1rem 1.1rem 1.6rem;
  color: var(--cream-light);
  text-align: left;
}

.palm-cover::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 14px;
  background: rgba(0, 0, 0, 0.25);
  border-radius: 6px 0 0 6px;
}

.palm-cover-series {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.9;
}

.palm-cover-title {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 800;
  font-size: 1.9rem;
  line-height: 1.05;
}

.palm-cover-author {
  font-size: 0.95rem;
  font-weight: 600;
}

.palm-cover-small {
  width: min(180px, 55vw);
}

/* ---------- Кнопка ---------- */

.palm-cta {
  display: inline-block;
  justify-self: start;
  padding: 1.1rem 2.4rem;
  background: var(--terracotta-accent);
  color: var(--cream-light);
  font-weight: 800;
  font-size: 1.125rem;
  text-decoration: none;
  border-radius: 999px;
  box-shadow: 0 10px 22px rgba(184, 96, 62, 0.4);
  transition: transform 0.2s ease, background 0.2s ease;
}

.palm-cta:hover {
  background: #9c4f30;
  transform: translateY(-2px);
}

/* ---------- Екран 2: розділи ---------- */

.palm-chapters {
  list-style: none;
  display: grid;
  gap: 1rem;
  counter-reset: chapter;
}

.palm-chapters li {
  position: relative;
  padding: 1rem 1.1rem 1rem 3.6rem;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 14px;
}

.palm-chapters li::before {
  counter-increment: chapter;
  content: counter(chapter);
  position: absolute;
  left: 1rem;
  top: 1rem;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--olive-deep);
  color: var(--cream-light);
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 1rem;
}

.palm-chapters h3 {
  font-size: 1.2rem;
  margin-bottom: 0.25rem;
}

.palm-chapters p {
  font-size: 1rem;
}

.palm-inset {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--soft-radius);
  box-shadow: 0 10px 24px var(--clay-shadow);
}

.palm-features {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.9rem;
}

.palm-feature {
  display: grid;
  gap: 0.2rem;
  border-top: 2px solid var(--terracotta-accent);
  padding-top: 0.6rem;
  font-size: 1rem;
}

.palm-feature strong {
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.15rem;
}

/* ---------- Екран 3: про книгу ---------- */

.palm-for {
  list-style: none;
  display: grid;
  gap: 0.6rem;
}

.palm-for li {
  position: relative;
  padding-left: 1.6rem;
}

.palm-for li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.65rem;
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  background: var(--terracotta-accent);
}

.palm-quote {
  padding: 1.25rem 1.5rem;
  border-left: 4px solid var(--olive-deep);
  background: rgba(94, 107, 67, 0.08);
  border-radius: 0 var(--soft-radius) var(--soft-radius) 0;
}

.palm-quote p {
  font-family: "Fraunces", Georgia, serif;
  font-style: italic;
  font-size: clamp(1.2rem, 2vw, 1.5rem);
  line-height: 1.5;
}

.palm-quote cite {
  display: block;
  margin-top: 0.6rem;
  font-style: normal;
  font-size: 0.95rem;
  color: var(--olive-deep);
}

/* ---------- Екран 4: форма ---------- */

.palm-order-panel {
  background: rgba(255, 255, 255, 0.7);
}

.palm-order-grid {
  display: grid;
  gap: 1.5rem;
  justify-items: center;
  text-align: center;
}

.palm-format-note {
  font-size: 1.05rem;
}

.palm-form {
  display: grid;
  gap: 0.6rem;
}

.palm-form label {
  font-weight: 700;
  font-size: 1.05rem;
}

.palm-form input {
  width: 100%;
  min-height: 3.5rem;
  padding: 0.8rem 1rem;
  font-family: inherit;
  font-size: 1.125rem;
  color: var(--clay-ink);
  background: #fffdf8;
  border: 2px solid rgba(59, 42, 32, 0.3);
  border-radius: 14px;
}

.palm-form input::placeholder {
  color: rgba(59, 42, 32, 0.5);
}

.palm-form input:focus-visible {
  border-color: var(--terracotta-accent);
}

.palm-form button {
  min-height: 3.5rem;
  margin-top: 0.6rem;
  padding: 0.8rem 1.5rem;
  font-family: inherit;
  font-size: 1.125rem;
  font-weight: 800;
  color: var(--cream-light);
  background: var(--olive-deep);
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.palm-form button:hover {
  background: #4a5635;
  transform: translateY(-2px);
}

.palm-consent {
  font-size: 0.95rem;
  text-align: center;
}

.palm-consent a {
  color: var(--terracotta-accent);
  font-weight: 700;
}

/* ---------- Футер ---------- */

.palm-footer {
  background: var(--clay-ink);
  color: var(--sand-base);
  padding: 2.5rem 1.25rem;
  text-align: center;
  font-size: 1rem;
  display: grid;
  gap: 0.6rem;
}

.palm-footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.25rem;
}

.palm-footer a {
  color: var(--sand-base);
  font-weight: 700;
}

.palm-disclaimer {
  font-size: 0.9rem;
  opacity: 0.85;
}

/* ---------- Адаптив ---------- */

@media (min-width: 560px) {
  .palm-features {
    grid-template-columns: 1fr 1fr;
    gap: 1rem 1.25rem;
  }

  .palm-order-grid {
    grid-template-columns: auto 1fr;
    justify-items: start;
    text-align: left;
    align-items: center;
  }
}

@media (min-width: 900px) {
  .palm-screen-chapters {
    justify-content: flex-start;
    padding-left: 6vw;
  }

  .palm-screen-about {
    justify-content: flex-end;
    padding-right: 6vw;
  }

  .palm-screen-hero {
    justify-content: flex-start;
    padding-left: 6vw;
  }

  .palm-order-grid {
    grid-template-columns: auto 1fr;
  }
}

@media (min-width: 1400px) {
  .palm-panel {
    max-width: 40rem;
  }
}

/* ---------- Сторінки політик ---------- */

.legal-body {
  min-height: 100svh;
  background: var(--sand-base);
  padding: 3rem 1.25rem;
}

.legal-wrap {
  max-width: 46rem;
  margin: 0 auto;
  background: var(--cream-light);
  padding: clamp(1.5rem, 4vw, 3rem);
  border-radius: var(--soft-radius);
  box-shadow: 0 16px 36px var(--clay-shadow);
  display: grid;
  gap: 1.1rem;
}

.legal-wrap h1 {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
}

.legal-wrap h2 {
  font-size: 1.6rem;
  margin-top: 1rem;
  color: var(--terracotta-accent);
}

.legal-wrap p,
.legal-wrap li {
  font-size: 1.05rem;
}

.legal-wrap ul {
  padding-left: 1.4rem;
  display: grid;
  gap: 0.4rem;
}

.legal-section {
  display: grid;
  gap: 0.6rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid rgba(59, 42, 32, 0.15);
}

.legal-section:last-of-type {
  border-bottom: 0;
}

.legal-back {
  justify-self: start;
  color: var(--olive-deep);
  font-weight: 800;
  text-decoration: none;
  padding: 0.5rem 0;
}

.legal-back:hover {
  color: var(--terracotta-accent);
  text-decoration: underline;
}

.legal-updated {
  font-size: 0.95rem;
  color: var(--olive-deep);
}