/* WebbIA™ Tech — Quiet Authority design system */
@import url('https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&family=Inter+Tight:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500&family=Syne:wght@400;500;600;700;800&family=DM+Sans:wght@300;400;500&display=swap');

:root {
  /* Surfaces */
  --bg-primary: #050814;
  --bg-elevated: #0a0d1e;
  --bg-elevated-2: #11142B;

  /* Brand */
  --brand-primary: #5B4BCC;
  --brand-light: #7C6EE0;
  --brand-glow: #9B8FF2;
  --brand-deep: #1F1644;

  /* Accents */
  --accent-success: #22D3A0;

  /* Text */
  --text-primary: #F0EEF8;
  --text-secondary: #AFA9EC;
  --text-muted: #7B81A1;

  /* Strokes */
  --border-subtle: #1F2547;
  --border-glow: rgba(91, 75, 204, 0.25);

  /* System */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-xl: 32px;

  --maxw: 1240px;
  --pad-x: clamp(20px, 4vw, 56px);

  --shadow-glow: 0 0 0 1px var(--border-glow), 0 30px 80px -20px rgba(91,75,204,0.35);

  --font-display: 'Instrument Serif', 'Times New Roman', serif;
  --font-body: 'Inter Tight', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
}

/* Light theme override (opt-in via [data-theme="light"]) */
[data-theme="light"] {
  --bg-primary: #F6F4FB;
  --bg-elevated: #FFFFFF;
  --bg-elevated-2: #EFEBFA;
  --brand-primary: #5B4BCC;
  --brand-light: #7C6EE0;
  --brand-glow: #9B8FF2;
  --brand-deep: #ECE7FB;
  --text-primary: #0a0d1e;
  --text-secondary: #3D3266;
  --text-muted: #6B6F8C;
  --border-subtle: #E2DDF3;
  --border-glow: rgba(91,75,204,0.18);
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  font-feature-settings: 'ss01', 'ss02', 'cv11';
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
img, svg { display: block; max-width: 100%; }

/* Aurora bg layered behind everything */
.aurora {
  position: fixed; inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  opacity: 1;
}
.aurora { opacity: 0.65; }
.aurora::before, .aurora::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.55;
}
.aurora::before {
  width: 760px; height: 760px;
  background: radial-gradient(circle, var(--brand-primary) 0%, transparent 65%);
  top: -200px; left: -150px;
}
.aurora::after {
  width: 920px; height: 920px;
  background: radial-gradient(circle, var(--brand-deep) 0%, transparent 70%);
  top: 30vh; right: -300px;
}
[data-theme="light"] .aurora::before { opacity: 0.18; }
[data-theme="light"] .aurora::after { opacity: 0.12; }

.grain {
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.035;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

/* Layout */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding-left: var(--pad-x);
  padding-right: var(--pad-x);
  position: relative;
  z-index: 2;
}

/* Type */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow .dot {
  width: 6px; height: 6px;
  background: var(--brand-light);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--brand-glow);
}

h1, h2, h3, h4 {
  margin: 0;
  font-family: var(--font-body);
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}
h1 {
  font-size: clamp(48px, 7vw, 96px);
  line-height: 0.98;
  letter-spacing: -0.035em;
  font-weight: 400;
}
h2 {
  font-size: clamp(34px, 4.8vw, 60px);
  line-height: 1.05;
  letter-spacing: -0.03em;
  font-weight: 400;
}
h3 {
  font-size: clamp(22px, 2.4vw, 30px);
  line-height: 1.2;
  letter-spacing: -0.02em;
  font-weight: 500;
}
.serif { font-family: var(--font-display); font-weight: 400; font-style: italic; letter-spacing: -0.01em; }
.muted { color: var(--text-muted); }
.brand { color: var(--brand-light); }

p { margin: 0; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.005em;
  transition: transform .25s ease, background .25s ease, box-shadow .25s ease, border-color .25s ease;
  white-space: nowrap;
  border: 1px solid transparent;
}
.btn-primary {
  background: var(--brand-primary);
  color: #fff;
  box-shadow: 0 12px 30px -8px rgba(91,75,204,0.6), inset 0 1px 0 rgba(255,255,255,0.18);
}
.btn-primary:hover {
  background: var(--brand-light);
  transform: translateY(-1px);
  box-shadow: 0 18px 40px -8px rgba(91,75,204,0.75), inset 0 1px 0 rgba(255,255,255,0.25);
}
.btn-ghost {
  border-color: var(--border-subtle);
  color: var(--text-primary);
  background: rgba(255,255,255,0.02);
}
.btn-ghost:hover {
  border-color: var(--brand-primary);
  background: rgba(91,75,204,0.08);
}
.btn-cta {
  height: 56px;
  padding: 0 26px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 500;
}

/* Cards */
.card {
  background: linear-gradient(180deg, rgba(255,255,255,0.025), rgba(255,255,255,0));
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 28px;
  position: relative;
  transition: border-color .25s ease, transform .25s ease, background .25s ease;
}
[data-theme="light"] .card {
  background: #fff;
  box-shadow: 0 1px 0 rgba(10,13,30,0.04), 0 20px 40px -20px rgba(91,75,204,0.18);
}
.card:hover {
  border-color: var(--border-glow);
}
.card-glow {
  background:
    radial-gradient(circle at 0% 0%, rgba(91,75,204,0.12), transparent 50%),
    linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.01));
  border-color: var(--border-glow);
}

/* Nav */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  background: color-mix(in oklab, var(--bg-primary) 70%, transparent);
  border-bottom: 1px solid var(--border-subtle);
}
.nav-row {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 500;
  font-size: 16px;
  letter-spacing: -0.01em;
}
.logo-mark {
  width: 32px; height: 32px;
  border-radius: 8px;
  background-image: url("logo.png");
  background-size: cover;
  background-position: center;
  box-shadow: 0 6px 18px -4px rgba(91,75,204,0.45);
}
.logo-mark.__legacy {
  width: 28px; height: 28px;
  border-radius: 8px;
  background:
    radial-gradient(circle at 30% 30%, var(--brand-glow), var(--brand-primary) 60%, var(--brand-deep));
  position: relative;
  box-shadow: 0 6px 18px -2px rgba(91,75,204,0.55), inset 0 1px 0 rgba(255,255,255,0.3);
}
.logo-mark::after {
  display: none;
  content: '';
  position: absolute; inset: 6px;
  border-radius: 4px;
  background: linear-gradient(135deg, rgba(255,255,255,0.6), transparent 60%);
  mix-blend-mode: overlay;
}
.logo-tm {
  font-family: var(--font-mono);
  font-size: 9px;
  vertical-align: super;
  color: var(--text-muted);
  margin-left: 1px;
}
.nav-links {
  display: flex;
  gap: 4px;
  align-items: center;
}
.nav-link {
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 14px;
  color: var(--text-secondary);
  transition: color .2s ease, background .2s ease;
}
.nav-link:hover { color: var(--text-primary); background: rgba(255,255,255,0.04); }
[data-theme="light"] .nav-link:hover { background: rgba(91,75,204,0.06); }
.nav-link.active { color: var(--text-primary); }
.nav-link.active::after {
  content: '';
  display: block;
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--brand-light);
  margin: 4px auto 0;
  box-shadow: 0 0 10px var(--brand-glow);
}

/* Footer */
.footer {
  margin-top: 120px;
  border-top: 1px solid var(--border-subtle);
  padding: 64px 0 40px;
  position: relative;
  z-index: 2;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
}
.footer-row {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  color: var(--text-secondary);
  margin-top: 14px;
}
.footer-row svg { width: 16px; height: 16px; opacity: 0.7; }
.footer-bottom {
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Section helpers */
section { position: relative; z-index: 2; }
.section { padding: clamp(48px, 6vw, 84px) 0; }
.section-tight { padding: clamp(36px, 4.5vw, 64px) 0; }
.section-head {
  display: grid;
  gap: 18px;
  margin-bottom: clamp(48px, 6vw, 72px);
  max-width: 720px;
}

/* Reveal-on-scroll */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .9s cubic-bezier(.2,.7,.2,1), transform .9s cubic-bezier(.2,.7,.2,1);
  transition-delay: var(--reveal-delay, 0ms);
}
.reveal.is-in { opacity: 1; transform: translateY(0); }

@media (max-width: 860px) {
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .nav-links .nav-link.hide-sm { display: none; }
}
