/* ============================================================================
   Aperture landing page — page-level styles.

   Everything visual comes from the design system (assets/ds/_ds_bundle.css):
   its tokens, its class vocabulary. This file is layout glue only — it holds
   the values the handoff specifies for THIS page and nothing that belongs in
   the DS. Class names are prefixed `lp-` so they can never be mistaken for
   design-system names.
   ============================================================================ */

/* ---------------------------------------------------------------- frame --- */

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

html { scroll-behavior: smooth; }

body {
  background: var(--surface-page);
  color: var(--text-primary);
  font-family: var(--font-ui);
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--text-tertiary);
  text-decoration: none;
  transition: color var(--dur-fast);
}
a:hover { color: var(--accent); }

::selection { background: var(--accent); color: var(--on-accent); }

/* Project-level override: the DS default mono is JetBrains Mono; this project
   speaks Tomorrow. --font-code is left alone at JetBrains Mono. */
:root { --font-mono: "Tomorrow", ui-monospace, SFMono-Regular, Menlo, monospace; }

/* Tomorrow ships weight 400 only — anything heavier is a synthesised smear.
   Re-weight every DS class that renders in the mono face. */
.mono, .kpi-label, .kpi-figure, .figure-md, .figure-sm, .stat-label, .stat-figure,
.meta, .pill, .tag, .chip, .cell-soft, .cell-sub, .inset-label, .register-strip,
.brand-name, .btn, .tab, .tab.active, .btn.primary, .input, .search input, .avatar,
.code, .terminal-title, .terminal-body, .chart-axis, .legend, .rung-value,
.chain { font-weight: 400; }

/* Sized down from the DS default of 20px so the wordmark sits shorter than the
   20px logo mark beside it and centers against it. Intentional proportion. */
.brand-name { font-size: 14px; line-height: 1; letter-spacing: 0.1em; }

/* Tomorrow's digits are proportional, so tabular-nums is a no-op — numeric
   columns are right-aligned instead. */
.lp-num { text-align: right; }

.lp-shell {
  background: var(--surface-page);
  color: var(--text-primary);
  font-family: var(--font-ui);
  min-height: 100vh;
}

.lp-wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding-left: var(--page-pad-x);
  padding-right: var(--page-pad-x);
}

/* Every section boundary is a hairline, never a box. */
.lp-section { border-top: 1px solid var(--rule); }

/* Longhand: these classes share an element with .lp-wrap, which owns the
   horizontal padding. A `padding` shorthand here would wipe it out. */
.lp-section-body { padding-top: 92px; padding-bottom: 92px; }
.lp-section-body.lp-tight-bottom { padding-bottom: 84px; }

.lp-band-light {
  background: var(--surface-page);
  color: var(--text-primary);
}

/* ------------------------------------------------------------ typography --- */

.lp-kicker {
  color: var(--text-muted);
  margin-bottom: 16px;
}

.lp-card-kicker { color: var(--text-muted); }

.lp-h1 {
  font-size: 54px;
  line-height: 1.04;
  letter-spacing: -0.025em;
  font-weight: 600;
  text-wrap: balance;
  color: var(--text-secondary);
}
.lp-h1 strong { font-weight: inherit; color: var(--text-primary); }

.lp-h2 {
  font-size: 38px;
  line-height: 1.1;
  letter-spacing: -0.02em;
  font-weight: 600;
  text-wrap: balance;
}

.lp-lede {
  margin-top: 18px;
  font-size: 16.5px;
}

.prose { text-wrap: pretty; }

.lp-intro { max-width: 700px; margin-bottom: 44px; }
/* The 760px intros are followed by a block that owns its own 44px top gap. */
.lp-intro-wide { max-width: 760px; margin-bottom: 0; }
.lp-intro-tight { margin-bottom: 40px; }

/* -------------------------------------------------------------------- nav --- */

.lp-nav {
  position: sticky;
  top: 0;
  z-index: 60;
  background: var(--surface-chrome);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--rule);
}

.lp-nav-inner {
  height: var(--chrome-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.lp-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  flex-shrink: 0;
}

.lp-byline {
  color: var(--text-ghost);
  font-size: 9.5px;
  letter-spacing: var(--track-micro);
  text-transform: uppercase;
}

.lp-status { gap: 9px; }

.lp-status-text {
  font-size: 9.5px;
  letter-spacing: var(--track-micro);
  text-transform: uppercase;
  color: var(--text-secondary);
  white-space: nowrap;
}

/* ------------------------------------------------------------------- hero --- */

.lp-hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--rule);
}

/* The dot grid appears only in the hero. */
.lp-hero-texture {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(var(--dot-grid) 1px, transparent 1px);
  background-size: 22px 22px;
  -webkit-mask-image: linear-gradient(180deg, #000 5%, transparent 82%);
  mask-image: linear-gradient(180deg, #000 5%, transparent 82%);
  pointer-events: none;
}

.lp-hero-inner {
  position: relative;
  padding-top: 74px;
  padding-bottom: 84px;
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: 56px;
  align-items: center;
}

.lp-eyebrow { gap: 9px; margin-bottom: 24px; }

.lp-eyebrow-text {
  color: var(--accent);
  font-size: 9.5px;
  letter-spacing: var(--track-micro);
  text-transform: uppercase;
}

.lp-hero-sub {
  margin-top: 22px;
  font-size: 17px;
  max-width: 520px;
}

.lp-hero-notice {
  margin-top: 32px;
  border-left-color: var(--accent);
}
.lp-hero-notice .notice-title { font-size: 15px; }
.lp-hero-notice .notice-body { font-size: 13px; }

.lp-hero-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
  font-size: 11.5px;
  color: var(--text-muted);
}
.lp-hero-link .lp-arrow { color: var(--accent); }

.lp-sponsor {
  margin-top: 38px;
  padding-top: 22px;
  border-top: 1px solid var(--rule);
  display: flex;
  align-items: center;
  gap: 13px;
}
/* DNX Solutions logomark. The two mono files are vendored verbatim in
   assets/brand/; the sprite draws them in currentColor so each band gets the
   sanctioned single-colour version. */
.lp-dnx-logo {
  display: block;
  height: 30px;
  width: auto;
  flex-shrink: 0;
  color: #fff;          /* Logomark MonoRev */
}
[data-theme="light"] .lp-dnx-logo { color: #252540; }  /* Logomark Mono */
.lp-dnx-logo.lp-dnx-sm { height: 22px; }
/* Brandmark is portrait, so it reads at the same height as the logomark. */
.lp-dnx-logo.lp-dnx-brandmark { height: 30px; }
.lp-sponsor p {
  color: var(--text-muted);
  font-size: 12.5px;
  line-height: var(--leading-body);
}
.lp-sponsor a { color: var(--text-secondary); }
.lp-sponsor a:hover { color: var(--accent); }

/* --------------------------------------------------- hero cost dashboard --- */

.lp-dash { position: relative; }

.lp-dash .card-head { align-items: center; }

.lp-dash-title {
  font-size: 10.5px;
  letter-spacing: var(--track-tab);
  text-transform: uppercase;
  color: var(--text-secondary);
}

.lp-dash-range {
  font-size: 9.5px;
  letter-spacing: var(--track-micro);
  text-transform: uppercase;
  color: var(--text-ghost);
}

.lp-kpi-grid { grid-template-columns: 1fr 1fr; }

.lp-kpi { padding: 16px 18px; }
.lp-kpi .kpi-figure { margin-top: 10px; font-size: 28px; }

.lp-dash-tabs { padding: 14px 18px 10px; }
.lp-dash-tabs .tab { height: var(--control-h-sm); padding: 0 13px; font-size: 10px; }

/* Fixed height so a tab switch never reflows the page. */
.lp-dash-rows { min-height: 236px; }

.lp-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 13px 18px;
  width: 100%;
  text-align: left;
  border: 0;
  border-bottom: 1px solid var(--rule-divider);
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
  transition: background var(--dur-fast);
}
.lp-row:hover { background: var(--hover-row); }
.lp-row.lp-selected {
  background: var(--row-selected);
  box-shadow: inset 2px 0 0 var(--accent);
}

.lp-row-main { display: block; min-width: 0; }
.lp-row-label { display: block; font-size: 13px; }
.lp-row-meta { margin-top: 5px; }

.lp-row-right {
  text-align: right;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}
.lp-row-cost { font-size: 12.5px; color: var(--text-primary); }

/* --------------------------------------- design-system component stand-ins --- */

/* The handoff's DS ships these as React components (Mark, Money, Track,
   CoverageBar, Trust, CopyBlock). Until `aperture-console` is installable from
   a registry, they are reproduced here as exactly the markup those components
   render, on exactly the DS classes — so swapping them back is a deletion. */

/* Trust strips .card-foot's own top spacing; the page margin lives on the
   wrapper, so neither can win a specificity fight with the other. */
.card-foot.lp-trust-foot { margin-top: 0; padding-top: 0; border-top: none; }
.lp-trust-icon { color: var(--accent); flex-shrink: 0; display: flex; }
.lp-trust { margin-top: 22px; }

/* CoverageBar and Track animate their fill up from 0 on mount — the width is
   in the markup so it is right without JS, and aperture.js replays it. */

/* ------------------------------------------------- compatibility strip --- */

.lp-compat { position: relative; }
.lp-compat .register-strip { padding: 16px 0 22px; }

/* ------------------------------------------------------- 01 the problem --- */

.lp-problem-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
  margin-top: 44px;
}

.lp-claim {
  margin-top: 14px;
  font-size: 17px;
  font-weight: 600;
  line-height: var(--leading-tight);
}

.lp-card-body { margin-top: 10px; }

.lp-card-accent {
  border-top: 2px solid var(--accent);
  background: var(--surface-inset);
}
.lp-card-accent .lp-card-kicker { color: var(--accent); }

/* ------------------------------------------------------- 02 capabilities --- */

.lp-cap-grid {
  border: 1px solid var(--rule);
  background: var(--surface-panel);
}
.lp-cap-grid .cells-inner { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.lp-cap { padding: 26px 24px 28px; }

.lp-cap-no {
  font-size: 9.5px;
  letter-spacing: var(--track-micro);
  text-transform: uppercase;
  color: var(--accent);
}

.lp-cap h3 {
  margin-top: 14px;
  font-size: 16.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.lp-cap .prose { margin-top: 9px; }

/* --------------------------------------------------------- 03 attribution --- */

.lp-attr-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 56px;
  align-items: start;
}

.lp-chain { margin-top: 26px; }
.lp-coverage-inset { margin-top: 26px; }
.lp-coverage-bar { margin-top: 12px; }
.lp-trust { margin-top: 22px; }

.lp-attr-card .card-head { align-items: center; }
.lp-attr-card .card-sub { margin-top: 3px; }
.lp-attr-card .tab { height: var(--control-h-sm); padding: 0 14px; font-size: 10px; }

.lp-attr-body {
  padding: 6px 20px 20px;
  min-height: 360px;
}

.lp-attr-row {
  padding: 16px 0;
  border-bottom: 1px solid var(--rule-divider);
}
.lp-attr-row .spread { align-items: baseline; }
.lp-attr-row .inline { gap: 10px; min-width: 0; }
.lp-attr-name { font-size: 13.5px; }
.lp-attr-cost { font-size: 14px; color: var(--text-primary); }
.lp-attr-row .track { margin-top: 10px; }

/* ---------------------------------------------------- 04 service accounts --- */

.lp-sheet { background: var(--surface-sheet); }

.lp-tenant-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 22px;
  margin-top: 44px;
  align-items: start;
}

.lp-tenant-card .card-sub { margin-top: 3px; }

.lp-tenant-row {
  display: grid;
  grid-template-columns: 1.5fr 0.7fr 0.8fr 0.8fr;
  gap: 14px;
  align-items: center;
}
.lp-tenant-row.lp-head {
  background: var(--surface-inset);
  border-bottom: 1px solid var(--rule);
}
.lp-tenant-row.lp-head:hover { background: var(--surface-inset); }

.lp-tenant-name { font-size: 13.5px; }
.lp-tenant-reqs { font-size: 11.5px; color: var(--text-tertiary); }
.lp-tenant-spend { font-size: 12.5px; color: var(--text-primary); }

.lp-tenant-foot { padding: 16px 18px; }

.lp-copy-block { margin-top: 16px; }

.lp-quotas {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.lp-quota .spread { margin-bottom: 8px; }
.lp-quota-name { font-size: 11.5px; color: var(--text-secondary); }
.lp-quota-of { font-size: 11.5px; color: var(--text-muted); }
.lp-quota-trust { margin-top: 18px; }
.lp-quota-trust .card-foot { margin-top: 0; }

/* --------------------------------------------------------- 05 architecture --- */

.lp-arch { padding: 36px; }

.lp-arch-grid {
  display: grid;
  grid-template-columns: 1fr auto 1.1fr auto 1fr;
  gap: 0;
  align-items: center;
}

.lp-arch-sources {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

/* The 1px gap over a rule-colored parent is how the hairline dividers are
   drawn — no per-item borders. */
.lp-stack-list {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
}
.lp-stack-item {
  background: var(--surface-inset);
  padding: 11px 13px;
  font-size: 13px;
  color: var(--text-secondary);
}
.lp-stack-item.lp-first-class { color: var(--text-primary); }

.lp-arch-conn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 0 12px;
}
.lp-arch-conn-label {
  font-size: 9.5px;
  letter-spacing: var(--track-micro);
  text-transform: uppercase;
  color: var(--text-muted);
}
.lp-arch-line {
  width: 64px;
  height: 1px;
  background: var(--rule-strong);
}

.lp-gateway {
  background: var(--surface-inset);
  border: 1px solid var(--rule-strong);
  padding: 24px;
  position: relative;
}

/* The only accent-filled block on the page. */
.lp-gateway-tag {
  position: absolute;
  top: -9px;
  left: 16px;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 9px;
  letter-spacing: var(--track-micro);
  text-transform: uppercase;
  padding: 2px 8px;
}

.lp-gateway-brand {
  gap: 11px;
  margin-top: 6px;
  margin-bottom: 16px;
}
.lp-gateway-brand .brand-name { font-size: 13px; }

.lp-gateway-caps {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
}
.lp-gateway-cap {
  background: var(--surface-panel);
  padding: 8px 10px;
  font-size: 10px;
  letter-spacing: var(--track-column);
  text-transform: uppercase;
  color: var(--text-tertiary);
}

.lp-models-box {
  margin-top: 10px;
  background: var(--surface-inset);
  border: 1px solid var(--rule);
  padding: 14px;
}
.lp-models-name { font-size: 13.5px; font-weight: 600; }

/* ------------------------------------------------------------ 06 editions --- */

.lp-editions {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 22px;
}

.lp-edition { padding: 32px; }
.lp-edition.lp-card-hero { border-top: 2px solid var(--accent); }
.lp-edition .inline { gap: 10px; }
.lp-edition h3 {
  font-size: 23px;
  font-weight: 600;
  margin-top: 14px;
  letter-spacing: -0.015em;
}
.lp-edition .prose { margin-top: 10px; }

.lp-edition-kicker {
  font-size: 9.5px;
  letter-spacing: var(--track-micro);
  text-transform: uppercase;
  color: var(--accent);
}
.lp-edition-kicker.lp-muted { color: var(--text-muted); }

.lp-rungs {
  margin-top: 22px;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.lp-edition-cta {
  margin-top: 26px;
  height: 42px;
  padding: 0 20px;
}

/* ----------------------------------------------------------------- footer --- */

.lp-footer { border-top: 1px solid var(--rule); }
.lp-footer-inner { padding-top: 64px; padding-bottom: 0; }

.lp-footer-top {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 44px;
  padding-bottom: 44px;
}

.lp-footer-brand { gap: 11px; margin-bottom: 16px; }
.lp-footer-prose { max-width: 340px; }

.lp-footer-head {
  color: var(--text-muted);
  margin-bottom: 16px;
}

.lp-footer-list {
  display: flex;
  flex-direction: column;
  gap: 11px;
  font-size: 13.5px;
}

/* Pre-launch: not links yet. */
.lp-footer-soon { color: var(--text-ghost); }

/* ---------------------------------------------------------- scroll reveal --- */

/* The armed class is added to <html> by JS, and only when IntersectionObserver
   exists and motion is not reduced. Without it, content is simply visible —
   never leave content at opacity 0 with no observer to reveal it. */
.lp-reveal-armed [data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .6s var(--ease-out), transform .6s var(--ease-out);
}
.lp-reveal-armed [data-reveal].lp-revealed {
  opacity: 1;
  transform: none;
}

/* ------------------------------------------------------------ responsive --- */

/* The handoff's prototype is desktop-only (designed at 1320px) and states that
   responsive behaviour is NOT designed yet. What follows implements the
   "reasonable defaults" the handoff itself proposes — see README "Deviations". */

@media (max-width: 1180px) {
  .lp-wrap { padding-left: 32px; padding-right: 32px; }
  .lp-section-body { padding-top: 72px; padding-bottom: 72px; }
  .lp-section-body.lp-tight-bottom { padding-bottom: 68px; }

  .lp-h1 { font-size: 42px; }
  .lp-h2 { font-size: 32px; }

  .lp-hero-inner {
    grid-template-columns: 1fr;
    gap: 44px;
    padding-top: 56px;
    padding-bottom: 64px;
  }
  .lp-attr-grid { grid-template-columns: 1fr; gap: 44px; }
  .lp-tenant-grid { grid-template-columns: 1fr; }
  .lp-cap-grid .cells-inner { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lp-editions { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
  .lp-wrap { padding-left: 20px; padding-right: 20px; }
  .lp-section-body { padding-top: 64px; padding-bottom: 64px; }
  .lp-section-body.lp-tight-bottom { padding-bottom: 56px; }

  .lp-h1 { font-size: 34px; }
  .lp-h2 { font-size: 28px; }
  .lp-hero-sub, .lp-lede { font-size: 15.5px; }

  .lp-problem-cards { grid-template-columns: 1fr; }
  .lp-cap-grid .cells-inner { grid-template-columns: 1fr; }
  .lp-footer-top { grid-template-columns: 1fr; gap: 32px; }

  /* The five-track diagram cannot survive narrow widths — it becomes a
     vertical flow: sources -> gateway -> models. */
  .lp-arch { padding: 24px; }
  .lp-arch-grid { grid-template-columns: 1fr; gap: 22px; }
  .lp-arch-conn { flex-direction: row; gap: 12px; padding: 0; }
  .lp-arch-line { width: 1px; height: 32px; }

  /* Requests drop out first — spend and plan are the load-bearing columns. */
  .lp-tenant-row { grid-template-columns: 1.4fr 0.9fr 0.8fr; }
  .lp-tenant-row > .lp-tenant-reqs,
  .lp-tenant-row > .lp-col-reqs { display: none; }

  .lp-edition { padding: 24px; }
  .lp-footer-inner { padding-top: 48px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
