/* ================================================================
   AgentReady — Shared Design System
   Palette: Obsidian & Electric Blue
   ================================================================ */

/* ── Reset ───────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button, input, select, textarea { font: inherit; }

/* ── Design tokens ───────────────────────────────────────────── */
:root {
  /* Canvas */
  --canvas:    #050508;
  --base:      #0A0A12;
  --surface:   #0F0F18;
  --elevated:  #161625;

  /* Brand */
  --blue:      #1D6FE8;
  --blue-lt:   #7BB3FF;
  --blue-dim:  rgba(29, 111, 232, 0.14);
  --blue-brd:  rgba(29, 111, 232, 0.32);
  --cyan:      #50E6FF;
  --purple:    #7B5EA6;

  /* Borders */
  --border:    rgba(255, 255, 255, 0.06);
  --border-md: rgba(255, 255, 255, 0.10);
  --border-st: rgba(255, 255, 255, 0.16);

  /* Foreground */
  --fg:   #FFFFFF;
  --fg-2: #7A7A96;
  --fg-3: #3E3E58;

  /* Semantic */
  --gold:     #FFD700;
  --gold-bg:  rgba(255, 215, 0, 0.08);
  --gold-brd: rgba(255, 215, 0, 0.22);
  --green:    #34D399;
  --green-bg: rgba(52, 211, 153, 0.10);
  --violet:   #9B8AFB;

  /* Effects */
  --glow:       0 4px 28px rgba(29, 111, 232, 0.50);
  --glow-card:  0 0 0 1px rgba(255,255,255,0.05), 0 8px 28px rgba(0,0,0,0.50);
  --glow-hover: 0 0 0 1px rgba(29,111,232,0.35), 0 12px 36px rgba(0,0,0,0.55), 0 0 20px rgba(29,111,232,0.22);

  /* Typography */
  --font: 'Segoe UI', -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Helvetica Neue', Arial, sans-serif;
  --mono: 'Cascadia Code', 'Cascadia Mono', Consolas, 'Courier New', monospace;

  /* Layout */
  --max:     1400px;
  --wide:    1200px;
  --content: 960px;
  --narrow:  720px;
  --nav-h:   68px;
  --pad-x:   40px;

  /* Radius */
  --r-sm:   6px;
  --r-md:   10px;
  --r-lg:   14px;
  --r-xl:   20px;
  --r-full: 9999px;

  /* Motion */
  --ease:     cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out: cubic-bezier(0.0, 0.0, 0.2, 1);
  --t-fast:   120ms;
  --t-base:   220ms;
  --t-slow:   380ms;
  --t-reveal: 600ms;
}

/* ── Base ────────────────────────────────────────────────────── */
body {
  font-family: var(--font);
  background: var(--canvas);
  color: var(--fg);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ── Navigation ──────────────────────────────────────────────── */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--nav-h);
  display: flex; align-items: center;
  transition: background var(--t-base) var(--ease),
              backdrop-filter var(--t-base) var(--ease);
}
.nav.scrolled {
  background: rgba(5, 5, 8, 0.92);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  width: 100%; max-width: var(--max);
  margin: 0 auto; padding: 0 var(--pad-x);
  display: flex; align-items: center;
}
.nav-logo {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; margin-right: auto; flex-shrink: 0;
}
.nav-mark {
  width: 36px; height: 36px; border-radius: 8px;
  background: var(--blue); box-shadow: var(--glow);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 800; color: #fff;
  letter-spacing: -0.5px; flex-shrink: 0;
}
.nav-identity { display: flex; flex-direction: column; gap: 1px; }
.nav-name { font-size: 15px; font-weight: 700; color: var(--fg); letter-spacing: -0.02em; }
.nav-sub  { font-size: 9px;  font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--fg-3); }
.nav-links { display: flex; align-items: center; gap: 24px; }
.nav-link {
  font-size: 14px; font-weight: 500; color: var(--fg-2);
  text-decoration: none;
  transition: color var(--t-fast) var(--ease);
  white-space: nowrap;
}
.nav-link:hover, .nav-link.active { color: var(--fg); }
.nav-cta {
  font-size: 13px; font-weight: 700; padding: 8px 20px;
  border-radius: var(--r-full); background: var(--blue);
  color: #fff; text-decoration: none; box-shadow: var(--glow);
  transition: opacity var(--t-base) var(--ease), transform var(--t-base) var(--ease);
  white-space: nowrap; margin-left: 8px;
}
.nav-cta:hover { opacity: 0.88; transform: translateY(-1px); }

/* Mobile hamburger */
.nav-toggle {
  display: none; flex-direction: column; gap: 5px; cursor: pointer;
  background: none; border: none; padding: 4px; margin-left: 16px;
}
.nav-toggle span {
  display: block; width: 22px; height: 2px;
  background: var(--fg-2); border-radius: 2px;
  transition: all var(--t-base) var(--ease);
}

/* ── Layout helpers ──────────────────────────────────────────── */
.section     { padding: 96px var(--pad-x); }
.section-alt { background: var(--base); }

.section-inner         { max-width: var(--wide);    margin: 0 auto; }
.section-inner-content { max-width: var(--content); margin: 0 auto; }
.section-inner-narrow  { max-width: var(--narrow);  margin: 0 auto; }

.section-header { display: flex; flex-direction: column; gap: 12px; margin-bottom: 48px; }
.section-header.centered { text-align: center; align-items: center; }

.eyebrow {
  font-size: 11px; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--blue);
}
.section-title {
  font-size: clamp(32px, 3.5vw, 48px); font-weight: 800;
  letter-spacing: -0.03em; line-height: 1.1; color: var(--fg);
}
.section-sub {
  font-size: 17px; color: var(--fg-2); line-height: 1.65; max-width: 560px;
}
.section-header.centered .section-sub { max-width: 640px; }

/* Page header (inner pages) */
.page-header {
  padding: calc(var(--nav-h) + 72px) var(--pad-x) 72px;
  background: var(--canvas); position: relative; overflow: hidden;
}
.page-header-bg {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 70% 80% at 20% 60%, rgba(29,111,232,0.13) 0%, transparent 60%),
    radial-gradient(ellipse 50% 60% at 80% 20%, rgba(80,230,255,0.06) 0%, transparent 55%);
}
.page-header-inner {
  position: relative; z-index: 1;
  max-width: var(--wide); margin: 0 auto;
  display: flex; flex-direction: column; gap: 16px;
}
.page-title {
  font-size: clamp(40px, 5vw, 64px); font-weight: 800;
  letter-spacing: -0.04em; line-height: 1.0; color: var(--fg);
}
.page-desc { font-size: 18px; color: var(--fg-2); line-height: 1.65; max-width: 580px; }

/* ── Buttons ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font); cursor: pointer; border: none;
  text-decoration: none; white-space: nowrap;
  transition: all var(--t-base) var(--ease);
}
.btn-primary {
  padding: 13px 28px; border-radius: var(--r-md);
  background: var(--blue); color: #fff;
  font-size: 15px; font-weight: 700;
  box-shadow: var(--glow); letter-spacing: -0.01em;
}
.btn-primary:hover { opacity: 0.88; transform: translateY(-1px); }
.btn-secondary {
  padding: 13px 28px; border-radius: var(--r-md);
  background: rgba(255,255,255,0.04); color: var(--fg);
  font-size: 15px; font-weight: 600;
  border: 1px solid var(--border-st); letter-spacing: -0.01em;
}
.btn-secondary:hover { border-color: var(--blue-brd); transform: translateY(-1px); }
.btn-sm { padding: 9px 20px; font-size: 13px; }

/* ── Cards ───────────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--glow-card);
  transition: all var(--t-base) var(--ease);
}
a.card, .card-link {
  text-decoration: none; display: block; color: inherit;
}
a.card:hover, .card:hover {
  border-color: var(--blue-brd);
  transform: translateY(-3px);
  box-shadow: var(--glow-hover);
}

/* ── Pills ───────────────────────────────────────────────────── */
.pill {
  display: inline-flex; align-items: center;
  padding: 4px 12px; border-radius: var(--r-full);
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase;
  border: 1px solid; white-space: nowrap;
}
.pill-blue    { background: var(--blue-dim); color: var(--blue-lt); border-color: var(--blue-brd); }
.pill-gold    { background: var(--gold-bg);  color: var(--gold);    border-color: var(--gold-brd); }
.pill-neutral { background: rgba(255,255,255,0.04); color: var(--fg-2); border-color: var(--border-md); }
.pill-green   { background: var(--green-bg); color: var(--green);   border-color: rgba(52,211,153,0.30); }
.pill-violet  { background: rgba(155,138,251,0.12); color: var(--violet); border-color: rgba(155,138,251,0.30); }

/* ── Newsletter form ─────────────────────────────────────────── */
.nl-form { display: flex; gap: 10px; flex-wrap: wrap; }
.nl-input {
  flex: 1; min-width: 220px; padding: 12px 16px;
  border-radius: var(--r-md); background: rgba(255,255,255,0.04);
  border: 1px solid var(--border-md); color: var(--fg);
  font-size: 15px; outline: none;
  transition: border-color var(--t-fast) var(--ease);
}
.nl-input::placeholder { color: var(--fg-3); }
.nl-input:focus { border-color: var(--blue-brd); }
.nl-btn {
  padding: 12px 24px; border-radius: var(--r-md);
  background: var(--blue); color: #fff;
  font-size: 15px; font-weight: 700; border: none; cursor: pointer;
  box-shadow: var(--glow); white-space: nowrap;
  transition: opacity var(--t-base) var(--ease), transform var(--t-base) var(--ease);
}
.nl-btn:hover { opacity: 0.88; transform: translateY(-1px); }

/* ── CTA band (newsletter) ───────────────────────────────────── */
.cta-band {
  padding: 80px var(--pad-x);
  background: var(--base); position: relative; overflow: hidden;
}
.cta-band-bg {
  position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse 55% 75% at 50% 50%, rgba(29,111,232,0.13) 0%, transparent 70%);
}
.cta-band-inner {
  position: relative; z-index: 1;
  max-width: var(--narrow); margin: 0 auto; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 20px;
}
.cta-title {
  font-size: clamp(28px, 3.5vw, 44px); font-weight: 800;
  letter-spacing: -0.03em; line-height: 1.1; color: var(--fg);
}
.cta-sub { font-size: 17px; color: var(--fg-2); line-height: 1.65; }

/* ── Footer ──────────────────────────────────────────────────── */
footer {
  background: var(--canvas);
  border-top: 1px solid var(--border);
  padding: 64px var(--pad-x) 32px;
}
.footer-inner {
  max-width: var(--wide); margin: 0 auto;
  display: grid; grid-template-columns: 1.8fr 1fr 1.8fr; gap: 48px;
  padding-bottom: 48px; border-bottom: 1px solid var(--border);
}
.footer-logo { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.footer-mark {
  width: 32px; height: 32px; border-radius: 7px; background: var(--blue);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 800; color: #fff; flex-shrink: 0;
}
.footer-wordmark  { font-size: 16px; font-weight: 700; color: var(--fg); }
.footer-tagline   { font-size: 13px; color: var(--fg-2); margin-bottom: 10px; }
.footer-desc      { font-size: 13px; color: var(--fg-3); line-height: 1.6; }
.footer-desc a    { color: var(--blue-lt); text-decoration: none; }
.footer-desc a:hover { color: var(--fg); }
.footer-nav-title {
  font-size: 11px; font-weight: 700; letter-spacing: 0.10em;
  text-transform: uppercase; color: var(--fg-3); margin-bottom: 18px;
}
.footer-nav-links { display: flex; flex-direction: column; gap: 10px; }
.footer-nav-links a {
  font-size: 14px; color: var(--fg-2); text-decoration: none;
  transition: color var(--t-fast) var(--ease);
}
.footer-nav-links a:hover { color: var(--fg); }
.footer-nl-title { font-size: 15px; font-weight: 700; color: var(--fg); margin-bottom: 8px; }
.footer-nl-desc  { font-size: 13px; color: var(--fg-2); line-height: 1.55; margin-bottom: 16px; }
.footer-bottom {
  max-width: var(--wide); margin: 0 auto;
  padding-top: 28px; display: flex; justify-content: space-between;
  align-items: center; flex-wrap: wrap; gap: 12px;
}
.footer-copy { font-size: 12px; color: var(--fg-3); }
.footer-copy a { color: var(--fg-2); text-decoration: none; }
.footer-copy a:hover { color: var(--fg); }

/* ── Scroll reveal ───────────────────────────────────────────── */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0; transform: translateY(28px);
    transition: opacity var(--t-reveal) var(--ease-out),
                transform var(--t-reveal) var(--ease-out);
  }
  .reveal.visible { opacity: 1; transform: translateY(0); }
  .reveal-d1 { transition-delay: 100ms; }
  .reveal-d2 { transition-delay: 200ms; }
  .reveal-d3 { transition-delay: 320ms; }
}

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 1024px) {
  :root { --pad-x: 32px; }
}

@media (max-width: 768px) {
  :root { --pad-x: 24px; }
  .section { padding: 64px var(--pad-x); }
  .page-header { padding-top: calc(var(--nav-h) + 40px); padding-bottom: 48px; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .footer-inner > *:first-child { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
  :root { --pad-x: 20px; }
  .nav-links { display: none; }
  .nav-toggle { display: flex; }
  .nav-links.open {
    display: flex; flex-direction: column; align-items: flex-start;
    position: fixed; top: var(--nav-h); left: 0; right: 0;
    background: rgba(5,5,8,0.97); backdrop-filter: blur(18px);
    padding: 24px var(--pad-x) 36px; gap: 2px;
    border-bottom: 1px solid var(--border); z-index: 99;
  }
  .nav-links.open .nav-link { font-size: 16px; padding: 11px 0; width: 100%; }
  .nav-links.open .nav-cta {
    margin: 12px 0 0; width: 100%; text-align: center;
    display: flex; justify-content: center;
  }
  .section { padding: 56px var(--pad-x); }
  .footer-inner { grid-template-columns: 1fr; }
  .nl-form { flex-direction: column; }
  .nl-input, .nl-btn { width: 100%; }
  .btn { justify-content: center; }
}
