/* ================================================================
   Levrg — shared.css
   Design tokens, reset, backgrounds, nav, footer, buttons, chrome
   ================================================================ */

:root {
  /* Colors */
  --bg: #080808;
  --bg-elev: #0e0e11;
  --bg-card: #101015;
  --bg-card-hi: #141419;

  --text: #f5f5f7;
  --text-dim: #8a8a94;
  --text-faint: #55555c;

  --accent: #ff5b1f;
  --accent-hi: #ff7a43;
  --accent-lo: #e64a19;
  --accent-glow: rgba(255, 91, 31, 0.45);

  --border: rgba(255, 255, 255, 0.07);
  --border-strong: rgba(255, 255, 255, 0.14);

  /* Fonts */
  --serif: 'Instrument Serif', ui-serif, Georgia, serif;
  --sans: 'Geist', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;

  /* Layout */
  --max: 1280px;
  --pad-x: 48px;
  --nav-h: 74px;

  /* Motion */
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.6;
  font-weight: 400;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
img, svg, video { display: block; max-width: 100%; }
ul { list-style: none; }

/* ---------- Backgrounds ---------- */
.dot-grid {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: radial-gradient(circle, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 22px 22px;
  mask-image: radial-gradient(ellipse 90% 70% at 50% 30%, #000 40%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 30%, #000 40%, transparent 100%);
}
.ember-glow {
  position: fixed;
  top: -300px;
  right: -200px;
  width: 1100px;
  height: 900px;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at center, var(--accent-glow) 0%, rgba(255, 91, 31, 0.15) 25%, transparent 60%);
  filter: blur(40px);
  animation: glow-pulse 8s ease-in-out infinite;
}
@keyframes glow-pulse {
  0%, 100% { opacity: 0.85; transform: scale(1); }
  50%      { opacity: 1;    transform: scale(1.05); }
}

/* ---------- Nav ---------- */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  height: var(--nav-h);
  padding: 0 var(--pad-x);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: rgba(8, 8, 8, 0.6);
  border-bottom: 1px solid var(--border);
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 18px;
  letter-spacing: -0.01em;
  flex-shrink: 0;
}
.logo-mark {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), var(--accent-hi));
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 20px var(--accent-glow);
}
.logo-mark::after {
  content: '';
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.6);
  animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%      { transform: scale(0.7); opacity: 0.6; }
}

.nav-links {
  display: flex;
  gap: 36px;
  font-size: 14px;
  color: var(--text-dim);
  font-weight: 400;
}
.nav-links a {
  transition: color 0.2s;
  position: relative;
}
.nav-links a:hover { color: var(--text); }

/* Active nav link highlighting */
.site-nav[data-nav-active="product"] .nav-links a[data-nav="product"],
.site-nav[data-nav-active="pricing"] .nav-links a[data-nav="pricing"],
.site-nav[data-nav-active="about"]   .nav-links a[data-nav="about"],
.site-nav[data-nav-active="blog"]    .nav-links a[data-nav="blog"],
.site-nav[data-nav-active="contact"] .nav-links a[data-nav="contact"] {
  color: var(--text);
}
.site-nav[data-nav-active="product"] .nav-links a[data-nav="product"]::after,
.site-nav[data-nav-active="pricing"] .nav-links a[data-nav="pricing"]::after,
.site-nav[data-nav-active="about"]   .nav-links a[data-nav="about"]::after,
.site-nav[data-nav-active="blog"]    .nav-links a[data-nav="blog"]::after,
.site-nav[data-nav-active="contact"] .nav-links a[data-nav="contact"]::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -22px;
  height: 2px;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent-glow);
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 11px 20px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08) inset, 0 4px 20px rgba(255, 91, 31, 0.35);
  flex-shrink: 0;
}
.nav-cta:hover {
  background: var(--accent-hi);
  transform: translateY(-1px);
}
.nav-cta::after {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #fff;
}

.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.25s, opacity 0.25s;
}

/* ---------- Section primitives ---------- */
main { position: relative; z-index: 1; padding-top: var(--nav-h); }
section {
  padding: 120px var(--pad-x);
  max-width: var(--max);
  margin: 0 auto;
  position: relative;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-strong);
  font-size: 13px;
  color: var(--text-dim);
  font-weight: 400;
  margin-bottom: 28px;
}
.eyebrow::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
  animation: pulse-dot 2s ease-in-out infinite;
}

.section-head { margin-bottom: 64px; max-width: 760px; }
.section-head h2 {
  font-size: clamp(32px, 4.5vw, 56px);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.025em;
  margin-bottom: 18px;
}
.section-head h2 em {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  color: var(--accent);
}
.section-head p {
  font-size: 17px;
  color: var(--text-dim);
  line-height: 1.6;
  max-width: 600px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 15px 28px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.005em;
  transition: all 0.25s var(--ease);
}
.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1) inset, 0 8px 32px rgba(255, 91, 31, 0.4);
}
.btn-primary::after {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fff;
}
.btn-primary:hover {
  background: var(--accent-hi);
  transform: translateY(-2px);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.15) inset, 0 12px 40px rgba(255, 91, 31, 0.5);
}
.btn-secondary {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  border: 1px solid var(--border-strong);
}
.btn-secondary::after {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1.5px solid var(--text-dim);
  background: transparent;
}
.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.25);
}

.btn-row {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

/* ---------- Footer ---------- */
.site-footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border);
  padding: 80px var(--pad-x) 30px;
  margin-top: 40px;
}
.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.5fr 2fr;
  gap: 60px;
  padding-bottom: 50px;
  border-bottom: 1px solid var(--border);
}
.footer-brand .logo { margin-bottom: 18px; }
.footer-tagline {
  color: var(--text-dim);
  font-size: 14px;
  max-width: 280px;
  line-height: 1.55;
}
.footer-cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}
.footer-col h4 {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 18px;
}
.footer-col a {
  display: block;
  font-size: 14px;
  color: var(--text-dim);
  padding: 6px 0;
  transition: color 0.2s;
}
.footer-col a:hover { color: var(--text); }

.footer-base {
  max-width: var(--max);
  margin: 0 auto;
  padding-top: 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 13px;
  color: var(--text-faint);
}
.footer-base a:hover { color: var(--text-dim); }

/* ---------- Entrance animations ---------- */
.fade-up {
  opacity: 0;
  transform: translateY(20px);
  animation: fade-up 0.9s var(--ease) forwards;
}
.d1 { animation-delay: 0.05s; }
.d2 { animation-delay: 0.18s; }
.d3 { animation-delay: 0.32s; }
.d4 { animation-delay: 0.46s; }
.d5 { animation-delay: 0.60s; }
@keyframes fade-up {
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  :root { --pad-x: 24px; }
  section { padding: 80px 24px; }

  .nav-toggle { display: flex; }
  .nav-links {
    position: fixed;
    top: var(--nav-h);
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    padding: 20px 24px 32px;
    background: rgba(8, 8, 8, 0.96);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.25s, opacity 0.25s;
  }
  .nav-links a {
    padding: 14px 0;
    font-size: 16px;
    border-bottom: 1px solid var(--border);
  }
  .nav-links a::after { display: none !important; }
  .site-nav.open .nav-links {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
  .nav-cta { display: none; }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .footer-cols {
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
  }
}

@media (max-width: 560px) {
  .footer-cols { grid-template-columns: 1fr 1fr; }
  .footer-base { flex-direction: column; align-items: flex-start; }
}
