/* Freigent "Atlas" design tokens, matching freigent.ai (apps/lander/components/atlas/theme.ts).
   Red marks live action and the win. Ochre marks elapsed time only: never headlines, never calls to action. */

:root {
  --paper: #f5f0e0;
  --paper-raised: #fbf8ef;
  --ink: #17202f;
  --muted: rgba(23, 32, 47, 0.62);
  --faint: rgba(23, 32, 47, 0.55);
  --rule: rgba(23, 32, 47, 0.18);
  --red: #c4342b;
  --ochre: #b3872f;
  --green: #15803d;
  --code-bg: #17202f;
  --code-ink: #e8e2d0;
  --serif: 'Instrument Serif', Georgia, serif;
  --sans: 'Geist', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
  --wrap: 1120px;
  color-scheme: light;
}

/* Dark tokens apply when the system prefers dark (unless forced light), or when data-theme="dark" is set. */
:root[data-theme='dark'] {
  --paper: #0f1425;
  --paper-raised: #141a2e;
  --ink: #e8e2d0;
  --muted: rgba(232, 226, 208, 0.66);
  --faint: rgba(232, 226, 208, 0.55);
  --rule: rgba(232, 226, 208, 0.15);
  --green: #4ade80;
  --code-bg: #0b1020;
  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --paper: #0f1425;
    --paper-raised: #141a2e;
    --ink: #e8e2d0;
    --muted: rgba(232, 226, 208, 0.66);
    --faint: rgba(232, 226, 208, 0.55);
    --rule: rgba(232, 226, 208, 0.15);
    --green: #4ade80;
    --code-bg: #0b1020;
    color-scheme: dark;
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

img {
  max-width: 100%;
}

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

@media (max-width: 640px) {
  .wrap {
    padding: 0 16px;
  }
}

/* Labels: small mono capitals, the atlas plate captions. */
.label {
  font: 500 11px/1.4 var(--mono);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}

.label .tie {
  color: var(--red);
}

/* Header */
.top {
  border-bottom: 1px solid var(--rule);
}

.top .wrap {
  display: flex;
  align-items: center;
  gap: 32px;
  height: 64px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font: italic 26px/1 var(--serif);
}

.brand img {
  height: 26px;
  width: auto;
}

.brand small {
  font: 500 10px/1 var(--mono);
  font-style: normal;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  border-left: 1px solid var(--rule);
  padding-left: 10px;
}

.top nav {
  display: flex;
  gap: 24px;
  margin-left: auto;
}

.top nav a {
  font: 500 11px/1 var(--mono);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--muted);
}

.top nav a:hover,
.top nav a[aria-current='page'] {
  color: var(--ink);
}

@media (max-width: 720px) {
  .top nav {
    display: none;
  }
}

/* Buttons: ink blocks, like the lander. */
.button {
  display: inline-block;
  padding: 14px 22px;
  font: 500 11px/1 var(--mono);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  cursor: pointer;
}

.button.ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--rule);
}

.button:hover {
  opacity: 0.88;
}

.button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
a:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 2px;
}

/* Headlines: serif, the second line in red italic. */
h1,
h2,
h3 {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -0.01em;
  margin: 0;
}

h1 {
  font-size: clamp(44px, 7vw, 84px);
  line-height: 0.98;
}

h2 {
  font-size: clamp(32px, 4.4vw, 48px);
  line-height: 1.05;
}

h3 {
  font-size: 26px;
  line-height: 1.15;
}

h1 em,
h2 em {
  color: var(--red);
}

.lede {
  font-size: 19px;
  line-height: 1.55;
  color: var(--muted);
  max-width: 34em;
}

section {
  border-top: 1px solid var(--rule);
  padding: 88px 0;
}

@media (max-width: 640px) {
  section {
    padding: 56px 0;
  }
}

.section-head {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 48px;
  margin-bottom: 48px;
}

@media (max-width: 860px) {
  .section-head {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

/* Numbered columns, roman numerals like the design-partner perks. */
.columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  border-top: 1px solid var(--rule);
  border-left: 1px solid var(--rule);
}

.columns > * {
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: 28px 24px 32px;
}

.columns .num {
  font: italic 22px/1 var(--serif);
  color: var(--red);
  display: block;
  margin-bottom: 16px;
}

.columns h3 {
  margin-bottom: 10px;
}

.columns p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

/* Status chip: the honest "where this stands" marker. */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border: 1px solid var(--rule);
  font: 500 10px/1.5 var(--mono);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.chip::before {
  content: '';
  flex: none;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ochre);
}

.chip.live::before {
  background: var(--green);
}

.chip.down::before {
  background: var(--red);
}

/* Forms, as on the lander's design-partner form. */
form .field {
  margin-bottom: 18px;
}

form label {
  display: block;
  font: 500 10px/1.4 var(--mono);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}

input,
select,
textarea {
  width: 100%;
  padding: 12px 14px;
  font: 14px/1.4 var(--sans);
  color: var(--ink);
  background: var(--paper-raised);
  border: 1px solid var(--rule);
  border-radius: 0;
}

textarea {
  min-height: 96px;
  resize: vertical;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 16px;
}

@media (max-width: 640px) {
  .form-grid {
    grid-template-columns: 1fr;
  }
}

.form-note {
  font-size: 13px;
  color: var(--faint);
}

.form-status {
  margin-top: 16px;
  font: 500 12px/1.5 var(--mono);
}

.form-status[data-kind='error'] {
  color: var(--red);
}

.form-status[data-kind='done'] {
  color: var(--green);
}

/* Code */
pre,
code {
  font-family: var(--mono);
}

pre {
  background: var(--code-bg);
  color: var(--code-ink);
  padding: 20px 22px;
  overflow-x: auto;
  font-size: 13px;
  line-height: 1.6;
  margin: 0 0 24px;
}

:not(pre) > code {
  font-size: 0.88em;
  background: var(--rule);
  padding: 1px 5px;
}

/* Footer */
footer {
  border-top: 1px solid var(--rule);
  padding: 40px 0 56px;
}

footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 32px;
  align-items: baseline;
}

footer a {
  font: 500 11px/1 var(--mono);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--muted);
}

footer .fine {
  margin-left: auto;
  font-size: 13px;
  color: var(--faint);
}

/* Mark: the PNG is the blue F with the red tie; it reads on both papers. */
.skip {
  position: absolute;
  left: -9999px;
}

.skip:focus {
  left: 16px;
  top: 16px;
  z-index: 10;
  background: var(--ink);
  color: var(--paper);
  padding: 8px 12px;
}
