/* CortexHosting — landing page.

   Tokens mirror frontend/app/globals.css exactly. That file is the product's
   source of truth; this is a standalone static page that cannot import it, so
   the values are copied rather than derived. If the product palette moves,
   move it here too — the two are meant to read as one surface. */

:root {
  --bg-base: hsl(0 0% 4%);
  --bg-surface: hsl(0 0% 7%);
  --bg-elevated: hsl(0 0% 11%);

  --border-default: hsl(0 0% 14%);
  --border-strong: hsl(0 0% 22%);

  --text-primary: hsl(0 0% 93%);
  --text-secondary: hsl(0 0% 55%);
  --text-muted: hsl(0 0% 35%);
  --text-inverse: hsl(0 0% 4%);

  --accent: hsl(0 0% 100%);

  --font-display: "Clash Display", "Helvetica Neue", Arial, sans-serif;
  --font-body: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "Cascadia Mono", Menlo, monospace;

  --wrap: 1160px;
  --gutter: 1.5rem;

  --step-hero: clamp(2.6rem, 7.2vw, 5rem);
  --step-h2: clamp(1.7rem, 3.4vw, 2.5rem);
  --step-h3: 1.25rem;
  --step-body: 1.0625rem;
  --step-label: 0.6875rem;
}

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

html {
  color-scheme: dark;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg-base);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: var(--step-body);
  font-weight: 300;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.015em;
  margin: 0;
}

p {
  margin: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--bg-elevated);
  color: var(--text-primary);
  padding: 0.75rem 1rem;
  font-family: var(--font-mono);
  font-size: var(--step-label);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  z-index: 100;
}

.skip:focus {
  left: 1rem;
  top: 1rem;
}

/* ── shared structure ──────────────────────────────────────────────────
   .wrap sets the measure, .band sets the vertical rhythm. Each axis is set
   in exactly one place so no two selectors can quietly cancel each other. */

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.band {
  padding-block: clamp(4rem, 9vw, 7rem);
  border-top: 1px solid var(--border-default);
}

.label {
  display: block;
  font-family: var(--font-mono);
  font-size: var(--step-label);
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.lede {
  color: var(--text-secondary);
  max-width: 46ch;
}

/* ── nav ───────────────────────────────────────────────────────────── */

/* Opaque, not translucent. A blurred sticky bar samples a compositor layer
   that is one frame behind the scroll, so headings smear through it on the way
   past — visible in every capture of this page while it was there. The house
   rule already bans the same family of effect on cards; this is that rule
   applied to the one element that was breaking it. */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  height: 4rem;
  background: var(--bg-base);
  border-bottom: 1px solid var(--border-default);
}

.nav-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.wordmark {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-primary);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-links a {
  font-family: var(--font-mono);
  font-size: var(--step-label);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-secondary);
  transition: color 0.15s ease;
}

.nav-links a:hover {
  color: var(--text-primary);
}

@media (max-width: 640px) {
  .nav-links a.nav-drop {
    display: none;
  }

  .nav-links {
    gap: 1.25rem;
  }
}

/* ── hero ──────────────────────────────────────────────────────────── */

.hero {
  padding-block: clamp(3.5rem, 8vw, 6.5rem) clamp(4rem, 9vw, 7rem);
}

.hero-grid {
  display: grid;
  gap: clamp(3rem, 5vw, 4.5rem);
  align-items: start;
}

@media (min-width: 960px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  }
}

.hero h1 {
  font-size: var(--step-hero);
  line-height: 0.98;
  margin-block: 1.5rem 1.75rem;
  text-wrap: balance;
}

/* ── the pre-launch notice ─────────────────────────────────────────────
   Said plainly, and above the fold. A page whose only job is to be believed
   cannot open in the voice of a product that already has customers. */

.notice {
  margin-top: 2.25rem;
  border: 1px solid var(--border-default);
  border-left: 2px solid var(--border-strong);
  background: var(--bg-surface);
  padding: 1.125rem 1.25rem;
  font-size: 0.95rem;
  color: var(--text-secondary);
  max-width: 46ch;
}

.notice strong {
  color: var(--text-primary);
  font-weight: 500;
}

/* ── the spec plate ────────────────────────────────────────────────────
   The signature element, and the page's whole argument in one card. The
   vernacular is the asset plate bolted to a real machine: monospace, key
   left, value right, dotted leader between. Every value on it can be
   checked from outside, which is what makes it worth printing. */

.plate {
  border: 1px solid var(--border-default);
  background: var(--bg-surface);
  border-radius: 4px;
}

.plate-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-default);
}

.plate-head .stamp {
  font-family: var(--font-mono);
  font-size: var(--step-label);
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

.plate-rows {
  list-style: none;
  margin: 0;
  padding: 0.5rem 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  line-height: 1.5;
}

.plate-rows li {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  padding-block: 0.5rem;
}

.plate-rows li + li {
  border-top: 1px solid color-mix(in srgb, var(--border-default) 60%, transparent);
}

.plate-key {
  color: var(--text-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

/* The leader is drawn, not typed, so it is never selected with the text and
   never read out as a run of full stops. */
.plate-lead {
  flex: 1;
  height: 1px;
  align-self: center;
  min-width: 1rem;
  background-image: radial-gradient(circle, var(--border-strong) 0.5px, transparent 0.5px);
  background-size: 4px 1px;
  background-repeat: repeat-x;
}

.plate-val {
  color: var(--text-primary);
  text-align: right;
}

.plate-foot {
  padding: 0.9rem 1.25rem 1.1rem;
  border-top: 1px solid var(--border-default);
  font-size: 0.8rem;
  line-height: 1.6;
  color: var(--text-muted);
}

.plate-foot code {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-secondary);
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: 3px;
  padding: 0.1rem 0.35rem;
}

/* ── section headers ───────────────────────────────────────────────── */

.band-head {
  max-width: 46ch;
  margin-bottom: clamp(2.5rem, 4vw, 3.5rem);
}

.band-head h2 {
  font-size: var(--step-h2);
  line-height: 1.12;
  margin-block: 1rem;
  text-wrap: balance;
}

/* ── what it does ──────────────────────────────────────────────────── */

.cards {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1fr;
}

@media (min-width: 860px) {
  .cards {
    grid-template-columns: repeat(3, 1fr);
  }
}

.card {
  border: 1px solid var(--border-default);
  background: var(--bg-surface);
  border-radius: 8px;
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: border-color 0.2s ease;
}

.card:hover {
  border-color: var(--border-strong);
}

.card h3 {
  font-size: var(--step-h3);
  line-height: 1.25;
}

.card p {
  font-size: 0.95rem;
  color: var(--text-secondary);
}

/* ── who runs it ───────────────────────────────────────────────────── */

.split {
  display: grid;
  gap: clamp(2.5rem, 5vw, 4rem);
  align-items: start;
}

@media (min-width: 960px) {
  .split {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
}

.prose p {
  color: var(--text-secondary);
  max-width: 50ch;
}

.prose p + p {
  margin-top: 1.1rem;
}

.contacts {
  border: 1px solid var(--border-default);
  background: var(--bg-surface);
  border-radius: 8px;
  overflow: hidden;
}

.contact {
  display: block;
  padding: 1.25rem 1.5rem;
  transition: background-color 0.15s ease;
}

.contact + .contact {
  border-top: 1px solid var(--border-default);
}

.contact:hover {
  background: var(--bg-elevated);
}

.contact-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  flex-wrap: wrap;
}

.contact-addr {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-strong);
  padding-bottom: 1px;
  transition: border-color 0.15s ease;
}

.contact:hover .contact-addr {
  border-bottom-color: var(--accent);
}

.contact-note {
  margin-top: 0.4rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
  max-width: 44ch;
}

/* ── footer ────────────────────────────────────────────────────────── */

.foot {
  border-top: 1px solid var(--border-default);
  padding-block: 2.5rem;
}

.foot-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: var(--step-label);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* ── load sequence ─────────────────────────────────────────────────────
   One orchestrated entrance and nothing on scroll. Elements carry --d for
   the stagger. The hidden start state lives inside the no-preference query,
   so a reader who asked for less motion — or a browser that never runs the
   animation — gets the finished page rather than an empty one. */

@media (prefers-reduced-motion: no-preference) {
  [data-reveal] {
    opacity: 0;
    transform: translateY(14px);
    animation: reveal 0.55s cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
    animation-delay: var(--d, 0ms);
  }
}

@keyframes reveal {
  to {
    opacity: 1;
    transform: none;
  }
}
