/*
 * Lit Scrim: components
 * Built only from tokens.css. Load tokens.css first.
 */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ls-night);
  color: var(--ls-paper);
  font-family: var(--ls-sans);
  font-size: var(--ls-text-body);
  line-height: 1.6;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--ls-lamp); outline-offset: 3px; }

.ls-container { width: min(100% - 40px, var(--ls-container)); margin-inline: auto; }
.ls-narrow { width: min(100% - 40px, var(--ls-narrow)); margin-inline: auto; }

/* Wordmark: lowercase serif, never bold */
.ls-wordmark {
  font-family: var(--ls-serif);
  font-weight: 400;
  font-size: 30px;
  letter-spacing: -.01em;
  line-height: 1;
  text-decoration: none;
  color: var(--ls-paper);
}

/* Nav: sits on top of the hero scene, no background */
.ls-nav {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 26px var(--ls-gutter);
}
.ls-nav--solid { background: var(--ls-night); border-bottom: var(--ls-border); }
.ls-nav__links { display: flex; gap: 28px; list-style: none; margin: 0; padding: 0; }
.ls-nav__links a { text-decoration: none; color: var(--ls-soft); font-size: var(--ls-text-small); font-weight: 500; }
.ls-nav__links a:hover, .ls-nav__links a[aria-current] { color: var(--ls-paper); }
.ls-nav__actions { display: flex; align-items: center; gap: 18px; }
@media (max-width: 860px) { .ls-nav__links { display: none; } }

/* Hero: a drawn scene edge to edge, with the scrim fading in from the left */
.ls-hero {
  position: relative;
  min-height: min(820px, 100vh);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--ls-dusk);
}
.ls-hero--short { min-height: 0; }
.ls-scene { position: absolute; inset: 0; }
.ls-scene svg { width: 100%; height: 100%; }
.ls-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(90deg, var(--ls-scrim) 0%, rgba(18, 17, 15, .72) 38%, rgba(18, 17, 15, .12) 72%, rgba(18, 17, 15, 0) 100%),
    linear-gradient(0deg, var(--ls-night) 0%, rgba(18, 17, 15, 0) 22%);
}
.ls-hero__body {
  position: relative;
  z-index: 2;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 40px var(--ls-gutter) 120px;
  max-width: calc(620px + var(--ls-gutter) * 2);
}
.ls-hero__title {
  margin: 0 0 18px;
  font-weight: 600;
  font-size: var(--ls-text-hero);
  line-height: 1.05;
  letter-spacing: var(--ls-tracking-head);
}
.ls-lead { margin: 0 0 30px; font-size: var(--ls-text-lead); line-height: 1.5; color: var(--ls-paper); max-width: 560px; }
.ls-lead--soft { color: var(--ls-soft); }
@media (max-width: 640px) {
  .ls-hero::before {
    background: linear-gradient(0deg, var(--ls-night) 8%, rgba(18, 17, 15, .82) 55%, rgba(18, 17, 15, .45) 100%);
  }
  .ls-hero__body { padding-bottom: 110px; }
}

/* Slideshow controls and the italic corner caption */
.ls-controls {
  position: absolute;
  z-index: 2;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 10px;
}
.ls-dot { width: 8px; height: 8px; border-radius: var(--ls-radius-pill); background: var(--ls-faint); border: 0; padding: 0; cursor: pointer; }
.ls-dot[aria-current="true"] { width: 34px; background: var(--ls-paper); }
.ls-pause {
  width: 34px; height: 34px; margin-left: 10px;
  display: grid; place-items: center;
  background: var(--ls-night); color: var(--ls-paper);
  border: 0; border-radius: var(--ls-radius-sm); cursor: pointer;
}
.ls-caption {
  position: absolute;
  z-index: 2;
  right: 24px;
  bottom: 72px;
  margin: 0;
  font-family: var(--ls-serif);
  font-style: italic;
  font-size: var(--ls-text-small);
  color: var(--ls-paper);
}
@media (max-width: 640px) { .ls-caption { display: none; } }

/* Buttons: square, uppercase, tracked */
.ls-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 54px;
  padding: 0 38px;
  border: 1px solid transparent;
  border-radius: var(--ls-radius-0);
  font: 600 var(--ls-text-small)/1 var(--ls-sans);
  letter-spacing: var(--ls-tracking-label);
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background .2s var(--ls-ease), border-color .2s var(--ls-ease);
}
.ls-btn--primary { background: var(--ls-vermilion); color: #fff; }
.ls-btn--primary:hover { background: var(--ls-vermilion-dark); }
.ls-btn--outline { background: transparent; color: var(--ls-paper); border-color: var(--ls-faint); }
.ls-btn--outline:hover { border-color: var(--ls-paper); }
.ls-btn--sm { min-height: 40px; padding: 0 20px; font-size: var(--ls-text-micro); }
.ls-btn--block { width: 100%; }

/* "Have a card? Sign in ->" */
.ls-textlink { margin: 0; color: var(--ls-paper); font-size: var(--ls-text-body); }
.ls-textlink a { font-weight: 600; text-decoration: none; white-space: nowrap; }
.ls-textlink a::after { content: " \2192"; }
.ls-textlink a:hover { color: var(--ls-lamp); }

/* Store-style badges: dark fill, thin light border */
.ls-badges { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 56px; }
.ls-badge {
  display: inline-flex; align-items: center; gap: 12px;
  min-height: 56px; padding: 8px 20px 8px 14px;
  background: var(--ls-night); border: var(--ls-border-strong); border-radius: var(--ls-radius-sm);
  text-decoration: none; color: var(--ls-paper); white-space: nowrap;
}
.ls-badge small { display: block; font-size: 11px; color: var(--ls-soft); line-height: 1.2; }
.ls-badge strong { display: block; font-size: 19px; font-weight: 500; line-height: 1.15; }
.ls-also { margin-top: 30px; }
.ls-also p { margin: 0 0 8px; font-size: var(--ls-text-small); color: var(--ls-soft); }
.ls-also ul { display: flex; flex-wrap: wrap; gap: 8px 24px; list-style: none; margin: 0; padding: 0; color: var(--ls-faint); font-weight: 600; font-size: 15px; }

/* Sections and headings */
.ls-section { padding-block: var(--ls-section); }
.ls-section--raised { background: var(--ls-night-2); }
.ls-section--line { border-top: var(--ls-border); }
.ls-eyebrow {
  margin: 0 0 12px;
  font-size: var(--ls-text-micro);
  font-weight: 600;
  letter-spacing: var(--ls-tracking-label);
  text-transform: uppercase;
  color: var(--ls-vermilion);
}
.ls-h2 { margin: 0 0 14px; font-weight: 600; font-size: var(--ls-text-h2); line-height: 1.1; letter-spacing: var(--ls-tracking-head); }
.ls-h3 { margin: 0 0 8px; font-weight: 600; font-size: var(--ls-text-h3); line-height: 1.25; }
.ls-accent { color: var(--ls-vermilion); }
.ls-section-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 28px; }
.ls-section-head .ls-h2 { margin: 0; }
.ls-more { color: var(--ls-soft); font-size: var(--ls-text-small); font-weight: 600; text-decoration: none; white-space: nowrap; }
.ls-more::after { content: " \2192"; }

/* Poster row: scene tiles in a sideways shelf */
.ls-row-wrap { overflow-x: clip; }
.ls-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(230px, 1fr);
  gap: 18px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 8px;
  scrollbar-width: thin;
  scrollbar-color: var(--ls-line) transparent;
}
.ls-tile { scroll-snap-align: start; text-decoration: none; color: inherit; }
.ls-tile__art {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: var(--ls-radius);
  overflow: hidden;
  background: var(--ls-dusk);
}
.ls-tile__art svg { width: 100%; height: 100%; }
.ls-tile__title { margin: 12px 0 2px; font-weight: 600; font-size: 17px; line-height: 1.3; }
.ls-tile__meta { margin: 0; font-size: var(--ls-text-small); color: var(--ls-soft); }
.ls-tile:hover .ls-tile__art { outline: 2px solid var(--ls-paper); outline-offset: 3px; }

/* Stamp and status */
.ls-stamp {
  position: absolute; top: 12px; left: 12px;
  padding: 5px 9px;
  background: var(--ls-lamp); color: var(--ls-night);
  border-radius: var(--ls-radius-sm);
  font-size: 11px; font-weight: 700; letter-spacing: var(--ls-tracking-label); text-transform: uppercase;
}
.ls-status { display: inline-flex; align-items: center; gap: 8px; font-size: var(--ls-text-small); color: var(--ls-soft); }
.ls-status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--ls-pool); }
.ls-status--closed::before { background: var(--ls-faint); }

/* Steps: numbered with a large serif numeral */
.ls-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 0; border-top: var(--ls-border); }
.ls-step { padding: 28px 28px 8px 0; }
.ls-step__num { display: block; font-family: var(--ls-serif); font-size: 54px; line-height: 1; color: var(--ls-vermilion); margin-bottom: 14px; }
.ls-step p { margin: 0; color: var(--ls-soft); }

/* Cards */
.ls-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; }
.ls-card { padding: 28px; background: var(--ls-night-2); border: var(--ls-border); border-radius: var(--ls-radius); }
.ls-card p { margin: 0; color: var(--ls-soft); }
.ls-card__icon { width: 40px; height: 40px; margin-bottom: 20px; color: var(--ls-lamp); }

/* Quote */
.ls-quote { margin: 0; }
.ls-quote blockquote { margin: 0 0 18px; font-family: var(--ls-serif); font-size: clamp(24px, 3vw, 34px); line-height: 1.35; }
.ls-quote figcaption { color: var(--ls-soft); font-size: var(--ls-text-small); }

/* Card strip: the library card drawn in CSS */
.ls-libcard {
  position: relative;
  width: min(100%, 360px);
  aspect-ratio: 1.6;
  padding: 22px;
  border-radius: var(--ls-radius);
  background: var(--ls-paper);
  color: var(--ls-night);
  box-shadow: var(--ls-shadow);
  display: flex; flex-direction: column; justify-content: space-between;
}
.ls-libcard .ls-wordmark { color: var(--ls-night); font-size: 22px; }
.ls-libcard__bars { height: 34px; background: repeating-linear-gradient(90deg, var(--ls-night) 0 2px, transparent 2px 5px, var(--ls-night) 5px 6px, transparent 6px 9px); }
.ls-libcard__row { display: flex; justify-content: space-between; font-size: var(--ls-text-micro); letter-spacing: var(--ls-tracking-label); text-transform: uppercase; }
.ls-libcard__band { position: absolute; top: 0; right: 0; width: 26%; height: 100%; background: var(--ls-vermilion); border-radius: 0 var(--ls-radius) var(--ls-radius) 0; }

/* Split: text next to a visual */
.ls-split { display: grid; grid-template-columns: 1.1fr .9fr; gap: 56px; align-items: center; }
@media (max-width: 860px) { .ls-split { grid-template-columns: 1fr; gap: 36px; } }

/* Pricing: who pays, as plain rows of plans */
.ls-plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; align-items: stretch; }
.ls-plan { display: flex; flex-direction: column; padding: 30px; background: var(--ls-night-2); border: var(--ls-border); border-radius: var(--ls-radius); }
.ls-plan--featured { border-color: var(--ls-vermilion); box-shadow: inset 0 3px 0 var(--ls-vermilion); }
.ls-plan__label { margin: 0 0 6px; font-size: var(--ls-text-micro); font-weight: 600; letter-spacing: var(--ls-tracking-label); text-transform: uppercase; color: var(--ls-soft); }
.ls-plan--featured .ls-plan__label { color: var(--ls-vermilion); }
.ls-plan__name { margin: 0 0 8px; font-size: 24px; font-weight: 600; }
.ls-plan__desc { margin: 0 0 22px; color: var(--ls-soft); }
.ls-plan__price { margin: 0 0 4px; font-family: var(--ls-serif); font-size: 50px; line-height: 1; }
.ls-plan__per { margin: 0 0 24px; font-size: var(--ls-text-small); color: var(--ls-soft); }
.ls-plan__list { list-style: none; margin: 0 0 28px; padding: 22px 0 0; border-top: var(--ls-border); display: grid; gap: 10px; flex: 1; }
.ls-plan__list li { padding-left: 26px; position: relative; }
.ls-plan__list li::before { content: ""; position: absolute; left: 2px; top: 8px; width: 12px; height: 7px; border-left: 2px solid var(--ls-pool); border-bottom: 2px solid var(--ls-pool); transform: rotate(-45deg); }

/* Compare table */
.ls-table-wrap { overflow-x: auto; border: var(--ls-border); border-radius: var(--ls-radius); }
.ls-table { width: 100%; min-width: 560px; border-collapse: collapse; font-size: 15px; }
.ls-table th, .ls-table td { padding: 15px 20px; text-align: left; border-bottom: var(--ls-border); }
.ls-table thead th { font-size: var(--ls-text-micro); letter-spacing: var(--ls-tracking-label); text-transform: uppercase; color: var(--ls-soft); background: var(--ls-night-2); }
.ls-table tr:last-child td { border-bottom: 0; }

/* FAQ */
.ls-faq { border-top: var(--ls-border); }
.ls-faq details { border-bottom: var(--ls-border); padding: 20px 0; }
.ls-faq summary { cursor: pointer; font-weight: 600; font-size: 18px; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.ls-faq summary::-webkit-details-marker { display: none; }
.ls-faq summary::after { content: "+"; color: var(--ls-vermilion); font-size: 22px; line-height: 1; }
.ls-faq details[open] summary::after { content: "\2212"; }
.ls-faq p { margin: 12px 0 0; color: var(--ls-soft); max-width: 640px; }

/* Article */
.ls-article-head { padding: 56px 0 36px; }
.ls-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; color: var(--ls-soft); font-size: var(--ls-text-small); }
.ls-article-art { aspect-ratio: 16 / 8; border-radius: var(--ls-radius); overflow: hidden; background: var(--ls-dusk); margin-bottom: 10px; }
.ls-article-art svg { width: 100%; height: 100%; }
.ls-figcap { margin: 0 0 40px; font-family: var(--ls-serif); font-style: italic; font-size: var(--ls-text-small); color: var(--ls-soft); }
.ls-prose { font-size: 18px; line-height: 1.75; }
.ls-prose p { margin: 0 0 1.3em; }
.ls-prose h2 { font-size: 28px; line-height: 1.2; margin: 1.8em 0 .6em; font-weight: 600; letter-spacing: var(--ls-tracking-head); }
.ls-prose a { color: var(--ls-paper); text-decoration-color: var(--ls-vermilion); text-underline-offset: 3px; }
.ls-prose blockquote { margin: 1.8em 0; padding-left: 24px; border-left: 3px solid var(--ls-vermilion); font-family: var(--ls-serif); font-size: 24px; line-height: 1.45; }
.ls-prose ul { padding-left: 1.2em; margin: 0 0 1.3em; }
.ls-prose li { margin-bottom: .4em; }
.ls-callout { padding: 22px 24px; margin: 1.8em 0; background: var(--ls-night-2); border: var(--ls-border); border-radius: var(--ls-radius); font-size: 16px; }
.ls-callout strong { color: var(--ls-lamp); }
.ls-author { display: flex; align-items: center; gap: 14px; padding: 26px 0; border-top: var(--ls-border); margin-top: 40px; }
.ls-avatar { width: 48px; height: 48px; border-radius: 50%; background: var(--ls-night-3); display: grid; place-items: center; font-family: var(--ls-serif); font-size: 20px; color: var(--ls-lamp); flex: none; }

/* Forms: square fields on a raised panel */
.ls-panel { padding: clamp(24px, 4vw, 40px); background: var(--ls-night-2); border: var(--ls-border); border-radius: var(--ls-radius); }
.ls-field { display: grid; gap: 8px; margin-bottom: 20px; }
.ls-field label { font-size: var(--ls-text-small); font-weight: 500; }
.ls-input, .ls-select {
  width: 100%;
  min-height: 52px;
  padding: 0 16px;
  background: var(--ls-night-3);
  color: var(--ls-paper);
  border: var(--ls-border);
  border-radius: var(--ls-radius-0);
  font: 400 16px var(--ls-sans);
}
.ls-input::placeholder { color: var(--ls-faint); }
.ls-input:focus, .ls-select:focus { outline: none; border-color: var(--ls-lamp); }
.ls-hint { font-size: var(--ls-text-micro); color: var(--ls-faint); }
.ls-check { display: flex; gap: 12px; align-items: flex-start; font-size: var(--ls-text-small); color: var(--ls-soft); margin-bottom: 24px; }
.ls-check input { accent-color: var(--ls-vermilion); width: 18px; height: 18px; margin-top: 2px; flex: none; }
.ls-or { display: flex; align-items: center; gap: 14px; margin: 22px 0; color: var(--ls-faint); font-size: var(--ls-text-micro); letter-spacing: var(--ls-tracking-label); text-transform: uppercase; }
.ls-or::before, .ls-or::after { content: ""; flex: 1; height: 1px; background: var(--ls-line); }

/* Footer */
.ls-footer { padding: 56px 0 40px; background: var(--ls-night-2); border-top: var(--ls-border); font-size: var(--ls-text-small); color: var(--ls-soft); }
.ls-footer__grid { display: grid; grid-template-columns: 2fr repeat(3, 1fr); gap: 32px; margin-bottom: 40px; }
.ls-footer h4 { margin: 0 0 12px; color: var(--ls-paper); font-size: var(--ls-text-small); font-weight: 600; }
.ls-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ls-footer a { text-decoration: none; }
.ls-footer a:hover { color: var(--ls-paper); }
.ls-footer__base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding-top: 24px; border-top: var(--ls-border); color: var(--ls-faint); }
@media (max-width: 760px) { .ls-footer__grid { grid-template-columns: 1fr 1fr; } .ls-footer__grid > :first-child { grid-column: 1 / -1; } }

/* Entrance: a slow fade, nothing else */
.ls-fade { animation: ls-fade var(--ls-slow) var(--ls-ease) both; }
@keyframes ls-fade { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .ls-fade { animation: none; } }
