:root {
  color-scheme: light;
  --cream: #ece0c4;
  --paper: #e5d8b8;
  --paper-soft: rgba(246, 239, 222, 0.86);
  --paper-card: rgba(246, 239, 222, 0.72);
  --ink: #241d16;
  --ink-soft: #2e271d;
  --muted: #4a3f31;
  --dim: #6a5c47;
  --teal: #2f6f6d;
  --teal-dark: #1e4d50;
  --teal-deep: #163b3e;
  --teal-line: #4d8b86;
  --teal-pale: #9fc4bf;
  --orange: #c8502a;
  --orange-light: #e0803f;
  --brass: #9b7a38;
  --brass-light: #d8b26a;
  --brass-dark: #7d5f2a;
  --rule: #b39a66;
  --max: 880px;
  --pad: clamp(16px, 5vw, 44px);
  --card-pad: clamp(18px, 3vw, 26px);
  --fs-body: clamp(17px, 2.3vw, 19px);
}

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

body {
  margin: 0;
  min-width: 320px;
  background: var(--paper);
  color: var(--ink);
  font-family: "PT Serif", Georgia, serif;
  -webkit-text-size-adjust: 100%;
}

a {
  color: var(--orange);
  text-decoration: none;
}

a:hover,
a:focus-visible {
  color: #a03d1c;
}

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

.ru {
  font-family: "Russo One", "Arial Black", sans-serif;
  text-transform: uppercase;
  font-weight: 400;
}

.nr {
  font-family: "PT Sans Narrow", "Arial Narrow", "Helvetica Neue", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 700;
}

.page {
  position: relative;
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding-bottom: clamp(24px, 5vw, 34px);
  background: var(--paper);
  overflow: hidden;
}

.orbits {
  position: absolute;
  top: 120px;
  left: 0;
  width: 100%;
  opacity: 0.13;
  pointer-events: none;
}

.rail {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 6px 16px;
  padding: 15px var(--pad);
  border-bottom: 3px double var(--brass-dark);
  font-size: clamp(12px, 2.6vw, 14px);
  color: var(--muted);
}

.rail__cycle {
  color: var(--orange);
}

.hero {
  position: relative;
  padding: clamp(24px, 5vw, 40px) var(--pad) 0;
}

.plaque {
  position: relative;
  padding: clamp(7px, 1.4vw, 11px);
  border-radius: clamp(16px, 3vw, 26px);
  background: linear-gradient(158deg, #dcb771 0%, var(--brass-dark) 38%, #cfa259 68%, var(--brass-dark) 100%);
  box-shadow: 0 18px 40px rgba(50, 36, 14, 0.34);
}

.rivet {
  position: absolute;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: radial-gradient(circle at 34% 30%, #f4e0ac, #8a6a2e 72%);
  box-shadow: inset 0 -1px 2px rgba(40, 28, 8, 0.55);
}

.rivet--sm {
  width: 9px;
  height: 9px;
}

.plaque > .rivet {
  top: 13px;
  left: 13px;
}

.plaque > .rivet:nth-of-type(2) {
  left: auto;
  right: 13px;
}

.plaque > .rivet:nth-of-type(3) {
  top: auto;
  bottom: 13px;
}

.plaque > .rivet:nth-of-type(4) {
  top: auto;
  left: auto;
  right: 13px;
  bottom: 13px;
}

.plaque > .rivet:nth-of-type(5) {
  left: 50%;
  margin-left: -6px;
}

.plaque > .rivet:nth-of-type(6) {
  top: auto;
  bottom: 13px;
  left: 50%;
  margin-left: -6px;
}

.plaque__enamel {
  padding: clamp(9px, 1.8vw, 14px);
  border: 2px solid var(--teal-deep);
  border-radius: clamp(10px, 2vw, 17px);
  background: linear-gradient(180deg, #357a76, #235a5b 62%, #1c4a4d);
}

.plaque__field {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(8px, 1.6vw, 12px);
  padding: clamp(18px, 3.4vw, 30px) clamp(16px, 3.8vw, 34px) clamp(16px, 3vw, 26px);
  border: 2px solid var(--brass);
  border-radius: 10px;
  background: var(--cream);
  overflow: hidden;
}

.plaque__engraving {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.22;
  pointer-events: none;
}

.plaque__author {
  position: relative;
  margin: 0;
  padding: 4px clamp(12px, 3vw, 22px);
  border: 1px solid var(--brass-dark);
  border-radius: 3px;
  font-size: clamp(11px, 2.4vw, 15px);
  letter-spacing: 0.3em;
  color: #3b3226;
}

.plaque__series {
  position: relative;
  margin: clamp(2px, 1vw, 6px) 0 0;
  font-size: clamp(30px, 7.1vw, 54px);
  line-height: 0.94;
  letter-spacing: 0.005em;
  color: var(--orange);
  text-shadow: 2px 2px 0 #7a2b16;
}

.plaque__series + .plaque__series {
  margin-top: 0;
  color: var(--teal-dark);
  text-shadow: 2px 2px 0 #0d2b2e;
}

.plaque__volume {
  position: relative;
  width: 100%;
  margin-top: clamp(8px, 1.6vw, 12px);
  padding: clamp(9px, 1.8vw, 12px) clamp(12px, 2.6vw, 20px);
  border: 2px solid var(--orange);
  border-radius: 8px;
  background: linear-gradient(180deg, var(--teal), var(--teal-dark));
  text-align: center;
}

.plaque__volume span {
  font-size: clamp(15px, 3.5vw, 27px);
  letter-spacing: 0.02em;
  color: #f2e9d4;
  text-shadow: 1px 2px 0 #0d2b2e;
}

.epigraph {
  max-width: 660px;
  margin: clamp(22px, 4vw, 30px) auto 0;
  text-align: center;
}

.epigraph p {
  margin: 0;
  font-size: clamp(19px, 4vw, 25px);
  font-style: italic;
  line-height: 1.36;
  text-wrap: pretty;
}

.cap {
  margin: 10px 0 0;
  font-family: "PT Sans Narrow", "Arial Narrow", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: clamp(12px, 2.4vw, 13px);
  font-weight: 700;
  color: var(--dim);
}

.section {
  position: relative;
  margin: clamp(26px, 5vw, 40px) var(--pad) 0;
}

.h2 {
  margin: 0 0 16px;
  font-family: "Russo One", "Arial Black", sans-serif;
  text-transform: uppercase;
  font-weight: 400;
  font-size: clamp(22px, 4.8vw, 30px);
  line-height: 1.06;
  color: var(--teal-dark);
  text-shadow: 1px 2px 0 rgba(13, 43, 46, 0.22);
}

.frame {
  position: relative;
  padding: clamp(5px, 1vw, 8px);
  border: 2px solid var(--brass);
  background: linear-gradient(150deg, var(--brass-light), #8a6a2e);
}

.frame img {
  display: block;
  width: 100%;
  border: 1px solid #4a3a18;
}

.frame > .rivet {
  top: 10px;
  left: 10px;
}

.frame > .rivet:nth-of-type(2) {
  left: auto;
  right: 10px;
}

.frame > .rivet:nth-of-type(3) {
  top: auto;
  bottom: 10px;
}

.frame > .rivet:nth-of-type(4) {
  top: auto;
  left: auto;
  right: 10px;
  bottom: 10px;
}

/* --- Единая система поверхностей ---
   .card  — панель с информацией: аннотация, обещания, шаги цикла.
   .quote — дословный текст книги, всегда с оранжевой планкой слева.
   .plate — эмалированный шильдик.
   Других типов рамок и фонов на странице нет. */

.card,
.quote {
  padding: var(--card-pad);
  background: var(--paper-soft);
}

.card {
  border: 1px solid var(--rule);
}

.card--now {
  border-color: var(--orange);
}

.quote {
  margin: 18px 0;
  border-left: 5px solid var(--orange);
}

.quote p {
  margin: 0;
  font-size: var(--fs-body);
  font-style: italic;
  line-height: 1.6;
  color: var(--ink);
  text-wrap: pretty;
}

.quote p + p {
  margin-top: 12px;
}

.quote--lead {
  margin: clamp(22px, 4vw, 30px) 0 0;
}

.quote--lead p {
  font-size: clamp(19px, 3.2vw, 24px);
  line-height: 1.42;
}

.quote .cap {
  margin-top: 12px;
  font-style: normal;
}

.label {
  margin: 0 0 12px;
  font-family: "PT Sans Narrow", "Arial Narrow", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 13px;
  font-weight: 700;
  color: var(--teal);
}

.label--now {
  color: var(--orange);
}

.body-text {
  margin: 0;
  font-size: var(--fs-body);
  line-height: 1.64;
  color: var(--ink-soft);
  text-wrap: pretty;
}

.body-text + .body-text {
  margin-top: 12px;
}

.body-text--muted {
  color: var(--muted);
}

.annotation {
  display: flex;
  gap: clamp(16px, 3vw, 28px);
  align-items: flex-start;
}

.annotation img {
  flex-shrink: 0;
  display: block;
  width: clamp(120px, 24vw, 196px);
  border: 3px solid var(--brass);
  box-shadow: 0 10px 24px rgba(50, 36, 14, 0.32);
}

.wide-figure {
  margin: 18px 0 22px;
}

.vedro {
  display: grid;
  grid-template-columns: 316px minmax(0, 1fr);
  gap: clamp(16px, 2.6vw, 24px);
  align-items: stretch;
  margin: 18px 0 22px;
}

.plate {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--card-pad);
  border: 3px solid var(--brass);
  border-radius: 6px;
  background: linear-gradient(180deg, var(--teal), var(--teal-dark));
  box-shadow: 0 8px 20px rgba(50, 36, 14, 0.3);
}

.plate .label {
  color: var(--teal-pale);
}

.plate__commands {
  margin: 0;
  padding-top: 12px;
  border-top: 1px solid var(--teal-line);
  font-family: "PT Sans Narrow", "Arial Narrow", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: clamp(14px, 2.6vw, 16px);
  font-weight: 700;
  line-height: 1.8;
  color: #dfece9;
}

.plate > .rivet {
  top: 7px;
  left: 7px;
}

.plate > .rivet:nth-of-type(2) {
  top: auto;
  left: auto;
  right: 7px;
  bottom: 7px;
}

.vedro__image img {
  height: 100%;
  object-fit: cover;
}

.grid-2,
.grid-3 {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

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

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

.card__name {
  margin: 0 0 8px;
  font-family: "Russo One", "Arial Black", sans-serif;
  text-transform: uppercase;
  font-weight: 400;
  font-size: clamp(17px, 2.4vw, 19px);
  line-height: 1.14;
  color: var(--teal-dark);
}

.cta {
  display: flex;
  justify-content: center;
  margin: clamp(28px, 5vw, 40px) var(--pad) 0;
}

.cta-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 66px;
  padding: 20px clamp(24px, 6vw, 52px);
  border: 3px solid var(--brass);
  border-radius: 6px;
  background: linear-gradient(180deg, #d9662f, #b8461f);
  box-shadow: 0 10px 24px rgba(80, 34, 12, 0.34);
  text-align: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.cta-button span {
  font-family: "Russo One", "Arial Black", sans-serif;
  text-transform: uppercase;
  font-size: clamp(16px, 3.4vw, 23px);
  letter-spacing: 0.03em;
  color: #f7efdc;
  text-shadow: 1px 2px 0 #6d2711;
}

.cta-button:hover,
.cta-button:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(80, 34, 12, 0.42);
  outline: none;
}

.footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 16px;
  margin: clamp(28px, 5vw, 38px) var(--pad) 0;
  padding-top: 15px;
  border-top: 3px double var(--brass-dark);
  font-size: 13px;
  color: var(--dim);
}

.age {
  padding: 2px 9px;
  border: 1px solid var(--brass-dark);
  border-radius: 3px;
  color: var(--muted);
  letter-spacing: 0.06em;
}

body.cookie-open {
  padding-bottom: 120px;
}

.cookie-banner {
  position: fixed;
  z-index: 50;
  right: 16px;
  bottom: 16px;
  left: 16px;
  display: none;
  max-width: 760px;
  margin: 0 auto;
  padding: 14px 16px;
  border: 2px solid var(--brass);
  border-radius: 6px;
  background: var(--teal-dark);
  box-shadow: 0 16px 40px rgba(20, 14, 6, 0.45);
}

.cookie-banner.is-visible {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 14px;
}

.cookie-banner p {
  margin: 0;
  font-size: 14px;
  line-height: 1.45;
  color: #e6efec;
}

.cookie-banner button {
  flex: 0 0 auto;
  min-height: 40px;
  padding: 8px 18px;
  border: 0;
  border-radius: 4px;
  background: var(--orange);
  color: #f7efdc;
  font-family: "PT Sans Narrow", "Arial Narrow", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.cookie-banner button:hover {
  background: #d9662f;
}

@media (max-width: 760px) {
  .vedro,
  .grid-2,
  .grid-3 {
    grid-template-columns: minmax(0, 1fr);
  }

  .vedro__image img {
    height: auto;
  }

  .annotation {
    flex-direction: column;
    align-items: center;
    text-align: left;
  }

  .annotation img {
    width: min(220px, 62%);
  }

  .cta-button {
    width: 100%;
  }

  body.cookie-open {
    padding-bottom: 190px;
  }
}

@media (max-width: 420px) {
  .rail {
    font-size: 12px;
    letter-spacing: 0.08em;
  }

  .plaque__author {
    letter-spacing: 0.18em;
  }
}
