/* ==========================================================================
   BetaBytez — Design Tokens & Global Foundation
   ========================================================================== */

:root {
  /* Palette */
  --white: #ffffff;
  --surface: #F8FAFC;
  --surface-alt: #F1F5F9;
  --line: #E5E7EB;
  --line-soft: rgba(17, 24, 39, 0.08);
  --ink: #111827;
  --ink-soft: #4B5563;
  --ink-faint: #9CA3AF;
  --navy: #0B1220;
  --blue: #2563EB;
  --blue-light: #60A5FA;
  --blue-dim: rgba(37, 99, 235, 0.10);
  --blue-dim-2: rgba(37, 99, 235, 0.18);

  /* Gradients */
  --grad-brand: linear-gradient(135deg, #2563EB 0%, #60A5FA 100%);
  --grad-navy: linear-gradient(180deg, #0B1220 0%, #111827 100%);
  --grad-mesh: radial-gradient(circle at 20% 20%, rgba(37,99,235,0.10), transparent 45%),
               radial-gradient(circle at 80% 30%, rgba(96,165,250,0.12), transparent 45%),
               radial-gradient(circle at 50% 90%, rgba(37,99,235,0.06), transparent 50%);

  /* Type */
  --font-display: 'Manrope', 'Inter', sans-serif;
  --font-body: 'Inter', sans-serif;

  /* Layout */
  --max: 1280px;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-pill: 999px;

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(17, 24, 39, 0.04);
  --shadow-md: 0 8px 30px rgba(17, 24, 39, 0.08);
  --shadow-lg: 0 20px 60px rgba(17, 24, 39, 0.12);
  --shadow-blue: 0 10px 40px rgba(37, 99, 235, 0.25);

  /* Motion */
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-soft: cubic-bezier(0.22, 0.61, 0.36, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

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

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--white);
  line-height: 1.65;
  overflow-x: hidden;
  font-size: 16px;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, textarea, select { font-family: inherit; }

::selection { background: var(--blue); color: #fff; }

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
  border-radius: 4px;
}

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

h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.02em;
  line-height: 1.1;
}

p { color: var(--ink-soft); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 18px;
}

.eyebrow::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 0 4px var(--blue-dim);
}

.section-head {
  max-width: 640px;
  margin-bottom: 64px;
}

.section-head.center { margin-inline: auto; text-align: center; }

.section-head h2 {
  font-size: clamp(2rem, 3.4vw, 2.75rem);
  margin-bottom: 16px;
}

.section-head p { font-size: 1.05rem; color: var(--ink-soft); }

section { position: relative; }

.section-pad { padding: 120px 0; }
@media (max-width: 768px) { .section-pad { padding: 80px 0; } }

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 30px;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), background 0.3s, color 0.3s, border-color 0.3s;
  white-space: nowrap;
  position: relative;
}

.btn-primary {
  background: var(--ink);
  color: #fff;
  box-shadow: var(--shadow-md);
}
.btn-primary:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); background: var(--blue); }

.btn-glow {
  background: var(--grad-brand);
  color: #fff;
  box-shadow: var(--shadow-blue);
}
.btn-glow:hover { transform: translateY(-3px); box-shadow: 0 16px 46px rgba(37,99,235,0.38); }

.btn-outline {
  background: transparent;
  color: var(--ink);
  border: 1.5px solid var(--line);
}
.btn-outline:hover { border-color: var(--ink); background: var(--surface); transform: translateY(-3px); }

.btn-outline.on-dark { color: #fff; border-color: rgba(255,255,255,0.25); }
.btn-outline.on-dark:hover { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.5); }

.btn-sm { padding: 10px 20px; font-size: 0.85rem; }

.btn svg { width: 18px; height: 18px; transition: transform 0.3s var(--ease); }
.btn:hover svg.arrow { transform: translateX(4px); }

/* ---- Scroll reveal ---- */
[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}
[data-reveal="left"] { transform: translateX(-32px); }
[data-reveal="right"] { transform: translateX(32px); }
[data-reveal="scale"] { transform: scale(0.94); }
[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

/* ---- Header ---- */
.site-header {
  position: fixed;
  top: 0; left: 0; width: 100%;
  z-index: 1000;
  padding: 22px 0;
  transition: padding 0.35s var(--ease), background 0.35s var(--ease), box-shadow 0.35s var(--ease);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.site-header.scrolled {
  padding: 14px 0;
  background: rgba(255,255,255,0.82);
  backdrop-filter: blur(16px) saturate(160%);
  box-shadow: 0 1px 0 var(--line), var(--shadow-sm);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.brand img { width: 34px; height: 34px; border-radius: 50%; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 34px;
}
.nav-links a {
  position: relative;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--ink-soft);
  padding: 6px 0;
  transition: color 0.25s;
}
.nav-links a::after {
  content: '';
  position: absolute;
  left: 0; bottom: 0;
  width: 0; height: 2px;
  background: var(--blue);
  transition: width 0.3s var(--ease);
  border-radius: 2px;
}
.nav-links a:hover,
.nav-links a.active { color: var(--ink); }
.nav-links a:hover::after,
.nav-links a.active::after { width: 100%; }

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

.menu-toggle {
  display: none;
  width: 40px; height: 40px;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  border: 1px solid var(--line);
}
.menu-toggle span, .menu-toggle span::before, .menu-toggle span::after {
  content: '';
  display: block;
  width: 18px; height: 2px;
  background: var(--ink);
  position: relative;
  transition: 0.3s;
}
.menu-toggle span::before { content: ''; position: absolute; top: -6px; width: 18px; height: 2px; background: var(--ink); }
.menu-toggle span::after { content: ''; position: absolute; top: 6px; width: 18px; height: 2px; background: var(--ink); }

.mobile-nav {
  position: fixed;
  top: 0; right: 0;
  width: min(84vw, 360px);
  height: 100vh;
  background: #fff;
  box-shadow: -20px 0 60px rgba(17,24,39,0.15);
  transform: translateX(100%);
  transition: transform 0.45s var(--ease);
  z-index: 1100;
  padding: 100px 32px 40px;
  display: flex;
  flex-direction: column;
  gap: 26px;
}
.mobile-nav.open { transform: translateX(0); }
.mobile-nav a { font-size: 1.1rem; font-weight: 600; color: var(--ink); }
.mobile-nav .btn { align-self: flex-start; margin-top: 10px; }

.nav-scrim {
  position: fixed; inset: 0;
  background: rgba(11,18,32,0.45);
  z-index: 1050;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s;
}
.nav-scrim.show { opacity: 1; visibility: visible; }

@media (max-width: 900px) {
  .nav-links { display: none; }
  .header-actions .btn.desktop-only { display: none; }
  .menu-toggle { display: flex; }
}

/* ---- Footer ---- */
.site-footer {
  background: var(--navy);
  color: rgba(255,255,255,0.7);
  padding: 90px 0 0;
}
.footer-top {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr 1.2fr;
  gap: 40px;
  padding-bottom: 60px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.footer-brand .brand { color: #fff; margin-bottom: 16px; }
.footer-brand p { color: rgba(255,255,255,0.55); max-width: 280px; font-size: 0.92rem; }
.footer-col h4 {
  color: #fff; font-size: 0.85rem; text-transform: uppercase;
  letter-spacing: 0.08em; margin-bottom: 20px; font-weight: 700;
}
.footer-col ul { display: flex; flex-direction: column; gap: 12px; }
.footer-col a { color: rgba(255,255,255,0.6); font-size: 0.92rem; transition: color 0.25s, padding-left 0.25s; }
.footer-col a:hover { color: #fff; padding-left: 3px; }

.footer-social { display: flex; gap: 10px; margin-top: 20px; }
.footer-social a {
  width: 38px; height: 38px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1);
  transition: background 0.3s, transform 0.3s;
}
.footer-social a:hover { background: var(--blue); transform: translateY(-3px); }
.footer-social svg { width: 16px; height: 16px; }

.newsletter-form { display: flex; gap: 8px; margin-top: 8px; }
.newsletter-form input {
  flex: 1; padding: 12px 16px; border-radius: var(--radius-pill);
  border: 1px solid rgba(255,255,255,0.15); background: rgba(255,255,255,0.06);
  color: #fff; font-size: 0.88rem;
}
.newsletter-form input::placeholder { color: rgba(255,255,255,0.4); }
.newsletter-form button {
  background: var(--grad-brand); color: #fff; border-radius: var(--radius-pill);
  padding: 12px 20px; font-weight: 600; font-size: 0.85rem; flex-shrink: 0;
}

.footer-bottom {
  display: flex; justify-content: space-between; align-items: center;
  padding: 26px 0; font-size: 0.82rem; color: rgba(255,255,255,0.45); flex-wrap: wrap; gap: 10px;
}
.footer-bottom a { color: rgba(255,255,255,0.45); }
.footer-bottom a:hover { color: #fff; }

@media (max-width: 900px) {
  .footer-top { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .footer-top { grid-template-columns: 1fr; gap: 32px; }
}

/* ---- Back to top ---- */
.back-top {
  position: fixed;
  right: 26px; bottom: 26px;
  width: 46px; height: 46px;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.3s, transform 0.3s, visibility 0.3s, background 0.3s;
  z-index: 500;
  box-shadow: var(--shadow-md);
}
.back-top.show { opacity: 1; visibility: visible; transform: none; }
.back-top:hover { background: var(--blue); }

/* ---- Page hero (used on inner pages) ---- */
.page-hero {
  padding: 190px 0 90px;
  background: var(--surface);
  position: relative;
  overflow: hidden;
  text-align: center;
}
.page-hero::before {
  content: '';
  position: absolute; inset: 0;
  background: var(--grad-mesh);
}
.page-hero .container { position: relative; z-index: 1; }
.page-hero .eyebrow { justify-content: center; }
.page-hero h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); margin-bottom: 16px; }
.page-hero p { max-width: 600px; margin: 0 auto; font-size: 1.05rem; }

/* ---- Utility ---- */
.text-gradient {
  background: var(--grad-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.glass {
  background: rgba(255,255,255,0.65);
  backdrop-filter: blur(18px) saturate(160%);
  border: 1px solid rgba(255,255,255,0.5);
}
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px; border-radius: var(--radius-pill);
  background: var(--surface); border: 1px solid var(--line);
  font-size: 0.78rem; font-weight: 600; color: var(--ink-soft);
}
