/* Юридические страницы (offer, privacy) — поверх base.css */

/* ============================================================
   PAGE-SPECIFIC TOKENS
   ============================================================ */
:root { --text-body: rgba(210,210,240,0.85); }

body.doc-page {
  display: flex;
  flex-direction: column;
  align-items: center;
}

body.doc-offer {
  --doc-accent:            var(--accent-blue);
  --doc-accent-soft:       rgba(59,130,246,0.15);
  --doc-accent-border:     rgba(59,130,246,0.25);
  --doc-placeholder-bg:    rgba(59,130,246,0.05);
  --doc-placeholder-border:rgba(59,130,246,0.2);
}
body.doc-privacy {
  --doc-accent:            var(--accent-violet);
  --doc-accent-soft:       rgba(139,92,246,0.15);
  --doc-accent-border:     rgba(139,92,246,0.25);
  --doc-placeholder-bg:    rgba(139,92,246,0.05);
  --doc-placeholder-border:rgba(139,92,246,0.2);
}

/* ============================================================
   CANVAS
   ============================================================ */
#canvas { position: fixed; inset: 0; z-index: 0; pointer-events: none; }

/* ============================================================
   ORB AMBIENT LIGHTS  — mobile-first viewport-relative
   ============================================================ */
.orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(80px);
  z-index: 0;
  pointer-events: none;
  animation: doc-drift 18s ease-in-out infinite alternate;
}
.orb-1 {
  width:  clamp(13.75rem, 55vw, 37.5rem); /* 220px → 600px */
  height: clamp(13.75rem, 55vw, 37.5rem);
  background: radial-gradient(circle, rgba(99,102,241,0.12) 0%, transparent 70%);
  top: -20%; left: -15%;
  animation-delay: 0s;
}
.orb-2 {
  width:  clamp(11.25rem, 45vw, 31.25rem); /* 180px → 500px */
  height: clamp(11.25rem, 45vw, 31.25rem);
  background: radial-gradient(circle, rgba(6,182,212,0.1) 0%, transparent 70%);
  bottom: -15%; right: -10%;
  animation-delay: -8s;
}

@keyframes doc-drift {
  0%   { transform: translate(0,0) scale(1); }
  50%  { transform: translate(40px,-30px) scale(1.05); }
  100% { transform: translate(-20px,40px) scale(0.97); }
}

/* ============================================================
   TOP NAV  — mobile-first
   ============================================================ */
.top-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;  /* 12px 16px — mobile */
  background: rgba(4,4,15,0.75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.nav-back {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.8125rem;   /* 13px */
  font-weight: 500;
  letter-spacing: 0.04em;
  transition: color 0.2s ease;
  min-height: 2.75rem;    /* touch target */
  padding: 0.5rem 0;
}
.nav-back:hover { color: var(--text-primary); }
.nav-back svg   { flex-shrink: 0; }

/* Brand centered on mobile via absolute, in-flow at ≥768px */
.nav-brand {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.8125rem;   /* 13px */
  font-weight: 700;
  letter-spacing: 0.08em;
  color: rgba(200,200,230,0.4);
  text-transform: uppercase;
  white-space: nowrap;
  pointer-events: none;
}

/* ============================================================
   PAGE CONTAINER  — mobile-first
   ============================================================ */
.page {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 47.5rem;     /* 760px */
  padding: 2rem 1rem 3.75rem; /* 32px 16px 60px — mobile */
}

/* ============================================================
   DOC HEADER
   ============================================================ */
.doc-header {
  margin-bottom: 2rem;    /* 32px — mobile */
  animation: fadeUp 0.6s cubic-bezier(0.16,1,0.3,1) both;
}

.doc-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px;
  background: var(--doc-placeholder-bg);
  border: 1px solid var(--doc-placeholder-border);
  border-radius: var(--r-full);
  font-size: 0.625rem;    /* 10px */
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--doc-accent);
  margin-bottom: 1rem;
}

.doc-title {
  font-size: clamp(1.625rem, 5vw, 2.75rem); /* 26px → 44px */
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 0.75rem;
}

.doc-title-gradient {
  background: linear-gradient(135deg, #a5b4fc 0%, #60a5fa 50%, #22d3ee 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
body.doc-privacy .doc-title-gradient {
  background: linear-gradient(135deg, #c4b5fd 0%, #a78bfa 50%, #818cf8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.doc-meta {
  font-size: 0.75rem;     /* 12px */
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

/* ============================================================
   DOC BODY
   ============================================================ */
.doc-body {
  counter-reset: doc-section;
  animation: fadeUp 0.65s cubic-bezier(0.16,1,0.3,1) 0.1s both;
}

.doc-section {
  margin-bottom: 1.25rem; /* 20px — mobile */
  padding: 1.25rem 1rem;  /* 20px 16px — mobile */
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.doc-section-title {
  font-size: 0.9375rem;   /* 15px */
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  margin-bottom: 0.875rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 0.625rem;
}

.section-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px; height: 24px;
  border-radius: var(--r-sm);
  background: var(--doc-accent-soft);
  border: 1px solid var(--doc-accent-border);
  font-size: 0.6875rem;   /* 11px */
  font-weight: 700;
  color: var(--doc-accent);
  flex-shrink: 0;
}

.doc-section p,
.doc-section li {
  font-size: 0.875rem;    /* 14px */
  line-height: 1.75;
  color: var(--text-body);
}
.doc-section p + p { margin-top: 0.625rem; }
.doc-section ul,
.doc-section ol {
  padding-left: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
}
.doc-section li::marker { color: var(--doc-accent); }

.placeholder-block {
  padding: 1rem 1.25rem;
  background: var(--doc-placeholder-bg);
  border: 1px dashed var(--doc-placeholder-border);
  border-radius: var(--r-md);
  font-size: 0.8125rem;   /* 13px */
  color: rgba(150,150,200,0.55);
  font-style: italic;
  text-align: center;
}

/* ============================================================
   DOC FOOTER
   ============================================================ */
.doc-footer {
  margin-top: 2.5rem;     /* 40px — mobile */
  text-align: center;
  font-size: 0.6875rem;   /* 11px */
  color: rgba(150,150,180,0.3);
  letter-spacing: 0.06em;
  animation: fadeUp 0.6s cubic-bezier(0.16,1,0.3,1) 0.3s both;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.625rem;
}

/* ============================================================
   RESPONSIVE BREAKPOINTS  (mobile-first, min-width)
   ============================================================ */

/* ── 480px — Large phones ── */
@media (min-width: 30rem) {
  .top-nav    { padding: 0.75rem 1.25rem; }
  .page       { padding: 2.5rem 1.25rem 4rem; }
  .doc-section { padding: 1.25rem; margin-bottom: 1.5rem; }
  .doc-header  { margin-bottom: 2.5rem; }
  .doc-eyebrow { padding: 5px 14px; }
}

/* ── 768px — Tablets portrait ── */
@media (min-width: 48rem) {
  .top-nav    { padding: 1rem 2rem; }
  .nav-brand  { position: static; transform: none; pointer-events: auto; }
  .page       { padding: 3.5rem 2rem 5rem; }
  .doc-section { padding: 1.75rem 2rem; margin-bottom: 1.75rem; }
  .doc-header  { margin-bottom: 3rem; }
  .doc-footer  { margin-top: 3.5rem; }
}

/* ── 1024px — Tablets landscape / small laptops ── */
@media (min-width: 64rem) {
  .top-nav { padding: 1rem 2.5rem; }
  .page    { max-width: 52.5rem; /* ~840px */ }
}

/* ── 1280px — Standard laptops ── */
@media (min-width: 80rem) {
  .page { max-width: 55rem; /* ~880px */ }
}

/* ── 1440px — Large desktops ── */
@media (min-width: 90rem) {
  .page        { max-width: 57.5rem; /* ~920px */ }
  .doc-section { margin-bottom: 2rem; }
  .doc-footer  { margin-top: 4rem; }
}

/* ── 1920px — Full HD ── */
@media (min-width: 120rem) {
  .page        { max-width: 65rem; /* ~1040px */ padding: 4.5rem 2rem 6rem; }
  .doc-section { padding: 2rem 2.5rem; margin-bottom: 2.5rem; }
  .doc-section-title { font-size: 1rem; }
  .doc-section p,
  .doc-section li    { font-size: 0.9375rem; }
  .placeholder-block { font-size: 0.875rem; }
  .doc-footer  { margin-top: 5rem; font-size: 0.75rem; }
  .top-nav     { padding: 1.25rem 3rem; }
}

/* ── 2560px — 2K / 4K ── */
@media (min-width: 160rem) {
  .page        { max-width: 80rem; /* 1280px */ padding: 5rem 2rem 7rem; }
  .doc-section { padding: 2.5rem 3rem; margin-bottom: 3rem; }
  .doc-section-title { font-size: 1.125rem; }
  .doc-section p,
  .doc-section li    { font-size: 1rem; line-height: 1.8; }
  .placeholder-block { font-size: 0.9375rem; }
  .doc-footer  { margin-top: 6rem; font-size: 0.875rem; }
  .top-nav     { padding: 1.5rem 4rem; }
  .doc-eyebrow { font-size: 0.6875rem; }
}
