/* media.publo.app — тёмная типографская сетка. Тот же набор шрифтов, что
   у остальных проектов publo: Archivo для текста, Geist Mono для цифр. */

:root {
  --paper: #0d0d0c;
  --card: #151513;
  --ink: #f3efe9;
  --muted: #8d8880;
  --red: #f2261c;
  --blue: #6d86ff;
  --line: rgba(243, 239, 233, 0.16);
  --line-strong: rgba(243, 239, 233, 0.42);
  --on-red: #fff4f2;
  --sans: "Archivo", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --gutter: clamp(16px, 3vw, 40px);
  --head: 64px;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --paper: #f3efe9;
    --card: #ffffff;
    --ink: #111110;
    --muted: #77716a;
    --blue: #1b44f5;
    --line: rgba(17, 17, 16, 0.18);
    --line-strong: rgba(17, 17, 16, 0.6);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 500;
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
a:hover { color: var(--red); }
button, input, textarea, select { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
img { display: block; max-width: 100%; }
h1, h2, h3, p { margin: 0; }

.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.muted { color: var(--muted); }

/* ───────────────── шапка ───────────────── */
.top {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: clamp(12px, 2vw, 28px);
  height: var(--head);
  padding: 0 var(--gutter);
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand {
  font-weight: 900; font-size: 20px; letter-spacing: -0.045em;
  display: flex; align-items: baseline; gap: 4px; flex: none;
}
.brand i { width: 8px; height: 8px; background: var(--red); border-radius: 50%; display: block; }
.top form { flex: 1; display: flex; align-items: center; gap: 10px; min-width: 0; }
.top input {
  flex: 1; min-width: 0;
  background: none; border: 0;
  border-bottom: 1px solid var(--line);
  padding: 8px 2px; font-size: 16px;
}
.top input::placeholder { color: var(--muted); }
.top input:focus { border-bottom-color: var(--red); outline: none; }
.top nav { display: flex; gap: 16px; align-items: center; flex: none; }
.top nav a, .top nav button { font-size: 13px; color: var(--muted); }
.top nav a:hover, .top nav button:hover, .top nav a.on { color: var(--ink); }
.top nav a.on { border-bottom: 2px solid var(--red); }
@media (max-width: 640px) {
  .top { height: auto; flex-wrap: wrap; padding: 10px var(--gutter); }
  .top form { order: 3; width: 100%; }
}

main { padding: var(--gutter); max-width: 1240px; margin: 0 auto; }

/* ───────────────── начальный экран ───────────────── */
.hero { padding: clamp(30px, 9vh, 90px) 0 40px; max-width: 900px; }
.hero h1 {
  font-weight: 900; letter-spacing: -0.05em; line-height: 0.92;
  font-size: clamp(40px, 8.4vw, 104px);
}
.hero h1 em { font-style: normal; color: var(--red); }
.hero p { margin-top: 22px; max-width: 620px; font-size: 17px; color: var(--muted); }
.hero form { margin-top: 34px; display: flex; gap: 12px; align-items: center; max-width: 720px; }
.hero input {
  flex: 1; background: none; border: 0; border-bottom: 2px solid var(--line-strong);
  font-size: clamp(20px, 3vw, 30px); font-weight: 600; letter-spacing: -0.02em;
  padding: 10px 2px;
}
.hero input:focus { border-bottom-color: var(--red); outline: none; }
.hero .go {
  flex: none; background: var(--red); color: var(--on-red);
  padding: 12px 22px; font-weight: 600; font-size: 15px;
}
.hint { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 8px; }
.hint button {
  border: 1px solid var(--line); padding: 5px 11px; border-radius: 999px;
  font-size: 13px; color: var(--muted);
}
.hint button:hover { border-color: var(--red); color: var(--ink); }

/* ───────────────── сетка карточек ───────────────── */
.group { margin: 40px 0; }
.group > header {
  display: flex; align-items: baseline; gap: 12px;
  padding-bottom: 10px; margin-bottom: 18px; border-bottom: 1px solid var(--line);
}
.group h2 { font-weight: 900; font-size: 22px; letter-spacing: -0.03em; }
.grid {
  display: grid; gap: clamp(14px, 2vw, 26px);
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
}
.card { display: block; position: relative; }
.card .art {
  position: relative; aspect-ratio: 2 / 3; overflow: hidden;
  background: var(--card); border: 1px solid var(--line);
}
.card .art img { width: 100%; height: 100%; object-fit: cover; }
.card:hover .art { border-color: var(--red); }
.card .art .no {
  position: absolute; inset: 0; display: grid; place-items: center;
  padding: 12px; text-align: center; font-size: 12px; color: var(--muted);
}
.card h3 {
  margin-top: 10px; font-size: 15px; font-weight: 600; letter-spacing: -0.015em;
  line-height: 1.2;
}
.card .sub { font-size: 12.5px; color: var(--muted); line-height: 1.25; margin-top: 2px; }
.card .row { margin-top: 6px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.badge {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.02em;
  border: 1px solid var(--line); padding: 2px 6px; color: var(--muted);
}
.badge.score { color: var(--ink); border-color: var(--line-strong); }
.badge.mine { background: var(--red); color: var(--on-red); border-color: var(--red); }
.corner {
  position: absolute; top: 0; right: 0; z-index: 2;
  background: var(--red); color: var(--on-red);
  font-family: var(--mono); font-size: 12px; padding: 3px 7px;
}

/* ───────────────── карточка тайтла ───────────────── */
.title-page { display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: clamp(20px, 3.4vw, 48px); }
@media (max-width: 860px) { .title-page { grid-template-columns: 1fr; } }
.side { display: flex; flex-direction: column; gap: 22px; }
.side .poster { border: 1px solid var(--line); background: var(--card); aspect-ratio: 2/3; }
.side .poster img { width: 100%; height: 100%; object-fit: cover; }

.head h1 { font-weight: 900; font-size: clamp(28px, 4.6vw, 52px); letter-spacing: -0.045em; line-height: 0.98; }
.head .alt { margin-top: 8px; font-size: 17px; color: var(--muted); }
.head .facts { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 8px; }
.desc { margin-top: 24px; max-width: 68ch; white-space: pre-wrap; }

section.block { margin-top: 40px; }
section.block > h2 {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--muted); padding-bottom: 8px; border-bottom: 1px solid var(--line); margin-bottom: 16px;
}

/* метаоценка */
.meta-box { display: flex; align-items: flex-start; gap: 18px; }
.meta-num {
  font-family: var(--mono); font-weight: 500; font-size: 72px; line-height: 0.86;
  letter-spacing: -0.05em;
}
.meta-box .of { font-size: 13px; color: var(--muted); margin-top: 6px; }
.ratings { display: flex; flex-direction: column; gap: 10px; }
.rating { display: grid; grid-template-columns: 132px 1fr 62px; gap: 12px; align-items: center; }
.rating .bar { height: 6px; background: var(--line); position: relative; }
.rating .bar i { position: absolute; inset: 0 auto 0 0; background: var(--ink); }
.rating .bar i.meta { background: var(--red); }
.rating .val { font-family: var(--mono); font-size: 13px; text-align: right; }
.rating .who { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rating .who small { color: var(--muted); display: block; font-size: 11px; }

/* мой вердикт */
.verdict { border-left: 3px solid var(--red); padding: 4px 0 4px 18px; }
.verdict .score { font-family: var(--mono); font-size: 46px; line-height: 1; letter-spacing: -0.04em; }
.verdict .score small { font-size: 15px; color: var(--muted); letter-spacing: 0; }
.verdict p { margin-top: 10px; white-space: pre-wrap; max-width: 66ch; }
.verdict .none { color: var(--muted); }
.scorer { display: flex; flex-wrap: wrap; gap: 4px; margin: 10px 0; }
.scorer button {
  width: 34px; height: 34px; border: 1px solid var(--line);
  font-family: var(--mono); font-size: 13px;
}
.scorer button:hover { border-color: var(--line-strong); }
.scorer button.on { background: var(--red); border-color: var(--red); color: var(--on-red); }
.states { display: flex; flex-wrap: wrap; gap: 6px; }
.states button { border: 1px solid var(--line); padding: 6px 12px; font-size: 13px; }
.states button.on { background: var(--ink); color: var(--paper); border-color: var(--ink); }
textarea {
  width: 100%; min-height: 120px; resize: vertical;
  background: var(--card); border: 1px solid var(--line); padding: 12px; line-height: 1.5;
}
textarea:focus { border-color: var(--line-strong); outline: none; }
.btn {
  border: 1px solid var(--line-strong); padding: 9px 18px; font-size: 14px; font-weight: 600;
}
.btn:hover { border-color: var(--red); color: var(--red); }
.btn.solid { background: var(--red); border-color: var(--red); color: var(--on-red); }
.btn.solid:hover { color: var(--on-red); filter: brightness(1.1); }
.btn[disabled] { opacity: 0.45; cursor: default; }

/* ссылки «где смотреть» */
.links { display: flex; flex-direction: column; }
.links a {
  display: flex; justify-content: space-between; align-items: baseline; gap: 10px;
  padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14px;
}
.links a span:last-child { font-family: var(--mono); font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.links a:hover span:last-child { color: var(--red); }

/* отзывы */
.reviews { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.review { border: 1px solid var(--line); padding: 14px 16px; background: var(--card); }
.review header { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; margin-bottom: 8px; }
.review .who { font-weight: 600; font-size: 14px; }
.review .src { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.review p { font-size: 14px; color: var(--ink); white-space: pre-wrap; }
.review .n { font-family: var(--mono); color: var(--muted); font-size: 13px; }
.form-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 10px; }
.form-row input[type="text"], .form-row input[type="number"] {
  background: var(--card); border: 1px solid var(--line); padding: 9px 12px;
}
.form-row input[type="text"] { min-width: 180px; }
.form-row input[type="number"] { width: 90px; }

/* каталог */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.filters button { border: 1px solid var(--line); padding: 7px 14px; font-size: 13px; }
.filters button.on { background: var(--ink); color: var(--paper); border-color: var(--ink); }

.note { color: var(--muted); font-size: 14px; max-width: 70ch; }
.spin { display: inline-block; width: 12px; height: 12px; border: 2px solid var(--line-strong); border-top-color: transparent; border-radius: 50%; animation: sp 0.7s linear infinite; vertical-align: -1px; }
@keyframes sp { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spin { animation: none; } }
.err { border-left: 3px solid var(--red); padding-left: 14px; color: var(--muted); }
footer.bot { border-top: 1px solid var(--line); margin-top: 70px; padding: 22px var(--gutter) 50px; color: var(--muted); font-size: 13px; }
footer.bot p { max-width: 74ch; }
