:root {
  --mist-cream: #fdf6f0;
  --lilac-haze: #e9e3f7;
  --peach-glow: #ffd9c7;
  --sage-soft: #d9ebe0;
  --ink-plum: #3d3352;
  --rose-dust: #c97c8e;
  --plaque-glass: rgba(255, 255, 255, 0.62);
  --soft-radius: 20px;
  --pill-radius: 999px;
  --warm-shadow: 0 18px 40px rgba(61, 51, 82, 0.18);
  --gentle-shadow: 0 6px 18px rgba(61, 51, 82, 0.10);
  --heading-font: "Outfit", system-ui, sans-serif;
  --text-font: "Nunito Sans", system-ui, sans-serif;
}

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

html,
body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

body {
  font-family: var(--text-font);
  font-size: clamp(1.125rem, 1.6vw, 1.4rem);
  line-height: 1.6;
  color: var(--ink-plum);
  background: var(--mist-cream);
}

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

h1,
h2,
h3 {
  font-family: var(--heading-font);
  line-height: 1.15;
  margin: 0 0 0.6em;
  font-weight: 700;
}

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

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

h3 {
  font-size: clamp(1.25rem, 2vw, 1.6rem);
}

p {
  margin: 0 0 1em;
  max-width: 38rem;
}

a {
  color: var(--rose-dust);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

a:focus-visible,
input:focus-visible,
button:focus-visible {
  outline: 3px solid var(--rose-dust);
  outline-offset: 3px;
}

/* ===== Екран 1: hero ===== */
.dream-hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  overflow: hidden;
  isolation: isolate;
}

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

.dream-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(160deg, rgba(233, 227, 247, 0.85), rgba(255, 217, 199, 0.55));
}

.dream-hero__inner {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  align-items: center;
}

.dream-kicker {
  font-family: var(--heading-font);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--rose-dust);
}

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

.dream-hero__note {
  font-size: 1rem;
  opacity: 0.85;
}

.moon-plaque {
  background: var(--plaque-glass);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-radius: var(--soft-radius);
  padding: clamp(1.5rem, 4vw, 3rem);
  box-shadow: var(--gentle-shadow);
  max-width: 38rem;
  width: 100%;
}

.cta-moonlight {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.5rem;
  padding: 0.9rem 2.2rem;
  border-radius: var(--pill-radius);
  background: var(--ink-plum);
  color: #ffffff;
  font-family: var(--heading-font);
  font-size: 1.125rem;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(61, 51, 82, 0.22);
  transition: background-color 0.25s ease, transform 0.25s ease;
}

.cta-moonlight:hover {
  background: var(--rose-dust);
  transform: translateY(-2px);
}

/* Обкладинка, намальована CSS */
.dream-cover {
  position: relative;
  width: min(260px, 72vw);
  aspect-ratio: 2 / 3;
  border-radius: 6px var(--soft-radius) var(--soft-radius) 6px;
  background: linear-gradient(155deg, var(--lilac-haze) 0%, var(--peach-glow) 55%, var(--rose-dust) 100%);
  box-shadow: var(--warm-shadow);
  padding: 1.6rem 1.4rem 1.4rem 1.9rem;
  color: var(--ink-plum);
  display: flex;
  align-items: stretch;
}

.dream-cover::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 14px;
  border-radius: 6px 0 0 6px;
  background: linear-gradient(90deg, var(--ink-plum), #5a4d78);
}

.dream-cover::after {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 10px;
  pointer-events: none;
}

.dream-cover__body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.6rem;
  width: 100%;
  text-align: center;
  position: relative;
  z-index: 1;
}

.dream-cover__label {
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin: 0;
  opacity: 0.8;
}

.dream-cover__title {
  font-family: var(--heading-font);
  font-weight: 800;
  font-size: 1.7rem;
  line-height: 1.1;
  margin: 0;
}

.dream-cover__subtitle {
  font-size: 0.85rem;
  margin: 0;
}

.dream-cover__author {
  font-family: var(--heading-font);
  font-weight: 600;
  font-size: 0.95rem;
  margin: 0.4rem 0 0;
}

.dream-cover--small {
  width: min(180px, 50vw);
  margin-top: 1rem;
}

.dream-cover--small .dream-cover__title {
  font-size: 1.2rem;
}

/* ===== Екран 2: проблема + цитата (layout B) ===== */
.dream-talk,
.dream-chapters {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  overflow: hidden;
  isolation: isolate;
}

.dream-talk__photo,
.dream-chapters__photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
}

.dream-talk::after,
.dream-chapters::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(253, 246, 240, 0.35), rgba(217, 235, 224, 0.6));
}

.dream-talk__inner,
.dream-chapters__inner {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 1.25rem;
  display: flex;
  justify-content: flex-start;
}

.dream-chapters__inner {
  justify-content: flex-end;
}

.dream-questions {
  list-style: none;
  padding: 0;
  margin: 0 0 1.2rem;
  display: grid;
  gap: 0.75rem;
}

.dream-questions li {
  position: relative;
  padding: 0.9rem 1.1rem 0.9rem 3.2rem;
  background: rgba(255, 255, 255, 0.7);
  border-radius: var(--soft-radius);
}

.dream-questions li::before {
  content: "?";
  position: absolute;
  left: 0.9rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1.7rem;
  height: 1.7rem;
  border-radius: var(--pill-radius);
  background: var(--rose-dust);
  color: #fff;
  font-family: var(--heading-font);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.dream-quote {
  margin: 1.5rem 0 0;
  padding: 1.2rem 1.4rem;
  border-left: 4px solid var(--rose-dust);
  background: var(--lilac-haze);
  border-radius: var(--soft-radius);
}

.dream-quote p {
  font-family: var(--heading-font);
  font-size: clamp(1.25rem, 2.2vw, 1.7rem);
  font-weight: 500;
  margin: 0 0 0.6rem;
  max-width: none;
}

.dream-quote cite {
  font-style: normal;
  font-size: 0.95rem;
  opacity: 0.85;
}

/* ===== Екран 3: розділи + features ===== */
.dream-chapter-list {
  display: grid;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.dream-chapter {
  padding: 1rem 1.2rem;
  background: rgba(255, 255, 255, 0.7);
  border-radius: var(--soft-radius);
  border: 1px solid rgba(61, 51, 82, 0.08);
}

.dream-chapter h3 {
  font-size: clamp(1.1rem, 1.8vw, 1.35rem);
  margin-bottom: 0.3em;
}

.dream-chapter p {
  margin: 0;
  font-size: 1rem;
}

.dream-features {
  background: var(--sage-soft);
  border-radius: var(--soft-radius);
  padding: 1.2rem 1.4rem;
  margin-bottom: 1.5rem;
}

.dream-features ul {
  margin: 0;
  padding-left: 1.2rem;
}

.dream-features li {
  margin-bottom: 0.4rem;
}

.dream-chapters__figure {
  margin: 0;
}

.dream-chapters__figure img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--soft-radius);
  box-shadow: var(--gentle-shadow);
}

.dream-chapters__figure figcaption {
  font-size: 0.95rem;
  margin-top: 0.6rem;
  opacity: 0.85;
}

/* ===== Екран 4: форма ===== */
.dream-order {
  min-height: 100svh;
  display: flex;
  align-items: center;
  background: linear-gradient(160deg, var(--lilac-haze) 0%, var(--peach-glow) 100%);
}

.dream-order__inner {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.dream-order__format {
  font-size: 1rem;
}

.moon-form {
  background: rgba(255, 255, 255, 0.75);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-radius: var(--soft-radius);
  padding: clamp(1.5rem, 4vw, 2.5rem);
  box-shadow: var(--gentle-shadow);
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  width: 100%;
  max-width: 34rem;
}

.moon-field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.moon-field label {
  font-weight: 700;
  font-size: 1.05rem;
}

.moon-field input {
  min-height: 3.5rem;
  padding: 0.8rem 1rem;
  font-family: var(--text-font);
  font-size: 1.125rem;
  color: var(--ink-plum);
  background: #ffffff;
  border: 2px solid rgba(61, 51, 82, 0.2);
  border-radius: 14px;
  width: 100%;
}

.moon-field input::placeholder {
  color: #7d7192;
  opacity: 1;
}

.moon-field input:focus {
  border-color: var(--rose-dust);
}

.cta-moonlight--form {
  width: 100%;
}

.moon-consent {
  font-size: 0.95rem;
  margin: 0;
  max-width: none;
  text-align: center;
}

/* ===== Footer ===== */
.dream-footer {
  background: var(--ink-plum);
  color: #f3eefb;
  text-align: center;
  padding: 2.5rem 1.25rem;
  font-size: 0.95rem;
}

.dream-footer p {
  margin: 0.4rem auto;
  max-width: 38rem;
}

.dream-footer a {
  color: var(--peach-glow);
}

.dream-footer__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem 1.8rem;
  margin-bottom: 1rem;
}

.dream-footer__small {
  opacity: 0.8;
  font-size: 0.875rem;
}

/* ===== Desktop ===== */
@media (min-width: 768px) {
  .dream-hero__inner {
    flex-direction: row;
    justify-content: space-between;
    gap: 3rem;
  }

  .dream-talk__inner,
  .dream-chapters__inner {
    padding: 4rem 2.5rem;
  }

  .dream-order__inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 4rem;
  }

  .dream-order__intro {
    flex: 1 1 40%;
  }

  .moon-form {
    flex: 1 1 50%;
  }
}

@media (min-width: 1200px) {
  .dream-hero__inner {
    padding: 4rem 2.5rem;
  }
}

/* ===== Сторінки політик ===== */
.legal-page {
  background: var(--mist-cream);
  min-height: 100svh;
  padding: 0;
}

.legal-wrap {
  max-width: 46rem;
  margin: 0 auto;
  padding: 3rem 1.25rem 4rem;
}

.legal-wrap h1 {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  margin-bottom: 0.4em;
}

.legal-meta {
  font-size: 0.95rem;
  opacity: 0.8;
  margin-bottom: 2rem;
}

.legal-body {
  background: rgba(255, 255, 255, 0.75);
  border-radius: var(--soft-radius);
  padding: clamp(1.4rem, 4vw, 2.6rem);
  box-shadow: var(--gentle-shadow);
}

.legal-body section + section {
  margin-top: 1.8rem;
  padding-top: 1.6rem;
  border-top: 1px solid rgba(61, 51, 82, 0.12);
}

.legal-body h2 {
  font-size: clamp(1.4rem, 3vw, 1.9rem);
}

.legal-body p,
.legal-body li {
  font-size: 1.05rem;
  max-width: none;
}

.legal-body ul {
  padding-left: 1.2rem;
}

.legal-back {
  display: inline-block;
  margin-top: 2rem;
  font-family: var(--heading-font);
  font-weight: 600;
  font-size: 1.05rem;
  text-decoration: none;
  padding: 0.7rem 1.4rem;
  border-radius: var(--pill-radius);
  background: var(--lilac-haze);
  color: var(--ink-plum);
  min-height: 3.5rem;
  line-height: 2.1rem;
}

.legal-back:hover {
  background: var(--peach-glow);
}