/* ============================================================
   Gray's Autonomy — corporate light design system (v8)
   Straightforward, professional, credible. White ground, slate
   ink, one confident blue. No theatrics.
   NOTE: var names (--navy/--cyan/--blue/--paper/--ink/--line/--mono)
   are load-bearing — ai.css & conversion.css consume them.
   ============================================================ */

:root {
  --paper: #ffffff;        /* page ground */
  --paper-2: #f8fafc;      /* alternate band */
  --ink: #0f172a;          /* primary text (slate-900) */
  --ink-soft: #475569;     /* secondary text (slate-600) */
  --navy: #0f172a;         /* dark surfaces (widget header, footer) */
  --blue: #1d4ed8;         /* accent on light (blue-700) */
  --cyan: #2563eb;         /* accent on dark / interactive (blue-600) */
  --line: #e2e8f0;         /* borders (slate-200) */
  --line-strong: #cbd5e1;  /* stronger borders (slate-300) */
  --ok: #15803d;
  --mono: "Inter", ui-monospace, "SF Mono", Menlo, monospace;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.06), 0 8px 24px rgba(15, 23, 42, 0.07);
  --maxw: 1120px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  font-size: 16px;
}

h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; font-weight: 700; }
h1 { font-size: clamp(2.2rem, 5.2vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3.6vw, 2.2rem); }
h3 { font-size: 1.1rem; }
p { color: var(--ink-soft); }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
strong { color: var(--ink); }
.accent { color: var(--blue); }

section { padding: 4.5rem 1.5rem; }
.wrap, .section-head { max-width: var(--maxw); margin: 0 auto; }
.section-head { text-align: center; margin-bottom: 2.2rem; }
.section-head h2 { margin-top: 0.4rem; }
.section-sub { max-width: 640px; margin: 0.8rem auto 0; }
.eyebrow {
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--blue);
}

/* Scroll reveal (script.js toggles .in) */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.5s ease, transform 0.5s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 0.8rem 1.5rem;
  background: rgba(255, 255, 255, 0.92); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.brand { display: inline-flex; align-items: center; gap: 0.6rem; text-decoration: none; }
.brand:hover { text-decoration: none; }
.brand-monogram {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 8px;
  background: var(--navy); color: #fff;
  font-weight: 800; font-size: 0.82rem; letter-spacing: 0.02em;
}
.brand-text { font-weight: 700; font-size: 1.05rem; color: var(--ink); letter-spacing: -0.01em; }
.nav-links { display: flex; align-items: center; gap: 1.3rem; }
.nav-links a { color: var(--ink-soft); font-size: 0.92rem; font-weight: 500; }
.nav-links a:hover { color: var(--ink); text-decoration: none; }
.nav-cta {
  background: var(--blue); color: #fff !important; font-weight: 600;
  padding: 0.5rem 1rem; border-radius: 8px;
}
.nav-cta:hover { background: var(--cyan); text-decoration: none; }
@media (max-width: 760px) { .nav-links a:not(.nav-cta) { display: none; } }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  font-family: var(--sans); font-weight: 600; font-size: 0.95rem;
  padding: 0.75rem 1.4rem; border-radius: 8px; border: 1px solid transparent;
  cursor: pointer; transition: background 0.15s, border-color 0.15s;
}
.btn.primary { background: var(--blue); color: #fff; }
.btn.primary:hover { background: var(--cyan); text-decoration: none; }
.btn.ghost { background: #fff; color: var(--ink); border-color: var(--line-strong); }
.btn.ghost:hover { border-color: var(--ink-soft); text-decoration: none; }
.btn.lg { padding: 0.9rem 1.7rem; font-size: 1rem; }

/* ---------- Hero ---------- */
.hero { padding: 4.5rem 1.5rem 3rem; background: var(--paper); }
.hero-inner {
  max-width: var(--maxw); margin: 0 auto;
  display: grid; grid-template-columns: 1.05fr 1fr; gap: 3rem; align-items: start;
}
@media (max-width: 900px) { .hero-inner { grid-template-columns: 1fr; gap: 2rem; } }
.hero-lede { margin-top: 1.1rem; font-size: 1.08rem; max-width: 520px; }
.hero-points { list-style: none; margin-top: 1.4rem; display: grid; gap: 0.55rem; }
.hero-points li {
  position: relative; padding-left: 1.6rem; color: var(--ink-soft); font-size: 0.98rem;
}
.hero-points li::before {
  content: "✓"; position: absolute; left: 0; top: 0;
  color: var(--ok); font-weight: 700;
}

/* Demo call card */
.call-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 1.6rem;
}
.call-card-head {
  display: flex; align-items: center; gap: 0.5rem;
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.14em; color: var(--blue);
}
.pulse-dot {
  width: 9px; height: 9px; border-radius: 50%; background: var(--ok);
  animation: pulse 1.6s ease-out infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(21, 128, 61, 0.45); }
  70% { box-shadow: 0 0 0 9px rgba(21, 128, 61, 0); }
  100% { box-shadow: 0 0 0 0 rgba(21, 128, 61, 0); }
}
.call-card-blurb { margin: 0.7rem 0 1.1rem; font-size: 0.97rem; }
.demo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.8rem; }
.demo-field.wide { grid-column: 1 / -1; }
@media (max-width: 480px) { .demo-grid { grid-template-columns: 1fr; } }
.demo-label {
  display: block; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--ink-soft); margin-bottom: 0.3rem;
}
.demo-label span { text-transform: none; letter-spacing: 0; font-weight: 400; }
.demo-form input {
  width: 100%; padding: 0.7rem 0.9rem; font-size: 0.97rem; font-family: var(--sans);
  border: 1px solid var(--line-strong); border-radius: 8px; background: #fff; color: var(--ink);
}
.demo-form input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.13); }
.demo-form input::placeholder { color: #94a3b8; }
.demo-cta { width: 100%; margin-top: 1rem; }
.demo-fine { margin-top: 0.6rem; font-size: 0.78rem; color: #94a3b8; text-align: center; }
.demo-turnstile { margin-top: 0.8rem; }
.demo-result {
  margin-top: 1rem; padding: 0.85rem 1rem; border-radius: 8px;
  background: #eff6ff; border: 1px solid #bfdbfe; color: var(--ink); font-size: 0.95rem;
}
/* Honeypot: display:none so mobile autofill skips it (never off-screen positioning). */
.demo-grid .hp { display: none !important; }

/* Stack strip */
.stack-strip {
  max-width: var(--maxw); margin: 3rem auto 0; padding-top: 1.6rem;
  border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; align-items: center; gap: 1.6rem;
}
.stack-label { font-size: 0.68rem; font-weight: 700; letter-spacing: 0.16em; color: #94a3b8; }
.stack-name { font-weight: 600; font-size: 1rem; color: #64748b; }

/* ---------- Comparison ---------- */
.compare { background: var(--paper-2); }
.cmp-wrap { max-width: 880px; margin: 0 auto; overflow-x: auto; }
.cmp-table {
  width: 100%; border-collapse: separate; border-spacing: 0;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow); font-size: 0.95rem;
}
.cmp-table th, .cmp-table td { padding: 0.85rem 1.1rem; text-align: left; border-bottom: 1px solid var(--line); }
.cmp-table thead th { background: var(--paper-2); font-size: 0.85rem; letter-spacing: 0.04em; color: var(--ink-soft); }
.cmp-table thead th.hl { background: var(--blue); color: #fff; }
.cmp-table td.hl { background: #eff6ff; color: var(--ink); }
.cmp-table tbody th[scope="row"] { font-weight: 600; color: var(--ink); white-space: nowrap; background: #fff; }
.cmp-table tbody tr:last-child td,
.cmp-table tbody tr:last-child th { border-bottom: none; }
.cmp-table tbody td:not(.hl) { color: var(--ink-soft); }
.cmp-note { max-width: 700px; margin: 1.4rem auto 0; text-align: center; font-size: 0.92rem; }

/* Mobile: a table this wide can't shrink without side-scrolling, so restack each row
   as its own card — the comparison reads top-to-bottom instead of left-to-right. */
@media (max-width: 720px) {
  .cmp-wrap { overflow-x: visible; }
  .cmp-table,
  .cmp-table tbody,
  .cmp-table tr,
  .cmp-table th,
  .cmp-table td { display: block; width: auto; }
  .cmp-table { border: none; background: none; box-shadow: none; border-radius: 0; }
  .cmp-table thead { display: none; }
  .cmp-table tbody tr {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 0.9rem;
    overflow: hidden;
  }
  .cmp-table tbody th[scope="row"] {
    white-space: normal;
    background: var(--paper-2);
    font-size: 0.85rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--ink-soft);
    padding: 0.6rem 1rem;
    border-bottom: 1px solid var(--line);
  }
  .cmp-table tbody td { padding: 0.75rem 1rem; border-bottom: 1px solid var(--line); }
  .cmp-table tbody tr td:last-child { border-bottom: none; }
  /* Label each value, since the column headers are gone. */
  .cmp-table tbody td::before {
    content: attr(data-h);
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--ink-faint, #94a3b8);
    margin-bottom: 0.2rem;
  }
  .cmp-table tbody td.hl::before { color: var(--blue); }
}

/* ---------- Training ---------- */
.split {
  max-width: var(--maxw); margin: 0 auto;
  display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center;
}
@media (max-width: 860px) { .split { grid-template-columns: 1fr; gap: 1.6rem; } }
.split h2 { margin: 0.4rem 0 1rem; }
.split p { margin-bottom: 0.8rem; }
.train-demo { display: grid; gap: 0.8rem; }
.train-step {
  display: flex; align-items: center; gap: 0.9rem;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 1rem 1.2rem; font-weight: 500; color: var(--ink);
}
.train-n {
  flex: none; display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--blue); color: #fff; font-size: 0.85rem; font-weight: 700;
}

/* ---------- Pricing ---------- */
.pricing { background: var(--navy); }
.pricing .eyebrow { color: #93c5fd; }
.pricing h2 { color: #fff; margin-top: 0.4rem; }
.pricing .wrap { text-align: center; max-width: 640px; }
.price-card {
  margin: 2rem auto 0; background: #fff; border-radius: var(--radius);
  padding: 2.2rem 2rem; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}
.price-big { font-size: 1.15rem; font-weight: 600; color: var(--ink-soft); }
.price-big span { font-size: 3.4rem; font-weight: 800; color: var(--ink); letter-spacing: -0.03em; }
.price-sub { margin: 0.8rem 0 1.4rem; font-size: 0.98rem; }
.price-card .btn { width: 100%; }
.price-fine { margin-top: 0.9rem; font-size: 0.82rem; color: #94a3b8; }

/* ---------- Integrations ---------- */
.int-row {
  max-width: 780px; margin: 0 auto;
  display: flex; flex-wrap: wrap; justify-content: center; gap: 0.6rem;
}
.int-tag {
  padding: 0.5rem 1rem; border: 1px solid var(--line-strong); border-radius: 999px;
  font-size: 0.9rem; font-weight: 500; color: var(--ink); background: #fff;
}
.int-tag.more { border-style: dashed; color: var(--ink-soft); }
.int-cta { text-align: center; margin-top: 1.6rem; font-size: 0.95rem; }

/* ---------- FAQ ---------- */
.faq { background: var(--paper-2); }
.faq-list { max-width: 720px; margin: 0 auto; display: grid; gap: 0.7rem; }
.faq-list details {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.2rem;
}
.faq-list summary { cursor: pointer; font-weight: 600; color: var(--ink); list-style: none; position: relative; padding-right: 1.6rem; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: "+"; position: absolute; right: 0.1rem; top: -0.1rem; font-size: 1.2rem; color: var(--ink-soft); }
.faq-list details[open] summary::after { content: "–"; }
.faq-list details p { margin-top: 0.7rem; font-size: 0.95rem; }

/* ---------- Final CTA ---------- */
.contact { text-align: center; }
.contact-lede { max-width: 540px; margin: 0.8rem auto 1.6rem; }
.contact-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.8rem; }
.contact-direct { margin-top: 1.4rem; font-size: 0.9rem; }

/* ---------- Footer ---------- */
.footer {
  background: var(--navy); color: #cbd5e1; text-align: center;
  padding: 2.6rem 1.5rem;
}
.footer .brand { justify-content: center; display: inline-flex; }
.footer .brand-text { color: #fff; }
.footer .brand-monogram { background: rgba(255, 255, 255, 0.12); }
.footer .tagline { margin-top: 0.8rem; font-size: 0.7rem; letter-spacing: 0.18em; color: #64748b; }
.footer .copyright { margin-top: 0.4rem; font-size: 0.82rem; color: #64748b; }

/* Footer legal links */
.footer .legal-links { font-size: 0.9rem; margin: 0.5rem 0 0.35rem; }
.footer .legal-links a { color: inherit; opacity: 0.75; }
.footer .legal-links a:hover { opacity: 1; }

/* ---------- Both directions (inbound / outbound) ---------- */
.both { background: var(--paper-2); }
.both-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem;
  max-width: 880px; margin: 0 auto;
}
.both-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 1.5rem 1.6rem;
}
.both-card.hl { border-color: var(--blue); }
.both-card h3 {
  font-size: 0.8rem; letter-spacing: 0.09em; text-transform: uppercase;
  color: var(--ink-soft); margin: 0 0 0.9rem;
}
.both-card.hl h3 { color: var(--blue); }
.both-card ul { list-style: none; padding: 0; margin: 0; }
.both-card li {
  position: relative; padding-left: 1.4rem; margin-bottom: 0.7rem;
  color: var(--ink-soft); font-size: 0.95rem; line-height: 1.55;
}
.both-card li::before {
  content: ""; position: absolute; left: 0; top: 0.55em;
  width: 6px; height: 6px; border-radius: 50%; background: var(--line-strong, #cbd5e1);
}
.both-card.hl li::before { background: var(--blue); }
.both-card li:last-child { margin-bottom: 0; }
.both-note {
  max-width: 700px; margin: 1.4rem auto 0; text-align: center;
  font-size: 0.92rem; color: var(--ink-soft);
}
@media (max-width: 720px) {
  .both-grid { grid-template-columns: 1fr; }
}
