/* ==========================================================================
   Отряд — продающий сайт первой смены. Тема «тропа отряда».
   Токены — из docs/3-kontseptsiya-sayta.md, раздел 2 (палитра) и раздел 4 (принципы).
   ========================================================================== */

/* ---- Fonts (self-hosted, latin + cyrillic only, variable weight ranges) ---- */

@font-face {
  font-family: 'Playfair Display';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('fonts/playfair-display-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Playfair Display';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('fonts/playfair-display-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Playfair Display';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/playfair-display-italic-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Playfair Display';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/playfair-display-italic-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Golos Text';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('fonts/golos-text-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Golos Text';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('fonts/golos-text-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

/* ---- Tokens ---- */

:root {
  --color-base: #F5EDE1;
  --color-card: #FBF6EC;
  --color-text: #2B2118;
  --color-text-secondary: #6B5F4F;
  --color-terracotta: #C4531E;
  --color-petrol: #1F4B4A;
  --color-petrol-hover: #163837;
  --color-petrol-active: #102b2a;
  --color-on-dark: #FFFDF8;
  --color-on-dark-secondary: #C9DAD6;
  --color-slot-bg: #F6E27A;
  --color-hairline: #E6D9C4;

  --font-display: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-text: 'Golos Text', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;

  --max-width: 1180px;
  --gutter: 24px;

  --radius-card: 20px;
  --radius-btn: 10px;

  --space-section: 3rem;
  --space-heading-body: 1.5rem;
  --space-paragraph: 1rem;

  --h1-size: 2rem;
  --h2-size: 1.75rem;
  --h3-size: 1.375rem;
  --body-size: 1rem;
  --body-lh: 1.55;
}

@media (min-width: 1280px) {
  :root {
    --gutter: 64px;
    --space-section: 6rem;
    --h1-size: 3.5rem;
    --h2-size: 2.5rem;
    --h3-size: 1.75rem;
    --body-size: 1.125rem;
    --body-lh: 1.6;
  }
}

/* ---- Reset ---- */

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: clip; }
body {
  overflow-x: clip;
  margin: 0;
  background: var(--color-base);
  color: var(--color-text);
  font-family: var(--font-text);
  font-size: var(--body-size);
  line-height: var(--body-lh);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
ul { margin: 0; padding: 0; }
h1, h2, h3, p, ul { margin: 0; }

/* ---- Layout ---- */

.wrap {
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  padding-block: var(--space-section);
}

.section--card-bg { background: var(--color-card); }

.section--dark {
  background: var(--color-petrol);
  color: var(--color-on-dark);
}

.section--dark .eyebrow,
.section--dark .body-secondary { color: var(--color-on-dark-secondary); }

.split {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  align-items: end;
}

@media (min-width: 900px) {
  .split {
    grid-template-columns: 7fr 5fr;
    gap: 3rem;
  }
  .split--reverse { grid-template-columns: 5fr 7fr; }
  .split--reverse > .split__illustration { order: -1; }
}

.split__illustration {
  justify-self: center;
  align-self: end;
  width: 100%;
  max-width: 280px;
}

.split__illustration img,
.hero__trail img { width: 100%; height: auto; mix-blend-mode: multiply; }

/* ---- Typography ---- */

.eyebrow {
  display: block;
  font-family: var(--font-text);
  font-weight: 600;
  font-size: 0.8125rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-secondary);
  margin-bottom: 0.75rem;
}

h1, .h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-style: normal;
  font-size: var(--h1-size);
  line-height: 1.12;
  overflow-wrap: anywhere;
  min-width: 0;
}

h2, .h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-style: normal;
  font-size: var(--h2-size);
  line-height: 1.16;
  overflow-wrap: anywhere;
  min-width: 0;
}

h3, .h3 {
  font-family: var(--font-text);
  font-weight: 600;
  font-size: var(--h3-size);
  line-height: 1.3;
}

.lede {
  font-family: var(--font-text);
  font-weight: 500;
  font-size: 1.25rem;
  line-height: 1.5;
  color: var(--color-text);
}

.body-copy {
  max-width: 62ch;
}

.body-copy > * + * { margin-top: var(--space-paragraph); }

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

.block-head { margin-bottom: var(--space-heading-body); max-width: 46ch; }
.block-head + .body-copy,
.block-head + .split { margin-top: 0; }

/* quoted phrase inside running body text may be emphasised by weight, never italic on headings */
strong { font-weight: 600; }

/* ---- Buttons ---- */

.btn {
  display: inline-block;
  text-align: center;
  white-space: normal;
  border-radius: var(--radius-btn);
  padding: 14px 32px;
  font-family: var(--font-text);
  font-weight: 500;
  font-size: 1rem;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.btn--pay {
  background: var(--color-petrol);
  color: var(--color-on-dark);
}
.btn--pay:hover { background: var(--color-petrol-hover); }
.btn--pay:active { background: var(--color-petrol-active); }
.section--dark .btn--pay { background: var(--color-on-dark); color: var(--color-petrol); }
.section--dark .btn--pay:hover,
.section--dark .btn--pay:active { background: var(--color-base); }

.btn--tg {
  background: transparent;
  border-color: var(--color-petrol);
  color: var(--color-petrol);
}
.section--dark .btn--tg { border-color: var(--color-on-dark); color: var(--color-on-dark); }
.btn--tg:hover { background: var(--color-petrol); color: var(--color-on-dark); }
.section--dark .btn--tg:hover { background: var(--color-on-dark); color: var(--color-petrol); }

.btn:focus-visible {
  outline: 3px solid var(--color-terracotta);
  outline-offset: 2px;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.cta-row { margin-top: 2rem; }

/* link that has no real url yet — visibly marked, never silently "#" */
.link-slot {
  text-decoration: underline dashed var(--color-text-secondary);
  text-decoration-thickness: 1px;
}

/* ---- Badges / pills ---- */

.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.35em 0.9em;
  font-family: var(--font-text);
  font-weight: 600;
  font-size: 0.9rem;
  background: var(--color-terracotta);
  color: var(--color-on-dark);
}

/* ---- Slot: unfilled fact placeholder ---- */

.slot {
  display: inline-block;
  vertical-align: middle;
  border: 1px dashed var(--color-text-secondary);
  border-radius: 999px;
  padding: 0.15em 0.7em;
  font-family: var(--font-text);
  font-weight: 500;
  font-style: normal;
  font-size: 1rem;
  line-height: 1.4;
  color: var(--color-text-secondary);
  background: var(--color-slot-bg);
  white-space: normal;
}

/* ---- Header ---- */

.site-header {
  padding-block: 1.5rem;
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.wordmark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  text-decoration: none;
}

/* ---- Hero ---- */

.hero { padding-top: 2rem; }
.hero__trail {
  width: 100%;
  max-width: 240px;
  margin-top: 2.5rem;
  margin-left: auto;
}
@media (min-width: 900px) {
  .hero__grid {
    display: grid;
    grid-template-columns: 8fr 4fr;
    gap: 2rem;
    align-items: start;
  }
  .hero__trail { margin-top: 0; max-width: 440px; align-self: center; }
}

/* ---- Trail divider (decorative, not a data fact) ---- */

.trail-divider {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 2.5rem 0;
  color: var(--color-terracotta);
}
.trail-divider::before,
.trail-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background-image: linear-gradient(to right, var(--color-terracotta) 0 6px, transparent 6px 14px);
  background-size: 14px 1px;
  background-repeat: repeat-x;
}
.trail-divider__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-terracotta);
  flex-shrink: 0;
}

/* ---- Program list (block 5) ---- */

.program-list {
  display: grid;
  gap: 1.25rem;
  margin-top: 2rem;
}
@media (min-width: 700px) {
  .program-list { grid-template-columns: repeat(3, 1fr); }
}
.program-item {
  background: var(--color-card);
  border-radius: var(--radius-card);
  padding: 1.5rem;
}
.program-item h3 { margin-bottom: 0.5rem; }
.program-item p { color: var(--color-text-secondary); }

/* ---- Team (block 6) ---- */

.team-photo {
  width: 148px;
  height: 148px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--color-card);
  border: 1px dashed var(--color-text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.team-photo img { width: 100%; height: 100%; object-fit: cover; }
.team-photo__label {
  display: inline-block;
  border: 1px dashed var(--color-text-secondary);
  border-radius: 999px;
  font-family: var(--font-text);
  font-weight: 500;
  font-size: 0.75rem;
  line-height: 1.4;
  color: var(--color-text-secondary);
  background: var(--color-slot-bg);
  text-align: center;
  padding: 0.15em 0.7em;
}
.team-block {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

/* ---- Pricing (block 8) ---- */

.pricing-grid {
  display: grid;
  gap: 1.5rem;
  margin-top: 2.5rem;
}
@media (min-width: 900px) {
  .pricing-grid { grid-template-columns: repeat(3, 1fr); }
}
.pricing-card {
  background: var(--color-card);
  border-radius: var(--radius-card);
  padding: 2rem 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.pricing-card__price {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.75rem;
  color: var(--color-petrol);
}
.pricing-card__gift {
  font-size: 0.95rem;
  color: var(--color-text-secondary);
  border-top: 1px solid var(--color-hairline);
  padding-top: 1rem;
}
.pricing-card .btn { margin-top: auto; }
.pricing-note {
  margin-top: 2rem;
  color: var(--color-text-secondary);
}

/* ---- FAQ (block 10) ---- */

.faq-list { margin-top: 2rem; display: grid; gap: 0.75rem; }
.faq-item {
  background: var(--color-card);
  border-radius: 16px;
  padding: 0.25rem 1.5rem;
}
.faq-item summary {
  cursor: pointer;
  list-style: none;
  padding: 1.25rem 0;
  font-family: var(--font-text);
  font-weight: 600;
  font-size: 1.0625rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--color-terracotta);
  flex-shrink: 0;
  transition: transform 0.2s ease;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p { padding-bottom: 1.25rem; color: var(--color-text-secondary); }

/* ---- Scarcity (block 11) ---- */

.scarcity-figure {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 3rem;
  color: var(--color-on-dark);
}
/* if seats_total is ever emptied, the slot pill must not inherit the 3rem display size
   or the light on-dark color — it needs the same dark slot text color as .slot elsewhere */
.scarcity-figure.slot {
  font-family: var(--font-text);
  font-size: 1.25rem;
  color: var(--color-text-secondary);
}

/* ---- Guarantee (block 12) ---- */

.guarantee-mark {
  width: 56px;
  height: 56px;
  border: 2px solid var(--color-terracotta);
  border-radius: 50%;
  margin-bottom: 1.5rem;
}

/* ---- Close (block 13) ---- */

.close-block { text-align: left; }

/* ---- Footer ---- */

.site-footer {
  padding-block: 2.5rem;
  border-top: 1px solid var(--color-hairline);
  color: var(--color-text-secondary);
  font-size: 0.875rem;
}
.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  justify-content: space-between;
}
.site-footer a { text-decoration: underline; }

/* ---- Scroll reveal ---- */

.reveal {
  transition: opacity 0.6s ease, transform 0.6s ease;
}
/* hidden only once JS confirms it can reveal the section again — no JS/broken data.js
   means html never gets .reveal-armed, so content stays visible by default */
html.reveal-armed .reveal:not(.is-visible) {
  opacity: 0;
  transform: translateY(24px);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  html.reveal-armed .reveal:not(.is-visible) {
    opacity: 1;
    transform: none;
  }
  .reveal {
    transition: none;
  }
  .btn, .faq-item summary::after { transition: none; }
}

/* ---- Focus ---- */

a:focus-visible, summary:focus-visible {
  outline: 3px solid var(--color-terracotta);
  outline-offset: 2px;
}

/* terracotta outline reads low-contrast on the dark petrol section — swap to the light
   on-dark color there so keyboard focus stays visible */
.section--dark a:focus-visible,
.section--dark summary:focus-visible,
.section--dark .btn:focus-visible {
  outline-color: var(--color-on-dark);
}
