/* Shared rhythm for the CELLONAUT flight journal. */
:root {
  --journal-accent: #ff72c8;
  --journal-text: #c9cce0;
  --journal-rule: rgba(119, 160, 215, .2);
  --journal-space: 88px;
}

.hero h1,
.lore h2,
.radar h2,
.mission h2 {
  color: #f8f9ff;
  font-weight: 900;
  letter-spacing: -.045em;
  overflow-wrap: anywhere;
  text-wrap: balance;
}

.hero h1 { max-width: 800px; font-size: clamp(62px, 7.5vw, 104px); line-height: .94; }
html[lang="ru"] .hero h1 { font-size: clamp(54px, 6.5vw, 92px); }
.hero h1 span,
.lore h2 span,
.radar h2 span,
.mission h2 span {
  color: var(--journal-accent);
  -webkit-text-stroke: 0;
  filter: none;
}

.lore h2,
.radar h2,
.mission h2 { font-size: clamp(34px, 4.7vw, 64px); line-height: 1.04; }

html[lang^="zh"] .hero h1,
html[lang^="zh"] .lore h2,
html[lang^="zh"] .radar h2,
html[lang^="zh"] .mission h2 { letter-spacing: -.015em; line-height: 1.12; }

.hero .intro { color: #d6d9ed; }
.lore,
.memes,
.radar,
.mission { padding-block: var(--journal-space); }

.section-label {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
  color: #80dfff;
  font-size: 10px;
  line-height: 1.6;
  letter-spacing: .17em;
}
.section-label::before {
  content: "";
  flex: 0 0 8px;
  width: 8px;
  height: 8px;
  border: 1px solid #80dfff;
  border-radius: 50%;
  background: #080b22;
  box-shadow: 0 0 0 4px rgba(57, 198, 255, .055);
}
.section-label::after {
  content: "";
  flex: 1 1 24px;
  min-width: 24px;
  height: 1px;
  background: linear-gradient(90deg, rgba(57, 198, 255, .3), rgba(255, 114, 200, .18) 65%, transparent);
}

.lore-grid { gap: 56px; align-items: start; }
.story { padding-left: 28px; border-left-color: rgba(57, 198, 255, .3); color: var(--journal-text); font-size: 16px; line-height: 1.75; }
.story > p:first-child { margin-top: 0; }
.story > p:last-of-type { margin-bottom: 0; }
.signal { margin-top: 24px; padding: 20px; border-color: var(--journal-rule); border-radius: 12px; }
.signal strong { font-size: 16px; }
.signal em { font-size: 13px; align-self: center; }

.memes {
  background: radial-gradient(ellipse at 80% 0, rgba(62, 97, 205, .055), transparent 60%), #08091c;
  border-block: 1px solid rgba(119, 160, 215, .08);
}
.meme-grid { gap: 22px; counter-reset: transmission; }
.meme-grid figure {
  counter-increment: transmission;
  border-color: var(--journal-rule);
  border-radius: 16px;
  background: #0a0c22;
  box-shadow: 0 12px 28px rgba(0, 0, 0, .15);
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.meme-grid figure img { transform: none; transition: none; }
.meme-grid figure:hover img { transform: none; }
.meme-grid figcaption {
  display: flex;
  align-items: baseline;
  gap: 12px;
  min-height: 76px;
  padding: 18px;
  border-top: 1px solid var(--journal-rule);
  background: #0a0c22;
  color: #d7daec;
  font-size: 10px;
  line-height: 1.6;
  letter-spacing: .08em;
}
.meme-grid figcaption::before {
  content: counter(transmission, decimal-leading-zero);
  flex-shrink: 0;
  color: #80dfff;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.radar { background: linear-gradient(180deg, #08091c, #060616); }
.radar-head { gap: 48px; align-items: center; margin-bottom: 30px; }
.radar-copy { color: var(--journal-text); }
.radar-copy > p:first-child { margin-top: 0; }
.radar-note { margin-bottom: 0; color: #a9aec7; border-left-color: var(--journal-accent); }
.stoch-head h3 { font-size: clamp(18px, 2vw, 24px); line-height: 1.3; letter-spacing: .015em; }
.stoch-kicker { line-height: 1.6; }

.mission-grid { gap: 56px; }
.mission-grid .mascot-card { width: min(100%, 400px); margin-inline: auto; }
.steps { margin-top: 28px; border-top-color: var(--journal-rule); }
.steps article { gap: 18px; padding-block: 18px; border-bottom-color: var(--journal-rule); }
.steps b { padding-top: 2px; color: var(--journal-accent); }
.steps h3 { font-size: 13px; line-height: 1.45; letter-spacing: .1em; }
.steps p { color: var(--journal-text); font-size: 14px; line-height: 1.65; }

@media (hover: hover) {
  .meme-grid figure:hover { transform: translateY(-4px); border-color: rgba(128, 223, 255, .42); box-shadow: 0 18px 36px rgba(0, 0, 0, .24); }
}

@media (min-width: 640px) and (max-width: 800px) {
  .meme-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
  .meme-grid figcaption { padding: 14px 12px; gap: 8px; font-size: 9px; min-height: 86px; }
}

@media (max-width: 900px) {
  :root { --journal-space: 68px; }
  .hero { flex-direction: column; align-items: stretch; justify-content: flex-start; min-height: 0; padding: calc(var(--header-offset) + 20px) 0 80px; }
  .hero-copy { order: 1; padding-top: 0; }
  .hero .character-message { position: relative; order: 2; align-self: flex-end; right: auto; bottom: auto; width: min(245px, calc(100% - 40px)); margin: 20px 20px 0 auto; padding: 12px 14px; }
  .hero h1 { font-size: clamp(42px, 11vw, 76px); max-width: 100%; }
  html[lang="ru"] .hero h1 { font-size: clamp(36px, 10.1vw, 64px); }
  html[lang^="zh"] .hero h1 { font-size: clamp(42px, 11vw, 68px); }
  .hero .intro { max-width: 560px; }
  .lore-grid,
  .mission-grid { gap: 32px; }
  .radar-head { gap: 24px; }
}

@media (max-width: 800px) {
  .lore h2,
  .radar h2,
  .mission h2 { font-size: clamp(30px, 7.6vw, 46px); }
  .story { padding-left: 20px; }
  .mission-grid .mascot-card { width: min(78%, 300px); }
}

@media (max-width: 540px) {
  :root { --journal-space: 54px; }
  .section-label { margin-bottom: 24px; gap: 10px; font-size: 9px; letter-spacing: .13em; }
  .lore h2,
  .radar h2,
  .mission h2 { font-size: clamp(29px, 8vw, 40px); }
  html[lang="ru"] .lore h2,
  html[lang="ru"] .radar h2,
  html[lang="ru"] .mission h2 { font-size: clamp(27px, 7.7vw, 36px); }
  .story { font-size: 15px; line-height: 1.7; }
  .signal { padding: 16px; gap: 10px; }
  .signal strong { font-size: 14px; }
  .meme-grid { gap: 20px; }
  .meme-grid figcaption { min-height: 64px; padding: 16px; }
  .radar-copy { font-size: 15px; }
  .radar-head { margin-bottom: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  .meme-grid figure { transition: none; }
  .meme-grid figure:hover { transform: none; }
}

@media (forced-colors: active) {
  .hero h1 span,
  .lore h2 span,
  .radar h2 span,
  .mission h2 span { color: CanvasText; }
  .section-label::before { border-color: CanvasText; }
}
