/* CosmoMatch · промо 10 — Планетный альманах: эфемеридная газетта */

:root {
  --ground: #E7E2D1;
  --ink: #1D1C19;
  --accent: #2F5D50;
  --secondary: #8C4A2F;
  --glow: #C8B98E;
  --rule: rgba(29, 28, 25, 0.55);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { background: var(--ground); }

body {
  font-family: 'PT Serif', Georgia, serif;
  color: var(--ink);
  line-height: 1.6;
  overflow-x: hidden;
}

.gazette {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 32px 64px;
}

/* ---------- шапка-газетта ---------- */

.masthead { padding-top: 22px; }

.masthead__rule {
  height: 3px;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

.masthead__rule--thick {
  height: 6px;
  border-top-width: 3px;
  margin-top: 3px;
}

.masthead__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 0;
}

.logo { display: flex; align-items: center; gap: 18px; min-width: 0; }

.logo__mark { width: 52px; height: 46px; flex: none; color: var(--ink); }

.wordmark {
  font-family: 'PT Serif', Georgia, serif;
  font-variant: small-caps;
  font-weight: 700;
  font-size: clamp(20px, 3vw, 30px);
  letter-spacing: 0.14em;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 2px;
  white-space: nowrap;
}

.head__num {
  font-family: 'PT Sans', 'Helvetica Neue', Arial, sans-serif;
  font-size: 13px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--secondary);
  white-space: nowrap;
}

.dateline {
  font-family: 'PT Sans', 'Helvetica Neue', Arial, sans-serif;
  font-size: 13px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--accent);
  padding: 12px 0 0;
  text-align: center;
}

/* ---------- hero ---------- */

.hero {
  text-align: center;
  padding: 52px 0 44px;
  border-bottom: 1px solid var(--rule);
}

.headline {
  font-weight: 700;
  font-size: clamp(40px, 6.6vw, 76px);
  line-height: 1.1;
  margin-bottom: 20px;
}

.sub {
  max-width: 62ch;
  margin: 0 auto 28px;
  font-size: 17px;
}

.cta {
  display: inline-block;
  font-family: 'PT Sans', 'Helvetica Neue', Arial, sans-serif;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ground);
  background: var(--accent);
  padding: 15px 42px;
  border: 2px solid var(--accent);
  transition: background 0.25s ease, color 0.25s ease;
}

.cta:hover, .cta:focus-visible { background: var(--ink); border-color: var(--ink); color: var(--ground); }

.cta--ghost {
  background: transparent;
  color: var(--accent);
  border-color: var(--accent);
}

.cta--ghost:hover, .cta--ghost:focus-visible { background: var(--accent); color: var(--ground); }

/* ---------- разворот: таблица + заметки ---------- */

.spread {
  display: grid;
  grid-template-columns: minmax(0, 2.1fr) minmax(0, 1fr);
  gap: 40px;
  padding: 44px 0;
  border-bottom: 1px solid var(--rule);
}

.eph { min-width: 0; overflow-x: auto; }

.eph__table {
  width: 100%;
  border-collapse: collapse;
  font-size: 16px;
}

.eph__table th {
  font-family: 'PT Sans', 'Helvetica Neue', Arial, sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  text-align: left;
  padding: 10px 12px;
  border-bottom: 3px double var(--rule);
}

.eph__table td {
  padding: 13px 12px;
  border-bottom: 1px solid var(--glow);
  transition: background 0.2s ease;
}

.eph__row:hover td { background: rgba(47, 93, 80, 0.09); }
.eph__row:hover .eph__glyph { color: var(--accent); }

.eph__glyph {
  font-family: 'JetBrains Mono', monospace;
  color: var(--secondary);
  width: 34px;
}

.mono, .eph__table .mono {
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  white-space: nowrap;
}

.roll {
  display: inline-block;
  min-width: 7ch;
  text-align: right;
}

.eph__caption {
  margin-top: 14px;
  font-family: 'PT Sans', 'Helvetica Neue', Arial, sans-serif;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--secondary);
}

/* заметки справа */

.notes { display: flex; flex-direction: column; gap: 26px; min-width: 0; }

.quote {
  background: rgba(255, 255, 255, 0.4);
  border: 2px solid var(--ink);
  border-radius: 14px 5px 16px 6px / 5px 16px 6px 14px;
  padding: 26px 24px;
  transform: rotate(-0.6deg);
}

.quote p {
  font-weight: 700;
  font-size: 21px;
  line-height: 1.4;
}

.quote::before {
  content: "";
  display: block;
  width: 46px;
  height: 3px;
  background: var(--secondary);
  margin-bottom: 16px;
}

.note {
  font-family: 'PT Sans', 'Helvetica Neue', Arial, sans-serif;
  font-size: 14px;
  line-height: 1.6;
  color: var(--secondary);
  border-left: 2px dashed var(--secondary);
  padding: 6px 0 6px 16px;
  margin: 0;
}

/* ---------- три подписанных блока ---------- */

.sections {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 34px;
  padding: 46px 0;
  border-bottom: 1px solid var(--rule);
}

.entry { padding-top: 16px; border-top: 3px solid var(--ink); }

.entry__t {
  font-variant: small-caps;
  font-weight: 700;
  font-size: 20px;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 8px;
}

.entry__d { font-size: 15px; }

.final { padding: 40px 0 6px; text-align: center; }

/* ---------- футер ---------- */

.foot { margin-top: 34px; }

.foot__text {
  font-variant: small-caps;
  font-weight: 700;
  letter-spacing: 0.18em;
  font-size: 14px;
  color: var(--ink);
  padding: 16px 0 10px;
  text-align: center;
}

.promo-nav {
  display: flex;
  justify-content: center;
  gap: 26px;
  flex-wrap: wrap;
  padding-bottom: 16px;
}

.promo-nav a {
  font-family: 'PT Sans', 'Helvetica Neue', Arial, sans-serif;
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--accent);
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.promo-nav a:hover, .promo-nav a:focus-visible { color: var(--secondary); border-bottom-color: var(--secondary); }

/* ---------- появление по скроллу ---------- */

[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

[data-reveal].is-in { opacity: 1; transform: none; }

/* строки таблицы: снизу вверх с задержкой */

.eph__row.pre td { background: rgba(200, 185, 142, 0.12); }

.eph__row.pre {
  opacity: 0;
  transform: translateY(14px);
}

.eph__row {
  opacity: 1;
  transform: none;
  transition: opacity 0.5s ease, transform 0.5s ease;
}

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

@media (max-width: 900px) {
  .spread { grid-template-columns: 1fr; }
  .sections { grid-template-columns: 1fr; gap: 24px; }
}

@media (max-width: 640px) {
  .gazette { padding: 0 18px 48px; }
  .masthead__row { flex-direction: row; }
  .wordmark { font-size: 19px; letter-spacing: 0.08em; }
  .logo__mark { width: 44px; height: 39px; }
  .eph__table { font-size: 13px; }
  .eph__table th, .eph__table td { padding: 9px 6px; }
  .mono, .eph__table .mono { font-size: 11px; }
  .roll { min-width: 6ch; }
}

/* ---------- reduce-motion ---------- */

@media (prefers-reduced-motion: reduce) {
  [data-reveal], .eph__row {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .cta, .promo-nav a, .eph__table td { transition: none; }
}
