/* ==========================================================================
   ovyrn — core.css
   Общие токены и базовые компоненты для всего сайта (маркетинг + кабинет).
   ========================================================================== */

@font-face {
  font-family: 'Fraunces';
  src: local('Fraunces');
  font-display: swap;
}

:root {
  /* Colors */
  --bg: #000000;
  --bg-soft: #0c0c0b;
  --bg-elevated: #131311;
  --text: #f4f2ec;
  --text-dim: rgba(244, 242, 236, 0.65);
  --text-faint: rgba(244, 242, 236, 0.4);
  --border: rgba(244, 242, 236, 0.1);
  --border-strong: rgba(244, 242, 236, 0.18);
  --accent: #f4f2ec;

  /* Rainbow gradient (used sparingly, per word/phrase) */
  --rainbow: linear-gradient(90deg, #ff6b6b, #ffd93d, #6bff8f, #4dd8ff, #a06bff, #ff6bd6);

  /* Radii */
  --r-lg: 26px;
  --r-md: 20px;
  --r-sm: 14px;

  /* Fonts */
  --font-hero: 'Fraunces', Georgia, serif;
  --font-heading: 'Outfit', 'Inter', -apple-system, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'Geist Mono', 'SFMono-Regular', Consolas, monospace;

  --header-h: 64px;
}

* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}
body { min-height: 100vh; overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
img, svg { display: block; max-width: 100%; }

.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Section heading — Outfit with white→grey gradient fade */
.section-title {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  background: linear-gradient(180deg, #ffffff 0%, rgba(255,255,255,0.55) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin: 0 0 16px;
}

.section-sub {
  color: var(--text-dim);
  font-size: 1.05rem;
  line-height: 1.6;
  max-width: 640px;
  margin: 0 0 48px;
}

/* Rainbow accent — use on a single word/short phrase, sparingly */
.rainbow-text {
  background: var(--rainbow);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: rainbow-shift 6s linear infinite;
}
@keyframes rainbow-shift {
  to { background-position: 200% center; }
}

/* Glass surface — shared by buttons, cards, inputs */
.glass {
  border: 2px solid rgba(255,255,255,0.05);
  background-image: linear-gradient(104deg, rgba(253,253,253,0.05) 5%, rgba(240,240,228,0.10) 100%);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  box-shadow: 0 1px 2px rgba(0,0,0,0.35);
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 22px;
  border-radius: var(--r-md);
  font-size: 14px; font-weight: 600;
  cursor: pointer; border: none;
  transition: transform .15s ease, background .2s ease, color .2s ease;
}
.btn-primary {
  color: #fff;
  border: 2px solid rgba(255,255,255,0.05);
  background: linear-gradient(104deg, rgba(253,253,253,0.05) 5%, rgba(240,240,228,0.10) 100%);
}
.btn-primary:hover { background: rgba(255,255,255,0.92); color: #000; }
.btn-ghost {
  background: transparent; color: var(--text-dim); border: 1px solid transparent;
}
.btn-ghost:hover { color: var(--text); background: rgba(255,255,255,0.05); }

/* ============================== HEADER / NAV ============================= */
.site-header {
  position: sticky; top: 0; z-index: 40;
  height: var(--header-h);
  display: flex; align-items: center;
  background: rgba(0,0,0,0.72);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.site-header .container {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px;
}
.logo-link { display: flex; align-items: center; }
.logo-link svg { height: 22px; width: auto; }

.nav-menu { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav-item { position: relative; }
.nav-trigger {
  display: flex; align-items: center; gap: 6px;
  height: var(--header-h); padding: 0 14px;
  background: none; border: none; cursor: pointer;
  color: var(--text-dim); font-size: 14px; font-weight: 500;
}
.nav-trigger:hover, .nav-trigger[aria-expanded="true"] { color: var(--text); }
.nav-trigger .chev {
  width: 12px; height: 12px; transition: transform .2s ease;
  opacity: 0.7;
}
.nav-trigger[aria-expanded="true"] .chev { transform: rotate(180deg); }

.nav-link {
  display: flex; align-items: center;
  height: var(--header-h); padding: 0 14px;
  color: var(--text-dim); font-size: 14px; font-weight: 500;
}
.nav-link:hover { color: var(--text); }

.nav-panel {
  position: absolute; top: calc(100% + 8px); left: 0;
  min-width: 260px;
  border-radius: var(--r-md);
  padding: 10px;
  display: none;
  flex-direction: column;
  gap: 2px;
  z-index: 50;
}
.nav-panel.open {
  display: flex;
  animation: nav-panel-in .16s ease;
}
@keyframes nav-panel-in {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}
.nav-panel a {
  display: block; padding: 10px 12px; border-radius: 10px;
  color: var(--text-dim); font-size: 14px;
}
.nav-panel a:hover { background: rgba(255,255,255,0.06); color: var(--text); }
.nav-panel a small { display: block; color: var(--text-faint); font-size: 12px; margin-top: 2px; }

.header-actions { display: flex; align-items: center; gap: 8px; }

/* Mobile toggle (basic; full mobile drawer can extend this) */
.nav-mobile-toggle { display: none; background: none; border: none; color: var(--text); cursor: pointer; }
@media (max-width: 860px) {
  .nav-menu, .header-actions .btn-ghost { display: none; }
  .nav-mobile-toggle { display: flex; }
}

/* ================================ FOOTER ================================= */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg);
  padding: 64px 0 40px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(4, 1fr);
  gap: 32px;
}
.footer-col h4 {
  font-size: 13px; color: var(--text-dim); font-weight: 500; margin: 0 0 16px;
}
.footer-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.footer-col a { color: var(--text-dim); font-size: 14px; }
.footer-col a:hover { color: var(--text); }
.footer-status {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px; border-radius: 999px;
  border: 1px solid var(--border-strong);
  font-size: 12px; color: var(--text-dim);
  width: fit-content; margin-top: 20px;
}
.footer-status .dot { width: 8px; height: 8px; border-radius: 50%; background: #3ddc73; }

@media (max-width: 860px) {
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ================================= ICONS ================================= */
.icon { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.6; }

/* ================================ HERO CUBE =============================
   CSS-only 3D cube (9 "плиток" на каждой грани, разная фактура), вращается
   бесконечно. Не WebGL-видео, но держит тот же дух: тёмный, с бликами.
   ========================================================================== */
.cube-stage {
  width: 220px; height: 220px;
  perspective: 900px;
  margin: 0 auto;
}
.cube {
  width: 100%; height: 100%;
  position: relative;
  transform-style: preserve-3d;
  animation: cube-spin 16s linear infinite;
}
@keyframes cube-spin {
  from { transform: rotateX(-18deg) rotateY(0deg); }
  to   { transform: rotateX(-18deg) rotateY(360deg); }
}
.cube-face {
  position: absolute; inset: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: 2px;
  background: #050505;
  border: 1px solid rgba(255,255,255,0.06);
}
.cube-face span {
  background: linear-gradient(160deg, #1b1b1b, #0a0a0a);
}
.cube-face span:nth-child(3n+1) { background: linear-gradient(160deg, #2a2a2a, #0c0c0c); }
.cube-face span:nth-child(5) {
  background:
    radial-gradient(1px 1px at 20% 30%, rgba(255,255,255,0.5) 50%, transparent 51%),
    radial-gradient(1px 1px at 60% 70%, rgba(255,255,255,0.4) 50%, transparent 51%),
    radial-gradient(1px 1px at 80% 20%, rgba(255,255,255,0.5) 50%, transparent 51%),
    #050505;
}
.cube-face span:nth-child(9) {
  background-image: radial-gradient(rgba(255,255,255,0.35) 1px, transparent 1px);
  background-size: 5px 5px;
  background-color: #0a0a0a;
}
.cube-front  { transform: translateZ(110px); }
.cube-back   { transform: rotateY(180deg) translateZ(110px); }
.cube-right  { transform: rotateY(90deg) translateZ(110px); }
.cube-left   { transform: rotateY(-90deg) translateZ(110px); }
.cube-top    { transform: rotateX(90deg) translateZ(110px); }
.cube-bottom { transform: rotateX(-90deg) translateZ(110px); }

/* ================================= HERO =================================== */
.hero {
  padding: 96px 0 60px;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 40px;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px; border-radius: 999px;
  border: 1px solid var(--border-strong);
  font-size: 13px; color: var(--text-dim);
  margin-bottom: 24px;
}
.hero h1 {
  font-family: var(--font-hero);
  font-weight: 400;
  font-size: clamp(2.6rem, 5.5vw, 4.5rem);
  line-height: 1.02;
  letter-spacing: -0.01em;
  margin: 0 0 20px;
}
.hero p.lead {
  color: var(--text-dim);
  font-size: 1.15rem;
  line-height: 1.6;
  max-width: 480px;
  margin: 0 0 32px;
}
.hero-ctas { display: flex; gap: 12px; flex-wrap: wrap; }

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; text-align: center; }
  .hero p.lead { margin-left: auto; margin-right: auto; }
  .hero-ctas { justify-content: center; }
}

/* ============================ FEATURE GRID ================================ */
.features {
  padding: 80px 0;
  border-top: 1px solid var(--border);
}
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.feature-card {
  padding: 28px;
  border-radius: var(--r-lg);
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(255,255,255,0.03), transparent 60%);
}
.feature-card .icon-wrap {
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 12px;
  border: 1px solid var(--border-strong);
  background: linear-gradient(160deg, rgba(255,255,255,0.06), transparent);
  margin-bottom: 18px;
}
.feature-card h3 {
  font-family: var(--font-heading); font-size: 1.15rem; font-weight: 600;
  margin: 0 0 8px;
}
.feature-card p { color: var(--text-dim); font-size: 14px; line-height: 1.6; margin: 0; }

@media (max-width: 860px) {
  .feature-grid { grid-template-columns: 1fr; }
}

/* ============================== PRICING TEASER ============================ */
.pricing-cta {
  padding: 90px 0;
  text-align: center;
  border-top: 1px solid var(--border);
}
