:root {
  --bg: #FDF2F2;
  --surface: #FFFFFF;
  --text: #451A03;
  --muted: #92400E;
  --primary: #E11D48;
  --secondary: #78350F;
  --accent: #F43F5E;
  --border: rgba(69, 26, 3, 0.1);
  --emerald: #064e3b;
  --charcoal: #1c1917;
  --page-padding: 24px;
  --font-sans: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: ui-monospace, "Cascadia Code", "Consolas", monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-image:
    linear-gradient(160deg, rgba(225, 29, 72, 0.04) 0%, transparent 45%),
    radial-gradient(ellipse at 85% 10%, rgba(6, 78, 59, 0.06) 0%, transparent 50%);
  position: relative;
}

main {
  flex: 1 0 auto;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    repeating-linear-gradient(0deg, transparent, transparent 47px, rgba(6, 78, 59, 0.03) 47px, rgba(6, 78, 59, 0.03) 48px),
    repeating-linear-gradient(90deg, transparent, transparent 47px, rgba(28, 25, 23, 0.02) 47px, rgba(28, 25, 23, 0.02) 48px);
  pointer-events: none;
  z-index: 0;
}

body > * {
  position: relative;
  z-index: 1;
}

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover {
  color: var(--accent);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.disclosure-pill {
  max-width: fit-content;
  margin: 8px auto;
  padding: 6px 24px;
  font-size: 11px;
  line-height: 1.5;
  color: var(--muted);
  background: rgba(225, 29, 72, 0.05);
  border: 1px solid var(--border);
  border-radius: 999px;
  text-align: center;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 900;
  background: var(--charcoal);
  height: 52px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  height: 100%;
  padding: 0 var(--page-padding);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.logo-link img {
  height: 32px;
  width: auto;
}

.nav-cta-desktop {
  display: none;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--surface);
  background: var(--primary);
  padding: 8px 18px;
  border-radius: 999px;
  transition: background 0.2s ease, transform 0.2s ease;
}

.nav-cta-desktop:hover {
  background: var(--accent);
  color: var(--surface);
  transform: translateY(-1px);
}

.burger-btn {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--surface);
  font-size: 20px;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.burger-btn:hover {
  border-color: var(--primary);
  background: rgba(225, 29, 72, 0.15);
}

.nav-drawer {
  position: fixed;
  top: 0;
  right: -300px;
  width: 300px;
  height: 100vh;
  background: var(--charcoal);
  z-index: 1000;
  padding: 60px 28px 28px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border-left: 1px solid rgba(225, 29, 72, 0.2);
  overflow-y: auto;
}

.nav-drawer.open {
  right: 0;
}

.drawer-close {
  position: absolute;
  top: 12px;
  right: 16px;
  background: transparent;
  border: none;
  color: var(--surface);
  font-size: 28px;
  cursor: pointer;
  line-height: 1;
}

.nav-drawer a {
  color: rgba(255, 255, 255, 0.85);
  padding: 12px 0;
  font-size: 15px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.04em;
}

.nav-drawer a:hover {
  color: var(--accent);
}

.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(28, 25, 23, 0.5);
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.drawer-overlay.visible {
  opacity: 1;
  pointer-events: auto;
}

.site-footer {
  background: var(--charcoal);
  color: rgba(255, 255, 255, 0.75);
  padding: 48px var(--page-padding) 32px;
  margin-top: auto;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.footer-top {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 28px;
}

.footer-logo img {
  height: 36px;
  opacity: 0.9;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.65);
  font-size: 13px;
}

.footer-links a:hover {
  color: var(--accent);
}

.footer-requisites {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.45);
  margin-bottom: 24px;
  font-family: var(--font-mono);
}

.footer-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  margin-bottom: 24px;
}

.footer-badges img {
  height: 40px;
  width: auto;
  opacity: 0.85;
  transition: opacity 0.2s ease;
}

.footer-badges a:hover img {
  opacity: 1;
}

.footer-disclosure {
  font-size: 12px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 20px;
}

.footer-copy {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.35);
}

.age-overlay {
  position: fixed;
  inset: 0;
  background: rgba(28, 25, 23, 0.88);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.age-overlay.hidden {
  display: none;
}

.age-modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 36px 32px;
  max-width: 440px;
  width: 100%;
  text-align: center;
  box-shadow: 0 24px 64px rgba(69, 26, 3, 0.2);
}

.age-modal h2 {
  font-size: 1.35rem;
  margin-bottom: 12px;
  color: var(--text);
}

.age-modal p {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 24px;
}

.age-buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-primary {
  background: var(--primary);
  color: var(--surface);
  border: none;
  padding: 12px 24px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease;
}

.btn-primary:hover {
  background: var(--accent);
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
  padding: 12px 24px;
  border-radius: 999px;
  font-size: 14px;
  cursor: pointer;
  transition: border-color 0.2s ease;
}

.btn-outline:hover {
  border-color: var(--primary);
}

.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 16px 24px;
  z-index: 1500;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 16px;
  box-shadow: 0 -8px 32px rgba(69, 26, 3, 0.1);
}

.cookie-banner.hidden {
  display: none;
}

.cookie-banner p {
  font-size: 13px;
  color: var(--muted);
  max-width: 640px;
  flex: 1;
  min-width: 200px;
}

.cookie-actions {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}

.btn-cookie-reject {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
  padding: 10px 20px;
  border-radius: 999px;
  font-size: 13px;
  cursor: pointer;
}

.btn-cookie-reject:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.legal-page {
  padding: 48px var(--page-padding) 64px;
}

.legal-inner {
  max-width: 800px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 40px 36px;
}

.legal-inner h1 {
  font-size: 1.75rem;
  margin-bottom: 20px;
  color: var(--text);
}

.legal-inner h2 {
  font-size: 1.15rem;
  margin: 28px 0 12px;
  color: var(--secondary);
}

.legal-inner p,
.legal-inner li {
  font-size: 15px;
  color: var(--muted);
  margin-bottom: 12px;
}

.legal-inner ul {
  padding-left: 20px;
  margin-bottom: 16px;
}

.contact-form {
  margin-top: 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.contact-form label {
  font-size: 13px;
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--secondary);
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-family: var(--font-sans);
  font-size: 15px;
  color: var(--text);
  background: var(--bg);
}

.contact-form textarea {
  min-height: 140px;
  resize: vertical;
}

.form-error {
  font-size: 13px;
  color: var(--primary);
  display: none;
}

.form-error.visible {
  display: block;
}

.form-success {
  padding: 24px;
  background: rgba(6, 78, 59, 0.08);
  border: 1px solid rgba(6, 78, 59, 0.2);
  border-radius: 12px;
  color: var(--emerald);
  font-size: 15px;
}

.form-success.hidden {
  display: none;
}

.error-page {
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px var(--page-padding);
  text-align: center;
}

.error-inner h1 {
  font-size: 4rem;
  color: var(--primary);
  margin-bottom: 12px;
}

.error-inner p {
  color: var(--muted);
  margin-bottom: 24px;
}

@media (min-width: 768px) {
  .nav-cta-desktop {
    display: inline-flex;
    margin-left: auto;
    margin-right: 12px;
  }
}

@media (max-width: 767px) {
  .cookie-banner {
    flex-direction: column;
    text-align: center;
  }
}

.topic-hero-strip {
  background: linear-gradient(135deg, var(--charcoal) 0%, var(--emerald) 100%);
  padding: 56px var(--page-padding);
  position: relative;
  overflow: hidden;
}

.topic-hero-strip::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(90deg, transparent, transparent 40px, rgba(255,255,255,0.03) 40px, rgba(255,255,255,0.03) 41px);
  pointer-events: none;
}

.topic-hero-inner {
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.topic-hero-inner h1 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  color: var(--surface);
  margin-bottom: 12px;
}

.topic-hero-inner p {
  color: rgba(255, 255, 255, 0.75);
  max-width: 600px;
  font-size: 16px;
}

.topic-body {
  max-width: 1200px;
  margin: 0 auto;
  padding: 48px var(--page-padding) 64px;
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 48px;
}

.topic-sidebar {
  position: sticky;
  top: 72px;
  align-self: start;
}

.sidebar-rail {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px;
}

.sidebar-rail h3 {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--emerald);
  margin-bottom: 16px;
}

.sidebar-rail a {
  display: block;
  padding: 8px 0;
  font-size: 14px;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
}

.sidebar-rail a:last-child {
  border-bottom: none;
}

.topic-content h2 {
  font-size: 1.35rem;
  color: var(--secondary);
  margin: 32px 0 14px;
}

.topic-content h2:first-child {
  margin-top: 0;
}

.topic-content p {
  color: var(--muted);
  margin-bottom: 16px;
  font-size: 15px;
  line-height: 1.7;
}

.topic-image-band {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin: 32px 0;
}

.topic-img-frame {
  max-width: 500px;
  max-height: 320px;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid var(--border);
}

.topic-img-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pull-quote-live {
  border-left: 4px solid var(--primary);
  padding: 20px 24px;
  background: rgba(225, 29, 72, 0.05);
  border-radius: 0 12px 12px 0;
  margin: 28px 0;
  font-style: italic;
  color: var(--text);
}

@media (max-width: 900px) {
  .topic-body {
    grid-template-columns: 1fr;
  }

  .topic-sidebar {
    position: static;
  }

  .topic-image-band {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 375px) {
  .topic-img-frame {
    max-width: 100%;
    width: 100%;
  }

  .topic-body {
    overflow-x: hidden;
  }
}
