:root {
  --ink-black: #15120f;
  --sun-yellow: #ffd23f;
  --block-blue: #2250e0;
  --flare-red: #ff4b2b;
  --leaf-green: #13a06f;
  --paper-cream: #fff4dc;
  --plate-shade: rgba(255, 244, 220, 0.95);
  --plate-shadow-size: 14px;
}

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

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

body {
  margin: 0;
  font-family: 'Nunito Sans', system-ui, Arial, sans-serif;
  font-weight: 400;
  font-size: clamp(1.125rem, 1.6vw, 1.4rem);
  line-height: 1.6;
  color: var(--ink-black);
  background: var(--paper-cream);
  overflow-x: hidden;
}

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

h1,
h2,
h3 {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  margin: 0 0 0.5em;
}

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

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

h3 {
  font-size: clamp(1.3rem, 2.2vw, 1.8rem);
}

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

a {
  color: var(--ink-black);
}

:focus-visible {
  outline: 4px solid var(--block-blue);
  outline-offset: 4px;
}

/* ---------- Блоки-екрани: кожен свого кольору ---------- */

.flow-opener,
.flow-audience,
.flow-features,
.flow-order {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(3rem, 8vw, 6rem) 1.25rem;
  overflow: hidden;
  border-bottom: 6px solid var(--ink-black);
}

.flow-opener {
  background: var(--sun-yellow);
}

.flow-audience {
  background: var(--block-blue);
}

.flow-features {
  background: var(--flare-red);
}

.flow-order {
  background: var(--leaf-green);
}

.flow-opener__photo,
.flow-audience__photo,
.flow-features__photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  filter: contrast(1.05) saturate(1.1);
}

/* Напівпрозора плашка поверх фото */
.flow-plate {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 44rem;
  background: var(--plate-shade);
  border: 4px solid var(--ink-black);
  box-shadow: 8px 8px 0 var(--ink-black);
  padding: clamp(1.5rem, 4vw, 3.5rem);
}

.flow-plate--hero {
  text-align: left;
}

.flow-kicker {
  display: inline-block;
  background: var(--ink-black);
  color: var(--sun-yellow);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.95rem;
  padding: 0.35rem 0.8rem;
  margin: 0 0 1rem;
}

.flow-subtitle {
  font-weight: 700;
  font-size: clamp(1.2rem, 2vw, 1.6rem);
  margin-bottom: 1.2rem;
}

.flow-lead {
  margin-bottom: 1.8rem;
}

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

.tome-cover {
  position: relative;
  width: min(240px, 70vw);
  aspect-ratio: 2 / 3;
  background: linear-gradient(160deg, var(--flare-red) 0%, #b82010 55%, var(--ink-black) 100%);
  border: 4px solid var(--ink-black);
  box-shadow: 12px 12px 0 var(--ink-black);
  padding: 1.4rem 1.2rem 1.2rem 2.4rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: var(--paper-cream);
  margin: 0 auto 1.5rem;
}

.tome-cover::before {
  content: "";
  position: absolute;
  left: 14px;
  top: 0;
  bottom: 0;
  width: 12px;
  background: var(--sun-yellow);
  border-right: 4px solid var(--ink-black);
}

.tome-cover__title {
  display: block;
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 700;
  font-size: clamp(1.5rem, 4vw, 2.1rem);
  line-height: 1.05;
  text-transform: uppercase;
  color: var(--sun-yellow);
}

.tome-cover__author {
  display: block;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tome-cover--small {
  width: min(200px, 60vw);
}

.flow-cover-wrap {
  display: flex;
  justify-content: center;
}

/* ---------- Кнопка-якір ---------- */

.flow-cta {
  display: inline-block;
  background: var(--ink-black);
  color: var(--sun-yellow);
  font-weight: 700;
  text-transform: uppercase;
  text-decoration: none;
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  padding: 1.1rem 2rem;
  border: 4px solid var(--ink-black);
  box-shadow: 8px 8px 0 var(--flare-red);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.flow-cta:hover {
  transform: translate(-3px, -3px);
  box-shadow: 11px 11px 0 var(--flare-red);
}

.flow-cta:focus-visible {
  outline: 4px solid var(--block-blue);
  outline-offset: 4px;
}

/* ---------- Екран 2: аудиторія ---------- */

.flow-inset {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border: 4px solid var(--ink-black);
  box-shadow: 10px 10px 0 var(--ink-black);
  margin-bottom: 1.8rem;
}

.flow-portraits {
  list-style: none;
  padding: 0;
  margin: 0 0 2rem;
  display: grid;
  gap: 1.2rem;
}

.flow-portraits li {
  border-left: 8px solid var(--block-blue);
  padding-left: 1rem;
}

.flow-portraits h3 {
  font-size: clamp(1.2rem, 2vw, 1.5rem);
  margin-bottom: 0.3em;
}

.flow-portraits p {
  margin: 0;
}

.flow-about-title {
  margin-top: 0.5rem;
}

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

.flow-feature-grid {
  list-style: none;
  padding: 0;
  margin: 0 0 2rem;
  display: grid;
  gap: 1rem;
}

.flow-feature-grid li {
  background: var(--ink-black);
  color: var(--paper-cream);
  padding: 1rem 1.2rem;
  border: 3px solid var(--ink-black);
}

.flow-feature-grid strong {
  display: block;
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 700;
  font-size: 1.25rem;
  text-transform: uppercase;
  color: var(--sun-yellow);
  margin-bottom: 0.2rem;
}

.flow-feature-grid span {
  display: block;
  line-height: 1.5;
}

.flow-chapters {
  list-style: none;
  counter-reset: chapter-count;
  padding: 0;
  margin: 0 0 2rem;
}

.flow-chapters li {
  counter-increment: chapter-count;
  position: relative;
  padding: 0.2rem 0 0.9rem 3.4rem;
  font-weight: 700;
}

.flow-chapters li::before {
  content: counter(chapter-count);
  position: absolute;
  left: 0;
  top: 0;
  width: 2.5rem;
  height: 2.5rem;
  display: grid;
  place-items: center;
  background: var(--block-blue);
  color: #ffffff;
  border: 3px solid var(--ink-black);
  font-weight: 700;
}

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

.flow-order__inner {
  display: grid;
  gap: 2.5rem;
  width: 100%;
  max-width: 64rem;
  justify-items: center;
  align-items: center;
}

.flow-order__body {
  width: 100%;
  max-width: 36rem;
  background: var(--paper-cream);
  border: 4px solid var(--ink-black);
  box-shadow: 10px 10px 0 var(--ink-black);
  padding: clamp(1.5rem, 4vw, 2.8rem);
}

.flow-form {
  display: grid;
  gap: 0.6rem;
  margin: 1.5rem 0;
}

.flow-form label {
  font-weight: 700;
  font-size: 1.15rem;
  margin-top: 0.4rem;
}

.flow-form input {
  width: 100%;
  min-height: 3.5rem;
  font: inherit;
  font-size: 1.125rem;
  padding: 0.7rem 1rem;
  background: #ffffff;
  color: var(--ink-black);
  border: 4px solid var(--ink-black);
  border-radius: 0;
}

.flow-form input::placeholder {
  color: #6a5f55;
}

.flow-form input:focus-visible {
  outline: 4px solid var(--block-blue);
  outline-offset: 2px;
}

.flow-form button {
  min-height: 3.8rem;
  margin-top: 0.8rem;
  font: inherit;
  font-weight: 700;
  font-size: 1.15rem;
  text-transform: uppercase;
  color: var(--paper-cream);
  background: var(--flare-red);
  border: 4px solid var(--ink-black);
  border-radius: 0;
  box-shadow: 8px 8px 0 var(--ink-black);
  cursor: pointer;
}

.flow-form button:focus-visible {
  outline: 4px solid var(--block-blue);
  outline-offset: 4px;
}

.flow-consent {
  font-size: 0.95rem;
  line-height: 1.5;
}

.flow-consent a {
  color: var(--block-blue);
  font-weight: 700;
}

.flow-format-line {
  font-size: 0.95rem;
  margin: 0;
}

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

.flow-footer {
  background: var(--ink-black);
  color: var(--paper-cream);
  padding: 2.5rem 1.25rem;
  text-align: center;
  font-size: 1rem;
}

.flow-footer p {
  margin: 0.5rem auto;
  max-width: 40rem;
}

.flow-footer a {
  color: var(--sun-yellow);
  font-weight: 700;
}

.flow-footer__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.8rem 2rem;
  margin-bottom: 1rem;
}

.flow-footer__small {
  font-size: 0.9rem;
  opacity: 0.85;
}

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

@media (min-width: 640px) {
  .flow-feature-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 900px) {
  .flow-opener {
    justify-content: flex-start;
    padding-left: clamp(2rem, 6vw, 7rem);
  }

  .flow-plate {
    box-shadow: 16px 16px 0 var(--ink-black);
  }

  .flow-order__inner {
    grid-template-columns: auto 1fr;
    justify-items: start;
  }

  .flow-order__body {
    box-shadow: 16px 16px 0 var(--ink-black);
  }

  .flow-audience,
  .flow-features {
    justify-content: flex-end;
    padding-right: clamp(2rem, 6vw, 7rem);
  }
}

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

.legal-body {
  background: var(--paper-cream);
}

.legal-bar {
  height: 1.2rem;
  background: var(--block-blue);
  border-bottom: 6px solid var(--ink-black);
}

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

.legal-title {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  margin-bottom: 1rem;
}

.legal-intro {
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
}

.legal-back {
  display: inline-block;
  font-weight: 700;
  color: var(--ink-black);
  background: var(--sun-yellow);
  border: 3px solid var(--ink-black);
  padding: 0.4rem 0.9rem;
  text-decoration: none;
  box-shadow: 5px 5px 0 var(--ink-black);
  margin-bottom: 2rem;
}

.legal-back:hover {
  transform: translate(-2px, -2px);
  box-shadow: 7px 7px 0 var(--ink-black);
}

.legal-section {
  border-top: 4px solid var(--ink-black);
  padding-top: 1.2rem;
  margin-top: 2rem;
}

.legal-section h2 {
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  color: var(--flare-red);
}

.legal-section p {
  max-width: none;
}

.legal-footer-note {
  margin-top: 2.5rem;
  padding: 1rem 1.2rem;
  background: var(--leaf-green);
  color: var(--paper-cream);
  border: 4px solid var(--ink-black);
  box-shadow: 8px 8px 0 var(--ink-black);
}