/**
 * LOSPOR landing.
 *
 * Deliberately restrained: no photography, no gradients, no drop shadows, no
 * filled cards. Structure comes from whitespace and hairlines, emphasis from
 * type size, and colour appears exactly once — the amber in the brand mark and
 * on the single primary action.
 *
 * The palette is the clinical app's, so the landing and the product it
 * describes look like the same thing: cool near-black surfaces, a soft
 * off-white, and the brand amber from lospor-app/public/brand.
 *
 * Dark follows the operating system. There is no toggle because `_headers`
 * sets `script-src 'none'` — no JavaScript, nowhere to persist a choice.
 */

:root {
  color-scheme: light;

  --bg: #fbfbfa;
  --surface: #ffffff;
  --line: #e3e6e3;
  --line-soft: #eef0ee;
  --text: #14181a;
  --text-soft: #55636b;
  --text-faint: #8a959c;

  /* Brand amber, darkened for contrast on a pale ground. */
  --accent: #a8700f;
  --accent-ink: #ffffff;
  --on-accent: #1c1c1c;

  --content: 1080px;
  --gutter: clamp(20px, 5vw, 48px);
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;

    --bg: #0b0e10;
    --surface: #12171a;
    --line: #222a30;
    --line-soft: #171d21;
    --text: #f2f5f7;
    --text-soft: #a3aeb6;
    --text-faint: #6d7981;

    /* The brand amber itself, which needs no adjustment on a dark ground. */
    --accent: #f6ad2f;
    --accent-ink: #1c1c1c;
    --on-accent: #1c1c1c;
  }
}

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

html {
  scroll-behavior: smooth;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; }

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

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 10px 14px;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 6px;
  font-weight: 650;
  text-decoration: none;
  transform: translateY(-200%);
}

.skip-link:focus { transform: translateY(0); }

.wrap {
  width: min(100% - (var(--gutter) * 2), var(--content));
  margin-inline: auto;
}

/* ── Header ─────────────────────────────────────────────────────────────── */

.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  font-size: 14px;
  text-decoration: none;
}

.brand .mark { width: 26px; height: 26px; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 26px;
}

.nav-links a {
  font-size: 14px;
  font-weight: 550;
  color: var(--text-soft);
  text-decoration: none;
}

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

.nav-links .lang-switch {
  font-size: 13px;
  color: var(--text-faint);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 11px;
  white-space: nowrap;
}

.nav-links .lang-switch:hover { border-color: var(--text-faint); color: var(--text); }

.nav-links .nav-action {
  color: var(--text);
  font-weight: 650;
}

/* ── Hero ───────────────────────────────────────────────────────────────── */

.hero {
  padding: clamp(72px, 13vh, 148px) 0 clamp(64px, 11vh, 120px);
  border-bottom: 1px solid var(--line);
}

.hero .mark {
  width: clamp(88px, 11vw, 124px);
  height: auto;
  color: var(--text);
  margin-bottom: 34px;
}

.eyebrow {
  margin: 0 0 12px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.19em;
  text-transform: uppercase;
  color: var(--text-faint);
}

h1 {
  margin: 0;
  font-size: clamp(44px, 8vw, 84px);
  line-height: 1.02;
  letter-spacing: -0.035em;
  font-weight: 700;
}

.hero-summary {
  margin: 22px 0 0;
  max-width: 46ch;
  font-size: clamp(17px, 2.1vw, 20px);
  line-height: 1.55;
  color: var(--text-soft);
}

.hero-actions {
  margin-top: 38px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: 7px;
  border: 1px solid transparent;
  font-size: 15px;
  font-weight: 650;
  text-decoration: none;
}

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

.button-primary:hover { filter: brightness(1.07); }

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

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

.hero-points {
  margin: 34px 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 26px;
  font-size: 13.5px;
  color: var(--text-faint);
}

.hero-points li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.hero-points li::before {
  content: "";
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
}

/* ── Sections ───────────────────────────────────────────────────────────── */

.section {
  padding: clamp(64px, 10vh, 108px) 0;
  border-bottom: 1px solid var(--line);
}

.section-kicker {
  margin: 0 0 14px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.19em;
  text-transform: uppercase;
  color: var(--text-faint);
}

h2 {
  margin: 0;
  font-size: clamp(27px, 4vw, 38px);
  line-height: 1.16;
  letter-spacing: -0.02em;
  font-weight: 700;
  max-width: 20ch;
}

.section-heading p {
  margin: 18px 0 0;
  max-width: 58ch;
  color: var(--text-soft);
}

/* ── Products ───────────────────────────────────────────────────────────── */

.primary-products {
  margin-top: 52px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border-block: 1px solid var(--line);
}

.product {
  background: var(--bg);
  padding: 34px 0;
  padding-inline: 0 34px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.product:last-child { padding-inline: 34px 0; }

.product-label {
  margin: 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}

.product h3 {
  margin: 0;
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.012em;
}

.product p {
  margin: 0;
  color: var(--text-soft);
  max-width: 42ch;
}

.product-links {
  margin-top: auto;
  padding-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
}

.product-links a,
.text-link {
  font-size: 14.5px;
  font-weight: 600;
  text-decoration: none;
  color: var(--text);
  border-bottom: 1px solid var(--line);
  padding-bottom: 2px;
}

.product-links a:hover,
.text-link:hover { border-bottom-color: var(--accent); }

/* ── Supporting links ───────────────────────────────────────────────────── */

.support-grid {
  margin-top: 44px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
}

.support-link {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 14px;
  align-items: start;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  text-decoration: none;
}

.support-index {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-faint);
  font-variant-numeric: tabular-nums;
  padding-top: 3px;
}

.support-link strong {
  display: block;
  font-size: 15.5px;
  font-weight: 650;
}

.support-link small {
  display: block;
  margin-top: 3px;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--text-soft);
}

.support-link:hover { border-top-color: var(--accent); }

.support-arrow { display: none; }

/* ── Workflow ───────────────────────────────────────────────────────────── */

.workflow-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(36px, 6vw, 84px);
  align-items: start;
}

.workflow-steps {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.workflow-steps li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 18px;
  padding: 22px 0;
  border-top: 1px solid var(--line);
}

.workflow-steps li:last-child { border-bottom: 1px solid var(--line); }

.step-number {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  padding-top: 4px;
}

.workflow-steps h3 {
  margin: 0;
  font-size: 16.5px;
  font-weight: 650;
}

.workflow-steps p {
  margin: 5px 0 0;
  color: var(--text-soft);
  font-size: 15px;
  max-width: 52ch;
}

/* ── Open source ────────────────────────────────────────────────────────── */

.open-source-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
  gap: clamp(32px, 6vw, 76px);
  align-items: end;
}

.open-source p {
  margin: 18px 0 0;
  color: var(--text-soft);
  max-width: 54ch;
}

.open-source-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
}

/* ── Footer ─────────────────────────────────────────────────────────────── */

.site-footer {
  padding: 46px 0;
  color: var(--text-faint);
  font-size: 14px;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 26px;
  align-items: start;
}

.site-footer strong {
  display: block;
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.site-footer p { margin: 4px 0 0; }

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
}

.footer-links a {
  text-decoration: none;
  color: var(--text-soft);
}

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

.copyright {
  grid-column: 1 / -1;
  margin-top: 26px;
  padding-top: 20px;
  border-top: 1px solid var(--line-soft);
  font-size: 13px;
}

/* ── Narrow ─────────────────────────────────────────────────────────────── */

@media (max-width: 860px) {
  .primary-products {
    grid-template-columns: minmax(0, 1fr);
  }

  .product,
  .product:last-child {
    padding-inline: 0;
  }

  .support-grid { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .support-link { padding-block: 18px; }

  .workflow-layout,
  .open-source-inner {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 620px) {
  /* The language switch stays: it is the only route to the other locale. */
  .nav-links > a:not(.nav-action):not(.lang-switch) { display: none; }

  .footer-inner { grid-template-columns: minmax(0, 1fr); }
}
