:root {
  --clay-paper: #f5e9d9;
  --clay-paper-deep: #ecd6b8;
  --terracotta-glow: #b4532e;
  --terracotta-deep: #7d3319;
  --olive-leaf: #6d7140;
  --olive-shade: #4f5230;
  --sand-dune: #e6c9a2;
  --cocoa-ink: #3b2317;
  --clay-radius: 18px;
  --clay-radius-lg: 28px;
  --clay-shadow: 0 1rem 2.5rem rgba(59, 35, 23, 0.22);
  --clay-font-head: "Noto Serif", Georgia, "Times New Roman", serif;
  --clay-font-text: "Open Sans", Arial, sans-serif;
}

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

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

body {
  margin: 0;
  font-family: var(--clay-font-text);
  font-size: clamp(1.125rem, 1.6vw, 1.4rem);
  line-height: 1.6;
  color: var(--cocoa-ink);
  background: var(--clay-paper);
  overflow-x: hidden;
}

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

h1,
h2,
h3 {
  font-family: var(--clay-font-head);
  line-height: 1.15;
  margin: 0 0 0.6em;
  color: var(--cocoa-ink);
}

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

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

h3 {
  font-size: clamp(1.35rem, 2.4vw, 1.8rem);
  font-weight: 600;
}

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

a {
  color: var(--terracotta-glow);
}

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

/* ---------- Екран 1: hero ---------- */
.hearth-hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4rem 1.25rem;
  isolation: isolate;
  overflow: hidden;
}

.hearth-hero__media {
  position: absolute;
  inset: 0;
  z-index: -1;
}

.hearth-hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hearth-hero__panel {
  background: rgba(245, 233, 217, 0.9);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  padding: clamp(1.5rem, 4vw, 3rem);
  border-radius: var(--clay-radius-lg);
  max-width: 40rem;
  width: 100%;
  box-shadow: var(--clay-shadow);
  display: grid;
  gap: 1.25rem;
  justify-items: start;
}

.hearth-hero__panel h1 {
  margin: 0;
}

.hearth-hero__panel p {
  margin: 0;
}

.hearth-kicker {
  font-size: 0.95rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--olive-leaf);
  font-weight: 600;
  margin: 0;
}

.hearth-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.5rem;
  background: var(--terracotta-glow);
  color: #fff8f0;
  text-decoration: none;
  padding: 1rem 2.2rem;
  border-radius: 999px;
  font-weight: 700;
  box-shadow: 0 0.6rem 1.4rem rgba(180, 83, 46, 0.35);
}

.hearth-cta:hover {
  background: var(--terracotta-deep);
}

/* ---------- Обкладинка (CSS) ---------- */
.atlas-cover {
  position: relative;
  width: min(13rem, 60vw);
  aspect-ratio: 2 / 3;
  background: linear-gradient(160deg, var(--terracotta-glow) 0%, var(--terracotta-deep) 62%, #4a1d0d 100%);
  border-radius: 6px 16px 16px 6px;
  box-shadow: 0 1.1rem 2.2rem rgba(59, 35, 23, 0.4), inset 0.4rem 0 0.6rem -0.4rem rgba(0, 0, 0, 0.25);
  padding: 1.3rem 1.1rem 1.1rem 1.6rem;
  color: var(--clay-paper);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  margin: 0.5rem 0;
}

.atlas-cover::before {
  content: "";
  position: absolute;
  inset: 0.45rem;
  border: 1px solid rgba(230, 201, 162, 0.55);
  border-radius: 10px;
  pointer-events: none;
}

.atlas-cover__spine {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0.75rem;
  background: linear-gradient(90deg, var(--cocoa-ink), var(--olive-leaf));
}

.atlas-cover__label {
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--sand-dune);
}

.atlas-cover__title {
  display: block;
  font-family: var(--clay-font-head);
  font-size: clamp(1.3rem, 3.4vw, 1.9rem);
  font-weight: 700;
  line-height: 1.1;
  color: var(--clay-paper);
}

.atlas-cover__author {
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  color: var(--sand-dune);
}

.atlas-cover--mini {
  width: min(10rem, 50vw);
}

/* ---------- Екран 2: цитата + про книгу ---------- */
.grain-quote {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4rem 1.25rem;
  isolation: isolate;
  overflow: hidden;
}

.grain-quote__media {
  position: absolute;
  inset: 0;
  z-index: -1;
}

.grain-quote__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.grain-quote__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(59, 35, 23, 0.2), rgba(59, 35, 23, 0.55));
}

.grain-quote__panel {
  background: rgba(245, 233, 217, 0.92);
  border-radius: var(--clay-radius-lg);
  padding: clamp(1.5rem, 4vw, 3rem);
  max-width: 40rem;
  width: 100%;
  box-shadow: var(--clay-shadow);
}

.grain-quote__text {
  margin: 0 0 2rem;
  padding-left: 1.25rem;
  border-left: 4px solid var(--terracotta-glow);
}

.grain-quote__text p {
  font-family: var(--clay-font-head);
  font-style: italic;
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  line-height: 1.35;
  margin: 0 0 0.75rem;
}

.grain-quote__text cite {
  font-style: normal;
  font-size: 0.95rem;
  color: var(--olive-leaf);
}

/* ---------- Екран 3: переваги + для кого ---------- */
.grain-features {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4rem 1.25rem;
  isolation: isolate;
  overflow: hidden;
}

.grain-features__media {
  position: absolute;
  inset: 0;
  z-index: -1;
}

.grain-features__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.grain-features__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(79, 82, 48, 0.35);
}

.grain-features__panel {
  background: rgba(79, 82, 48, 0.9);
  color: var(--clay-paper);
  border-radius: var(--clay-radius-lg);
  padding: clamp(1.5rem, 4vw, 3rem);
  max-width: 40rem;
  width: 100%;
  box-shadow: var(--clay-shadow);
}

.grain-features__panel h2,
.grain-features__panel p {
  color: var(--clay-paper);
}

.grain-features__panel h3 {
  color: var(--sand-dune);
}

.grain-features__list {
  list-style: none;
  padding: 0;
  margin: 0 0 2rem;
  display: grid;
  gap: 1.25rem;
}

.grain-features__list li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem;
  align-items: start;
  background: rgba(245, 233, 217, 0.08);
  border: 1px solid rgba(230, 201, 162, 0.35);
  border-radius: var(--clay-radius);
  padding: 1rem 1.2rem;
}

.grain-features__num {
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 50%;
  background: var(--sand-dune);
  color: var(--cocoa-ink);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-family: var(--clay-font-head);
}

.grain-features__list h3 {
  color: var(--sand-dune);
  font-size: clamp(1.25rem, 2.2vw, 1.6rem);
  margin-bottom: 0.3rem;
}

.grain-features__list p {
  margin: 0;
  font-size: 1rem;
  color: var(--clay-paper);
}

/* ---------- Екран 4: форма замовлення ---------- */
.order-hall {
  background: linear-gradient(160deg, var(--olive-leaf), var(--olive-shade));
  color: var(--clay-paper);
  min-height: 100svh;
  padding: 4rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.order-hall__inner {
  width: 100%;
  max-width: 64rem;
  display: grid;
  gap: 2.5rem;
  align-items: center;
}

.order-hall h2 {
  color: var(--clay-paper);
}

.order-hall__info p {
  color: var(--clay-paper);
}

.order-hall__form {
  background: var(--clay-paper);
  color: var(--cocoa-ink);
  padding: clamp(1.5rem, 4vw, 2.5rem);
  border-radius: var(--clay-radius-lg);
  box-shadow: var(--clay-shadow);
  display: grid;
  gap: 1rem;
}

.order-hall__form label {
  font-weight: 600;
  font-size: 1rem;
}

.order-hall__form input {
  width: 100%;
  min-height: 3.5rem;
  font-family: var(--clay-font-text);
  font-size: 1.125rem;
  padding: 0.8rem 1rem;
  border: 2px solid var(--olive-leaf);
  border-radius: 12px;
  background: #fffaf3;
  color: var(--cocoa-ink);
}

.order-hall__form input::placeholder {
  color: #8a7260;
}

.order-hall__submit {
  min-height: 3.5rem;
  font-family: var(--clay-font-text);
  font-weight: 700;
  font-size: 1.15rem;
  background: var(--terracotta-glow);
  color: #fff8f0;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  padding: 0.9rem 1.5rem;
}

.order-hall__submit:hover {
  background: var(--terracotta-deep);
}

.order-hall__consent {
  font-size: 0.9rem;
  margin: 0;
  color: var(--olive-shade);
}

.order-hall__consent a {
  color: var(--terracotta-deep);
}

/* ---------- Футер ---------- */
.clay-footer {
  background: var(--cocoa-ink);
  color: var(--sand-dune);
  padding: 2.5rem 1.25rem;
  font-size: 0.95rem;
}

.clay-footer__inner {
  max-width: 64rem;
  margin: 0 auto;
  display: grid;
  gap: 0.9rem;
}

.clay-footer a {
  color: var(--sand-dune);
}

.clay-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.75rem;
  padding: 0;
  margin: 0;
  list-style: none;
}

.clay-footer p {
  margin: 0;
  max-width: none;
}

/* ---------- Сторінки політик ---------- */
.legal-body {
  background: var(--clay-paper);
  color: var(--cocoa-ink);
}

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

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

.legal-section {
  border-top: 2px solid var(--sand-dune);
  padding-top: 1.25rem;
  margin-top: 1.75rem;
}

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

.legal-section p {
  font-size: 1.05rem;
}

.legal-back {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  margin-bottom: 1.5rem;
  font-weight: 600;
  color: var(--terracotta-deep);
}

.legal-note {
  background: #fff6ea;
  border-left: 5px solid var(--terracotta-glow);
  padding: 1rem 1.25rem;
  border-radius: var(--clay-radius);
}

/* ---------- Адаптив ---------- */
@media (min-width: 900px) {
  .hearth-hero__panel {
    margin-left: 6vw;
  }

  .grain-quote__panel {
    margin-left: auto;
    margin-right: 6vw;
  }

  .grain-features__panel {
    margin-left: 6vw;
  }

  .order-hall__inner {
    grid-template-columns: 1fr 1.1fr;
  }
}