/* MetaInference — landing page */

@font-face {
  font-family: 'Newsreader';
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url('/fonts/newsreader-latin-opsz-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Newsreader';
  font-style: italic;
  font-weight: 200 800;
  font-display: swap;
  src: url('/fonts/newsreader-latin-opsz-italic.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/fonts/inter-latin-wght-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 100 800;
  font-display: swap;
  src: url('/fonts/jetbrains-mono-latin-wght-normal.woff2') format('woff2');
}

:root {
  --paper: #f5f3ec;
  --paper-raised: #fbfaf6;
  --ink: #15171c;
  --ink-soft: #4d515a;
  --ink-faint: #868a93;
  --rule: #dcd8cc;
  --accent: #2a3fd6;
  --accent-ink: #ffffff;
  --curve: 42, 63, 214;
  --error: #b3261e;

  --serif: 'Newsreader', 'Iowan Old Style', 'Palatino Linotype', Georgia, serif;
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;

  --wrap: 1120px;
  --gutter: clamp(20px, 5vw, 48px);
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #101216;
    --paper-raised: #171a20;
    --ink: #ecebe6;
    --ink-soft: #a9acb4;
    --ink-faint: #70747e;
    --rule: #2a2e37;
    --accent: #8d9bff;
    --accent-ink: #0d0f14;
    --curve: 141, 155, 255;
    --error: #ff8a80;
  }
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3,
p,
ul,
ol,
figure {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

a {
  color: inherit;
}

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

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

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

.skip {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 20;
  padding: 10px 14px;
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
  border-radius: 4px;
}
.skip:focus {
  top: 12px;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid color-mix(in srgb, var(--rule) 70%, transparent);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 500;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.brand-mark {
  width: 28px;
  height: 28px;
}
.brand-dot {
  fill: var(--accent);
}

.nav {
  display: flex;
  align-items: center;
  gap: clamp(16px, 3vw, 32px);
  font-size: 14.5px;
}

.nav a {
  color: var(--ink-soft);
  text-decoration: none;
  transition: color 0.15s;
}
.nav a:hover {
  color: var(--ink);
}

.nav .nav-cta {
  color: var(--ink);
  padding: 7px 14px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  transition: background 0.15s, color 0.15s;
}
.nav .nav-cta:hover {
  background: var(--ink);
  color: var(--paper);
}

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

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

.hero {
  padding-block: clamp(40px, 6vw, 88px) clamp(48px, 7vw, 104px);
  border-bottom: 1px solid var(--rule);
}

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

.hero-visual {
  position: relative;
  width: 100%;
  max-width: 520px;
  aspect-ratio: 1;
  margin-inline: auto;
}

#transport {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  cursor: grab;
  /* horizontal drags turn the model; vertical ones still scroll the page */
  touch-action: pan-y;
  -webkit-user-select: none;
  user-select: none;
}
#transport.is-dragging {
  cursor: grabbing;
}

@media (min-width: 1000px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
    gap: 32px;
  }
  .hero-visual {
    max-width: none;
    /* let the cloud breathe past the column edge */
    width: 112%;
  }
}

.eyebrow,
.section-label,
.pillar-num,
.questions span,
.field label,
.site-footer {
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.eyebrow {
  color: var(--accent);
  margin-bottom: 28px;
}

h1 {
  font-family: var(--serif);
  font-size: clamp(44px, 5.5vw, 74px);
  font-weight: 400;
  line-height: 0.98;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

h1 em {
  display: block;
  font-style: italic;
  font-weight: 350;
  color: var(--accent);
}

.lede {
  max-width: 32ch;
  margin-top: clamp(28px, 4vw, 44px);
  font-family: var(--serif);
  font-size: clamp(21px, 2.4vw, 28px);
  line-height: 1.35;
  color: var(--ink-soft);
  text-wrap: pretty;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 28px;
  margin-top: 40px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 26px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font: 500 15.5px/1 var(--sans);
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.button:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}
.button:disabled {
  opacity: 0.55;
  cursor: progress;
}

.text-link {
  font-size: 15.5px;
  color: var(--ink-soft);
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 2px;
  transition: color 0.15s, border-color 0.15s;
}
.text-link:hover {
  color: var(--ink);
  border-color: var(--ink);
}

/* ------------------------------------------------------------------ figure */

.band {
  position: relative;
  height: clamp(220px, 30vw, 400px);
  border-bottom: 1px solid var(--rule);
  background: var(--paper-raised);
}

#posterior {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* ---------------------------------------------------------------- sections */

.section {
  padding-block: clamp(72px, 11vw, 144px);
  border-bottom: 1px solid var(--rule);
}

.grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 28px;
}

@media (min-width: 900px) {
  .grid {
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 48px;
  }
}

.section-label {
  font-weight: 400;
  color: var(--ink-soft);
  padding-top: 10px;
}
.section-label span {
  color: var(--ink-faint);
  margin-right: 10px;
}

.statement {
  max-width: 22ch;
  font-family: var(--serif);
  font-size: clamp(30px, 4.4vw, 52px);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.prose {
  max-width: 62ch;
  margin-top: 36px;
  color: var(--ink-soft);
}
.prose p + p {
  margin-top: 1em;
}

/* questions */

.questions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 0 48px;
  margin-top: 48px;
  border-top: 1px solid var(--rule);
}

.questions li {
  display: flex;
  align-items: baseline;
  gap: 18px;
  padding: 18px 0;
  border-bottom: 1px solid var(--rule);
  font-family: var(--serif);
  font-size: 22px;
  line-height: 1.3;
}

.questions span {
  flex: none;
  color: var(--accent);
  text-transform: none;
}

/* pillars */

.pillars {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: 0 48px;
  margin-top: 56px;
}

.pillars li {
  padding: 28px 0 36px;
  border-top: 1px solid var(--ink);
}

.pillar-num {
  display: block;
  margin-bottom: 20px;
  color: var(--accent);
  text-transform: none;
}

.pillars h3 {
  max-width: 20ch;
  font-family: var(--serif);
  font-size: 27px;
  font-weight: 450;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.pillars p {
  max-width: 44ch;
  margin-top: 12px;
  color: var(--ink-soft);
}

/* -------------------------------------------------------------------- form */

.section-contact {
  border-bottom: 0;
}

.form {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 28px 32px;
  max-width: 720px;
  margin-top: 56px;
}

@media (min-width: 640px) {
  .form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .field-wide {
    grid-column: 1 / -1;
  }
}

.field label {
  display: block;
  margin-bottom: 6px;
  color: var(--ink-soft);
}

.optional {
  color: var(--ink-faint);
  text-transform: none;
  letter-spacing: 0;
  margin-left: 6px;
}

.field input,
.field textarea {
  display: block;
  width: 100%;
  padding: 10px 0 12px;
  border: 0;
  border-bottom: 1px solid var(--ink-faint);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font: 400 18px/1.45 var(--sans);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.field textarea {
  resize: vertical;
  min-height: 140px;
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-bottom-color: var(--accent);
  box-shadow: 0 1px 0 0 var(--accent);
}

.field input[aria-invalid='true'],
.field textarea[aria-invalid='true'] {
  border-bottom-color: var(--error);
  box-shadow: 0 1px 0 0 var(--error);
}

.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 24px;
  margin-top: 8px;
}

.form-status {
  font-size: 15px;
  color: var(--ink-soft);
}
.form-status.is-error {
  color: var(--error);
}

.form-done {
  margin-top: 56px;
  padding-top: 28px;
  border-top: 1px solid var(--ink);
  max-width: 720px;
}
.form-done:focus {
  outline: none;
}
.form-done .statement {
  font-size: clamp(26px, 3.2vw, 36px);
  max-width: none;
}
.form-done p + p {
  margin-top: 12px;
  color: var(--ink-soft);
}

[hidden] {
  display: none !important;
}

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

.site-footer {
  border-top: 1px solid var(--rule);
  color: var(--ink-faint);
  font-size: 11.5px;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  padding-block: 28px;
}

/* --------------------------------------------------------------- error page */

.notfound {
  min-height: 100vh;
  display: grid;
  place-content: center;
  justify-items: start;
  gap: 24px;
  padding: var(--gutter);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    transition: none !important;
  }
}
