/* Marketing page layout only.
 *
 * Everything with a look — buttons, panels, badges, the LCD readout, engraved
 * labels, the brand lockup — comes from css/design-system.css, which is the
 * product's own compiled stylesheet vendored from the design system's build.
 * This file adds the one thing that stylesheet has no opinion about: how a
 * landing page is arranged. If a rule here sets a colour, a radius or a font,
 * it is either a token or a mistake.
 */

body {
  /* The app paints this on .app-shell; a static page has to say it itself. */
  background: var(--bg);
  color: var(--text);
}

.wrap {
  max-width: var(--measure-wide);
  margin: 0 auto;
  padding: 0 var(--space-9);
}

/* ---------- nav ---------- */
.site-nav {
  display: flex;
  align-items: center;
  gap: var(--space-9);
  padding: var(--space-8) 0;
}

.site-brand {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  text-decoration: none;
  color: var(--text);
}

.site-nav-links {
  margin-left: var(--space-7);
}

.site-nav-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

/* The app's dropdown is mounted and unmounted by React, so its stylesheet
   never had to say what a closed panel looks like. Here the panel is in the
   markup from the start and js/prefs.js toggles the hidden attribute — and
   .dropdown-panel's own display:flex outranks the browser's [hidden] rule, so
   without this every panel would render open. */
.dropdown-panel[hidden] {
  display: none;
}

/* An <a> carrying a button class gets none of the <button> element rules, so
   the design system restates them for a.btn-secondary. The primary key needs
   the same treatment, and there is no a.btn-key in the app because the app
   only ever uses a real <button> for it. */
.btn-key {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  min-height: 38px;
  padding: var(--space-4) var(--space-8);
  border-radius: var(--radius);
  background: var(--action);
  color: var(--text-on-action);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-mono);
  text-transform: uppercase;
  text-decoration: none;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    inset 0 -2px 0 rgba(0, 0, 0, 0.28),
    0 1px 3px var(--bevel-dark);
  transition: var(--transition-control);
}

.btn-key:hover {
  background: var(--action-hover);
  color: var(--text-on-action);
  text-decoration: none;
}

.btn-key:active {
  transform: translateY(1px);
  box-shadow: var(--bevel-pressed);
}

/* ---------- hero ---------- */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: var(--space-12);
  align-items: center;
  padding: var(--space-11) 0 var(--space-12);
}

.hero-copy {
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
}

.hero h1 {
  font-size: var(--text-3xl);
  line-height: 1.05;
  margin: 0;
}

.hero-lede {
  font-size: var(--text-md);
  line-height: var(--leading-body);
  color: var(--text-muted);
  max-width: 46ch;
  margin: 0;
}

.hero-actions {
  display: flex;
  gap: var(--space-5);
  align-items: center;
  flex-wrap: wrap;
}

.hero-note {
  margin: 0;
}

/* ---------- product shots ---------- */
/* A plate, like every other surface in this system — the screenshot sits on
   it rather than floating. Overflow hidden so the image takes the plate's
   corners instead of squaring them off. */
.shot {
  margin: 0;
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--bevel-panel);
  overflow: hidden;
}

.shot img {
  display: block;
  width: 100%;
  height: auto;
}

.shot figcaption {
  display: block;
  padding: var(--space-5) var(--space-7);
  border-top: 1px solid var(--hairline);
  margin: 0;
}

/* ---------- bands ---------- */
.band {
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
  padding-bottom: var(--space-12);
}

.band > h2 {
  margin: 0;
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-6);
}

.step {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.step .topic-card-slot {
  align-self: flex-start;
}

.step h3 {
  margin: 0;
}

.step p {
  margin: 0;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--space-12);
  align-items: center;
}

.split-copy {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.split-copy h2 {
  margin: 0;
  font-size: var(--text-xl);
}

.split-copy p {
  margin: 0;
  max-width: var(--measure-prose);
}

/* The image leads on the first split and follows on the second, so the page
   alternates rather than marching down one side. */
.split.reverse .split-copy {
  order: -1;
}

.honest-readout {
  align-self: flex-start;
}

.entry-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-5);
}

.entry {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  align-items: flex-start;
}

.entry p {
  margin: 0;
}

/* The badge's left margin is for a badge trailing a heading; here it starts
   the card. */
.entry .badge {
  margin-left: 0;
}

.cta {
  align-items: center;
  text-align: center;
  gap: var(--space-6);
  padding: var(--space-11) 0 var(--space-12);
  border-top: 1px solid var(--hairline);
}

.cta h2 {
  margin: 0;
  font-size: var(--text-xl);
}

.cta p {
  margin: 0;
}

/* ---------- footer ---------- */
.site-footer {
  display: flex;
  gap: var(--space-11);
  flex-wrap: wrap;
  align-items: flex-start;
  padding: var(--space-10) 0 var(--space-12);
  border-top: 1px solid var(--hairline);
}

.footer-brand,
.footer-col {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.footer-col .section-label {
  margin: 0;
}

.footer-note {
  margin: 0 0 0 auto;
  max-width: 30ch;
}

/* ---------- narrow ---------- */
@media (max-width: 900px) {
  .hero,
  .split {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-10);
  }

  /* Whatever the desktop order, the copy leads on a phone — a screenshot at
     this width is an illustration, not an argument. */
  .split .split-copy,
  .split.reverse .split-copy {
    order: -1;
  }

  .steps,
  .entry-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .wrap {
    padding: 0 var(--space-6);
  }

  .hero h1 {
    font-size: var(--text-2xl);
  }

  .site-nav-links {
    display: none;
  }

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

  .footer-note {
    margin-left: 0;
  }
}
