/* ADMIT site — design tokens & core system
   Source of truth: ADMIT_SITE_SPEC.md §4 (reference preview tokens), type set in Inter. */

@font-face {
  font-family: "Inter var";
  src: url("/assets/fonts/InterVariable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  /* ground */
  --paper: #f4f3ef;
  --paper-raised: #fbfaf7;
  --ink: #171717;
  --muted: #696860;
  --line: rgba(23, 23, 23, 0.10);
  --line-soft: rgba(23, 23, 23, 0.06);

  /* brand + verdict */
  --sage: #d8e3dd;
  --sage-deep: #b9cec2;
  --green: #3f7a5f;
  --green-deep: #25543d;
  --blue: #456dde;
  --amber: #c17a31;
  --red: #a64235;

  /* verdict washes */
  --green-wash: #e4ede7;
  --amber-wash: #f3e6d7;
  --red-wash: #f0dfdb;
  --blue-wash: #e3e9f9;

  /* type */
  --sans: "Inter var", Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;

  /* shape + motion */
  --radius: 18px;
  --radius-sm: 12px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --shadow-lift: 0 14px 40px rgba(23, 23, 23, 0.10);
  --shadow-card: 0 2px 10px rgba(23, 23, 23, 0.04);

  --header-h: 64px;
  --max-w: 1180px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16.5px;
  line-height: 1.6;
  font-feature-settings: "cv05" 1, "cv11" 1;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--sage-deep); color: var(--green-deep); }

a { color: inherit; }
img, svg { max-width: 100%; height: auto; }
button { font: inherit; color: inherit; cursor: pointer; }

.skip-link {
  position: absolute; left: -9999px; top: 10px; z-index: 200;
  background: var(--ink); color: var(--paper-raised);
  padding: 10px 16px; border-radius: 999px; text-decoration: none; font-weight: 600;
}
.skip-link:focus { left: 10px; }

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

h1, h2, h3, h4 { margin: 0; font-weight: 600; line-height: 1.08; letter-spacing: -0.022em; }

.display {
  font-size: clamp(2.8rem, 7.2vw, 5.4rem);
  letter-spacing: -0.042em;
  line-height: 0.98;
  font-weight: 640;
}

.headline {
  font-size: clamp(1.9rem, 3.6vw, 2.9rem);
  letter-spacing: -0.034em;
  line-height: 1.04;
  font-weight: 630;
}

.subhead {
  font-size: clamp(1.25rem, 2vw, 1.55rem);
  letter-spacing: -0.024em;
  font-weight: 620;
}

.lead {
  font-size: clamp(1.05rem, 1.5vw, 1.25rem);
  line-height: 1.55;
  color: var(--muted);
  max-width: 40em;
}

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.74rem; font-weight: 660;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--muted);
}

.muted { color: var(--muted); }
.small { font-size: 0.87rem; }

.prose { max-width: 46em; }
.prose p { margin: 0 0 1em; }
.prose a { color: var(--green-deep); text-decoration-color: var(--sage-deep); text-underline-offset: 3px; }
.prose a:hover { text-decoration-color: var(--green); }

code, .mono {
  font-family: var(--mono);
  font-size: 0.86em;
}
code {
  background: rgba(23, 23, 23, 0.055);
  padding: 0.14em 0.42em;
  border-radius: 6px;
}

/* ---------- layout ---------- */

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

.section { padding: 88px 0; }
.section + .section { border-top: 1px solid var(--line-soft); }
.section-head { max-width: 44em; margin-bottom: 44px; }
.section-head .eyebrow { margin-bottom: 14px; }
.section-head h2 { margin-bottom: 14px; }

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-2 > *, .grid-3 > * { min-width: 0; }

/* ---------- header ---------- */

.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  height: var(--header-h);
  background: color-mix(in srgb, var(--paper) 82%, transparent);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-soft);
}
.header-inner {
  max-width: var(--max-w); margin: 0 auto; padding: 0 24px;
  height: 100%; display: flex; align-items: center; gap: 28px;
  position: relative;
}

.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; flex: none; }
.brand-mark {
  align-self: center;
  display: grid; place-items: center;
  width: 30px; height: 30px; border-radius: 9px;
  background: var(--ink); color: var(--paper-raised);
  font-weight: 680; font-size: 0.95rem; letter-spacing: 0;
}
.brand-name { font-weight: 680; letter-spacing: 0.01em; font-size: 1.05rem; }
.brand-by { color: var(--muted); font-size: 0.8rem; }
.brand-sep { width: 1px; height: 15px; background: var(--line); flex: none; }
.brand-refiant { height: 14px; width: auto; opacity: 0.8; }

.site-nav {
  display: flex; gap: 4px; min-width: 0;
  position: absolute; left: 50%; transform: translateX(-50%);
}
.site-nav a {
  text-decoration: none; color: var(--muted);
  font-size: 0.92rem; font-weight: 560;
  padding: 7px 12px; border-radius: 999px;
  transition: color 0.2s var(--ease), background 0.2s var(--ease);
}
.site-nav a:hover { color: var(--ink); background: rgba(23, 23, 23, 0.05); }
.site-nav a[aria-current="page"] { color: var(--ink); background: var(--sage); }

.header-actions { margin-left: auto; display: flex; align-items: center; gap: 12px; }

.status-chip {
  font-size: 0.74rem; font-weight: 620; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--green-deep);
  background: var(--sage);
  border: 1px solid var(--sage-deep);
  padding: 4px 11px; border-radius: 999px;
  white-space: nowrap;
}

.nav-toggle {
  display: none;
  background: none; border: 1px solid var(--line);
  border-radius: 999px; padding: 7px 14px;
  font-size: 0.9rem; font-weight: 580;
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  border-radius: 999px; text-decoration: none;
  font-weight: 600; font-size: 0.95rem;
  padding: 11px 22px; border: 1px solid transparent;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease),
    background 0.25s var(--ease), border-color 0.25s var(--ease);
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary { background: var(--ink); color: var(--paper-raised); }
.btn-primary:hover { box-shadow: 0 10px 26px rgba(23, 23, 23, 0.22); }

.btn-sage { background: var(--sage); color: var(--green-deep); border-color: var(--sage-deep); }
.btn-sage:hover { background: var(--sage-deep); box-shadow: 0 8px 22px rgba(63, 122, 95, 0.18); }

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

.btn .arrow { transition: transform 0.25s var(--ease); }
.btn:hover .arrow { transform: translateX(3px); }

.btn-sm { padding: 7px 15px; font-size: 0.87rem; }

/* ---------- cards ---------- */

.card {
  background: var(--paper-raised);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 28px;
  min-width: 0;
  box-shadow: var(--shadow-card);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s var(--ease);
}
a.card { text-decoration: none; display: block; }
.card.is-hoverable:hover, a.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lift);
  border-color: var(--line);
}

.card h3 { margin-bottom: 8px; }
.card p { margin: 0; color: var(--muted); font-size: 0.95rem; }

.card-verb {
  font-size: 0.74rem; font-weight: 660; letter-spacing: 0.13em; text-transform: uppercase;
  color: var(--green); margin-bottom: 14px; display: block;
}

/* opt-in flex column so bottom lines align across a card row;
   plain .card stays block so row-layout cards are untouched */
.card-col { display: flex; flex-direction: column; }
.card-col > .pill { align-self: flex-start; }
.card-status { margin: 2px 0 12px; }

.card code, .card .mono { overflow-wrap: anywhere; }
table.data code, table.data .mono { overflow-wrap: anywhere; }

/* status pills on repo chips etc. */
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.74rem; font-weight: 620;
  padding: 3px 10px; border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted); background: var(--paper-raised);
  white-space: nowrap;
}
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: 0.7; }
.pill-green { color: var(--green-deep); background: var(--green-wash); border-color: rgba(63, 122, 95, 0.3); }
.pill-amber { color: #8a5620; background: var(--amber-wash); border-color: rgba(193, 122, 49, 0.32); }
.pill-red { color: #7d3228; background: var(--red-wash); border-color: rgba(166, 66, 53, 0.3); }
.pill-blue { color: #2c4dae; background: var(--blue-wash); border-color: rgba(69, 109, 222, 0.3); }
.pill-ink { color: var(--paper-raised); background: var(--ink); border-color: var(--ink); }

/* ---------- console ---------- */

.console {
  background: var(--ink);
  color: #e9e7e0;
  border-radius: var(--radius);
  font-family: var(--mono);
  font-size: 0.82rem;
  line-height: 1.65;
  box-shadow: 0 24px 70px rgba(23, 23, 23, 0.28);
  overflow: hidden;
}
.console-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 18px;
  border-bottom: 1px solid rgba(251, 250, 247, 0.09);
  font-family: var(--sans); font-size: 0.78rem; color: #9a988f;
}
.console-dot { width: 9px; height: 9px; border-radius: 50%; background: rgba(251, 250, 247, 0.16); }
.console-title { margin-left: 6px; }
.console-body { padding: 18px 20px 22px; overflow-x: auto; }
.console .c-dim { color: #8a887f; }
.console .c-green { color: #8fc7a9; }
.console .c-amber { color: #e0a568; }
.console .c-red { color: #e08a7c; }
.console .c-blue { color: #96aef0; }
.console .c-key { color: #c9c6ba; }

/* ---------- gate rows (shared by home teaser + demo) ---------- */

.gate-row {
  display: flex; align-items: baseline; gap: 12px;
  padding: 9px 12px; border-radius: 10px;
  border: 1px solid transparent;
}
.gate-row + .gate-row { margin-top: 6px; }
.gate-id {
  font-family: var(--mono); font-size: 0.78rem; font-weight: 600;
  flex: none; width: 2.4em;
}
.gate-name { font-weight: 600; font-size: 0.92rem; flex: none; }
.gate-note { color: var(--muted); font-size: 0.87rem; }
.gate-state { margin-left: auto; flex: none; font-size: 0.8rem; font-weight: 650; letter-spacing: 0.04em; }

.gate-pass { background: var(--green-wash); border-color: rgba(63, 122, 95, 0.22); }
.gate-pass .gate-id, .gate-pass .gate-state { color: var(--green-deep); }
.gate-fail { background: var(--red-wash); border-color: rgba(166, 66, 53, 0.3); }
.gate-fail .gate-id, .gate-fail .gate-state { color: var(--red); }
.gate-skip { background: transparent; border-color: var(--line-soft); opacity: 0.62; }
.gate-skip .gate-state { color: var(--muted); }
.gate-wait { border-color: var(--line-soft); }
.gate-wait .gate-state { color: var(--muted); }

/* verdict banner */
.verdict {
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  font-weight: 600;
  display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap;
}
.verdict .mono { font-size: 0.85rem; }
.verdict-blocked { background: var(--red-wash); color: var(--red); border: 1px solid rgba(166, 66, 53, 0.35); }
.verdict-admissible { background: var(--green-wash); color: var(--green-deep); border: 1px solid rgba(63, 122, 95, 0.35); }
.verdict-pending { background: var(--paper-raised); color: var(--muted); border: 1px solid var(--line); }

/* ---------- tables ---------- */

.table-wrap { overflow-x: auto; border: 1px solid var(--line-soft); border-radius: var(--radius-sm); background: var(--paper-raised); }
table.data {
  width: 100%; border-collapse: collapse; font-size: 0.92rem;
}
table.data th {
  text-align: left; font-size: 0.74rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--muted); font-weight: 640;
  padding: 14px 18px; border-bottom: 1px solid var(--line);
}
table.data td { padding: 13px 18px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
table.data tr:last-child td { border-bottom: none; }
table.data td:first-child { white-space: nowrap; }

/* ---------- callouts ---------- */

.callout {
  border-radius: var(--radius);
  padding: 24px 28px;
  border: 1px solid var(--line-soft);
  background: var(--paper-raised);
}
.callout-sage { background: var(--sage); border-color: var(--sage-deep); }
.callout-amber { background: var(--amber-wash); border-color: rgba(193, 122, 49, 0.3); }
.callout p { margin: 0; }
.callout .callout-label {
  display: block; font-size: 0.74rem; font-weight: 660; letter-spacing: 0.12em;
  text-transform: uppercase; margin-bottom: 8px; color: var(--muted);
}
.callout-amber .callout-label { color: #8a5620; }

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

.site-footer {
  margin-top: 40px;
  border-top: 1px solid var(--line);
  background: var(--paper-raised);
  padding: 56px 0 40px;
  font-size: 0.9rem;
}
.footer-grid {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 36px;
  margin-bottom: 40px;
}
.footer-nonclaim { color: var(--muted); line-height: 1.65; max-width: 34em; }
.footer-col h4 {
  font-size: 0.74rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 14px; font-weight: 650;
}
.footer-col a {
  display: block; text-decoration: none; color: var(--ink);
  padding: 4px 0; font-weight: 520;
}
.footer-col a:hover { color: var(--green-deep); }
.footer-col .soon { color: var(--muted); font-weight: 400; font-size: 0.8rem; }
.footer-base {
  display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
  padding-top: 24px; border-top: 1px solid var(--line-soft);
  color: var(--muted); font-size: 0.83rem;
}

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

html.js .reveal:not(.is-visible) { opacity: 0; transform: translateY(18px); }
.reveal.is-visible {
  opacity: 1; transform: none;
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal-d1.is-visible { transition-delay: 0.08s; }
.reveal-d2.is-visible { transition-delay: 0.16s; }
.reveal-d3.is-visible { transition-delay: 0.24s; }

/* ---------- page intro (subpage hero) ---------- */

.page-hero { padding: calc(var(--header-h) + 72px) 24px 56px; }
.page-hero .eyebrow { margin-bottom: 18px; }
.page-hero h1 { margin-bottom: 20px; }
.page-hero .lead { margin: 0; }

/* honesty line used on product pages */
.honesty {
  display: flex; gap: 10px; align-items: baseline;
  font-size: 0.88rem; color: var(--muted);
  border-left: 3px solid var(--amber);
  padding: 4px 0 4px 14px;
}

/* ---------- reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001s !important;
  }
  .reveal { opacity: 1; transform: none; }
}
html.reduce-motion *, html.reduce-motion *::before, html.reduce-motion *::after {
  animation-duration: 0.001s !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.001s !important;
}
html.reduce-motion .reveal { opacity: 1; transform: none; }

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

@media (max-width: 960px) {
  .grid-3 { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .status-chip { display: none; }
}

@media (max-width: 1023px) {
  .section { padding: 64px 0; }
  .site-nav {
    display: none; transform: none;
    position: absolute; top: var(--header-h); left: 0; right: 0;
    flex-direction: column; gap: 2px;
    background: var(--paper-raised);
    border-bottom: 1px solid var(--line);
    padding: 12px 20px 18px;
  }
  .site-nav.is-open { display: flex; }
  .site-nav a { padding: 11px 12px; font-size: 1rem; }
  .nav-toggle { display: inline-flex; }
  .header-actions .btn { display: none; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
}
