/* Peakflov — shared styles */
:root {
  --bg: #0A0A0A;
  --bg-2: #0F172A;
  --surface: #0c0f1a;
  --surface-2: #111827;
  --border: rgba(59, 130, 246, 0.14);
  --border-strong: rgba(59, 130, 246, 0.35);
  --text: #E6EAF2;
  --text-dim: #8A93A6;
  --text-mute: #5B6476;
  --blue: #3B82F6;
  --blue-2: #60A5FA;
  --blue-deep: #1D4ED8;
  --glow: 0 0 0 1px rgba(59,130,246,0.15), 0 20px 60px -20px rgba(59,130,246,0.35);
  --glow-soft: 0 0 0 1px rgba(59,130,246,0.10), 0 10px 40px -20px rgba(59,130,246,0.25);
  --radius: 14px;
  --radius-lg: 22px;
  --maxw: 1280px;
  --nav-h: 76px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.55;
  overflow-x: hidden;
}

/* Global video background */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: #0A0A0A;
  z-index: -4;
  pointer-events: none;
}
.global-bg-video {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  z-index: -3;
  pointer-events: none;
  opacity: 0.25;
}
.global-bg-overlay {
  position: fixed;
  inset: 0;
  background: linear-gradient(180deg, rgba(10,10,12,0.65) 0%, rgba(10,10,12,0.88) 40%, #0A0A0A 100%);
  z-index: -2;
  pointer-events: none;
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(59,130,246,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(59,130,246,0.03) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(1200px 800px at 50% 0%, #000 0%, transparent 70%);
  z-index: -1;
  pointer-events: none;
  opacity: 0.5;
}

a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-weight: 500;
  letter-spacing: -0.02em;
  margin: 0;
  line-height: 1.05;
}
h1 { font-size: clamp(48px, 6.4vw, 88px); }
h2 { font-size: clamp(36px, 4.2vw, 56px); letter-spacing: -0.025em; }
h3 { font-size: clamp(22px, 1.6vw, 26px); letter-spacing: -0.015em; font-weight: 500; }
p  { color: var(--text-dim); font-size: 17px; }

.mono { font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace; }

/* ————— Navbar ————— */
.nav {
  position: fixed;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  width: min(1280px, calc(100% - 32px));
  height: var(--nav-h);
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 0 20px 0 26px;
  background: rgba(10, 10, 12, 0.55);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 16px;
  box-shadow: 0 10px 40px -20px rgba(0,0,0,0.8);
}
.nav::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: 17px;
  padding: 1px;
  background: linear-gradient(120deg, rgba(59,130,246,0.35), rgba(59,130,246,0) 40%, rgba(59,130,246,0) 60%, rgba(59,130,246,0.25));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  pointer-events: none;
  opacity: 0.7;
}

.logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.logo img {
  height: 64px;
  width: auto;
  display: block;
}
.footer .logo img {
  height: 54px;
}

/* Language switcher */
.lang-switch {
  display: flex;
  gap: 2px;
  margin-left: 8px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  padding: 2px;
  background: rgba(255,255,255,0.03);
}
.lang-btn {
  padding: 5px 10px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--text-mute);
  border: none;
  background: transparent;
  border-radius: 6px;
  cursor: pointer;
  transition: color .2s, background .2s;
}
.lang-btn:hover { color: var(--text); }
.lang-btn.active {
  color: #fff;
  background: rgba(59,130,246,0.2);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}
@media (max-width: 960px) {
  .logo img { height: 52px; }
  .footer .logo img { height: 44px; }
  .nav { gap: 16px; padding: 0 14px 0 18px; }
}
.nav-links a {
  padding: 10px 14px;
  font-size: 14px;
  color: var(--text-dim);
  border-radius: 10px;
  transition: color .2s ease, background .2s ease;
}
.nav-links a:hover { color: #fff; background: rgba(59,130,246,0.07); }
.nav-links a.active { color: #fff; }
.nav-links a.active::after {
  content: "";
  display: block;
  width: 14px; height: 1px;
  background: var(--blue);
  margin: 4px auto 0;
  box-shadow: 0 0 8px var(--blue);
}

.nav-cta {
  margin-left: 12px;
}

/* ————— Buttons ————— */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .25s ease, background .25s ease, border-color .25s ease;
  white-space: nowrap;
  font-family: inherit;
}
.btn-primary {
  background: linear-gradient(180deg, #3B82F6 0%, #2563EB 100%);
  color: #fff;
  box-shadow: 0 10px 30px -10px rgba(59,130,246,0.55), inset 0 1px 0 rgba(255,255,255,0.18);
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 40px -10px rgba(59,130,246,0.8), inset 0 1px 0 rgba(255,255,255,0.25);
}
.btn-ghost {
  background: rgba(255,255,255,0.02);
  color: #fff;
  border-color: rgba(255,255,255,0.1);
}
.btn-ghost:hover {
  background: rgba(59,130,246,0.08);
  border-color: var(--border-strong);
  box-shadow: 0 0 0 1px var(--border-strong), 0 12px 40px -20px rgba(59,130,246,0.5);
}
.btn-lg { padding: 15px 24px; font-size: 15px; border-radius: 12px; }

.btn .arrow { transition: transform .25s ease; }
.btn:hover .arrow { transform: translateX(3px); }

/* ————— Layout ————— */
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.section { padding: 120px 0; position: relative; }
.section-sm { padding: 80px 0; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--blue-2);
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(59,130,246,0.06);
}
.eyebrow::before {
  content: "";
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 8px var(--blue);
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 40px;
  margin-bottom: 64px;
}
.section-head p { max-width: 420px; }

/* ————— Cards ————— */
.card {
  position: relative;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.5) 0%, rgba(10, 10, 14, 0.5) 100%);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius);
  padding: 28px;
  transition: transform .3s ease, border-color .3s ease, box-shadow .3s ease;
  overflow: hidden;
}
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(600px circle at var(--mx, 50%) var(--my, 0%), rgba(59,130,246,0.10), transparent 40%);
  opacity: 0;
  transition: opacity .3s ease;
  pointer-events: none;
}
.card:hover {
  transform: translateY(-4px);
  border-color: var(--border-strong);
  box-shadow: 0 20px 60px -30px rgba(59,130,246,0.6), 0 0 0 1px var(--border-strong);
}
.card:hover::before { opacity: 1; }

/* ————— Footer ————— */
.footer {
  border-top: 1px solid rgba(255,255,255,0.06);
  padding: 48px 0 32px;
  margin-top: 80px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
.footer-grid h4 {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-mute);
  font-weight: 500;
  margin-bottom: 16px;
}
.footer-grid a, .footer-grid div.fc-item {
  display: block;
  color: var(--text-dim);
  font-size: 14px;
  padding: 4px 0;
  transition: color .2s ease;
}
.footer-grid a:hover { color: var(--blue-2); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.04);
  color: var(--text-mute);
  font-size: 12px;
  font-family: 'JetBrains Mono', monospace;
}

/* ————— Utility ————— */
.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(59,130,246,0.25), transparent);
  margin: 0;
  border: 0;
}

/* Accessibility */
:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
  border-radius: 6px;
}

/* ————— Cookie Banner ————— */
.cookie-banner {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 200;
  max-width: 360px;
  padding: 20px 24px;
  background: rgba(10,10,14,0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(59,130,246,0.2);
  border-radius: var(--radius);
  box-shadow: 0 20px 60px -20px rgba(0,0,0,0.8), 0 0 0 1px rgba(59,130,246,0.08);
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: opacity .3s ease, transform .3s ease;
}
.cookie-banner.hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
}
.cookie-banner p {
  font-size: 13px;
  color: var(--text-dim);
  margin: 0;
  line-height: 1.55;
}
.cookie-actions {
  display: flex;
  gap: 8px;
}
.cookie-actions .btn {
  flex: 1;
  justify-content: center;
  padding: 9px 12px;
  font-size: 13px;
}

/* ————— Legal pages ————— */
.legal-wrap { padding: calc(var(--nav-h) + 100px) 0 120px; }
.legal-header { margin-bottom: 60px; }
.legal-header .eyebrow { margin-bottom: 20px; }
.legal-header h1 { font-family: 'Space Grotesk', sans-serif; font-weight: 400; font-size: clamp(36px, 4vw, 56px); }
.legal-updated { font-family: 'JetBrains Mono', monospace; font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-mute); margin-top: 16px; }
.legal-body { max-width: 780px; }
.legal-body .intro { font-size: 18px; color: var(--text-dim); margin-bottom: 48px; line-height: 1.65; }
.legal-section { margin-bottom: 40px; padding-bottom: 40px; border-bottom: 1px solid rgba(255,255,255,0.05); }
.legal-section:last-child { border-bottom: 0; }
.legal-section h2 { font-family: 'Space Grotesk', sans-serif; font-size: 20px; font-weight: 500; color: #fff; margin-bottom: 12px; letter-spacing: -0.01em; }
.legal-section p { font-size: 16px; line-height: 1.7; margin: 0; }

/* ————— 404 page ————— */
.err-wrap { padding: calc(var(--nav-h) + 140px) 0 140px; text-align: center; }
.err-code { font-family: 'Space Grotesk', sans-serif; font-size: clamp(100px, 18vw, 200px); font-weight: 400; letter-spacing: -0.06em; line-height: 1; background: linear-gradient(180deg, rgba(255,255,255,0.15), rgba(255,255,255,0.04)); -webkit-background-clip: text; background-clip: text; color: transparent; margin-bottom: 16px; }
.err-wrap h1 { font-family: 'Space Grotesk', sans-serif; font-weight: 400; font-size: clamp(28px, 3vw, 42px); margin-bottom: 16px; }
.err-wrap p { max-width: 400px; margin: 0 auto 40px; }

/* Responsive */
@media (max-width: 820px) {
  .nav-links { gap: 2px; }
  .nav-links a { padding: 8px 10px; font-size: 13px; }
  .section { padding: 80px 0; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .section-head { flex-direction: column; align-items: flex-start; }
}
