/* ═══ MythLab — Shared Shell Stylesheet ═══════════════════════════════
   Used by terms.html, privacy.html, support.html.
   Mirrors the landing.html design tokens so the trail-pages feel like
   the same product. Lighter than the landing — no particle canvas,
   no constellation, no rotating frame. Just typography, surface,
   buttons, nav, footer.
   ──────────────────────────────────────────────────────────────────── */

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
  src: url('/fonts/inter-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
  src: url('/fonts/inter-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;
}
@font-face {
  font-family: 'Inter Tight';
  font-style: normal;
  font-weight: 600 900;
  font-display: swap;
  src: url('/fonts/inter-tight-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Inter Tight';
  font-style: normal;
  font-weight: 600 900;
  font-display: swap;
  src: url('/fonts/inter-tight-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 {
  --bg-deep:        #0A0A0C;
  --bg-card:        #131418;
  --bg-soft:        #181920;
  --bg-glass:       rgba(19, 20, 24, 0.55);
  --bg-nav:         rgba(10, 10, 12, 0.78);
  --gold:           #D4A84B;
  --gold-bright:    #E9C46A;
  --gold-soft:      #F5D67E;
  --gold-dim:       #8A6D2E;
  --purple:         #A47AE3;
  --purple-bright:  #C7A4FF;
  --cream:          #EDE6D3;
  --cream-dim:      #9A9080;
  --cream-soft:     #BBB1A0;
  --line:           rgba(212, 168, 75, 0.30);
  --line-strong:    rgba(212, 168, 75, 0.55);
  --line-soft:      rgba(212, 168, 75, 0.14);
  --font-body:      'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-heading:   'Inter Tight', 'Inter', sans-serif;
  --font-serif:     'Cormorant Garamond', 'EB Garamond', 'Iowan Old Style', 'Palatino Linotype', 'Times New Roman', Georgia, serif;
  --font-mono:      'JetBrains Mono', ui-monospace, monospace;
  --container:      900px;
  --gap:            24px;
  --radius:         16px;
  --radius-sm:      8px;
  --radius-pill:    999px;
  --ease-out:       cubic-bezier(0.22, 1, 0.36, 1);
  --ease-smooth:    cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body {
  font-family: var(--font-body);
  background: var(--bg-deep);
  color: var(--cream);
  line-height: 1.7;
  overflow-x: hidden;
  min-height: 100vh;
  position: relative;
}
img { max-width: 100%; display: block; }
a { color: var(--gold-bright); text-decoration: none; transition: color 200ms ease; }
a:hover { color: var(--gold-soft); }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
ul, ol { list-style: none; }

/* A11y */
.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  padding: 12px 22px;
  background: var(--gold);
  color: #1B130A;
  font-weight: 700;
  border-radius: var(--radius-sm);
  z-index: 10000;
  transition: top 200ms ease;
}
.skip-link:focus { top: 16px; }
:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 2px;
}
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

/* Backdrop — fixed, lighter than landing (no canvas) */
.bg-stack {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}
.bg-glow {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 50% 40% at 25% 15%, rgba(164, 122, 227, 0.14), transparent 60%),
    radial-gradient(ellipse 55% 45% at 80% 80%, rgba(212, 168, 75, 0.10), transparent 70%);
}
.bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(212, 168, 75, 0.040) 1px, transparent 1px),
    linear-gradient(90deg, rgba(212, 168, 75, 0.040) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, black 25%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, black 25%, transparent 80%);
}
.bg-stack::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold) 50%, transparent);
}

.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }

/* Typography */
.kicker {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--cream-dim);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.kicker .dot {
  display: inline-block;
  width: 4px; height: 4px;
  border-radius: 999px;
  background: var(--gold);
  box-shadow: 0 0 8px rgba(212, 168, 75, 0.6);
}
.page-headline {
  font-family: var(--font-heading);
  font-size: clamp(36px, 5.4vw, 56px);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -0.022em;
  color: var(--cream);
  text-wrap: balance;
  margin-bottom: 18px;
}
.page-headline .accent { color: var(--gold); }
.page-headline .serif {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 500;
  color: var(--gold);
}
.page-lede {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(18px, 2.2vw, 22px);
  line-height: 1.5;
  color: var(--cream-soft);
  max-width: 60ch;
  margin-bottom: 48px;
  text-wrap: balance;
}

/* Buttons */
.btn-gold {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 14px 28px;
  border-radius: var(--radius-pill);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.02em;
  color: #1B130A;
  background: linear-gradient(135deg, var(--gold-soft) 0%, var(--gold-bright) 40%, var(--gold) 100%);
  border: 1px solid rgba(255, 220, 140, 0.55);
  box-shadow:
    inset 0 1px 0 rgba(255, 245, 215, 0.55),
    0 10px 30px -10px rgba(212, 168, 75, 0.55);
  transition: transform 240ms var(--ease-out), box-shadow 240ms ease, filter 200ms ease;
  cursor: pointer;
}
.btn-gold:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow:
    inset 0 1px 0 rgba(255, 245, 215, 0.65),
    0 14px 40px -10px rgba(233, 196, 106, 0.75);
  filter: brightness(1.06);
  color: #1B130A;
}
.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 13px 26px;
  border-radius: var(--radius-pill);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 14px;
  color: var(--cream);
  background: transparent;
  border: 1px solid var(--line-strong);
  cursor: pointer;
  transition: border-color 220ms, color 220ms, background 220ms, transform 240ms var(--ease-out);
}
.btn-outline:hover {
  border-color: var(--gold-bright);
  background: rgba(212, 168, 75, 0.06);
  color: var(--gold-bright);
  transform: translateY(-2px);
}

/* Navigation — simplified for trail pages */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: var(--bg-nav);
  -webkit-backdrop-filter: blur(18px) saturate(180%);
  backdrop-filter: blur(18px) saturate(180%);
  border-bottom: 1px solid var(--line-soft);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
  gap: 24px;
}
.nav-logo {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: var(--cream);
  display: flex;
  align-items: center;
  gap: 12px;
}
.nav-logo:hover { color: var(--cream); }
.nav-logo .mark {
  display: inline-block;
  width: 30px; height: 30px;
  color: var(--gold);
}
.nav-logo .myth { color: var(--cream); }
.nav-logo .lab  { color: var(--gold); }
.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
}
.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--cream-soft);
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.nav-links a:hover { color: var(--gold-bright); }
.nav-cta {
  padding: 11px 22px;
  border-radius: var(--radius-pill);
  color: #1B130A !important;
  font-weight: 700;
  background: linear-gradient(135deg, var(--gold-soft), var(--gold));
  box-shadow: 0 6px 20px -8px rgba(212, 168, 75, 0.55);
  min-height: 44px;
}
.nav-cta:hover {
  filter: brightness(1.08);
  color: #1B130A !important;
}
.lang-toggle {
  display: flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  overflow: hidden;
  min-height: 44px;
  background: rgba(255,255,255,0.02);
}
.lang-toggle button {
  padding: 10px 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--cream-dim);
  min-height: 44px;
  min-width: 44px;
  transition: all 200ms;
}
.lang-toggle button.active {
  color: #1B130A;
  background: var(--gold);
}
.lang-toggle button:hover:not(.active) { color: var(--cream); }

/* Main content wrapper */
.page-main {
  padding-top: 128px;
  padding-bottom: 96px;
  position: relative;
  z-index: 1;
}

/* Editorial content — long-form prose for legal pages */
.prose {
  font-size: 16px;
  line-height: 1.75;
  color: var(--cream-soft);
}
.prose h2 {
  font-family: var(--font-heading);
  font-size: clamp(22px, 2.6vw, 28px);
  font-weight: 700;
  color: var(--cream);
  letter-spacing: -0.012em;
  margin-top: 56px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line-soft);
}
.prose h2:first-child { margin-top: 0; }
.prose h3 {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 700;
  color: var(--cream);
  margin-top: 28px;
  margin-bottom: 10px;
}
.prose p {
  margin-bottom: 18px;
  max-width: 70ch;
}
.prose ul, .prose ol {
  list-style: revert;
  margin: 0 0 18px 22px;
  padding-left: 8px;
  color: var(--cream-soft);
  max-width: 70ch;
}
.prose li { margin-bottom: 8px; }
.prose a {
  color: var(--gold-bright);
  text-decoration: underline;
  text-decoration-color: var(--gold-dim);
  text-underline-offset: 3px;
  transition: text-decoration-color 200ms ease, color 200ms ease;
}
.prose a:hover {
  color: var(--gold-soft);
  text-decoration-color: var(--gold-bright);
}
.prose strong { color: var(--cream); font-weight: 700; }
.prose em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 500;
  color: var(--gold-bright);
}
.prose hr {
  border: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line-strong), transparent);
  margin: 40px 0;
}
.prose .meta-row {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--cream-dim);
  margin-bottom: 36px;
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}

/* Diamond divider — used between major sections */
.divider-diamond {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--gold);
  margin: 48px auto;
  max-width: 320px;
}
.divider-diamond .line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line-strong), transparent);
}
.divider-diamond .diamond {
  width: 14px; height: 14px;
}

/* Card — used for support contact + general callouts */
.card {
  background:
    linear-gradient(180deg, rgba(212, 168, 75, 0.04) 0%, transparent 45%),
    var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px 28px;
  position: relative;
  overflow: hidden;
}
.card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--line-strong) 50%, transparent);
  pointer-events: none;
}

/* Footer */
.footer {
  border-top: 1px solid var(--line-soft);
  padding: 64px 0 32px;
  background: var(--bg-deep);
  position: relative;
  z-index: 1;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 40px;
}
.footer-brand p {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 15px;
  color: var(--cream-dim);
  line-height: 1.6;
  margin-top: 14px;
  max-width: 320px;
}
.footer-col h3 {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 18px;
}
.footer-col a {
  display: flex;
  align-items: center;
  font-size: 14px;
  color: var(--cream-soft);
  padding: 6px 0;
  min-height: 32px;
}
.footer-col a:hover { color: var(--gold-bright); }
.footer-disclaimer {
  text-align: center;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.10em;
  color: var(--cream-dim);
  padding: 24px 0 16px;
  border-top: 1px solid var(--line-soft);
}
.footer-bottom {
  border-top: 1px solid var(--line-soft);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.05em;
  color: var(--cream-dim);
}

/* Form controls — general */
.form-row { margin-bottom: 22px; }
.form-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--cream-dim);
  margin-bottom: 8px;
}
.form-input,
.form-select,
.form-textarea {
  width: 100%;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--cream);
  padding: 14px 16px;
  font-family: var(--font-body);
  font-size: 15px;
  min-height: 48px;
  transition: border-color 220ms ease, background 220ms ease;
}
.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--gold);
  background: rgba(212, 168, 75, 0.04);
  outline: none;
}
.form-textarea { min-height: 120px; resize: vertical; line-height: 1.55; }
.form-help {
  margin-top: 6px;
  font-size: 12px;
  color: var(--cream-dim);
  line-height: 1.5;
}
.form-success {
  margin-top: 18px;
  padding: 14px 18px;
  background: rgba(212, 168, 75, 0.06);
  border-left: 3px solid var(--gold);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 16px;
  color: var(--gold-bright);
}

/* Responsive */
@media (max-width: 768px) {
  .nav-inner { gap: 12px; }
  .nav-links { gap: 12px; }
  .nav-links a:not(.nav-cta) { font-size: 13px; }
  /* Lang toggle stays visible on mobile — RU users who land on EN
     trail-pages need an in-UI way to switch (per CLAUDE.md frontend
     localization rule). */
  .lang-toggle { min-height: 38px; }
  .lang-toggle button { padding: 8px 10px; min-height: 38px; min-width: 38px; font-size: 10px; }
  .page-main { padding-top: 108px; padding-bottom: 64px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
  .footer-bottom { flex-direction: column; gap: 14px; text-align: center; }
  .prose h2 { margin-top: 40px; }
}
@media (max-width: 480px) {
  .container { padding: 0 18px; }
  .nav-inner { height: 64px; }
  .nav-links a:not(.nav-cta) { display: none; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}
