:root {
  --cream: #f6efdc;
  --cream-deep: #f6efdc;
  --ink: #1c140f;
  --ink-soft: #2c261e;
  --brown: #734418;
  --gold: #c6963a;
  --gold-ink: #2a2116;
  --rose: #c17d5c;
  --red: #e23b32;
  --card-line: #e4d6bc;
  --tan: #eadcc4;
  --note: #f6e7a2;
  --book-scale: 0.84;
  --shelf-h: 460px;
  --shelf-w: 1420px;
}

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

html {
  scroll-behavior: smooth;
}

section,
.finale {
  scroll-margin-top: 12px;
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: "Roboto Slab", "Times New Roman", serif;
  font-size: 16px;
  line-height: 1.5;
}

img {
  max-width: 100%;
}

a {
  color: inherit;
}

.skip {
  position: absolute;
  left: 12px;
  top: -40px;
  background: var(--gold);
  color: var(--gold-ink);
  padding: 8px 12px;
  z-index: 10;
}

.skip:focus {
  top: 12px;
}

h1, h2, h3, p {
  margin-top: 0;
}

.hero {
  padding: 52px 0 0;
  text-align: center;
}

.eyebrow {
  margin: 0 0 10px;
  font-size: 20px;
  font-weight: 400;
  letter-spacing: 0.01em;
  color: #3a3228;
}

.hero h1 {
  margin: 0 auto 28px;
  max-width: 12em;
  font-family: "Playfair Display SC", "Playfair Display", serif;
  font-weight: 400;
  font-size: clamp(46px, 6.2vw, 78px);
  line-height: 0.96;
  letter-spacing: 0.02em;
  text-transform: lowercase;
  color: var(--ink);
}

.shelf-viewport {
  --scale: clamp(0.68, 100vw / var(--shelf-w), 1);
  height: calc(var(--shelf-h) * var(--scale));
  overflow: hidden;
  position: relative;
}

.shelf-inner {
  position: absolute;
  left: 50%;
  top: 0;
  width: max-content;
  transform: translateX(-50%) scale(var(--scale));
  transform-origin: top center;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.books {
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.book {
  width: calc(var(--bw) * 1px * var(--book-scale));
  height: calc(var(--bh) * 1px * var(--book-scale));
  flex: 0 0 auto;
  margin-left: 4px;
  display: block;
  position: relative;
  z-index: 1;
}

.book:first-child {
  margin-left: 0;
}

.feature {
  z-index: 2;
  margin-left: 12px;
  margin-right: 6px;
}

.feature img {
  width: 100%;
  height: 100%;
  display: block;
}

.hit {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Roboto Slab", serif;
  font-size: 15px;
  font-weight: 500;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  border-radius: 1px;
}

.hit-test {
  left: 8%;
  top: 77.8%;
  width: 36%;
  height: 13.4%;
  background: #c6963a;
  color: #20180d;
  border: none;
}

.hit-how {
  left: 49.6%;
  top: 77.6%;
  width: 43.6%;
  height: 13.6%;
  background: #002559;
  color: #f3ead4;
  border: 1px solid #e6dfd2;
}

.hit:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.page-turn {
  height: 26px;
  background: var(--cream);
  border-top: 1px solid rgba(0, 0, 0, 0.25);
  border-bottom: 1px solid rgba(0, 0, 0, 0.25);
  box-shadow: inset 0 10px 4px -4px rgba(0, 0, 0, 0.35);
}

.plank {
  width: calc(100% + 36px);
  margin-left: -18px;
  height: 13px;
  display: block;
  object-fit: fill;
}

.pegs {
  width: 86%;
  height: auto;
  align-self: center;
  margin-top: 1px;
  display: block;
}

.voices {
  padding: 58px 24px 18px;
}

.voices h2,
.why h2 {
  margin: 0 auto 28px;
  padding: 0 12px;
  text-align: center;
  font-family: "Playfair Display SC", "Playfair Display", serif;
  font-weight: 400;
  font-size: clamp(22px, 2.35vw, 34px);
  line-height: 1.2;
  letter-spacing: 0.03em;
  text-transform: lowercase;
}

.quote-wrap {
  position: relative;
  max-width: 772px;
  margin: 0 auto;
  padding: 0 8px 36px;
}

.quote {
  margin: 0;
  background: rgb(236 223 192 / 62%);
  border: 1px solid #d8c69a;
  border-radius: 2px;
  padding: 26px 28px;
  box-shadow: 4px 4px 0 #d8c69a;
}

.quote p {
  margin: 0;
  font-family: "PT Serif", "Times New Roman", serif;
  font-style: italic;
  font-weight: 400;
  font-size: 16.5px;
  line-height: 1.58;
  color: #2a261f;
}

.hl {
  padding: 0 0.12em;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

.hl-blue { background: #b7d3f3; }
.hl-yellow { background: #f3e48a; }
.hl-pink { background: #f4b7cb; }
.hl-orange { background: #f0b48a; }

.sign {
  position: absolute;
  right: 10px;
  bottom: 8px;
  margin: 0;
  font-family: "Marck Script", cursive;
  font-size: 46px;
  line-height: 1;
  color: var(--red);
  transform: rotate(-8deg);
  white-space: nowrap;
}

.story {
  padding: 28px 24px 72px;
}

.story-inner {
  max-width: 680px;
  margin: 0 auto;
}

.story h2,
.how h2,
.faq h2 {
  font-family: "Roboto Slab", serif;
  font-weight: 600;
  font-size: 26px;
  letter-spacing: 0.045em;
  text-transform: uppercase;
  margin: 0 0 22px;
}

.story-points {
  position: relative;
  padding-left: 28px;
  min-height: 140px;
}

.bookmark {
  position: absolute;
  left: 0;
  top: 2px;
  bottom: 0;
  width: 16px;
  background: #e53935;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% calc(100% - 12px), 0 100%);
}

.story-copy p {
  margin: 0 0 16px;
  font-size: 16.5px;
  line-height: 1.45;
  color: var(--ink-soft);
}

.story-copy p:last-child {
  margin-bottom: 14px;
}

.story-end {
  margin-left: 0;
  background: #f4e6c6;
  border-left: 4px solid #e53935;
  padding: 12px 16px 14px 24px;
}

.story-end p {
  margin: 0;
  font-size: 15.5px;
  line-height: 1.45;
  color: var(--ink-soft);
}

.story-end .lead {
  color: #c24b3c;
}

.why {
  padding: 8px 24px 78px;
}

.why-grid {
  max-width: 1040px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(240px, 0.82fr);
  gap: 12px;
  align-items: start;
}

.banner {
  margin: 0 0 16px;
  padding: 16px 52px 16px 34px;
  color: #1c1916;
  font-size: 15.5px;
  line-height: 1.45;
  clip-path: polygon(0 0, calc(100% - 34px) 0, 100% 50%, calc(100% - 34px) 100%, 0 100%, 20px 50%);
}

.banner-lilac { background: #d2bef6; }
.banner-blue { background: #b7d4f8; }
.banner-green { background: #c6eeab; }

.note {
  margin-top: 18px;
  margin-left: 4px;
  background: var(--note);
  padding: 26px 28px 30px;
  transform: rotate(2.4deg);
  box-shadow:
    8px 10px 0 rgba(190, 182, 150, 0.55),
    14px 20px 28px rgba(70, 55, 30, 0.12);
}

.note h3 {
  margin: 0 0 14px;
  font-family: "Playfair Display", serif;
  font-weight: 700;
  font-style: normal;
  font-size: 28px;
  color: #1a2330;
}

.note p {
  margin: 0;
  font-family: "Playfair Display", serif;
  font-style: italic;
  font-weight: 500;
  font-size: 22px;
  line-height: 1.35;
  color: #1a2330;
}

.algo {
  background: var(--brown);
  color: #f6f0e6;
  padding: 54px 20px 48px;
  text-align: center;
}

.algo h2 {
  margin: 0 0 12px;
  font-family: "Playfair Display", serif;
  font-weight: 500;
  font-size: clamp(28px, 3vw, 36px);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.algo-lead {
  margin: 0 auto 34px;
  max-width: 48em;
  font-size: 15.5px;
  color: #f3e6d4;
}

.spines {
  list-style: none;
  margin: 0 auto;
  padding: 0;
  max-width: 1160px;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px;
  text-align: left;
}

.spine {
  min-height: 360px;
  padding: 20px 14px 18px;
  color: #fff;
  display: flex;
  flex-direction: column;
  position: relative;
}

.spine-1 { background: #1b7c8c; }
.spine-2 { background: #2a9a3c; }
.spine-3 { background: #e8871c; }
.spine-4 { background: #6e2a9c; }
.spine-5 { background: #c43a78; }
.spine-6 { background: #2c2a6a; }

.num {
  display: block;
  margin: 0 6px 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.9);
  text-align: center;
  font-family: "Playfair Display", serif;
  font-size: 28px;
  font-weight: 500;
  letter-spacing: 0.06em;
  line-height: 1;
}

.spine h3,
.spine p {
  font-family: "Playfair Display", serif;
  font-weight: 500;
  color: #fff;
}

.spine h3 {
  margin: 0 0 10px;
  font-size: 18px;
  line-height: 1.25;
  font-weight: 600;
}

.spine p {
  margin: 0;
  font-size: 15px;
  line-height: 1.35;
  font-weight: 500;
}

.spine.has-label {
  padding-bottom: 52px;
}

.spine.has-label::after {
  content: "";
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 18px;
  height: 22px;
  background: #f4f1ea;
}

.how {
  padding: 64px 24px 12px;
}

.how h2 {
  text-align: center;
}

.steps {
  list-style: none;
  margin: 28px auto 0;
  padding: 0;
  max-width: 560px;
}

.steps li {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 14px;
  margin-bottom: 22px;
  align-items: start;
}

.step-num {
  font-family: "Playfair Display", serif;
  font-size: 28px;
  line-height: 1;
  color: var(--rose);
}

.steps h3 {
  margin: 0 0 4px;
  font-family: "Roboto Slab", serif;
  font-size: 18px;
  font-weight: 700;
}

.steps p {
  margin: 0;
  font-size: 15.5px;
  line-height: 1.45;
  color: var(--ink-soft);
}

.team {
  padding: 36px 24px 56px;
}

.team h2 {
  margin: 0 0 28px;
  text-align: center;
  font-family: "Playfair Display", serif;
  font-weight: 500;
  font-size: clamp(30px, 3vw, 38px);
}

.team-grid {
  max-width: 900px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.person {
  background: #fff;
  box-shadow: 0 10px 24px rgba(60, 40, 20, 0.12);
  overflow: hidden;
}

.person header {
  text-align: center;
  padding: 14px 10px 12px;
}

.person h3 {
  margin: 0;
  color: #fff;
  font-family: "Playfair Display", serif;
  font-weight: 500;
  font-size: 30px;
  line-height: 1;
}

.person-arseniy header { background: #1a3d78; }
.person-gregory header { background: #8d1d28; }
.person-arlan header { background: #1c7a36; }

.role {
  margin: 0;
  padding: 8px 10px 9px;
  text-align: center;
  background: #fff;
  color: #6d6762;
  font-size: 13.5px;
}

.portrait {
  position: relative;
  background: #eee;
}

.portrait img {
  display: block;
  width: 100%;
  height: 280px;
  object-fit: cover;
  object-position: center 12%;
}

.person-arseniy .portrait img,
.person-gregory .portrait img,
.person-arlan .portrait img {
  object-position: center 6%;
}

.portrait p {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  margin: 0;
  padding: 48px 12px 12px;
  color: #fff;
  font-size: 12.5px;
  line-height: 1.35;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.55);
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.78));
}

.faq {
  padding: 8px 24px 72px;
}

.faq-inner {
  max-width: 720px;
  margin: 0 auto;
}

.accordion {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.accordion details {
  background: var(--tan);
  border-radius: 8px;
}

.accordion summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 14px 18px;
  font-size: 16.5px;
  color: var(--ink);
}

.accordion summary::-webkit-details-marker {
  display: none;
}

.accordion summary::before {
  content: "+";
  color: #c85a48;
  font-weight: 500;
  font-size: 20px;
  line-height: 1;
  flex: 0 0 auto;
}

.accordion details[open] summary::before {
  content: "–";
}

.accordion summary:focus-visible {
  outline: 2px solid var(--brown);
  outline-offset: 2px;
}

.accordion details p {
  margin: 0;
  padding: 0 18px 16px 42px;
  font-size: 15.5px;
  line-height: 1.5;
  color: var(--ink-soft);
}

.finale {
  background: var(--brown);
  color: #f6f0e6;
  text-align: center;
  padding: 72px 24px 36px;
}

.finale h2 {
  margin: 0 0 18px;
  font-family: "Playfair Display", serif;
  font-weight: 500;
  font-size: clamp(34px, 4.4vw, 52px);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1.12;
  color: #f7f1e6;
}

.finale p {
  margin: 0 auto;
  max-width: 28em;
  font-size: 16.5px;
  line-height: 1.5;
  color: #f3e6d4;
}

.btn-gold {
  display: inline-block;
  margin-top: 26px;
  padding: 12px 26px;
  background: var(--gold);
  color: var(--gold-ink);
  text-decoration: none;
  font-family: "Roboto Slab", serif;
  font-size: 16px;
  font-weight: 500;
  border-radius: 2px;
}

.btn-gold:hover {
  background: #b8872e;
}

.btn-gold:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

.finale .legal {
  margin-top: 64px;
  font-size: 13px;
  color: #e4d0b0;
}

@media (max-width: 980px) {
  .why-grid {
    grid-template-columns: 1fr;
  }

  .note {
    margin-left: 0;
    max-width: 460px;
  }

  .spines {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .spine {
    min-height: 300px;
  }
}

@media (max-width: 720px) {
  body {
    overflow-x: hidden;
  }

  .hero {
    padding-top: 32px;
  }

  .note {
    transform: rotate(1.2deg);
  }

  .eyebrow {
    font-size: 16px;
  }

  .sign {
    font-size: 36px;
    right: 0;
  }

  .team-grid {
    grid-template-columns: 1fr;
    max-width: 380px;
  }

  .spines {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .note p {
    font-size: 18px;
  }

  .finale p br {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
