/* ==========================================================================
   Lmnfrs Labs — landing page
   ========================================================================== */

:root {
  --bg: #0A0A0B;
  --fg: #EDEAE4;
  --accent: #5B9DFF;
  --accent-hi: #9AC2FF;

  /* Tints of --fg, used for hairlines and secondary text. */
  --line: rgba(237, 234, 228, .08);
  --line-strong: rgba(237, 234, 228, .14);
  --line-soft: rgba(237, 234, 228, .06);

  --fg-70: rgba(237, 234, 228, .70);
  --fg-62: rgba(237, 234, 228, .62);
  --fg-58: rgba(237, 234, 228, .58);
  --fg-38: rgba(237, 234, 228, .38);
  --fg-30: rgba(237, 234, 228, .30);

  --font-sans: 'Instrument Sans', system-ui, -apple-system, sans-serif;
  --font-serif: 'Instrument Serif', Georgia, serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;

  --pad-x: 48px;
  --shell: 1240px;
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  /* Wide rows (funders, notebook) must never scroll the page sideways. */
  overflow-x: clip;
}

h1, h2, h3, p, ul, ol, dl, dd, figure, figcaption { margin: 0; }
ul, ol { padding: 0; list-style: none; }

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

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

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 10px 16px;
  background: var(--accent);
  color: var(--bg);
  font-size: 14px;
  font-weight: 600;
  border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; color: var(--bg); }

@keyframes pulseDot {
  0%, 100% { opacity: 1; }
  50% { opacity: .25; }
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */

.btn {
  display: inline-block;
  padding: 13px 24px;
  border-radius: 10px;
  border: 1px solid transparent;
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  transition: background .18s ease, border-color .18s ease, color .18s ease;
}

.btn--primary { background: var(--accent); color: var(--bg); }
.btn--primary:hover { background: var(--accent-hi); color: var(--bg); }

.btn--ghost {
  color: var(--fg);
  font-weight: 500;
  padding-inline: 22px;
  border-color: rgba(237, 234, 228, .16);
}
.btn--ghost:hover {
  color: var(--fg);
  border-color: rgba(237, 234, 228, .4);
  background: rgba(237, 234, 228, .04);
}

.btn--sm { padding: 9px 16px; font-size: 14px; border-radius: 8px; }

.btn--block { display: block; text-align: center; padding: 14px 26px; }

.link-muted { color: var(--fg-62); font-size: 14px; }
.link-muted:hover { color: var(--fg); }

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  padding: 20px var(--pad-x);
  background: rgba(10, 10, 11, .82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--fg);
}
.brand:hover { color: var(--fg); }

.brand__mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: var(--accent);
  color: var(--bg);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -.02em;
}

.brand__name { font-size: 16px; font-weight: 600; letter-spacing: -.02em; }

.site-nav {
  display: flex;
  align-items: center;
  gap: 30px;
  font-size: 14px;
}
/* Direct children only — the dropdown panels contain their own links, which
   must not inherit the top-level nav's muted colour or pill padding. */
.site-nav > a { color: var(--fg-62); }
.site-nav > a:hover { color: var(--fg); }

.header-actions { display: flex; align-items: center; gap: 14px; }

/* Dropdown nav ------------------------------------------------------------
   The design opens these on mouseenter/mouseleave, so hover is the faithful
   trigger. :focus-within adds the keyboard path — tabbing to the trigger
   reveals the panel, and the items are real links, always in the DOM. */

.site-nav--menu { gap: 8px; }

.menu { position: relative; }

.menu__trigger {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--fg-62);
}
.menu:hover .menu__trigger,
.menu:focus-within .menu__trigger {
  background: rgba(237, 234, 228, .05);
  color: var(--fg);
}

.menu__caret {
  font-size: 9px;
  opacity: .55;
  transition: transform .15s ease;
}
.menu:hover .menu__caret,
.menu:focus-within .menu__caret { transform: rotate(180deg); }

.menu__panel {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 260px;
  /* Padding, not margin — it bridges the gap under the trigger so the
     pointer can cross into the panel without the hover dropping. */
  padding-top: 8px;
  visibility: hidden;
  opacity: 0;
  transition: opacity .15s ease, visibility .15s;
}
.menu:hover .menu__panel,
.menu:focus-within .menu__panel { visibility: visible; opacity: 1; }

/* The last menu would otherwise run off the right edge on narrow viewports. */
.menu:last-child .menu__panel { left: auto; right: 0; }

.menu__card {
  padding: 8px;
  border: 1px solid var(--line-strong);
  background: #111113;
  box-shadow: 0 24px 50px -20px rgba(0, 0, 0, .9);
}

.menu__item { display: block; padding: 10px 12px; color: var(--fg); }
.menu__item:hover { background: rgba(91, 157, 255, .1); color: var(--fg); }

.menu__title { display: block; font-size: 14px; font-weight: 500; }

.menu__desc {
  display: block;
  margin-top: 2px;
  font-size: 12.5px;
  line-height: 1.4;
  color: rgba(237, 234, 228, .5);
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 110px var(--pad-x) 96px;
  border-bottom: 1px solid var(--line);
}

.badge {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 6px 13px 6px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(237, 234, 228, .03);
  font-size: 12.5px;
  color: var(--fg-70);
}

.badge__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulseDot 2.4s ease-in-out infinite;
}

.hero__title {
  margin-top: 26px;
  max-width: 15ch;
  font-size: clamp(40px, 7.6vw, 76px);
  line-height: 1.02;
  letter-spacing: -.045em;
  font-weight: 600;
  text-wrap: balance;
}

.hero__title em,
.cta__title em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  color: var(--accent);
  letter-spacing: -.02em;
}

.hero__lede {
  margin-top: 24px;
  max-width: 56ch;
  font-size: 18.5px;
  line-height: 1.55;
  color: rgba(237, 234, 228, .6);
  text-wrap: pretty;
}

.hero__actions {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 36px;
}

.hero__meta {
  margin-top: 26px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--fg-38);
}

/* --------------------------------------------------------------------------
   Lab notebook
   -------------------------------------------------------------------------- */

.notebook {
  width: 100%;
  max-width: 1000px;
  margin-top: 72px;
  border: 1px solid rgba(237, 234, 228, .1);
  border-radius: 16px;
  background: rgba(237, 234, 228, .03);
  overflow: hidden;
  box-shadow: 0 40px 90px -40px rgba(0, 0, 0, .9);
}

.notebook__bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}

.notebook__light {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(237, 234, 228, .16);
}

.notebook__label {
  margin-left: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: rgba(237, 234, 228, .4);
}

.run {
  display: grid;
  grid-template-columns: 16px 1fr auto auto;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line-soft);
  text-align: left;
}
.run:last-child { border-bottom: none; }

.run__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--fg-30);
}
.run__dot--live { background: var(--accent); }

.run__name { font-size: 14.5px; color: rgba(237, 234, 228, .9); }

.run__src,
.run__time { font-family: var(--font-mono); font-size: 12px; }
.run__src { color: var(--fg-38); }
.run__time {
  min-width: 76px;
  text-align: right;
  color: rgba(237, 234, 228, .55);
}

/* --------------------------------------------------------------------------
   Funders strip
   -------------------------------------------------------------------------- */

.funders {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 24px 52px;
  padding: 22px var(--pad-x);
  border-bottom: 1px solid var(--line);
  color: var(--fg-30);
}

.funders__label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(237, 234, 228, .24);
}

.funders__list {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
  gap: 24px 52px;
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: .01em;
}

/* --------------------------------------------------------------------------
   Features
   -------------------------------------------------------------------------- */

.features {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 96px var(--pad-x) 100px;
}

.features__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 40px;
  margin-bottom: 48px;
}

.eyebrow {
  margin-bottom: 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--accent);
}

.features__title {
  max-width: 18ch;
  font-size: clamp(30px, 4.4vw, 44px);
  line-height: 1.08;
  letter-spacing: -.035em;
  font-weight: 600;
  text-wrap: balance;
}

.features__note {
  max-width: 38ch;
  font-size: 16px;
  line-height: 1.6;
  color: rgba(237, 234, 228, .55);
  text-wrap: pretty;
}

/* Each card owns its left hairline, so the grid drops its own to avoid a
   doubled line on the leading edge. */
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--line-strong);
  border-left: none;
}

.card {
  display: flex;
  flex-direction: column;
  min-height: 340px;
  padding: 34px 32px 36px;
  border-left: 1px solid var(--line-strong);
  background: rgba(237, 234, 228, .025);
  transition: background .2s ease;
}
.card:hover { background: rgba(237, 234, 228, .06); }

.card__num { font-family: var(--font-mono); font-size: 12px; color: rgba(237, 234, 228, .32); }

.card__glyph {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin-top: 22px;
  border: 1px solid rgba(91, 157, 255, .3);
  border-radius: 11px;
  background: rgba(91, 157, 255, .1);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 17px;
  font-weight: 500;
}

.card__title {
  margin-top: 22px;
  font-size: 22px;
  line-height: 1.2;
  letter-spacing: -.025em;
  font-weight: 600;
}

.card__body {
  margin-top: 12px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--fg-58);
  text-wrap: pretty;
}

.card__points {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin-top: auto;
  padding-top: 26px;
}

.card__points li {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: 13.5px;
  color: rgba(237, 234, 228, .72);
}

.card__points li::before {
  content: "◆";
  flex: none;
  font-size: 11px;
  color: var(--accent);
}

/* --------------------------------------------------------------------------
   Closing CTA
   -------------------------------------------------------------------------- */

.cta {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 var(--pad-x) 100px;
}

.cta__panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 48px;
  padding: clamp(36px, 5vw, 64px) clamp(28px, 4.4vw, 56px);
  border: 1px solid rgba(91, 157, 255, .22);
  border-radius: 20px;
  background: rgba(91, 157, 255, .07);
}

.cta__copy { flex: 1 1 380px; }

.cta__title {
  max-width: 20ch;
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.1;
  letter-spacing: -.035em;
  font-weight: 600;
  text-wrap: balance;
}

.cta__body {
  margin-top: 16px;
  max-width: 46ch;
  font-size: 16.5px;
  line-height: 1.6;
  color: var(--fg-62);
  text-wrap: pretty;
}

.cta__actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 240px;
  flex: 1 1 240px;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
  padding: 32px var(--pad-x) 44px;
  border-top: 1px solid var(--line);
  font-size: 13.5px;
  color: var(--fg-38);
}

.footer-nav { display: flex; flex-wrap: wrap; gap: 24px; }
.footer-nav a { color: inherit; }
.footer-nav a:hover { color: var(--fg); }

/* ==========================================================================
   Spec pages (Auditorium) — sharper, more technical read than the landing
   page: panels and glyph frames drop their corner radius, controls keep it.
   ========================================================================== */

.page-spec .card__glyph,
.page-spec .cta__panel { border-radius: 0; }

/* Pill nav ---------------------------------------------------------------- */

.site-nav--pill { gap: 8px; }
.site-nav--pill > a { padding: 8px 12px; border-radius: 8px; }
.site-nav--pill > a:hover { background: rgba(237, 234, 228, .05); color: var(--fg); }
.site-nav--pill > a[aria-current="page"] { color: var(--fg); }

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

.hero-split {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  align-items: center;
  gap: 72px;
  max-width: var(--shell);
  margin: 0 auto;
  padding: 96px var(--pad-x) 88px;
  border-bottom: 1px solid var(--line);
}

/* A block-level badge would stretch the full column without this. */
.hero-split .badge { width: fit-content; }
.hero-split .hero__title { max-width: none; font-size: clamp(38px, 6.6vw, 68px); }
.hero-split .hero__lede { max-width: 52ch; }
.hero-split .hero__actions { justify-content: flex-start; }

/* Speaker layout diagram -------------------------------------------------- */

.stage {
  --stage-inset: 36px;
  position: relative;
  aspect-ratio: 1 / 1;
  border: 1px solid rgba(237, 234, 228, .12);
  background: rgba(237, 234, 228, .03);
}

.stage__label {
  position: absolute;
  top: 14px;
  left: 16px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .06em;
  color: rgba(237, 234, 228, .35);
}

/* Insets off the frame rather than sizing with height:100%, which would
   collapse to zero — and take every speaker with it — if the percentage
   failed to resolve against the aspect-ratio box. */
.stage__field {
  position: absolute;
  inset: var(--stage-inset);
  border: 1px dashed var(--line-strong);
}

/* Each .spk carries its own top/left inline — those are layout data, not style. */
.spk {
  position: absolute;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.spk__box {
  width: 14px;
  height: 14px;
  background: rgba(237, 234, 228, .16);
  border: 1px solid rgba(237, 234, 228, .4);
}

.spk--height .spk__box {
  background: rgba(91, 157, 255, .35);
  border-color: var(--accent);
}

.spk__id {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 400;
  color: rgba(237, 234, 228, .45);
}

.stage__listener {
  position: absolute;
  top: 56%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(91, 157, 255, .5);
  background: rgba(91, 157, 255, .12);
}

/* Spec + steps panels ----------------------------------------------------- */

.panels-section {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 var(--pad-x) 96px;
}

.panels {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid var(--line-strong);
}

.panel { padding: 44px 40px; }

.panel--alt {
  border-left: 1px solid var(--line-strong);
  background: rgba(237, 234, 228, .025);
}

.eyebrow--panel { margin-bottom: 22px; }

.spec__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}

.spec__row dt { font-size: 14.5px; color: rgba(237, 234, 228, .6); }

.spec__row dd {
  font-family: var(--font-mono);
  font-size: 13.5px;
  color: var(--fg);
  text-align: right;
}

.step {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 16px;
  padding-bottom: 24px;
}

.step__n {
  padding-top: 3px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: rgba(237, 234, 228, .32);
}

.step__t { font-size: 16px; font-weight: 600; letter-spacing: -.02em; }

.step__d {
  margin-top: 6px;
  font-size: 14.5px;
  line-height: 1.55;
  color: rgba(237, 234, 228, .55);
  text-wrap: pretty;
}

.terminal {
  margin-top: 8px;
  padding: 14px 16px;
  border: 1px solid rgba(237, 234, 228, .12);
  font-family: var(--font-mono);
  font-size: 13px;
  color: rgba(237, 234, 228, .75);
  overflow-x: auto;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 940px) {
  /* Stacked cards: the shared hairline moves from left edge to top edge. */
  .cards { grid-template-columns: 1fr; border-left: 1px solid var(--line-strong); }
  .card { border-left: none; border-top: 1px solid var(--line-strong); min-height: 0; }
  .card:first-child { border-top: none; }

  .panels { grid-template-columns: 1fr; }
  .panel--alt { border-left: none; border-top: 1px solid var(--line-strong); }

  /* Diagram below the copy: cap it so it does not dominate the fold. */
  .hero-split { grid-template-columns: 1fr; gap: 48px; }
  .stage { width: 100%; max-width: 460px; }
}

@media (max-width: 860px) {
  :root { --pad-x: 24px; }

  /* Nav wraps to a second row here, which makes a sticky bar too tall on
     small screens — so it scrolls away instead. */
  .site-header {
    position: static;
    flex-wrap: wrap;
    gap: 14px 20px;
    padding-bottom: 14px;
  }
  .site-nav {
    order: 3;
    flex-basis: 100%;
    justify-content: center;
    gap: 22px;
    font-size: 13.5px;
  }

  /* No hover on touch, and the header is already two rows here — the
     triggers degrade to plain links to their own sections. */
  .site-nav--menu { gap: 4px; }
  .menu__panel { display: none; }
  .menu__caret { display: none; }
  .menu__trigger { padding: 6px 8px; }

  .hero { padding: 72px var(--pad-x) 72px; }
  .hero-split { padding: 64px var(--pad-x) 72px; }
  .notebook { margin-top: 48px; }
  .features { padding: 72px var(--pad-x) 76px; }
  .features__head { margin-bottom: 36px; }
  .panels-section { padding-bottom: 76px; }
  .panel { padding: 32px 24px; }
  .cta { padding-bottom: 76px; }
}

@media (max-width: 620px) {
  .hero__lede { font-size: 17px; }
  .hero__actions { width: 100%; flex-direction: column; align-items: stretch; }
  .hero__actions .btn { text-align: center; }
  .hero__meta { font-size: 12px; }

  /* Metadata drops under the entry title rather than squeezing four columns. */
  .run {
    grid-template-columns: 16px 1fr auto;
    grid-template-areas:
      "dot name name"
      ".   src  time";
    gap: 8px 12px;
  }
  .run__dot  { grid-area: dot; }
  .run__name { grid-area: name; }
  .run__src  { grid-area: src; }
  .run__time { grid-area: time; justify-self: end; min-width: 0; }

  .funders { gap: 16px 28px; }
  .funders__list { gap: 16px 28px; font-size: 14px; }

  .cta__actions { min-width: 0; }
  .site-footer { flex-direction: column; align-items: flex-start; }

  /* Tighter frame so the speaker labels keep room to breathe. */
  .stage { --stage-inset: 26px; }

  /* Long keys and values stop fitting on one line here. */
  .spec__row { flex-direction: column; gap: 4px; }
  .spec__row dd { text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .badge__dot { animation: none; }
  * { transition-duration: .01ms !important; }
}
