/* Палитра и размеры. Базовая тема тёмная, светлая переопределяет переменные. */
@font-face {
  font-family: Manrope;
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("../fonts/manrope-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: Manrope;
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("../fonts/manrope-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;
}

:root {
  color-scheme: dark;
  --background: #10110e;
  --surface: #171914;
  --field: #11130f;
  --text: #f3f3e9;
  --muted: #b4b7a6;
  --line: #34372a;
  --accent: #e4eb78;
  --accent-fill: #e4eb78;
  --accent-hover: #f1f8a0;
  --accent-ink: #191c10;
  --tint: #222617;
  --font: Manrope, system-ui, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", "Liberation Mono", monospace;
  --gutter: clamp(1rem, 5.35vw, 5rem);
  --measure: 80rem;
  --radius: 0.75rem;
  --ease: 180ms ease;
}

:root[data-theme="light"] {
  color-scheme: light;
  --background: #f6f6ed;
  --surface: #fffef8;
  --field: #f8f9ef;
  --text: #202317;
  --muted: #515546;
  --line: #d6d9c9;
  --accent: #555f12;
  --accent-fill: #e0e977;
  --accent-hover: #edf4a4;
  --tint: #eeefd9;
}

/* Базовые стили и общие элементы трёх страниц. */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 1.5rem;
}

body {
  min-height: 100vh;
  margin: 0;
  display: flex;
  flex-direction: column;
  background: var(--background);
  color: var(--text);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.65;
}

main { flex: 1; }
p, h1, h2, h3, figure { margin: 0; }

h1, h2, h3 {
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.04em;
}

h1 em {
  color: var(--accent);
  font-style: normal;
}

a { color: var(--accent); text-underline-offset: 0.21em; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: 0.55; }
picture { display: block; }
img { display: block; max-width: 100%; height: auto; }
[hidden] { display: none !important; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.container {
  width: min(var(--measure), calc(100% - var(--gutter) - var(--gutter)));
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  z-index: 5;
  inset: 0.75rem auto auto 0.75rem;
  padding: 0.65rem 1rem;
  transform: translateY(-160%);
  background: var(--surface);
}

.skip-link:focus { transform: translateY(0); }

.site-header { border-bottom: 1px solid var(--line); }

.header-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0.65rem 1rem;
  padding-block: 1rem;
  min-height: 4.75rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  gap: 0.75rem;
  color: var(--text);
  font-weight: 800;
  line-height: 1.15;
  text-decoration: none;
}

.brand small {
  display: block;
  margin-top: 0.27rem;
  color: var(--muted);
  font: 0.75rem/1 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.brand-mark {
  width: 2.35rem;
  height: 2.35rem;
  flex: none;
  border-radius: 0.45rem;
  background: url("../img/poison-mark-opt.png") center / contain no-repeat;
}

.site-nav {
  display: flex;
  justify-content: center;
  gap: clamp(0.4rem, 1.2vw, 1.25rem);
}

.site-nav a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0.38rem 0.7rem;
  border-radius: 0.35rem;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  transition: color var(--ease), background-color var(--ease);
}

.site-nav a:hover { color: var(--text); }

.site-nav a[aria-current="page"] {
  color: var(--accent);
  background: var(--tint);
}

.theme-button {
  display: grid;
  place-items: center;
  justify-self: end;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  background: var(--surface);
  color: var(--text);
  font: 1.4rem/1 system-ui, sans-serif;
  transition: color var(--ease), border-color var(--ease);
}

.theme-button:hover { color: var(--accent); border-color: var(--accent); }

.button {
  display: inline-flex;
  min-height: 3.1rem;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1.25rem;
  border: 1px solid transparent;
  border-radius: 0.4rem;
  font-size: 0.94rem;
  font-weight: 800;
  text-decoration: none;
  transition: background-color var(--ease), transform var(--ease);
}

.button-primary { background: var(--accent-fill); color: var(--accent-ink); }
.button-primary:hover:enabled, a.button-primary:hover { background: var(--accent-hover); }
.button:active { transform: translateY(1px); }

.site-footer {
  margin-top: clamp(3.5rem, 8vw, 7rem);
  border-top: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.25rem 2rem;
  padding-block: clamp(1.5rem, 4vw, 2.75rem);
}

.footer-brand { font-size: clamp(1.05rem, 1.7vw, 1.3rem); }
.footer-note { margin-top: 0.65rem; font-size: 0.9rem; }

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.footer-nav .button {
  min-height: 2.75rem;
  border-color: var(--line);
  background: var(--background);
  color: var(--text);
  font-size: 0.9rem;
}

.footer-nav .button:hover,
.footer-nav .button[aria-current="page"] {
  border-color: var(--accent);
  background: var(--tint);
  color: var(--accent);
}

.footer-copyright {
  padding-block: 0.9rem;
  border-top: 1px solid var(--line);
  font-size: 0.88rem;
}

/* Баннеры главной и правовой страниц. */
.home-main, .legal-main { padding-top: clamp(1rem, 2.25vw, 2rem); }

.hero {
  position: relative;
  isolation: isolate;
  display: grid;
  align-items: center;
  min-height: clamp(29rem, 40vw, 35rem);
  overflow: hidden;
  border: 1px solid #353927;
  border-radius: var(--radius);
  background: #14150e;
  color: #f4f5eb;
  --accent: #e4eb78;
}

.hero-image, .hero-image::after {
  position: absolute;
  inset: 0;
}

.hero-image { z-index: -1; }

.hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.legal-main .hero-image img { object-position: right center; }

.hero-image::after {
  content: "";
  background: linear-gradient(90deg, #14150ef5 0%, #14150ed9 31%, #14150e40 58%, transparent 76%);
}

.hero-content {
  width: fit-content;
  padding: clamp(2rem, 4.65vw, 4.6rem);
}

.hero-label {
  display: inline-flex;
  align-items: center;
  gap: 0.48rem;
  margin-bottom: clamp(1.15rem, 2vw, 1.9rem);
  padding: 0.34rem 0.63rem;
  border: 1px solid #575c31;
  border-radius: 0.25rem;
  background: #242815;
  color: #e4eb78;
  font: 0.78rem/1.4 var(--mono);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.warning-mark {
  width: 1rem;
  height: 1rem;
  display: grid;
  place-items: center;
  align-items: end;
  padding-bottom: 0.03rem;
  background: #e4eb78;
  color: #222617;
  clip-path: polygon(50% 5%, 100% 95%, 0 95%);
  font: 800 0.75rem/1 var(--font);
}

.hero h1 {
  font-size: clamp(3rem, 5.7vw, 5.5rem);
  letter-spacing: -0.065em;
  line-height: 1.02;
}

.hero-summary {
  max-width: 28rem;
  margin-top: 1.4rem;
  color: #c7c9b7;
  font-size: clamp(1rem, 1.35vw, 1.17rem);
}

.hero .button { margin-top: 1.8rem; }

.warning-feature {
  margin-top: clamp(1.25rem, 3.1vw, 2.6rem);
  padding: clamp(1.2rem, 3.5vw, 3.25rem);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.warning-feature h2 {
  margin-bottom: clamp(1.4rem, 2.6vw, 2rem);
  font-size: clamp(1.85rem, 3.6vw, 3.15rem);
}

.warning-feature h2 em {
  color: var(--accent);
  font-style: normal;
}

.warning-feature h3 {
  color: var(--text);
  font-size: clamp(1.1rem, 1.55vw, 1.3rem);
}

.warning-feature h3 + p { margin-top: 0.55rem; }

.warning-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1.35rem, 3.5vw, 3rem);
}

.overview { margin-top: clamp(2.6rem, 4.7vw, 4.5rem); }

.section-heading {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.3vw, 2rem);
  margin-bottom: 1.35rem;
}

.section-heading::after {
  content: "";
  flex: 1;
  border-top: 1px solid var(--line);
}

.section-heading h2 { font-size: clamp(1.85rem, 3.1vw, 2.65rem); }

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(0.75rem, 1.55vw, 1.35rem);
}

.topic-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  transition: border-color var(--ease);
}

.topic-card:hover, .topic-card:focus-within { border-color: var(--accent); }

.topic-link {
  display: block;
  height: 100%;
  border-radius: inherit;
  color: var(--text);
  text-decoration: none;
}

.topic-image {
  overflow: hidden;
  aspect-ratio: 2.05;
  border-radius: calc(var(--radius) - 1px) calc(var(--radius) - 1px) 0 0;
  border-bottom: 1px solid var(--line);
  background: #242617;
}

.topic-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 280ms ease;
}

.topic-card:hover img, .topic-link:focus-visible img { transform: scale(1.045); }

.topic-copy { padding: clamp(1rem, 2vw, 1.45rem); }
.topic-copy h3 { font-size: clamp(1.22rem, 1.7vw, 1.55rem); }
.topic-copy p { margin-top: 0.5rem; color: var(--muted); }

/* Статьи, правовая информация и выделенные сообщения. */
.reading { margin-top: clamp(3rem, 6vw, 6rem); }

.reading-section {
  display: grid;
  grid-template-columns: minmax(13rem, 0.85fr) minmax(0, 1.65fr);
  gap: 1rem clamp(2rem, 6vw, 6rem);
  padding-block: clamp(1.35rem, 3vw, 2.7rem);
  border-top: 1px solid var(--line);
}

.reading-section h2 { font-size: clamp(1.55rem, 2.55vw, 2.3rem); }

.reading-copy {
  max-width: 47rem;
  color: var(--muted);
}

.reading-copy > * + * { margin-top: 1rem; }
.reading-copy ul { padding-inline-start: 1.3rem; }
.reading-copy li + li { margin-top: 0.45rem; }
.reading-copy li::marker { color: var(--accent); }

.callout {
  padding: 1.1rem 1.25rem;
  border-inline-start: 3px solid var(--accent);
  border-radius: 0 0.4rem 0.4rem 0;
  background: var(--tint);
}

.callout strong { color: var(--text); }
.callout p { margin-top: 0.4rem; }
.source-line { font-size: 0.88rem; }

.page-intro { padding-block: clamp(2.2rem, 6vw, 5.15rem) clamp(1.75rem, 4vw, 3.35rem); }

.page-intro h1 {
  max-width: 75rem;
  font-size: clamp(2.7rem, 5.45vw, 5.1rem);
  letter-spacing: -0.06em;
  line-height: 1.06;
}

.page-intro p {
  max-width: 38rem;
  margin-top: 1.25rem;
  color: var(--muted);
  font-size: clamp(1rem, 1.55vw, 1.2rem);
}

.legal-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(0.8rem, 1.6vw, 1.25rem);
  margin: clamp(1.25rem, 3.2vw, 2.6rem) 0 0;
  padding: 0;
  list-style: none;
  counter-reset: legal-item;
}

.legal-list > li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: clamp(0.7rem, 1.4vw, 1.15rem);
  padding: clamp(1rem, 2.2vw, 1.7rem);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.legal-list > li::before {
  counter-increment: legal-item;
  content: counter(legal-item, decimal-leading-zero) / "";
  display: grid;
  place-items: center;
  min-width: 2.35rem;
  min-height: 2.35rem;
  border: 1px solid var(--line);
  border-radius: 0.35rem;
  background: var(--tint);
  color: var(--accent);
  font: 700 0.88rem/1 var(--mono);
}

/* Контакты и форма. */
.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(0, 1fr);
  align-items: start;
  gap: clamp(1rem, 2vw, 1.5rem);
}

.form-panel, .contact-panel {
  padding: clamp(1.2rem, 3.3vw, 2rem);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.contact-panel { border-top: 2px solid var(--accent); }
.form-panel h2, .contact-panel h2 { font-size: clamp(1.45rem, 2.4vw, 2rem); }
.muted { margin-top: 0.5rem; color: var(--muted); }

form {
  display: grid;
  gap: 1.05rem;
  margin-top: 1.45rem;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.05rem;
}

.field {
  display: grid;
  gap: 0.35rem;
}

.field label { font-size: 0.94rem; font-weight: 750; }

.field input, .field textarea {
  width: 100%;
  min-width: 0;
  min-height: 3rem;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 0.35rem;
  color: var(--text);
  background: var(--field);
  transition: border-color var(--ease);
}

.field input:focus, .field textarea:focus { border-color: var(--accent); }
.field textarea { resize: vertical; }
form .button { justify-self: start; }

.form-status {
  color: var(--accent);
  font-weight: 700;
}

.form-status:empty { margin-top: -1.05rem; }

.contact-panel address {
  display: grid;
  margin-top: 1.5rem;
  font-style: normal;
  overflow-wrap: anywhere;
}

.contact-label {
  margin-top: 1.05rem;
  color: var(--muted);
  font-size: 0.88rem;
}

.contact-label:first-child { margin-top: 0; }

/* Комментарии на главной странице. */
.comments {
  margin-top: clamp(2.25rem, 5vw, 4rem);
  padding-top: clamp(1.35rem, 3vw, 2.7rem);
  border-top: 1px solid var(--line);
}

.comments > h2 { font-size: clamp(1.85rem, 3.1vw, 2.65rem); }

.comment-list {
  display: grid;
  gap: 0.75rem;
  margin: 1.2rem 0;
  padding: 0;
  list-style: none;
}

.comment {
  padding: 1rem clamp(1rem, 2vw, 1.4rem);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.comment-meta {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.2rem 1rem;
  margin-bottom: 0.45rem;
  color: var(--muted);
  font-size: 0.88rem;
  overflow-wrap: anywhere;
}

.comment-meta strong { color: var(--text); }
.comment-meta time { white-space: nowrap; }
.comment-meta small { font-size: inherit; }

.comment p { white-space: pre-wrap; overflow-wrap: anywhere; }
.comment-status:not(:empty) { margin-top: 0.75rem; color: var(--accent); }

.comment-dialog {
  width: min(calc(100% - 2rem), 32rem);
  max-height: calc(100% - 2rem);
  padding: clamp(1.25rem, 4vw, 2rem);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
}

.comment-dialog::backdrop { background: rgb(6 7 4 / 72%); }
.comment-dialog h2 { font-size: clamp(1.45rem, 2.4vw, 2rem); }

.comment-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.comment-cancel {
  border-color: var(--line);
  background: transparent;
  color: var(--text);
}

.comment-cancel:hover { background: var(--tint); }

@media (max-width: 60rem) {
  .hero h1 { font-size: clamp(2.65rem, 6.2vw, 4.25rem); }
  .hero-image img { object-position: 65% center; }
}

@media (max-width: 54rem) {
  .warning-details { grid-template-columns: 1fr; }
}

@media (max-width: 44rem) {
  :root { --gutter: clamp(0.95rem, 4.5vw, 2rem); }

  .header-inner { grid-template-columns: 1fr auto; padding-block: 0.8rem 0.55rem; }

  .site-nav {
    grid-row: 2;
    grid-column: 1 / -1;
    justify-content: flex-start;
    gap: 0.2rem;
    border-top: 1px solid var(--line);
    padding-top: 0.45rem;
  }

  .site-nav a { padding-inline: clamp(0.28rem, 1.75vw, 0.7rem); }
  .site-nav a:nth-child(2) { flex-shrink: 1; }

  .hero {
    min-height: 0;
    align-items: start;
    padding-top: clamp(12.5rem, 45vw, 18.5rem);
  }

  /* Мобильный кадр фокусируется на правой части фотографии. */
  .hero-image { bottom: auto; height: clamp(15rem, 51vw, 21.5rem); }
  .hero-image img { object-position: 87% 49%; }
  .hero-image::after { background: linear-gradient(0deg, #14150e 0%, #14150e44 43%, transparent 68%); }
  .hero-content { padding: 0 clamp(1.15rem, 4.4vw, 2.2rem) 1.55rem; }
  .hero-label { margin-bottom: 0.9rem; }
  .hero h1 { font-size: clamp(2.05rem, 8vw, 3.3rem); }
  .hero-summary { margin-top: 0.9rem; }
  .hero .button { margin-top: 1.15rem; }

  .card-grid { grid-template-columns: 1fr; }
  .topic-image { aspect-ratio: 2.15; }
  .reading-section, .contact-layout, .legal-list { grid-template-columns: 1fr; }
  .page-intro h1 { font-size: clamp(1.9rem, 8.1vw, 3.1rem); overflow-wrap: anywhere; }
}

@media (max-width: 30rem) {
  .form-row { grid-template-columns: 1fr; }
}

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

/* Подтверждение отправки сообщения */
.feedback-success {
  width: min(30rem, calc(100% - 2rem));
  max-height: calc(100% - 2rem);
  margin: auto;
  padding: clamp(1.35rem, 5vw, 2.5rem);
  overflow: auto;
  background: linear-gradient(155deg, var(--tint), var(--surface) 44%);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 1.5rem;
  box-shadow: 0 1.5rem 5rem #0007;
  text-align: center;
}

.feedback-success::backdrop {
  background: rgb(10 12 8 / 70%);
  backdrop-filter: blur(4px);
}

.feedback-success-mark {
  display: grid;
  place-items: center;
  width: 3.75rem;
  height: 3.75rem;
  margin: 0 auto 1.35rem;
  border: 1px solid var(--accent);
  border-radius: 50%;
  background: var(--tint);
  color: var(--accent);
  box-shadow: 0 0 0 0.375rem var(--surface);
}

.feedback-success-mark::before {
  content: "";
  width: 0.75rem;
  height: 1.35rem;
  border: solid currentColor;
  border-width: 0 0.17rem 0.17rem 0;
  transform: translateY(-0.15rem) rotate(45deg);
}

.feedback-success h2 {
  font-size: clamp(1.45rem, 4vw, 2rem);
  text-wrap: balance;
}

.feedback-success h2 + p {
  margin: 0.75rem 0 1.25rem;
  color: var(--muted);
}

.feedback-success-note {
  padding: 0.8rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--field);
  color: var(--muted);
  font-size: 0.9rem;
}

.feedback-success form {
  margin-top: 1.35rem;
}

.feedback-success .button {
  min-width: 9rem;
}

@media (prefers-reduced-motion: no-preference) {
  .feedback-success[open] {
    animation: feedback-appear 200ms ease-out both;
  }
}

@keyframes feedback-appear {
  from { opacity: 0; transform: translateY(0.5rem) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.feedback-success-warning {
  display: block;
  margin-bottom: 0.25rem;
  color: var(--accent);
  font-weight: 800;
}

.hero-with-label {
  container-type: size;
  overflow: hidden;
  --hero-anchor-x: 0.5;
  --hero-anchor-y: 0.5;
}
.hero-label-art {
  --art-width: max(100cqw, calc(100cqh * 1800 / 749));
  --art-height: max(100cqh, calc(100cqw * 749 / 1800));
  position: absolute;
  width: var(--art-width);
  height: var(--art-height);
  left: calc((100% - var(--art-width)) * var(--hero-anchor-x));
  top: calc((100% - var(--art-height)) * var(--hero-anchor-y));
}
.hero-label-print {
  position: absolute;
  top: 57.8%;
  transform: translate(-50%, -50%) rotate(-1deg);
  color: #3a2914;
  opacity: 0.79;
  mix-blend-mode: multiply;
  font: 700 calc(var(--art-width) * 0.0058)/1.07 "Times New Roman", Georgia, serif;
  letter-spacing: 0.025em;
  text-align: center;
  text-transform: uppercase;
  white-space: nowrap;
}
.hero-label-print-left { left: 72.7%; }
.hero-label-print-right { left: 79.65%; }
@media (max-width: 60rem) {
  .hero-with-label { --hero-anchor-x: 0.65; }
}
@media (max-width: 44rem) {
  .hero-with-label {
    --hero-anchor-x: 0.87;
    --hero-anchor-y: 0.49;
  }
}
