/* ============================================================
   Atlas landing page — "engineering drawing" design system.
   Palette, type, and motifs are drawn from the subject itself:
   blueprint linework, title blocks, and grease-pencil redline
   annotations, because that's literally what Atlas produces —
   an annotated technical read-out of a codebase.
   ============================================================ */

:root {
  --paper: #f9fafb;
  --paper-raised: #ffffff;
  --grid-line: #e4e9ed;
  --ink: #14213d;
  --blueprint: #2b6cb0;
  --blueprint-dim: #7fa8d4;
  --signal: #e85d2c;
  /* --signal is 3.33:1 on --paper -- fine for borders/large accents (WCAG
     1.4.11 needs 3:1 for UI components) but fails 1.4.3's 4.5:1 for small
     text. Use this darker shade (4.71:1) anywhere --signal colors actual
     readable text below 18px. */
  --signal-text: #c74416;
  --slate: #5b6472;
  --line: #d8dee4;

  --font-display: "Space Grotesk", "Arial Narrow", sans-serif;
  --font-body: "IBM Plex Sans", -apple-system, sans-serif;
  --font-mono: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;

  --sheet-max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

body {
  margin: 0;
  background: var(--paper);
  background-image: linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 32px 32px;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--blueprint);
}

.wrap {
  max-width: var(--sheet-max);
  margin: 0 auto;
  padding: 0 28px;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--slate);
}

.eyebrow strong {
  color: var(--signal-text);
  font-weight: 600;
}

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

p {
  margin: 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: 0.02em;
  text-decoration: none;
  padding: 12px 20px;
  border: 1.5px solid var(--ink);
  border-radius: 3px;
  transition: background 0.15s ease, color 0.15s ease, transform 0.1s ease;
}

.btn:focus-visible,
a:focus-visible,
button:focus-visible {
  outline: 2.5px solid var(--signal);
  outline-offset: 2px;
}

.btn-primary {
  background: var(--ink);
  color: var(--paper);
}

.btn-primary:hover {
  background: var(--blueprint);
  border-color: var(--blueprint);
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
}

.btn-ghost:hover {
  border-color: var(--blueprint);
  color: var(--blueprint);
  transform: translateY(-1px);
}

/* ---------- header / title block ---------- */

.titlebar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(249, 250, 251, 0.88);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}

.titlebar .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

.wordmark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 19px;
  letter-spacing: -0.02em;
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.wordmark .tick {
  color: var(--signal);
}

.titlebar nav {
  display: flex;
  gap: 26px;
  font-family: var(--font-mono);
  font-size: 13px;
}

.titlebar nav a {
  color: var(--slate);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.titlebar nav a:hover {
  color: var(--ink);
  border-bottom-color: var(--signal);
}

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

.hero {
  padding: 76px 0 64px;
  position: relative;
}

.hero .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 460px);
  gap: 56px;
  align-items: center;
}

.hero-copy h1 {
  font-size: clamp(36px, 5vw, 58px);
  line-height: 1.04;
  margin: 14px 0 22px;
}

.hero-copy h1 em {
  font-style: normal;
  color: var(--blueprint);
}

.hero-copy .lede {
  font-size: 18px;
  color: var(--slate);
  max-width: 46ch;
  margin-bottom: 30px;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 34px;
}

.hero-meta {
  display: flex;
  gap: 22px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--slate);
  border-top: 1px solid var(--line);
  padding-top: 14px;
  flex-wrap: wrap;
}

.hero-meta b {
  color: var(--ink);
}

.hero-diagram {
  position: relative;
}

.hero-diagram svg {
  width: 100%;
  height: auto;
  overflow: visible;
}

.diagram-frame {
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--paper-raised);
  padding: 18px;
  position: relative;
}

.corner-tick {
  position: absolute;
  width: 10px;
  height: 10px;
  border: 1.5px solid var(--blueprint-dim);
}

.corner-tick.tl {
  top: -1px;
  left: -1px;
  border-right: none;
  border-bottom: none;
}
.corner-tick.tr {
  top: -1px;
  right: -1px;
  border-left: none;
  border-bottom: none;
}
.corner-tick.bl {
  bottom: -1px;
  left: -1px;
  border-right: none;
  border-top: none;
}
.corner-tick.br {
  bottom: -1px;
  right: -1px;
  border-left: none;
  border-top: none;
}

/* ---------- positioning strip ---------- */

.strip {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--paper-raised);
  padding: 34px 0;
}

.strip .wrap {
  display: flex;
  gap: 28px;
  align-items: flex-start;
}

.strip .mark {
  font-family: var(--font-mono);
  color: var(--signal);
  font-size: 22px;
  line-height: 1;
  flex-shrink: 0;
}

.strip p {
  font-size: 18px;
  max-width: 74ch;
  color: var(--ink);
}

.strip p code {
  font-family: var(--font-mono);
  background: var(--grid-line);
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 0.85em;
}

/* ---------- sheet sections (shared) ---------- */

.sheet {
  padding: 84px 0;
}

.sheet-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 44px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 18px;
  flex-wrap: wrap;
}

.sheet-tag {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.1em;
  color: var(--blueprint);
  text-transform: uppercase;
}

.sheet-head h2 {
  font-size: clamp(26px, 3vw, 36px);
}

.sheet-sub {
  color: var(--slate);
  max-width: 58ch;
  margin-top: 8px;
}

/* ---------- how it works ---------- */

.pipeline {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0;
  position: relative;
}

.pipeline::before {
  content: "";
  position: absolute;
  top: 21px;
  left: 4%;
  right: 4%;
  height: 1.5px;
  background: repeating-linear-gradient(
    90deg,
    var(--blueprint-dim) 0 6px,
    transparent 6px 12px
  );
  z-index: 0;
}

.pstep {
  position: relative;
  z-index: 1;
  padding-right: 18px;
}

.pstep .num {
  width: 42px;
  height: 42px;
  border: 1.5px solid var(--ink);
  border-radius: 50%;
  background: var(--paper);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 15px;
  margin-bottom: 16px;
}

.pstep .title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 16px;
  margin-bottom: 6px;
}

.pstep .module {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--signal-text);
  margin-bottom: 8px;
}

.pstep .desc {
  font-size: 13.5px;
  color: var(--slate);
  line-height: 1.5;
}

/* ---------- features ---------- */

.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.fcard {
  background: var(--paper-raised);
  padding: 28px 26px;
  transition: background 0.15s ease;
}

.fcard:hover {
  background: #fbfbfa;
}

.fcard svg {
  width: 30px;
  height: 30px;
  stroke: var(--blueprint);
  fill: none;
  stroke-width: 1.5;
  margin-bottom: 16px;
}

.fcard h3 {
  font-size: 16.5px;
  margin-bottom: 8px;
}

.fcard p {
  font-size: 14px;
  color: var(--slate);
}

/* ---------- screenshots ---------- */

.plates {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 24px;
}

.plate {
  border: 1px solid var(--line);
  background: var(--paper-raised);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}

.plate img {
  display: block;
  width: 100%;
}

.plate-cap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 9px 14px;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--slate);
}

.plates-side {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

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

.arch-flow-wrap {
  position: relative;
}

.arch-flow-wrap::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 22px;
  width: 40px;
  background: linear-gradient(90deg, transparent, var(--paper));
  pointer-events: none;
}

@media (min-width: 881px) {
  .arch-flow-wrap::after {
    display: none;
  }
}

.arch-flow {
  display: flex;
  align-items: center;
  gap: 0;
  overflow-x: auto;
  padding: 8px 0 22px;
}

.arch-node {
  flex: 0 0 auto;
  border: 1.5px solid var(--ink);
  background: var(--paper-raised);
  border-radius: 4px;
  padding: 14px 16px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  min-width: 128px;
  text-align: center;
}

.arch-node b {
  display: block;
  font-family: var(--font-display);
  font-size: 14px;
  margin-bottom: 4px;
}

.arch-arrow {
  flex: 0 0 auto;
  width: 34px;
  height: 1.5px;
  background: repeating-linear-gradient(
    90deg,
    var(--blueprint) 0 5px,
    transparent 5px 10px
  );
  position: relative;
}

.arch-arrow::after {
  content: "";
  position: absolute;
  right: 0;
  top: -3px;
  border-left: 6px solid var(--blueprint);
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
}

.arch-link {
  font-family: var(--font-mono);
  font-size: 13.5px;
}

/* ---------- proof / examples ---------- */

.proof-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.proof-card {
  border: 1px solid var(--line);
  background: var(--paper-raised);
  border-radius: 4px;
  padding: 24px;
  text-decoration: none;
  color: var(--ink);
  display: block;
  transition: border-color 0.15s ease, transform 0.1s ease;
}

.proof-card:hover {
  border-color: var(--blueprint);
  transform: translateY(-2px);
}

.proof-card .file {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--signal-text);
  margin-bottom: 10px;
}

.proof-card h3 {
  font-size: 17px;
  margin-bottom: 6px;
}

.proof-card p {
  font-size: 13.5px;
  color: var(--slate);
}

/* ---------- real-world validation table ---------- */

.validation-scroll {
  position: relative;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--paper-raised);
}

.validation-scroll::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 32px;
  background: linear-gradient(90deg, transparent, var(--paper-raised));
  pointer-events: none;
}

@media (min-width: 881px) {
  .validation-scroll::after {
    display: none;
  }
}

.validation-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-mono);
  font-size: 13px;
  white-space: nowrap;
}

.validation-table th,
.validation-table td {
  padding: 10px 16px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}

.validation-table thead th {
  color: var(--slate);
  font-weight: 500;
  font-size: 11.5px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.validation-table tbody tr:last-child td {
  border-bottom: none;
}

.validation-table a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--line);
  text-underline-offset: 3px;
}

.validation-table a:hover {
  text-decoration-color: var(--signal);
}

.validation-fail td {
  color: var(--slate);
  font-style: italic;
  white-space: normal;
}

/* ---------- footer / closing title block ---------- */

.closing {
  border-top: 1px solid var(--line);
  background: var(--ink);
  color: var(--paper);
  padding: 56px 0 34px;
}

.closing h2 {
  color: var(--paper);
  font-size: clamp(26px, 3.4vw, 40px);
  max-width: 22ch;
  margin-bottom: 26px;
}

.closing .hero-actions .btn-primary {
  background: var(--signal);
  border-color: var(--signal);
  color: var(--ink);
}

.closing .hero-actions .btn-primary:hover {
  background: #fff;
  border-color: #fff;
}

.closing .hero-actions .btn-ghost {
  color: var(--paper);
  border-color: rgba(249, 250, 251, 0.4);
}

.closing .hero-actions .btn-ghost:hover {
  border-color: var(--paper);
  color: var(--paper);
}

.titleblock {
  margin-top: 48px;
  padding-top: 22px;
  border-top: 1px solid rgba(249, 250, 251, 0.16);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: rgba(249, 250, 251, 0.55);
  letter-spacing: 0.04em;
}

.titleblock span b {
  color: rgba(249, 250, 251, 0.85);
}

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

.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

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

@media (max-width: 880px) {
  .hero .wrap {
    grid-template-columns: 1fr;
  }
  .hero-diagram {
    order: -1;
  }
  .pipeline {
    grid-template-columns: 1fr;
    gap: 22px;
  }
  .pipeline::before {
    display: none;
  }
  .features {
    grid-template-columns: 1fr;
  }
  .plates {
    grid-template-columns: 1fr;
  }
  .proof-grid {
    grid-template-columns: 1fr;
  }
  .titlebar nav {
    display: none;
  }
  .arch-flow {
    padding-bottom: 12px;
  }
}
