/* The banded pages — the landing page and /the-admin/. Loaded after
   assets/palette.css, which supplies every colour, and assets/site.css, which
   supplies the measures, the base type and the Rouge .highlight theme.
   Everything here is prefixed .lp- so it cannot reach the rest of the site.

   Two kinds of band. The landing page's bands are bespoke — each one
   (.lp-hero, .lp-integration, .lp-denials, .lp-start) sets its own type and
   spacing. The .lp-doc band under "documentary bands" is the generic one:
   headings, prose and screenshots on a shared vertical rhythm, light or dark
   depending on whether .lp-dark rides along. Reach for .lp-doc first. */

/* -------- tokens -------- */
/* The dark-band colours this page needs — --accent-light, --ink-bright,
   --ink-dim, --ink-faint, --rule-dark, --panel — are roles in
   assets/palette.css, along with everything else. Only measures live here. */
:root {
  --lp-pad: 48px;     /* band side padding */
  --lp-inner: 1200px; /* inner content width */
}

/* -------- resets over site.css -------- */
/* These undo the centred-column `section` and default `p`/`h*` margins that
   site.css applies, so the bands can run full bleed. They use :where() to stay
   at single-class specificity, so the component rules further down still win —
   without that, every .lp-sub / .lp-cta / .lp-h2 margin below is dead on
   arrival. For the same reason the side padding is set per-side here and the
   vertical padding is left entirely to each band. */
.lp main { display: block; }

.lp .lp-band {
  max-width: none;
  margin: 0;
  padding-left: var(--lp-pad);
  padding-right: var(--lp-pad);
}
.lp .lp-band > :where(*) { margin-top: 0; margin-bottom: 0; }

.lp :where(h1, h2, h3) { margin: 0; font-weight: 600; }
.lp :where(p) { margin: 0; }

.lp-inner {
  max-width: var(--lp-inner);
  margin: 0 auto;
}

/* -------- buttons -------- */
.lp-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 21px 38px;
  border: 1.5px solid transparent;
  border-radius: 4px;
  font-family: var(--sans);
  font-size: 19px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}
.lp-btn-solid { background: var(--accent); color: var(--on-accent); }
.lp-btn-solid:hover { background: var(--accent-hover); color: var(--on-accent); }

.lp-btn-ghost { background: transparent; border-color: var(--accent); color: var(--accent); }
.lp-btn-ghost:hover { background: var(--accent); color: var(--on-accent); }

.lp-btn-light { background: var(--accent-light); color: var(--ink); }
.lp-btn-light:hover { background: var(--accent-light-hover); color: var(--ink); }

.lp-btn-small {
  gap: 9px;
  padding: 14px 24px;
  border-radius: 3px;
  font-size: 15px;
}
.lp-arrow { font-size: 1.05em; line-height: 1; }

/* -------- header -------- */
/* The wordmark (17px mono), the nav links (14px sans) and the Buy button's
   label (15px sans, inside a padded box) all sit on one baseline. That needs
   baseline alignment at every level AND inside the button itself: a flex
   container only exposes a baseline if one of its own items participates in
   baseline alignment — with align-items: center it synthesises one from the
   border box instead, which is what left the button label sitting low. */
.lp-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  padding: 24px var(--lp-pad);
  border-bottom: 1px solid var(--rule);
}

.lp-wordmark {
  font-family: var(--mono);
  font-size: 17px;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
}

.lp-header-right {
  display: flex;
  align-items: baseline;
  gap: 44px;
}

.lp-nav {
  display: flex;
  align-items: baseline;
  gap: 30px;
}
.lp-header .lp-btn { align-items: baseline; }
.lp-nav a {
  font-family: var(--sans);
  font-size: 14px;
  color: var(--muted);
  text-decoration: none;
}
.lp-nav a:hover { color: var(--ink); }

/* -------- hero -------- */
.lp-hero {
  position: relative;
  padding-top: 116px;
  padding-bottom: 96px;
}

.lp-hero-copy { position: relative; z-index: 1; }

.lp-h1 {
  /* Sized so "Your Rails app does not need Temporal," holds ONE line inside the
     1200px measure. The mock was set in Source Serif 4; the live stack resolves
     to the wider Iowan Old Style, which needs a smaller size for the same break.
     If you change the serif or this measure, re-check that break. */
  font-size: clamp(2rem, 4.3vw, 62px);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -0.026em;
  color: var(--ink);
}
.lp-h1-accent { color: var(--accent); }
.lp-h1 .lp-h1-accent { display: block; }

.lp-sub {
  margin-top: 24px;
  font-size: clamp(1.375rem, 2.22vw, 32px);
  line-height: 1.31;
  color: var(--muted);
}

.lp-lede {
  max-width: 700px;
  margin-top: 44px;
}
.lp-lede p {
  font-size: 18px;
  line-height: 1.58;
  color: var(--ink);
}
.lp-lede p + p { margin-top: 18px; }

.lp-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 48px;
}

/* -------- the mechanism -------- */
/* Bleeds off the right edge of the hero, behind the copy. body { overflow-x:
   clip } in site.css keeps it from producing a horizontal scrollbar.
   Strokes are redrawn in accent with vector-effect: non-scaling-stroke, so the
   1.7px weight stays constant however the tiny viewBox is scaled. */
.lp-mech {
  position: absolute;
  z-index: 0;
  top: 238px;
  right: -80px;
  width: 705px;
  opacity: 0.4;
  pointer-events: none;
}
.lp-mech svg {
  display: block;
  width: 100%;
  height: auto;
}
/* The SVG carries its own inline <style> with `stroke: black; stroke-width:
   0.01`. That block lives in the body, so at equal specificity it wins over
   this file. The extra `svg` here outranks it. Do not flatten these selectors. */
.lp-mech svg .drive_wheel,
.lp-mech svg .lock_disc,
.lp-mech svg .drive_pin,
.lp-mech svg .geneva_wheel {
  stroke: var(--accent);
  stroke-width: 1.7;
  vector-effect: non-scaling-stroke;
}

/* -------- dark bands -------- */
.lp-dark { background: var(--ink); }

.lp-split {
  display: flex;
  align-items: flex-start;
  gap: 110px;
}

.lp-eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 1.6px;
  color: var(--ink-faint);
}

.lp-dark-body {
  font-size: 18px;
  line-height: 1.6;
  color: var(--ink-dim);
}
.lp-dark-body-sm { font-size: 17px; }

/* -------- integration band -------- */
.lp-integration {
  padding-top: 104px;
  padding-bottom: 104px;
}

.lp-lede-col { flex: 0 0 400px; width: 400px; }

.lp-h2 {
  margin-top: 22px;
  font-size: clamp(1.75rem, 2.64vw, 38px);
  line-height: 1.15;
  letter-spacing: -0.016em;
  color: var(--ink-bright);
}
.lp-lede-col .lp-dark-body { margin-top: 22px; }

/* On this band the code sits straight on the dark ground — no panel. The
   sample is 43 columns at its widest; sizing the type off the column width
   (43ch at ~0.6em per character needs the font under width/25.8) means it
   shrinks to fit instead of growing a scrollbar. */
.lp-code {
  flex: 1 1 auto;
  min-width: 0;
  container-type: inline-size;
}
.lp-code figure.highlight { margin: 0; }
.lp-code pre {
  margin: 0;
  padding: 0;
  overflow-x: auto;
  background: transparent;
  border-radius: 0;
  font-size: min(18px, 3.7cqw);
  line-height: 1.61;
}
.lp-code pre code { font-size: 1em; }

/* -------- denials band -------- */
.lp-denials {
  padding-top: 120px;
  padding-bottom: 120px;
}

.lp-denials-title {
  max-width: 900px;
  font-size: clamp(2rem, 3.9vw, 56px);
  font-weight: 700;
  line-height: 1.14;
  letter-spacing: -0.025em;
  color: var(--ink);
}

.lp-denial-list { margin-top: 64px; }

.lp-denial {
  display: flex;
  align-items: flex-start;
  gap: 80px;
  padding: 44px 0 48px;
  border-top: 1px solid var(--rule);
}
.lp-denial:first-child { border-top: 2px solid var(--ink); }
.lp-denial:last-child { border-bottom: 1px solid var(--rule); }

.lp-denial-head {
  flex: 0 0 440px;
  width: 440px;
  font-size: clamp(2rem, 3.2vw, 46px);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.026em;
  color: var(--ink);
}

.lp-denial-body {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 21px;
  line-height: 1.55;
  color: var(--ink);
}
.lp-denial-body .lp-kicker { margin-top: 10px; }

/* -------- get started band -------- */
.lp-start {
  padding-top: 96px;
  padding-bottom: 112px;
}

/* 700px fixed, the license column takes the remainder. The license column
   must use a 0 basis — with `auto` its max-content width steals space from
   the terminal panel and the install command gets clipped. */
.lp-install-col { flex: 0 0 700px; min-width: 0; }

.lp-start-title {
  font-size: 40px;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--ink-bright);
}

.lp-terminal {
  margin-top: 26px;
  padding: 22px 26px;
  background: var(--panel);
  border: 1px solid var(--rule-dark);
  border-radius: 4px;
}
.lp-terminal figure.highlight { margin: 0; }
.lp-terminal pre {
  margin: 0;
  padding: 0;
  background: transparent;
  border-radius: 0;
  font-size: 15px;
  line-height: 1.6;
}
.lp-terminal pre code { font-size: 1em; }

.lp-note {
  margin-top: 26px;
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink-dim);
}

.lp-license-col { flex: 1 1 0; min-width: 0; }
.lp-h3 {
  margin-top: 18px;
  font-size: 26px;
  line-height: 1.25;
  color: var(--ink-bright);
}
.lp-license-col .lp-dark-body { margin-top: 18px; }
.lp-license-cta { margin-top: 14px; }

/* -------- documentary bands -------- */
/* A band of prose and screenshots, used end to end by /the-admin/. The .lp
   reset above zeroes every margin, so the rhythm is set here in one place:
   one step between sibling blocks, a wider one around block media, and a
   clear break before a heading. Add .lp-dark for the dark variant — the type
   colours below are the only thing that changes. */
.lp-doc {
  padding-top: 96px;
  padding-bottom: 96px;
}

/* Prose holds a readable measure; media and the timeline island run the full
   inner width, which is the point of putting them on a band. */
.lp-doc .lp-inner > :where(p, h2, h3, .lp-eyebrow, .lp-cta) { max-width: 760px; }

.lp-doc .lp-inner > * + * { margin-top: 20px; }
.lp-doc .lp-inner > * + :is(h2, h3) { margin-top: 76px; }
.lp-doc .lp-inner > .lp-eyebrow + * { margin-top: 18px; }
.lp-doc .lp-inner > :is(img, video, geneva-timeline-island) { margin-top: 36px; }
.lp-doc .lp-inner > :is(img, video, geneva-timeline-island) + * { margin-top: 36px; }
.lp-doc .lp-inner > .lp-cta { margin-top: 40px; }
.lp-doc .lp-inner > :first-child { margin-top: 0; }

/* The h1 shares its metrics with .lp-denials-title, the h2 with .lp-h2 — the
   admin page is a second voice for the same type scale, not a new one. */
.lp-doc-h1 {
  max-width: 900px;
  font-size: clamp(2rem, 3.9vw, 56px);
  font-weight: 700;
  line-height: 1.14;
  letter-spacing: -0.025em;
  color: var(--ink);
}

/* The band's own type is addressed as direct children of .lp-inner, never as
   descendants. The timeline island is a widget with its own complete styling
   living inside this band, and a descendant selector here would repaint its
   insides in dark-band colours — which is exactly what it did: the tour card
   is white, so its body copy came out --ink-dim on white and its heading came
   out --ink-bright on white. Keep the `>` combinators. */
.lp-doc .lp-inner > h2 {
  font-size: clamp(1.75rem, 2.64vw, 38px);
  line-height: 1.15;
  letter-spacing: -0.016em;
  color: var(--ink);
}

.lp-doc .lp-inner > p {
  font-size: 18px;
  line-height: 1.6;
  color: var(--ink);
}
.lp-doc .lp-inner > .lp-doc-note { font-size: 16px; color: var(--muted); }

.lp-doc .lp-inner > :is(img, video) {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--rule);
  border-radius: 4px;
}

/* -------- documentary bands, dark -------- */
.lp-dark.lp-doc .lp-inner > h2 { color: var(--ink-bright); }
.lp-dark.lp-doc .lp-inner > p { color: var(--ink-dim); }
.lp-dark.lp-doc .lp-inner > .lp-doc-note { color: var(--ink-faint); }
.lp-dark.lp-doc .lp-inner > :is(img, video) { border-color: var(--rule-dark); }
/* Inline links in the band's own prose. Scoped the same way, and :not(.lp-btn)
   keeps it off a button sitting straight in .lp-inner, which carries its own
   label colour and would otherwise go invisible on its own fill. */
.lp-dark.lp-doc .lp-inner > :is(p, h2, h3) a:not(.lp-btn) { color: var(--accent-light); }
.lp-dark.lp-doc .lp-inner > :is(p, h2, h3) a:not(.lp-btn):hover { color: var(--accent-light-hover); }

/* -------- the timeline island -------- */
/* The island (admin/promo/timeline_island, pushed here by the admin repo's
   `rake promo:website`) ships its own complete styling and is left to draw
   itself. Two things still
   need saying from out here, both because the island sits on a ground it was
   not designed for. */
.lp-band geneva-timeline-island { display: block; }

/* The tour card the widget opens under the timeline is a <section>, and
   site.css sizes every section as the site's centred reading column — which
   left the card at --max while the timeline beside it ran the full band. The
   island owns its own layout; nothing inside it is a page section. */
.lp-band geneva-timeline-island section {
  max-width: none;
  margin-left: 0;
  margin-right: 0;
}

/* Its hint line is a caption on a widget standing on the dark band, where the
   widget's own #6b7280 lands at 2.4:1. */
.lp-band p.timeline-island-status {
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.45;
  color: var(--ink-faint);
}

/* The island already sets its hint line off from the card, so the next block
   needs a normal step rather than the wider one media gets. */
.lp-doc .lp-inner > geneva-timeline-island + * { margin-top: 20px; }

/* -------- footer -------- */
.lp-footer {
  padding: 36px var(--lp-pad) 44px;
  font-family: var(--sans);
  font-size: 14px;
  color: var(--muted);
}
.lp-footer p { margin: 0; }
.lp-footer a { color: var(--muted); }
.lp-footer a:hover { color: var(--ink); }

/* Licensing row: repo link on the left, the LGPL / commercial note beside it. */
.lp-footer-license {
  display: flex;
  align-items: center;
  gap: 28px;
  padding-bottom: 26px;
  border-bottom: 1px solid var(--rule);
}

/* `.lp-footer a` above is 0,1,1, so this has to be scoped under .lp-footer to
   win. Same for the hover. Do not unscope these. */
.lp-footer .lp-gh {
  display: inline-flex;
  align-items: center;
  flex: none;
  gap: 9px;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
}
.lp-footer .lp-gh:hover { color: var(--accent); }
.lp-gh-icon { flex: none; display: block; }

.lp-license-note {
  max-width: 660px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
}

.lp-footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-top: 24px;
}

/* -------- narrower desktops -------- */
@media (max-width: 1240px) {
  .lp-mech {
    top: 200px;
    right: -6vw;
    width: 46vw;
    opacity: 0.25;
  }
  .lp-split { gap: 64px; }
  .lp-lede-col { flex-basis: 340px; width: 340px; }
  .lp-install-col { flex-basis: 520px; }
  .lp-denial { gap: 48px; }
  .lp-denial-head { flex-basis: 340px; width: 340px; }
}

/* -------- tablets: the two-column bands stack -------- */
@media (max-width: 900px) {
  :root { --lp-pad: 32px; }

  .lp-mech { display: none; }

  .lp-hero { padding-top: 72px; padding-bottom: 72px; }
  .lp-sub { margin-top: 18px; }
  .lp-lede { margin-top: 32px; }
  .lp-cta { margin-top: 36px; }

  .lp-split { flex-direction: column; gap: 44px; }
  .lp-lede-col,
  .lp-install-col,
  .lp-license-col,
  .lp-code { flex: 1 1 auto; width: 100%; }

  .lp-doc { padding-top: 72px; padding-bottom: 72px; }
  .lp-doc .lp-inner > * + :is(h2, h3) { margin-top: 56px; }
  .lp-integration { padding-top: 72px; padding-bottom: 72px; }
  .lp-denials { padding-top: 80px; padding-bottom: 80px; }
  .lp-start { padding-top: 72px; padding-bottom: 80px; }

  .lp-code pre { font-size: min(16px, 3.7cqw); }
}

/* -------- the denial rows stack -------- */
@media (max-width: 760px) {
  .lp-denial {
    flex-direction: column;
    gap: 16px;
    padding: 32px 0 36px;
  }
  .lp-denial-head { flex: 1 1 auto; width: 100%; }
  .lp-denial-body { font-size: 19px; }
  .lp-denial-list { margin-top: 40px; }
}

/* -------- phones -------- */
@media (max-width: 680px) {
  :root { --lp-pad: 20px; }

  /* Wordmark and the Buy button share the first row, the nav takes the second. */
  .lp-header {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    column-gap: 12px;
    row-gap: 14px;
  }
  .lp-header-right { display: contents; }
  .lp-wordmark { grid-area: 1 / 1; }
  .lp-header .lp-btn { grid-area: 1 / 2; }
  .lp-nav {
    grid-area: 2 / 1 / 3 / 3;
    flex-wrap: wrap;
    gap: 8px 18px;
  }

  .lp-btn { padding: 16px 24px; font-size: 17px; }
  .lp-btn-small { padding: 11px 16px; font-size: 14px; }
  .lp-cta { gap: 12px; }

  .lp-doc { padding-top: 56px; padding-bottom: 56px; }
  .lp-doc .lp-inner > * + :is(h2, h3) { margin-top: 44px; }
  .lp-doc .lp-inner > :is(img, video, geneva-timeline-island) { margin-top: 28px; }
  .lp-doc .lp-inner > :is(img, video, geneva-timeline-island) + * { margin-top: 28px; }
  .lp-doc .lp-inner > p { font-size: 17px; }

  .lp-code pre { font-size: 14px; }
  .lp-terminal { padding: 16px 18px; }
  .lp-terminal pre { font-size: 13px; }

  .lp-footer-license {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .lp-footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
}

@media (max-width: 400px) {
  .lp-wordmark { font-size: 15px; }
  .lp-btn-small { padding: 10px 13px; font-size: 13px; }
  .lp-btn { width: 100%; justify-content: center; }
  .lp-header .lp-btn { width: auto; }
  .lp-cta { flex-direction: column; align-items: stretch; }
}

/* -------- motion -------- */
/* The mechanism is driven by the inline script in index.html, which checks
   prefers-reduced-motion before the first requestAnimationFrame. There is no
   CSS animation to switch off here. */

/* -------- vs pages: the comparison table -------- */
/* Used by the /vs/ pages only. The table always sits on a dark .lp-doc band,
   so its colours are the dark-band roles directly — there is no light
   variant. The wrap owns horizontal overflow so a wide table scrolls inside
   itself instead of stretching the page; min-width on the table is what
   forces that scroll on narrow screens. Scoped .lp-vs- throughout so nothing
   here can reach the rest of the site. */
.lp-vs-table-wrap {
  overflow-x: auto;
  margin-top: 36px;
}
.lp-vs-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink-dim);
  text-align: left;
}
.lp-vs-table th,
.lp-vs-table td {
  padding: 14px 20px 14px 0;
  vertical-align: top;
  border-top: 1px solid var(--rule-dark);
}
.lp-vs-table thead th {
  padding-top: 0;
  border-top: none;
  border-bottom: 2px solid var(--ink-dim);
  font-weight: 600;
  color: var(--ink-bright);
}
.lp-vs-table tbody th[scope="row"] {
  width: 17%;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  font-weight: 400;
  color: var(--ink-faint);
  padding-top: 17px; /* optically aligns the smaller type with the cells */
}
.lp-vs-table td { width: 41.5%; }
.lp-vs-table td:first-of-type { color: var(--ink-bright); }
