/* NornAI: лендинг. Фосфорный терминал снаружи, тёплый реактор внутри. */

@font-face {
  font-family: "Fixedsys";
  src: url("assets/fonts/fixedsys.woff2") format("woff2");
  font-display: swap;
}
@font-face {
  font-family: "Cozette";
  src: url("assets/fonts/cozette.woff2") format("woff2");
  font-display: swap;
}

:root {
  --hull: #06120a;       /* фон, тот же, что у терминала */
  --deck: #0a1d11;       /* панели */
  --line: #1d5433;       /* рамки */
  --phosphor: #46ff8c;   /* заголовки, шкалы */
  --phosphor-dim: #7fd89f;
  --text: #d5eedc;       /* длинный текст */
  --muted: #9cc8aa;
  --reactor: #ffb85c;    /* тепло: кнопки, реплики Капитана */
  --paper: #f3f5f4;      /* секция без игры */
  --ink: #15191a;

  --pixel: "Fixedsys", "Cozette", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --mono: "Cozette", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --gutter: 16px;
  --radius: 6px;
}

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

html { -webkit-text-size-adjust: 100%; scroll-padding-top: 5rem; }

body {
  margin: 0;
  background: var(--hull);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1.125rem;
  line-height: 1.6;
  overflow-x: hidden;
}

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

a { color: var(--phosphor); text-underline-offset: .2em; }
a:hover { color: #9dffc0; }

:focus-visible {
  outline: 3px solid var(--reactor);
  outline-offset: 3px;
  border-radius: 2px;
}

.skip {
  position: absolute;
  left: var(--gutter);
  top: -4rem;
  z-index: 100;
  padding: .6rem 1rem;
  background: var(--reactor);
  color: var(--hull);
  font-weight: 700;
}
.skip:focus { top: .75rem; }

.wrap {
  width: 100%;
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 var(--gutter);
}
/* Узкая колонка текста, но по той же левой кромке, что и остальные секции. */
.narrow > * { max-width: 44rem; }

h1, h2, h3 {
  font-family: var(--pixel);
  font-weight: 400;
  color: var(--phosphor);
  line-height: 1.2;
  margin: 0 0 1rem;
  text-shadow: 0 0 12px rgba(70, 255, 140, .35);
  text-wrap: balance;
}
h1 { font-size: 2rem; line-height: 1.1; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }

p { margin: 0 0 1rem; max-width: 65ch; }
.nowrap { white-space: nowrap; }

/* ---------- шапка ---------- */

.top {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(6, 18, 10, .92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(6px);
}
.top__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 3.5rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-family: var(--pixel);
  font-size: 1.25rem;
  color: var(--phosphor);
  text-decoration: none;
}
.brand__cat { width: 32px; height: 32px; image-rendering: pixelated; }
.top__cta {
  font-family: var(--mono);
  font-size: .95rem;
  color: var(--reactor);
  padding: .5rem .75rem;
  border: 1px solid rgba(255, 184, 92, .5);
  border-radius: var(--radius);
  text-decoration: none;
  white-space: nowrap;
}
.top__cta:hover { color: var(--hull); background: var(--reactor); }

/* ---------- кнопка ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.25rem;
  padding: .75rem 1.5rem;
  font-family: var(--pixel);
  font-size: 1.25rem;
  color: var(--hull);
  background: var(--reactor);
  border-radius: var(--radius);
  text-decoration: none;
  box-shadow: 0 0 0 1px #ffd49a inset, 0 0 28px rgba(255, 184, 92, .35);
  transition: box-shadow .2s ease, transform .2s ease;
}
.btn:hover {
  color: var(--hull);
  box-shadow: 0 0 0 1px #ffe2bb inset, 0 0 40px rgba(255, 184, 92, .55);
  transform: translateY(-1px);
}

/* ---------- первый экран ---------- */

.hero {
  position: relative;
  padding: 2.5rem 0 3.5rem;
  background:
    radial-gradient(60rem 30rem at 85% 110%, rgba(255, 184, 92, .10), transparent 60%),
    radial-gradient(50rem 30rem at 10% -10%, rgba(70, 255, 140, .07), transparent 60%);
}
/* Строки развёртки только на первом экране: дальше длинный текст, ему нужна чистота. */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(to bottom, transparent 0 2px, rgba(0, 0, 0, .18) 2px 3px);
}
.hero__grid { position: relative; z-index: 1; display: grid; gap: 2.5rem; align-items: center; }
.badge {
  display: inline-block;
  margin-bottom: 1.25rem;
  padding: .25rem .6rem;
  font-family: var(--mono);
  font-size: .95rem;
  color: var(--reactor);
  border: 1px dashed rgba(255, 184, 92, .6);
  border-radius: var(--radius);
}
.lead { font-size: 1.2rem; color: var(--text); }
.cta-row { margin-top: 1.75rem; }
.cta-note {
  margin: .9rem 0 0;
  font-size: .95rem;
  color: var(--muted);
}

/* ---------- ЭЛТ-монитор ---------- */

.crt { margin: 0; }
.crt__glass {
  position: relative;
  padding: 10px;
  background: #0d1a12;
  border: 1px solid #2a4a36;
  border-radius: 18px;
  box-shadow:
    0 0 0 6px #0b150f,
    0 0 0 7px #213b2b,
    0 24px 60px rgba(0, 0, 0, .55),
    0 0 60px rgba(70, 255, 140, .12);
}
.crt__glass img { border-radius: 10px; }
.crt__glass::after {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 10px;
  pointer-events: none;
  background: radial-gradient(ellipse at 50% 40%, transparent 55%, rgba(0, 0, 0, .35) 100%);
}
.crt figcaption {
  margin-top: .9rem;
  font-family: var(--mono);
  font-size: .9rem;
  color: var(--muted);
}
.hero__crt .crt__glass {
  box-shadow:
    0 0 0 6px #0b150f,
    0 0 0 7px #213b2b,
    0 30px 80px rgba(0, 0, 0, .6),
    0 40px 90px -30px rgba(255, 184, 92, .35),
    0 0 70px rgba(70, 255, 140, .15);
}

/* Одно движение на странице: монитор включается. */
@media (prefers-reduced-motion: no-preference) {
  .hero__crt img { animation: power-on .7s cubic-bezier(.2, .7, .2, 1) .15s both; }
}
@keyframes power-on {
  0% { transform: scale(1, .004); filter: brightness(3); opacity: .2; }
  45% { transform: scale(1, .004); filter: brightness(3); opacity: 1; }
  100% { transform: none; filter: none; opacity: 1; }
}

/* ---------- секции ---------- */

.section { padding: 4rem 0; border-top: 1px solid var(--line); }

.big {
  font-size: 1.35rem;
  line-height: 1.5;
  color: #eafaf0;
}
.captain {
  margin: 2rem 0 0;
  padding: 1.25rem 1.5rem;
  border-left: 4px solid var(--reactor);
  background: linear-gradient(90deg, rgba(255, 184, 92, .10), rgba(255, 184, 92, 0));
  border-radius: 0 var(--radius) var(--radius) 0;
}
.captain p {
  margin: 0;
  font-family: var(--mono);
  font-size: 1.15rem;
  line-height: 1.55;
  color: #ffd9a6;
}

/* Судовой журнал: четыре шага дня. */
.log {
  list-style: none;
  margin: 2rem 0 0;
  padding: 0;
  position: relative;
}
.log::before {
  content: "";
  position: absolute;
  left: 7px;
  top: .5rem;
  bottom: .5rem;
  width: 2px;
  background: linear-gradient(var(--phosphor), var(--line));
}
.log__item {
  position: relative;
  padding: 0 0 2rem 2.25rem;
}
.log__item p { margin: 0; }
.day__grid { display: grid; gap: 2.5rem; }
.log__item:last-child { padding-bottom: 0; }
.log__item::before {
  content: "";
  position: absolute;
  left: 0;
  top: .35rem;
  width: 16px;
  height: 16px;
  background: var(--hull);
  border: 2px solid var(--phosphor);
  box-shadow: 0 0 10px rgba(70, 255, 140, .5);
}
.log__item h3 { display: flex; flex-wrap: wrap; align-items: baseline; gap: .75rem; }
.log__time {
  font-family: var(--mono);
  font-size: 1rem;
  color: var(--muted);
  text-shadow: none;
}
.crt--small { max-width: 30rem; }

/* Иерархия заботы: верхний уровень узкий, нижний широкий. */
.levels {
  list-style: none;
  margin: 1.75rem 0;
  padding: 0;
  display: grid;
  gap: 6px;
  justify-items: center;
}
.levels li {
  width: 100%;
  padding: .7rem 1rem;
  border: 1px solid var(--line);
  background: var(--deck);
  border-radius: 4px;
  text-align: center;
}
.levels li:nth-child(1) { width: 70%; }
.levels li:nth-child(2) { width: 80%; }
.levels li:nth-child(3) { width: 90%; }
.levels li:nth-child(4) { border-color: var(--phosphor); }
.levels strong {
  display: block;
  font-family: var(--pixel);
  font-weight: 400;
  font-size: 1.2rem;
  color: var(--phosphor);
}
.levels span { display: block; font-size: .95rem; color: var(--muted); line-height: 1.4; }

.growth__grid, .gentle__grid { display: grid; gap: 2.5rem; align-items: start; }
.growth__side { display: grid; gap: 2rem; }
/* На телефоне сначала заголовок и правила, потом экран. */
.gentle__shot { order: 2; }
.note {
  padding: 1.25rem 1.5rem;
  background: var(--deck);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.note h3 { font-size: 1.25rem; }
.note p { margin: 0; color: var(--text); }

.rules { margin: 1.5rem 0 0; }
.rules > div { padding: 1rem 0; border-top: 1px dashed var(--line); }
.rules > div:first-child { border-top: 0; padding-top: 0; }
.rules dt {
  font-family: var(--pixel);
  font-size: 1.2rem;
  color: var(--phosphor);
  margin-bottom: .35rem;
}
.rules dd { margin: 0; max-width: 60ch; }

/* Секция без игры: терминал выключен, говорим прямо. */
.plain {
  background: var(--paper);
  color: var(--ink);
  border-top: 0;
}
.plain h2 {
  font-family: var(--sans);
  font-weight: 700;
  color: var(--ink);
  text-shadow: none;
  letter-spacing: -.01em;
}
.plain a { color: #0b5a2b; }
.plain__strong { font-weight: 600; }
.plain :focus-visible { outline-color: var(--ink); }

.facts { margin: 1.5rem 0 0; padding: 0; list-style: none; }
.facts li {
  position: relative;
  padding: .85rem 0 .85rem 1.75rem;
  border-top: 1px dashed var(--line);
  max-width: 65ch;
}
.facts li:first-child { border-top: 0; }
.facts li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1.35rem;
  width: 10px;
  height: 10px;
  background: var(--phosphor);
}

.faq details { border-top: 1px solid var(--line); }
.faq details:last-of-type { border-bottom: 1px solid var(--line); }
.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 1.1rem 2.25rem 1.1rem 0;
  position: relative;
  font-weight: 600;
  color: #eafaf0;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  position: absolute;
  right: .25rem;
  top: .85rem;
  font-family: var(--pixel);
  font-size: 1.5rem;
  color: var(--phosphor);
}
.faq details[open] summary::after { content: "−"; }
.faq summary:hover { color: var(--phosphor); }
.faq details p { color: var(--text); padding-bottom: .5rem; }

.final {
  background: radial-gradient(40rem 24rem at 20% 50%, rgba(255, 184, 92, .10), transparent 70%);
}
.final__row { display: grid; gap: 1.5rem; align-items: center; }
.final__pets { display: flex; gap: .5rem; }
.final__cat {
  width: 128px;
  height: 128px;
  image-rendering: pixelated;
  filter: drop-shadow(0 0 14px rgba(70, 255, 140, .45));
}

.foot {
  padding: 2.5rem 0 3rem;
  border-top: 1px solid var(--line);
  font-size: .95rem;
  color: var(--muted);
}
.foot__row p { margin: 0 0 .6rem; }
.foot a { color: var(--phosphor-dim); }

/* ---------- широкие экраны ---------- */

@media (min-width: 40rem) {
  :root { --gutter: 24px; }
  h1 { font-size: 2.5rem; }
  .final__row { grid-template-columns: auto 1fr; gap: 2.5rem; }
}

@media (min-width: 60rem) {
  :root { --gutter: 32px; }
  .hero { padding: 4.5rem 0 5.5rem; }
  .hero__grid { grid-template-columns: minmax(0, 1fr) 560px; gap: 3.5rem; }
  h1 { font-size: 3rem; }
  .section { padding: 5.5rem 0; }
  .day__grid { grid-template-columns: minmax(0, 1fr) 460px; gap: 4rem; align-items: start; }
  .day__shot { position: sticky; top: 6rem; }
  .log__item { padding-left: 3rem; }
  .growth__grid { grid-template-columns: minmax(0, 1fr) 460px; gap: 4rem; }
  .gentle__grid { grid-template-columns: 460px minmax(0, 1fr); gap: 4rem; }
  .gentle__shot { order: 0; }
}

/* ---------- 404 ---------- */

.lost { min-height: 100vh; display: flex; align-items: center; }
.lost__row { position: relative; z-index: 1; display: grid; gap: 2rem; align-items: center; }
.lost__cat {
  width: 160px;
  height: 160px;
  image-rendering: pixelated;
  filter: drop-shadow(0 0 14px rgba(70, 255, 140, .45));
}
@media (min-width: 40rem) {
  .lost__row { grid-template-columns: auto 1fr; gap: 3rem; }
  .lost__cat { width: 256px; height: 256px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

@media (forced-colors: active) {
  .hero::after { display: none; }
  .btn, .top__cta { border: 2px solid ButtonText; }
}

@media print {
  .hero::after, .top, .skip { display: none; }
  body { background: #fff; color: #000; }
}
