/* ============================================
   APEX marketing site
   Aesthetic: federal-courthouse-meets-stripe.
   Deep ink ground, parchment text, brass accent.
   Serif for authority, sans for precision.
============================================ */

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

:root {
  --ink: #0a0f1c;
  --ink-2: #131a2b;
  --ink-3: #1b2438;
  --line: rgba(244, 237, 224, 0.08);
  --cream: #f4ede0;
  --cream-2: #e8dfca;
  --muted: #8893a8;
  --muted-2: #6c7589;
  --brass: #c9a86a;
  --brass-2: #b8945a;
  --burgundy: #b03e3e;
  --green: #6db283;
  --red: #d65a5a;

  --font-serif: 'EB Garamond', 'Source Serif Pro', Georgia, 'Times New Roman', serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', Menlo, Consolas, monospace;

  --width: 1200px;
  --width-narrow: 920px;
}

html { scroll-behavior: smooth; }

body {
  background: var(--ink);
  color: var(--cream);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }
a:hover { color: var(--brass); }

::selection { background: var(--brass); color: var(--ink); }

/* ============================================
   NAV
============================================ */

.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(10, 15, 28, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  max-width: var(--width);
  margin: 0 auto;
  padding: 18px 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.brand {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 22px;
  letter-spacing: 0.04em;
  color: var(--cream);
  display: flex; align-items: center; gap: 9px;
}
.brand-mark {
  color: var(--brass);
  font-size: 20px;
  transform: translateY(-1px);
}
.brand-word { letter-spacing: 0.12em; }
.nav-links {
  display: flex; gap: 32px; align-items: center;
  font-size: 14px;
  color: var(--muted);
}
.nav-links a:hover { color: var(--cream); }
.cta-soft {
  color: var(--brass) !important;
  font-weight: 500;
}
.cta-soft:hover { color: var(--cream) !important; }

/* ============================================
   HERO
============================================ */

.hero {
  padding: 100px 28px 120px;
  max-width: var(--width);
  margin: 0 auto;
  position: relative;
}

.hero::before {
  /* subtle warm vignette */
  content: '';
  position: absolute;
  top: -100px; right: -50px;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(201, 168, 106, 0.07) 0%, transparent 60%);
  pointer-events: none;
  z-index: -1;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 80px;
  align-items: center;
}

.overline {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--brass);
  margin-bottom: 24px;
}
.overline-dark { color: var(--brass-2); }

h1 {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(48px, 6vw, 76px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
  color: var(--cream);
}
h1 em {
  font-style: italic;
  font-weight: 500;
  color: var(--brass);
}

.hero-sub {
  font-size: 19px;
  line-height: 1.55;
  color: var(--cream-2);
  margin-bottom: 36px;
  max-width: 520px;
}

.hero-cta {
  display: flex; gap: 14px; margin-bottom: 28px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 14px 26px;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.01em;
  border-radius: 4px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none !important;
}
.btn-primary {
  background: var(--brass);
  color: var(--ink) !important;
  border-color: var(--brass);
}
.btn-primary:hover {
  background: var(--brass-2);
  border-color: var(--brass-2);
  transform: translateY(-1px);
}
.btn-ghost {
  background: transparent;
  color: var(--cream) !important;
  border-color: var(--line);
}
.btn-ghost:hover {
  border-color: var(--brass);
  color: var(--brass) !important;
}
.btn-large {
  padding: 17px 36px;
  font-size: 16px;
}

.hero-trust {
  font-size: 13px;
  color: var(--muted);
  letter-spacing: 0.04em;
  display: flex; gap: 14px;
  flex-wrap: wrap;
}
.hero-trust .dot { color: var(--brass); opacity: 0.5; }

/* ============================================
   HERO VISUAL — chat preview in browser frame
============================================ */

.hero-vis {
  position: relative;
}
.browser-frame {
  background: #fbf9f5;
  border-radius: 12px;
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.5),
    0 12px 32px rgba(0, 0, 0, 0.3),
    0 0 0 1px rgba(244, 237, 224, 0.06);
  overflow: hidden;
  transform: perspective(1400px) rotateY(-3deg) rotateX(2deg);
  transition: transform 0.5s ease;
}
.browser-frame:hover {
  transform: perspective(1400px) rotateY(-1deg) rotateX(1deg);
}
.browser-bar {
  background: #e8e3d8;
  padding: 10px 14px;
  display: flex; align-items: center; gap: 6px;
  border-bottom: 1px solid #d4cebe;
}
.dot-red, .dot-yellow, .dot-green {
  width: 11px; height: 11px; border-radius: 50%;
}
.dot-red { background: #ff5f56; }
.dot-yellow { background: #ffbd2e; }
.dot-green { background: #27c93f; }
.url {
  margin-left: 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: #5a5240;
  background: #fbf9f5;
  padding: 5px 14px;
  border-radius: 4px;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.url .lock { color: var(--brass); margin-right: 6px; }

.chat {
  padding: 22px 22px 28px;
  background: #fbf9f5;
  color: #2a2820;
  display: flex; flex-direction: column; gap: 12px;
  font-family: var(--font-sans);
  font-size: 14px;
}
.bubble {
  padding: 11px 16px;
  border-radius: 16px;
  max-width: 88%;
  line-height: 1.5;
}
.bubble-user {
  background: #4f3ed6;
  color: #fff;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}
.bubble-assistant {
  background: #f0ebde;
  color: #2a2820;
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}
.bubble-assistant p { margin-bottom: 10px; font-size: 13.5px; }
.tool-chip {
  align-self: flex-start;
  background: #ebe5d3;
  color: #5a4d2e;
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 12px;
  border: 1px solid #d4cebe;
}
.mini-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  margin-top: 6px;
}
.mini-table th {
  text-align: left;
  font-weight: 600;
  color: #5a5240;
  padding: 4px 6px;
  border-bottom: 1px solid #d4cebe;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.mini-table td {
  padding: 5px 6px;
  border-bottom: 1px solid #ece6d5;
  font-family: var(--font-mono);
  font-size: 12px;
}
.mini-table tr.muted td { color: #8e8267; }

.action-card {
  align-self: stretch;
  background: #fff7e0;
  border: 1px solid #d4b75d;
  border-left: 3px solid #c9a86a;
  border-radius: 6px;
  padding: 12px 14px;
  margin-top: 4px;
}
.action-card-head {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8a6f1f;
  margin-bottom: 6px;
}
.action-card-body {
  font-size: 13px;
  line-height: 1.55;
  color: #2a2820;
  margin-bottom: 10px;
}
.action-card-actions {
  display: flex; gap: 8px;
}
.ac-confirm, .ac-cancel {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: 4px;
  border: 1px solid transparent;
  cursor: pointer;
}
.ac-confirm {
  background: #4f3ed6;
  color: #fff;
}
.ac-cancel {
  background: transparent;
  color: #2a2820;
  border-color: #d4cebe;
}

.hero-vis-caption {
  text-align: center;
  margin-top: 28px;
  font-size: 13px;
  color: var(--muted);
  font-style: italic;
  font-family: var(--font-serif);
  font-size: 15px;
}

/* ============================================
   PILLARS
============================================ */

.pillars {
  background: var(--ink-2);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 80px 28px;
}
.pillars-grid {
  max-width: var(--width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 60px;
}
.pillar h3 {
  font-family: var(--font-serif);
  font-size: 28px;
  font-weight: 500;
  margin-bottom: 12px;
  color: var(--cream);
}
.pillar p {
  color: var(--cream-2);
  font-size: 16px;
  line-height: 1.65;
}
.pillar-num {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--brass);
  letter-spacing: 0.2em;
  margin-bottom: 18px;
}

/* ============================================
   SECTION HEADS
============================================ */

.section-head {
  max-width: var(--width-narrow);
  margin: 0 auto 60px;
  text-align: center;
}
.section-head h2 {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(36px, 4.5vw, 54px);
  line-height: 1.1;
  letter-spacing: -0.015em;
  margin-bottom: 20px;
}
.lede {
  font-size: 18px;
  line-height: 1.6;
  color: var(--cream-2);
  max-width: 720px;
  margin: 0 auto;
}

/* ============================================
   HOW IT WORKS
============================================ */

.how {
  padding: 120px 28px;
  max-width: var(--width);
  margin: 0 auto;
}
.flow {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  gap: 24px;
  align-items: stretch;
  margin-top: 40px;
}
.flow-step {
  background: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 32px 28px;
  position: relative;
}
.flow-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--brass);
  letter-spacing: 0.18em;
  margin-bottom: 16px;
}
.flow-step h4 {
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 500;
  margin-bottom: 12px;
  color: var(--cream);
}
.flow-step p {
  color: var(--cream-2);
  font-size: 15px;
  line-height: 1.6;
  margin-bottom: 18px;
}
.flow-code {
  display: block;
  background: var(--ink-3);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 9px 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--brass);
  letter-spacing: 0;
}
.flow-arrow {
  display: flex; align-items: center; justify-content: center;
  font-size: 28px;
  color: var(--brass);
  opacity: 0.5;
}

/* ============================================
   CAPABILITIES GRID
============================================ */

.caps {
  background: var(--ink-2);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 120px 28px;
}
.caps-grid {
  max-width: var(--width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.cap {
  background: var(--ink);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 30px 26px;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.cap:hover {
  border-color: var(--brass);
  transform: translateY(-2px);
}
.cap-icon {
  font-size: 22px;
  margin-bottom: 16px;
  filter: grayscale(0.4);
}
.cap h4 {
  font-family: var(--font-serif);
  font-size: 21px;
  font-weight: 500;
  margin-bottom: 10px;
  color: var(--cream);
  letter-spacing: -0.005em;
}
.cap p {
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--cream-2);
}
.caps-foot {
  text-align: center;
  max-width: var(--width-narrow);
  margin: 60px auto 0;
  font-size: 15px;
  color: var(--muted);
  font-style: italic;
  font-family: var(--font-serif);
  font-size: 18px;
  line-height: 1.6;
}

/* ============================================
   PRODUCT TOUR — real screenshots
============================================ */

.tour {
  padding: 120px 28px;
  max-width: var(--width);
  margin: 0 auto;
}
.tour-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 36px;
}
.tour-shot {
  background: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.tour-shot:hover {
  border-color: var(--brass);
  transform: translateY(-2px);
}
.tour-shot-wide { grid-column: 1 / -1; }
.tour-shot img {
  display: block;
  width: 100%;
  height: auto;
  border-bottom: 1px solid var(--line);
}
.tour-shot figcaption {
  padding: 22px 28px 26px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--cream-2);
}
.tour-shot figcaption strong {
  color: var(--cream);
  font-family: var(--font-serif);
  font-size: 19px;
  font-weight: 500;
  display: block;
  margin-bottom: 6px;
  letter-spacing: -0.005em;
}
.figcap-num {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--brass);
  margin-bottom: 10px;
}
.tour-shot figcaption code {
  font-family: var(--font-mono);
  font-size: 13px;
  background: var(--ink);
  color: var(--brass);
  padding: 1px 6px;
  border-radius: 3px;
  border: 1px solid var(--line);
}

/* ============================================
   TRUST / AUDIT
============================================ */

.trust {
  padding: 120px 28px;
  max-width: var(--width);
  margin: 0 auto;
}
.trust-grid {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: 80px;
  align-items: center;
}
.trust-copy h2 {
  font-family: var(--font-serif);
  font-size: clamp(34px, 4.2vw, 50px);
  line-height: 1.1;
  font-weight: 500;
  letter-spacing: -0.015em;
  margin-bottom: 22px;
}
.trust-copy .lede {
  text-align: left;
  margin: 0 0 40px 0;
}
.trust-facts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.fact {
  border-left: 2px solid var(--brass);
  padding: 4px 0 4px 16px;
}
.fact-num {
  font-family: var(--font-serif);
  font-size: 36px;
  font-weight: 500;
  color: var(--cream);
  line-height: 1;
  margin-bottom: 6px;
}
.fact-label {
  font-size: 12px;
  color: var(--brass);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-family: var(--font-mono);
  margin-bottom: 8px;
}
.fact-desc {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}

.audit-card {
  background: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}
.audit-head {
  background: var(--ink-3);
  padding: 14px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--line);
}
.audit-pill {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--brass);
  background: rgba(201, 168, 106, 0.1);
  padding: 4px 10px;
  border-radius: 4px;
  letter-spacing: 0.02em;
}
.audit-meta {
  font-size: 11px;
  color: var(--muted);
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
}
.audit-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-mono);
  font-size: 12px;
}
.audit-table th {
  background: transparent;
  color: var(--muted);
  text-align: left;
  font-weight: 500;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 10px;
}
.audit-table td {
  padding: 10px 16px;
  color: var(--cream-2);
  border-bottom: 1px solid var(--line);
}
.audit-table tr:last-child td { border-bottom: none; }
.audit-table .ok {
  color: var(--green);
  font-weight: 500;
}
.audit-table .denied {
  color: var(--red);
  font-weight: 500;
}
.audit-foot {
  padding: 12px 20px;
  font-size: 11px;
  color: var(--muted);
  background: var(--ink-3);
  font-style: italic;
  font-family: var(--font-serif);
  font-size: 13px;
  border-top: 1px solid var(--line);
}

/* ============================================
   HONESTY / NARRATIVE
============================================ */

.honesty {
  background: var(--ink-2);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 120px 28px;
}
.honesty-inner {
  max-width: var(--width-narrow);
  margin: 0 auto;
  text-align: center;
}
.honesty h2 {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(32px, 4vw, 48px);
  line-height: 1.2;
  font-weight: 500;
  margin-bottom: 32px;
  color: var(--cream);
}
.honesty p {
  font-size: 18px;
  line-height: 1.7;
  color: var(--cream-2);
  margin-bottom: 22px;
}

/* ============================================
   BETA CTA
============================================ */

.beta {
  padding: 120px 28px;
  max-width: var(--width-narrow);
  margin: 0 auto;
}
.beta-inner {
  text-align: center;
}
.beta h2 {
  font-family: var(--font-serif);
  font-size: clamp(36px, 4.5vw, 52px);
  line-height: 1.1;
  font-weight: 500;
  margin-bottom: 22px;
}
.beta .lede {
  margin: 0 auto 48px;
}
.beta-form {
  background: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 40px;
  text-align: left;
  position: relative;
}
.beta-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 14px;
}
.beta-form input,
.beta-form select,
.beta-form textarea {
  width: 100%;
  background: var(--ink);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 13px 16px;
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--cream);
  transition: border-color 0.15s ease;
}
.beta-form input:focus,
.beta-form select:focus,
.beta-form textarea:focus {
  outline: none;
  border-color: var(--brass);
}
.beta-form textarea {
  margin-bottom: 22px;
  resize: vertical;
  font-family: var(--font-sans);
}
.beta-form .btn {
  width: 100%;
}
.beta-thanks {
  display: none;
  margin-top: 18px;
  padding: 12px 16px;
  background: rgba(109, 178, 131, 0.1);
  border-left: 3px solid var(--green);
  color: var(--green);
  font-size: 14px;
  border-radius: 4px;
}
.beta-thanks.show { display: block; }

/* ============================================
   FOOTER
============================================ */

.foot {
  background: var(--ink);
  border-top: 1px solid var(--line);
  padding: 60px 28px 36px;
}
.foot-inner {
  max-width: var(--width);
  margin: 0 auto;
}
.foot-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 40px;
  font-family: var(--font-serif);
  font-size: 22px;
  color: var(--cream);
}
.foot-tag {
  margin-left: 16px;
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--muted);
  font-style: italic;
}
.foot-cols {
  display: grid;
  grid-template-columns: repeat(2, 200px);
  gap: 60px;
  margin-bottom: 40px;
}
.foot-h {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--brass);
  text-transform: uppercase;
  margin-bottom: 14px;
}
.foot-cols a {
  display: block;
  color: var(--muted);
  font-size: 14px;
  padding: 4px 0;
}
.foot-cols a:hover { color: var(--cream); }
.foot-legal {
  padding-top: 30px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--muted-2);
  letter-spacing: 0.02em;
}

/* ============================================
   RESPONSIVE
============================================ */

@media (max-width: 980px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 60px;
  }
  .browser-frame { transform: none; }
  .pillars-grid { grid-template-columns: 1fr; gap: 40px; }
  .caps-grid { grid-template-columns: repeat(2, 1fr); }
  .tour-grid { grid-template-columns: 1fr; }
  .trust-grid { grid-template-columns: 1fr; gap: 50px; }
  .flow {
    grid-template-columns: 1fr;
  }
  .flow-arrow {
    transform: rotate(90deg);
    padding: 8px 0;
  }
  .trust-facts { grid-template-columns: 1fr; }
  .beta-row { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .nav-links a:not(.cta-soft) { display: none; }
  .hero { padding: 60px 20px 80px; }
  .pillars, .how, .caps, .trust, .honesty, .beta { padding-left: 20px; padding-right: 20px; }
  .caps-grid { grid-template-columns: 1fr; }
  .hero-cta { flex-direction: column; }
  .btn { width: 100%; }
  .foot-cols { grid-template-columns: 1fr; gap: 30px; }
}

/* ============================================
   ENTRANCE ANIMATIONS
============================================ */

.fade-up {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.fade-up.in-view {
  opacity: 1;
  transform: translateY(0);
}
