/* LoadCall website (loadcall.app). The portal's design system (docs/frontend/design.md): its tokens, dark first,
   one blue accent, Inter self-hosted. No framework: plain CSS. Follows the device's appearance (no switch). */

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

:root {
  --bg: #0b0c0f;
  --surface: #14161a;
  --elevated: #1c1f25;
  --border: #2a2e36;
  --border-strong: #646b79;
  --text: #f5f6f8;
  --text-secondary: #9aa0ab;
  --accent: #4c86ff;
  --accent-hover: #6a9bff;
  --on-accent: #0b0c0f;
  --accent-subtle: #14233f;
  --success: #30c48d;
  --danger: #ff6b6b;
  --shadow-card: none;
  --card-edge: var(--border);
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-6: 24px;
  --space-8: 32px;
  --space-12: 48px;
  --radius-md: 10px;
  --radius-lg: 12px;
  --radius-pill: 999px;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, sans-serif;
  color-scheme: dark;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f5f6f8;
    --surface: #ffffff;
    --elevated: #ffffff;
    --border: #e3e5ea;
    --border-strong: #8a919e;
    --text: #111318;
    --text-secondary: #5f6672;
    --accent: #1f5fe0;
    --accent-hover: #174cc0;
    --on-accent: #ffffff;
    --accent-subtle: #e3ecff;
    --success: #0e7a56;
    --danger: #c8312f;
    --shadow-card: 0 1px 2px rgba(17, 19, 24, 0.06), 0 8px 24px rgba(17, 19, 24, 0.06);
    --card-edge: transparent;
    color-scheme: light;
  }
}

* {
  box-sizing: border-box;
}

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

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/24px var(--font-sans);
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
p {
  margin: 0;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  color: var(--accent-hover);
}

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

.skip {
  position: absolute;
  left: -9999px;
}

.skip:focus {
  left: var(--space-4);
  top: var(--space-4);
  z-index: 10;
  padding: var(--space-2) var(--space-4);
  background: var(--elevated);
  border-radius: var(--radius-md);
}

/* Layout */
.wrap {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 var(--space-6);
}

.narrow {
  max-width: 560px;
}

header.top {
  position: sticky;
  top: 0;
  z-index: 5;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--border);
}

header.top .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  min-height: 60px;
  padding-top: env(safe-area-inset-top);
}

.wordmark {
  font-size: 20px;
  line-height: 28px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
}

.wordmark:hover {
  color: var(--text);
}

nav.links {
  display: flex;
  align-items: center;
  gap: var(--space-6);
}

nav.links .quiet-link {
  color: var(--text-secondary);
  font-size: 15px;
}

nav.links .quiet-link:hover {
  color: var(--text);
}

/* Phones: How it works goes; Sign in stays as a quiet link next to the button */
@media (max-width: 560px) {
  nav.links {
    gap: var(--space-4);
  }

  nav.links .wide-only {
    display: none;
  }
}

main {
  display: block;
}

section {
  padding: 96px 0;
}

section + section {
  border-top: 1px solid var(--border);
}

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

/* Type */
.eyebrow {
  font-size: 14px;
  line-height: 20px;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: var(--space-4);
}

.display {
  font-size: 56px;
  line-height: 60px;
  font-weight: 600;
  letter-spacing: -0.03em;
  max-width: 14ch;
}

h2 {
  font-size: 34px;
  line-height: 40px;
  font-weight: 600;
  letter-spacing: -0.025em;
  max-width: 22ch;
}

h3 {
  font-size: 17px;
  line-height: 24px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.lead {
  font-size: 20px;
  line-height: 30px;
  color: var(--text-secondary);
  max-width: 36em;
}

.secondary {
  color: var(--text-secondary);
}

.small {
  font-size: 14px;
  line-height: 20px;
}

@media (max-width: 640px) {
  .display {
    font-size: 40px;
    line-height: 44px;
  }

  h2 {
    font-size: 28px;
    line-height: 34px;
  }

  .lead {
    font-size: 17px;
    line-height: 26px;
  }
}

/* Hero */
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 120px 0 96px;
}

/* On the home page the hero runs up under the sticky header (60px, its border and the notch). At the top of the
   page the header is see-through, so it sits on the video with no band or line; once the page scrolls (home.js
   adds .scrolled) it fades back to the frosted header. */
.home .hero {
  margin-top: calc(-61px - env(safe-area-inset-top));
  padding-top: calc(120px + 61px + env(safe-area-inset-top));
}

.home header.top {
  transition: background-color 0.3s ease, border-color 0.3s ease, backdrop-filter 0.3s ease,
    -webkit-backdrop-filter 0.3s ease;
}

.home header.top:not(.scrolled) {
  background: transparent;
  border-bottom-color: transparent;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

/* The background video (assets/home_banner.mp4, a 14 s loop of the plane after exit; the still
   home_banner.jpg): faded back so the text leads, darkened behind the text, and blended into the page at the bottom.
   home.js starts it, unless reduce motion or Save-Data is on. */
.hero-media {
  position: absolute;
  inset: 0;
  z-index: -1;
}

.hero-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.5;
}

.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--bg) 70%, transparent) 0%, transparent 70%),
    linear-gradient(180deg, transparent 55%, var(--bg) 100%);
}

@media (prefers-color-scheme: light) {
  .hero-media video {
    opacity: 0.3;
  }
}

.hero .lead {
  margin-top: var(--space-6);
}

.hero .actions {
  margin-top: var(--space-8);
}

@media (max-width: 640px) {
  .hero {
    padding: 72px 0 64px;
  }

  .home .hero {
    padding-top: calc(72px + 61px + env(safe-area-inset-top));
  }
}

/* Buttons */
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: 44px;
  padding: 0 var(--space-6);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-strong);
  background: transparent;
  color: var(--text);
  font: 500 16px/24px var(--font-sans);
  cursor: pointer;
}

.button:hover {
  color: var(--text);
  border-color: var(--text-secondary);
}

.button.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
}

.button.primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: var(--on-accent);
}

.button.small {
  min-height: 36px;
  padding: 0 var(--space-4);
  font-size: 15px;
}

.button[disabled] {
  opacity: 0.6;
  cursor: progress;
}

/* Cards and grids */
.section-head {
  margin-bottom: var(--space-12);
}

.section-head .lead {
  margin-top: var(--space-4);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
  gap: var(--space-6);
}

.card {
  background: var(--surface);
  border: 1px solid var(--card-edge);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: var(--space-8);
}

.card p {
  margin-top: var(--space-2);
  color: var(--text-secondary);
}

.icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin-bottom: var(--space-4);
  border-radius: var(--radius-md);
  background: var(--accent-subtle);
  color: var(--accent);
}

.icon svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Steps */
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
  gap: var(--space-8);
  counter-reset: step;
}

.steps li {
  counter-increment: step;
}

.steps li::before {
  content: counter(step);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  margin-bottom: var(--space-4);
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-strong);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.steps p {
  margin-top: var(--space-2);
  color: var(--text-secondary);
}

/* List of smaller points */
.points {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
  gap: var(--space-6) var(--space-12);
}

.points li {
  padding-top: var(--space-4);
  border-top: 1px solid var(--border);
}

.points p {
  margin-top: var(--space-1);
  color: var(--text-secondary);
}

/* Closing call to action */
.cta {
  text-align: center;
}

.cta h2,
.cta .lead {
  margin-left: auto;
  margin-right: auto;
}

.cta .lead {
  margin-top: var(--space-4);
}

.cta .actions {
  justify-content: center;
  margin-top: var(--space-8);
}

/* Footer */
footer {
  border-top: 1px solid var(--border);
  padding: var(--space-8) 0 calc(var(--space-8) + env(safe-area-inset-bottom));
}

footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-4);
  font-size: 14px;
  line-height: 20px;
  color: var(--text-secondary);
}

footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-6);
}

footer a {
  color: var(--text-secondary);
}

footer a:hover {
  color: var(--text);
}

/* Forms (the waiting list) */
.page {
  padding: 72px 0 96px;
}

.page h1 {
  font-size: 34px;
  line-height: 40px;
  font-weight: 600;
  letter-spacing: -0.025em;
}

.page .lead {
  margin-top: var(--space-4);
}

form.card {
  margin-top: var(--space-8);
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.field {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.field label {
  font-size: 14px;
  line-height: 20px;
  font-weight: 500;
  color: var(--text-secondary);
}

.field input,
.field select {
  width: 100%;
  min-height: 44px;
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--text);
  font: 400 16px/24px var(--font-sans);
}

.field select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--text-secondary) 50%),
    linear-gradient(135deg, var(--text-secondary) 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%;
  background-size: 5px 5px;
  background-repeat: no-repeat;
  padding-right: var(--space-8);
}

.field input:focus-visible,
.field select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 0;
  border-color: var(--accent);
}

.consent {
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
  font-size: 14px;
  line-height: 20px;
  color: var(--text-secondary);
}

.consent input {
  width: 20px;
  height: 20px;
  margin: 0;
  flex: none;
  accent-color: var(--accent);
}

/* Hidden from people, tempting to bots: a filled-in one is never sent */
.trap {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.alert {
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  border: 1px solid var(--danger);
  color: var(--text);
  font-size: 14px;
  line-height: 20px;
}

.alert[hidden],
[hidden] {
  display: none !important;
}

.done {
  margin-top: var(--space-8);
}

.done .icon {
  background: color-mix(in srgb, var(--success) 18%, transparent);
  color: var(--success);
}

.done h2 {
  font-size: 24px;
  line-height: 30px;
}

.done p {
  margin-top: var(--space-2);
}

.actions.spaced {
  margin-top: var(--space-8);
}

/* Legal pages (/legal/...): long text, easy to read on a phone */
.legal {
  max-width: 720px;
}

.legal .meta {
  margin-top: var(--space-2);
  font-size: 14px;
  line-height: 20px;
  color: var(--text-secondary);
}

.legal .summary {
  margin-top: var(--space-8);
}

.legal .summary p + p,
.legal .summary ul {
  margin-top: var(--space-3);
}

.legal h2 {
  margin-top: var(--space-12);
  font-size: 22px;
  line-height: 28px;
  letter-spacing: -0.015em;
  max-width: none;
}

.legal h3 {
  margin-top: var(--space-6);
}

.legal p,
.legal ul,
.legal ol,
.legal table {
  margin-top: var(--space-3);
}

.legal ul,
.legal ol {
  padding-left: var(--space-6);
}

.legal li + li {
  margin-top: var(--space-2);
}

.legal .table {
  overflow-x: auto;
}

.legal table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  line-height: 20px;
}

.legal th,
.legal td {
  padding: var(--space-2) var(--space-3) var(--space-2) 0;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

.legal th {
  font-weight: 600;
}

.legal .credit {
  margin-top: var(--space-12);
  padding-top: var(--space-6);
  border-top: 1px solid var(--border);
  font-size: 14px;
  line-height: 20px;
  color: var(--text-secondary);
}

.legal .docs {
  list-style: none;
  padding: 0;
  margin-top: var(--space-8);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.legal .docs li + li {
  margin-top: 0;
}

.legal .docs a {
  display: block;
  color: inherit;
}

.legal .docs a:hover h3 {
  color: var(--accent);
}

.legal .docs h3 {
  margin-top: 0;
}
