/* КиберПапа — юридические документы. Тёплая палитра, Fraunces + Nunito. */

:root {
  --cream: #fff4e2;
  --cream-deep: #fde7c4;
  --peach: #ffb979;
  --tangerine: #ff8a3d;
  --ember: #e85d2f;
  --plum: #4a2d5a;
  --ink: #2b1b3a;
  --ink-soft: #5a3d6b;
  --sunshine: #ffd166;
  --shadow-soft: 0 8px 24px -8px rgba(74, 45, 90, 0.18);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Nunito", sans-serif;
  background: var(--cream);
  color: var(--ink);
  line-height: 1.65;
  font-weight: 500;
  -webkit-font-smoothing: antialiased;
}

/* Subtle grain — как на лендинге, для тёплой текстуры */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.4;
  mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.5 0 0 0 0 0.4 0 0 0 0 0.35 0 0 0 0.5 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

h1,
h2,
h3 {
  font-family: "Fraunces", serif;
  font-weight: 600;
  letter-spacing: -0.02em;
  font-variation-settings: "SOFT" 100, "WONK" 0;
  line-height: 1.15;
  color: var(--ink);
}

a {
  color: var(--ember);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1.5px;
  transition: color 0.2s;
}

a:hover {
  color: var(--tangerine);
}

strong {
  font-weight: 700;
}

code {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.92em;
  background: var(--cream-deep);
  padding: 2px 7px;
  border-radius: 6px;
  color: var(--plum);
}

/* ========== NAV ========== */
nav.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 244, 226, 0.85);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1.5px solid rgba(74, 45, 90, 0.08);
}
nav.site-nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px 32px;
  max-width: 1280px;
  margin: 0 auto;
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: "Fraunces", serif;
  font-weight: 700;
  font-size: 22px;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.01em;
}
.logo:hover {
  color: var(--ink);
}
.logo-mark {
  width: 38px;
  height: 38px;
  filter: drop-shadow(0 4px 8px rgba(232, 93, 47, 0.3));
}
.nav-cta {
  background: linear-gradient(135deg, #2aabee 0%, #229ed9 100%);
  color: #fff !important;
  padding: 10px 20px;
  border-radius: 100px;
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 14px -4px rgba(34, 158, 217, 0.5);
  transition:
    transform 0.2s,
    filter 0.2s;
  white-space: nowrap;
}
.nav-cta:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
  color: #fff;
}
.nav-cta svg {
  flex-shrink: 0;
}

/* ========== HERO STRIP ========== */
.legal-hero {
  background:
    radial-gradient(ellipse 70% 60% at 70% 30%, rgba(255, 209, 102, 0.45), transparent 70%),
    radial-gradient(ellipse 50% 50% at 20% 80%, rgba(255, 185, 121, 0.35), transparent 70%),
    linear-gradient(180deg, #ffe9c7 0%, #ffd4a3 100%);
  padding: 72px 32px 56px;
  text-align: center;
}
.legal-hero h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  margin: 0 auto 14px;
  max-width: 900px;
}
.legal-hero .subtitle {
  font-size: 1.05rem;
  color: var(--ink-soft);
  max-width: 680px;
  margin: 0 auto 8px;
}
.legal-hero .meta {
  font-size: 0.9rem;
  color: var(--plum);
  opacity: 0.7;
  letter-spacing: 0.02em;
}

/* ========== BODY ========== */
article {
  max-width: 760px;
  margin: 0 auto;
  padding: 64px 32px 48px;
}
article section {
  margin-bottom: 2.5rem;
}
article h2 {
  font-size: 1.5rem;
  margin: 2.75rem 0 1rem;
  color: var(--plum);
  position: relative;
}
article h2:first-of-type,
article section:first-child h2 {
  margin-top: 0;
}
article h2::before {
  content: "";
  display: block;
  width: 48px;
  height: 4px;
  border-radius: 100px;
  background: linear-gradient(90deg, var(--ember), var(--peach));
  margin-bottom: 14px;
}
article p {
  margin: 0 0 1rem;
  font-size: 1.05rem;
}
article ul {
  margin: 0 0 1rem;
  padding-left: 1.4rem;
}
article ul li {
  margin-bottom: 0.5rem;
  font-size: 1.02rem;
}
article ul li::marker {
  color: var(--tangerine);
  font-weight: 700;
}

/* ========== INTRA-LEGAL NAV (between docs) ========== */
.docs-nav {
  max-width: 760px;
  margin: 0 auto;
  padding: 32px 32px 64px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  border-top: 1px solid rgba(74, 45, 90, 0.12);
  margin-top: 24px;
}
.docs-nav a {
  background: var(--cream-deep);
  color: var(--plum);
  padding: 10px 18px;
  border-radius: 100px;
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
  border: 1.5px solid transparent;
  transition: all 0.2s;
}
.docs-nav a:hover {
  background: var(--peach);
  color: var(--ink);
  border-color: var(--ember);
}
.docs-nav a[aria-current="page"] {
  background: var(--ember);
  color: #fff;
  pointer-events: none;
}

/* ========== FOOTER ========== */
footer {
  background: var(--ink);
  color: rgba(255, 244, 226, 0.7);
  padding: 64px 0 30px;
  font-size: 14px;
  margin-top: 60px;
}
footer .container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 32px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 50px;
}
.footer-logo {
  color: var(--cream);
  font-family: "Fraunces", serif;
  font-weight: 700;
  font-size: 22px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.footer-desc {
  line-height: 1.65;
  max-width: 340px;
  font-size: 14px;
}
.footer-col h5 {
  color: var(--cream);
  font-family: "Nunito", sans-serif;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 18px;
}
.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.footer-col a {
  color: rgba(255, 244, 226, 0.7);
  text-decoration: none;
  transition: color 0.2s;
}
.footer-col a:hover {
  color: var(--sunshine);
}
.footer-disclaimer {
  border-top: 1px solid rgba(255, 244, 226, 0.1);
  padding-top: 28px;
  font-size: 12px;
  line-height: 1.6;
  color: rgba(255, 244, 226, 0.5);
  max-width: 960px;
}
.footer-disclaimer p {
  margin: 0 0 12px;
}
.footer-disclaimer strong {
  color: rgba(255, 244, 226, 0.85);
}
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-top: 20px;
  flex-wrap: wrap;
  gap: 12px;
  color: rgba(255, 244, 226, 0.5);
}
.footer-legal-line {
  font-size: 12px;
  line-height: 1.65;
  color: rgba(255, 244, 226, 0.55);
  max-width: 720px;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 760px) {
  nav.site-nav .container {
    padding: 14px 20px;
  }
  .legal-hero {
    padding: 48px 20px 36px;
  }
  article {
    padding: 40px 20px 32px;
    font-size: 1rem;
  }
  article h2 {
    font-size: 1.3rem;
    margin-top: 2rem;
  }
  article p,
  article ul li {
    font-size: 1rem;
  }
  .docs-nav {
    padding: 24px 20px 48px;
  }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 28px;
    margin-bottom: 32px;
  }
  footer {
    padding: 48px 0 24px;
  }
  footer .container {
    padding: 0 20px;
  }
}

@media print {
  nav.site-nav,
  .docs-nav,
  footer,
  body::before {
    display: none;
  }
  body {
    background: #fff;
    color: #000;
  }
  .legal-hero {
    background: none;
    padding: 0 0 24px;
    text-align: left;
  }
  article {
    max-width: none;
    padding: 0;
  }
  article h2::before {
    display: none;
  }
}
