/*
 * ForgeCAD landing hero — page styles.
 *
 * The workspace inside the hero uses the app's own stylesheets (see
 * vendor/forgecad/). This file only styles the marketing page around it: nav,
 * hero copy, the rounded background card, and the frame that scales the
 * workspace down to a screenshot-sized preview.
 */

:root {
  --lp-paper: #fbf6ee;
  --lp-ink: #17120d;
  --lp-muted: #5d5449;
  --lp-line: rgba(23, 18, 13, 0.08);
  --lp-brand: #ff801a;
  /* Reading text in dense content (plans, answers, nav); --lp-muted is for
     supporting copy under a heading. */
  --lp-text: #3c342c;
  /* Labels and fine print — eyebrows, "/ month", footer headings. The lightest
     grey that still reads at 4.5:1 on every paper tone the page uses. */
  --lp-subtle: #6f685f;
  /* Keyboard focus: the brand, darkened until the ring holds 3:1 on paper. */
  --lp-focus: #bf5200;

  /* Card system shared by "How it works" and "Application areas". */
  --lp-card-gap: clamp(16px, 1.6vw, 24px);
  --lp-card-radius: 22px;
  --lp-card-pad: clamp(22px, 2.2vw, 32px);
  /* The large gradient-and-grid surfaces: the hero demo card and the footer. */
  --lp-surface-radius: 32px;

  /* Section rhythm: the space above every section, the gap under its title,
     and the one size for the lead paragraph that follows a heading. */
  --lp-section-space: clamp(72px, 9vw, 132px);
  --lp-title-gap: clamp(32px, 4vw, 52px);
  --lp-lead-size: clamp(15px, 1.2vw, 18px);
  /* The hero grows with the display instead of sitting in a 1196px column:
     the nav and the demo card share this width, as in the design. */
  --lp-max: clamp(960px, 93vw, 1560px);

  /* Logical width of the workspace before it is scaled into the card — the UI
     keeps these pixel sizes, so this sets how dense the demo reads. The height
     is set by scripts/hero.js from the card's shape, so the workspace fills the
     frame edge to edge instead of leaving bands. */
  --lp-window-width: 1400px;
  --lp-window-height: 700px;

  /* The agent panel's stylesheets name this token; the app defines it, the page
     has to. */
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

/* Crossfade document navigations to and from the application's public
   pages. The shared header (view-transition-name: public-header) holds still. */
@view-transition {
  navigation: auto;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--lp-paper);
  color: var(--lp-ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

.lp-root {
  min-height: 100vh;
}

/* One focus ring for every control on the page (the workspace demo keeps the
   app's own). */
:where(a, button, [tabindex]):focus-visible {
  outline: 2px solid var(--lp-focus);
  outline-offset: 3px;
}

/* Text for screen readers only. */
.lp-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* In-page links land below the sticky nav rather than under it. */
[id] {
  scroll-margin-top: 88px;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

/* ── Nav ─────────────────────────────────────────────────────────────────── */

.lp-nav-wrap {
  position: sticky;
  top: 0;
  z-index: 40;
  padding: 12px 24px 0;
}

/* The React public pages repeat this pill value for value
   (web/client/pages/public-chrome.css, .lpd-topbar-inner). It keeps one width
   and centers the links, so the header holds still across page changes. */
.lp-nav {
  width: min(var(--lp-max), 100%);
  margin: 0 auto;
  height: 56px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 24px;
  padding: 0 8px 0 20px;
  border-radius: 999px;
  border: 1px solid var(--lp-line);
  background: rgba(255, 252, 247, 0.85);
  backdrop-filter: blur(16px);
  box-shadow: 0 10px 30px rgba(80, 52, 20, 0.07);
  view-transition-name: public-header;
}

.lp-nav-brand {
  grid-column: 1;
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--lp-ink);
  text-decoration: none;
  white-space: nowrap;
}

.lp-nav-links {
  grid-column: 2;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 30px;
}

.lp-nav-links a {
  font-size: 14.5px;
  font-weight: 500;
  color: var(--lp-text);
  text-decoration: none;
  white-space: nowrap;
}

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

.lp-nav-actions {
  grid-column: 3;
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 14px;
}

.lp-nav-cta {
  padding: 10px 20px;
  font-size: 14.5px;
}

/* Menu button: shown only once the links fold away (see Responsive). Two
   bars that cross into a close mark. */
.lp-nav-toggle {
  display: none;
  position: relative;
  width: 40px;
  height: 40px;
  flex: none;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--lp-ink);
  cursor: pointer;
  transition: background 0.18s ease;
}

.lp-nav-toggle:hover {
  background: rgba(23, 18, 13, 0.05);
}

.lp-nav-toggle span {
  position: absolute;
  left: 12px;
  right: 12px;
  height: 1.6px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 420ms cubic-bezier(0.32, 0.72, 0, 1);
}

.lp-nav-toggle span:first-child {
  transform: translateY(-3.5px);
}

.lp-nav-toggle span:last-child {
  transform: translateY(3.5px);
}

.is-menu-open .lp-nav-toggle span:first-child {
  transform: rotate(45deg);
}

.is-menu-open .lp-nav-toggle span:last-child {
  transform: rotate(-45deg);
}

/* The sheet drops from the pill, on its width, in the same frosted paper. */
.lp-nav-menu {
  position: absolute;
  left: 50%;
  top: calc(100% + 8px);
  width: min(var(--lp-max), calc(100% - 48px));
  display: none;
  padding: 10px;
  border-radius: var(--lp-card-radius);
  border: 1px solid var(--lp-line);
  background: rgba(255, 252, 247, 0.94);
  backdrop-filter: blur(16px);
  box-shadow: 0 24px 50px rgba(80, 52, 20, 0.12);
  transform-origin: 50% 0;
  opacity: 0;
  visibility: hidden;
  transform: translateX(-50%) translateY(-6px) scale(0.98);
  transition:
    opacity 260ms cubic-bezier(0.32, 0.72, 0, 1),
    transform 420ms cubic-bezier(0.32, 0.72, 0, 1),
    visibility 0s linear 420ms;
}

.is-menu-open .lp-nav-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%);
  transition:
    opacity 260ms cubic-bezier(0.32, 0.72, 0, 1),
    transform 420ms cubic-bezier(0.32, 0.72, 0, 1),
    visibility 0s;
}

.lp-nav-menu-links {
  display: flex;
  flex-direction: column;
}

.lp-nav-menu-links a {
  padding: 12px 14px;
  border-radius: 12px;
  color: var(--lp-ink);
  font-size: 17px;
  font-weight: 500;
  letter-spacing: -0.01em;
  text-decoration: none;
  transition: background 0.18s ease;
}

.lp-nav-menu-links a:hover {
  background: rgba(23, 18, 13, 0.045);
}

.lp-nav-menu-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-top: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--lp-line);
}

.lp-nav-menu-actions a {
  justify-content: center;
  padding: 12px 16px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  text-align: center;
}

/* ── Buttons ─────────────────────────────────────────────────────────────── */

.lp-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    background 0.18s ease;
}

.lp-button-primary {
  padding: 12px 24px;
  font-size: 15px;
  background: var(--lp-brand);
  color: #fff;
  box-shadow: 0 10px 24px rgba(255, 128, 26, 0.24);
}

.lp-button-primary:hover {
  transform: translateY(-1px);
  background: #f9770f;
}

.lp-button-ghost {
  padding: 12px 10px;
  font-size: 15px;
  color: var(--lp-ink);
}

.lp-button-ghost:hover {
  text-decoration: underline 2px var(--lp-brand);
  text-underline-offset: 6px;
}

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

.lp-shell {
  max-width: calc(var(--lp-max) + 48px);
  margin: 0 auto;
  padding: 0 24px 64px;
}

.lp-hero {
  width: min(var(--lp-content-width, 100%), 100%);
  margin: 0 auto;
  padding: 52px 0 0;
}

.lp-hero-title {
  margin: 0;
  max-width: 18ch;
  font-size: clamp(32px, 3.2vw, 52px);
  line-height: 1.06;
  letter-spacing: -0.035em;
  font-weight: 700;
}

.lp-hero-lead {
  margin: 14px 0 0;
  max-width: 640px;
  font-size: var(--lp-lead-size);
  line-height: 1.55;
  color: var(--lp-muted);
}

.lp-hero-actions {
  margin-top: 18px;
  display: flex;
  align-items: center;
  gap: 16px;
}

/* ── Hero background card ────────────────────────────────────────────────── */

.lp-demo {
  /* scripts/hero.js sets both: the card spans the content width and keeps its
     frame at 16:9, giving up a little width when the fold demands it. */
  --lp-demo-width: 100%;
  --lp-demo-height: 560px;

  position: relative;
  margin: 44px auto 0;
  width: var(--lp-demo-width);
  height: var(--lp-demo-height);
  border-radius: var(--lp-surface-radius);
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(80, 52, 20, 0.12);
}

/* Short windows: the hero keeps its tighter spacing so the demo keeps its room. */
@media (max-height: 900px) {
  .lp-hero {
    padding-top: 32px;
  }

  .lp-hero-lead {
    margin-top: 12px;
  }

  .lp-hero-actions {
    margin-top: 18px;
  }

  .lp-demo {
    margin-top: 28px;
  }
}

.lp-demo-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

/*
 * Grid of translucent cells over the gradient art — 28 × 16 cells across the
 * card at any size, as in the background artwork. Each cell carries a soft
 * highlight plus a crisper edge, so the grid reads over both the orange and the
 * off-white areas without hardening the blur underneath.
 */
.lp-demo-grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.55) 0 1px, transparent 1px 100%),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.55) 0 1px, transparent 1px 100%),
    linear-gradient(to right, rgba(255, 255, 255, 0.22) 0 4px, transparent 4px 100%),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.22) 0 4px, transparent 4px 100%);
  background-size: 3.5714% 6.2609%;
  opacity: 0.75;
}

/* ── How ForgeCAD works ───────────────────────────────────────────────────
   Three cards on the hero's measure: what you ask for, what the Agent does,
   and what you get back. The middle card runs the agent panel's own UI. */

.lp-how {
  width: min(var(--lp-content-width, 100%), 100%);
  margin: 0 auto;
  padding: var(--lp-section-space) 0 0;
}

.lp-how-title {
  margin: 0 0 var(--lp-title-gap);
  text-align: center;
}

/* One title style for every section below the hero, so each reads as a peer
   and the hero's headline stays the only larger type on the page. */
.lp-how-title,
.lp-areas-title,
.lp-code-title,
.lp-pricing-title,
.lp-faq-title {
  font-size: clamp(28px, 2.6vw, 40px);
  line-height: 1.1;
  letter-spacing: -0.03em;
  font-weight: 700;
}

.lp-how-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--lp-card-gap);
}

.lp-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: var(--lp-card-radius);
  border: 1px solid rgba(23, 18, 13, 0.07);
  background: #f4efe6;
  box-shadow: 0 1px 2px rgba(80, 52, 20, 0.04);

  transition:
    opacity 760ms cubic-bezier(0.32, 0.72, 0, 1),
    transform 760ms cubic-bezier(0.32, 0.72, 0, 1),
    box-shadow 560ms cubic-bezier(0.32, 0.72, 0, 1),
    border-color 560ms cubic-bezier(0.32, 0.72, 0, 1);
}

/* Hidden only while the motion script is there to bring them in. */
.js-motion .lp-card {
  opacity: 0;
  transform: translateY(12px);
}

.js-motion .lp-card.is-in,
.js-motion .lp-tile.is-in {
  opacity: 1;
  transform: none;
}

.lp-card:hover {
  border-color: rgba(23, 18, 13, 0.1);
  box-shadow: 0 10px 30px rgba(80, 52, 20, 0.07);
}

.lp-card.is-in:hover {
  transform: translateY(-2px);
}

/* ── Card media ── */

.lp-card-media {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1.54;
  overflow: hidden;
  background:
    radial-gradient(120% 90% at 50% 0%, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0) 70%),
    linear-gradient(180deg, #fdfaf4 0%, #f7f2e9 100%);
  border-bottom: 1px solid rgba(23, 18, 13, 0.05);
}

.lp-card-media > img {
  transition: transform 700ms cubic-bezier(0.32, 0.72, 0, 1);
}

/* 1 · The composer, rendered from editable text and settings in data.js. */
.lp-card-media--composer {
  /* The composer keeps its left edge and runs off the right, as the panel's
     own composer does when the panel is narrower than the message. */
  justify-content: flex-start;
  background:
    radial-gradient(90% 70% at 50% 110%, rgba(255, 128, 26, 0.16), rgba(255, 128, 26, 0) 68%),
    linear-gradient(180deg, #fdfaf4 0%, #f7f2e9 100%);
}

.lp-how-composer {
  width: 116%;
  min-height: clamp(138px, 11vw, 174px);
  max-width: none;
  margin-left: 7%;
  padding: clamp(15px, 1.5vw, 21px);
  display: flex;
  flex: none;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
  border: 1px solid #504946;
  border-radius: 17px;
  background: #3d3836;
  color: #f2ece3;
  box-shadow: 0 18px 34px rgba(48, 30, 12, 0.18), 0 1px 0 rgba(64, 120, 255, 0.8);
  transform-origin: left center;
  transition: transform 700ms cubic-bezier(0.32, 0.72, 0, 1);
}

.lp-card:hover .lp-how-composer {
  transform: translateY(-2px) scale(1.008);
}

.lp-how-composer-prompt {
  max-width: 34ch;
  margin: 0;
  font-size: clamp(14px, 1.1vw, 16px);
  line-height: 1.48;
  letter-spacing: -0.01em;
}

.lp-how-composer-controls {
  display: flex;
  align-items: center;
  gap: clamp(14px, 1.4vw, 22px);
  color: #ecdbb3;
  font-size: clamp(13px, 1vw, 15px);
  line-height: 1;
}

.lp-how-composer-add {
  color: #a89985;
  font-size: 23px;
  font-weight: 300;
  line-height: 1;
}

.lp-how-composer-setting {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.lp-how-composer-chevron {
  width: 7px;
  height: 7px;
  border-right: 1px solid #928474;
  border-bottom: 1px solid #928474;
  transform: translateY(-2px) rotate(45deg);
}

/* 2 · The agent's run, in the app's light theme. */
.lp-card-media--run {
  align-items: stretch;
  justify-content: center;
  flex-direction: column;
  gap: 10px;
  padding: 20px clamp(16px, 1.6vw, 26px);
  color: var(--fc-text);
  background:
    radial-gradient(100% 80% at 80% 0%, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0) 60%),
    linear-gradient(180deg, #fdfaf4 0%, #f8f3ea 100%);
  /* The run continues past the card, the way the panel's scroll does. */
  mask-image: linear-gradient(180deg, #000 78%, transparent 99%);
}

/* Still scene: no shine, no breathing icon, no pulsing dot, and no per-step
   marks — just the run as it stands. */
.lp-card-media--run .c-process-title,
.lp-card-media--run .c-icon-inner,
.lp-card-media--run .c-step-live,
.lp-card-media--run .is-entering {
  animation: none;
}

.lp-card-media--run .c-process-title.c-shine {
  background: none;
  color: var(--fc-text);
  -webkit-text-fill-color: currentColor;
}

.lp-card-media--run .c-step-done,
.lp-card-media--run .c-step-live {
  display: none;
}

.lp-card-media--run .c-icon-inner {
  opacity: 1;
}

.lp-card-media--run .c-process,
.lp-card-media--run .fx {
  width: 100%;
}

.lp-card-media--run .fx {
  border-top: 0;
}

.lp-card-media--run .c-steps {
  max-height: none;
  margin-top: 10px;
  overflow: visible;
}

.lp-card-media--run .c-steps li {
  padding: 2px 0;
}

.lp-card-media--run .fx-head {
  padding-left: 0;
  padding-right: 0;
}

.lp-card-media--run .fx-list {
  padding-left: 0;
  padding-right: 0;
}

/* 3 · The finished part. */
.lp-card-media--model {
  background:
    radial-gradient(85% 70% at 70% 8%, rgba(255, 128, 26, 0.13), rgba(255, 128, 26, 0) 62%),
    #222;
}

.lp-card-media--model > img {
  width: 82%;
  mix-blend-mode: normal;
  filter: drop-shadow(0 22px 26px rgba(0, 0, 0, 0.22));
}

.lp-card:hover .lp-card-media--model > img {
  transform: translateY(-3px) scale(1.012);
}

/* ── Card body ── */

.lp-card-body {
  flex: 1;
  padding: var(--lp-card-pad);
  background: #efeade;
}

.lp-card-body h3 {
  margin: 0 0 12px;
  font-size: clamp(19px, 1.6vw, 25px);
  line-height: 1.18;
  letter-spacing: -0.02em;
  font-weight: 700;
}

.lp-card-body p {
  margin: 0;
  max-width: 34ch;
  font-size: clamp(14.5px, 1.05vw, 16px);
  line-height: 1.55;
  color: var(--lp-muted);
}

@media (max-width: 900px) {
  .lp-how-grid {
    grid-template-columns: 1fr;
    max-width: 480px;
    margin: 0 auto;
  }

  .lp-card-body h3 br {
    display: none;
  }
}

/* ── Application areas ────────────────────────────────────────────────────
   A bento of three: Physical AI in the tall tile, with mechanical work and
   training data stacked beside it. The grid always spans the page's measure
   at a fixed 2 : 1, so it fills the width without growing into a tall block;
   columns and rows keep the sketch's split (852 | 718, 441 | 393).

   Spacing shares the "How it works" tokens — the same gap, radius and inner
   padding — so the two sections read as one system. Type steps down in a
   single scale: section title, then the lead tile, then the two smaller
   tiles, then body copy. */

.lp-areas {
  width: min(var(--lp-content-width, 100%), 100%);
  margin: 0 auto;
  padding: var(--lp-section-space) 0 0;
}

.lp-areas-head {
  margin-bottom: var(--lp-title-gap);
  text-align: center;
}

.lp-eyebrow {
  margin: 0 0 12px;
  color: var(--lp-subtle);
  font-size: clamp(12px, 0.9vw, 14px);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.lp-areas-title {
  margin: 0;
}

.lp-areas-grid {
  container-type: inline-size;
  display: grid;
  height: clamp(720px, 60vw, 920px);
  grid-template-columns: 852fr 718fr;
  grid-template-rows: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--lp-card-gap);
}

.lp-tile {
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  border-radius: var(--lp-card-radius);
  background: #efebe2;
  box-shadow: inset 0 0 0 1px rgba(23, 18, 13, 0.04);
  transition:
    opacity 760ms cubic-bezier(0.32, 0.72, 0, 1),
    transform 760ms cubic-bezier(0.32, 0.72, 0, 1),
    box-shadow 560ms cubic-bezier(0.32, 0.72, 0, 1);
}

.lp-tile--lead {
  grid-row: span 2;
}

.lp-tile--physical {
  background: #222120;
}

.lp-tile--physical .lp-tile-copy h3 {
  color: #fff;
}

.lp-tile--physical .lp-tile-copy p {
  color: rgba(255, 255, 255, 0.72);
}

.js-motion .lp-tile {
  opacity: 0;
  transform: translateY(12px);
}

.lp-tile:hover {
  box-shadow:
    inset 0 0 0 1px rgba(23, 18, 13, 0.05),
    0 10px 30px rgba(80, 52, 20, 0.07);
}

.js-motion .lp-tile.is-in:hover {
  transform: translateY(-2px);
}

.lp-tile-copy {
  position: relative;
  z-index: 1;
  padding: var(--lp-card-pad) var(--lp-card-pad) 0;
}

/* Tile headings sit a clear step below the section title, and the lead tile
   a step above its neighbours. Sized off the grid (cqw) with a floor. */
.lp-tile-copy h3 {
  margin: 0 0 max(8px, 0.8cqw);
  color: #2b2622;
  font-size: max(21px, 2.2cqw);
  line-height: 1.06;
  letter-spacing: -0.03em;
  font-weight: 600;
}

.lp-tile--lead .lp-tile-copy h3 {
  font-size: max(25px, 2.6cqw);
}

.lp-tile-copy p {
  margin: 0;
  max-width: 20cqw;
  color: var(--lp-muted);
  font-size: max(15px, 1.25cqw);
  line-height: 1.5;
  /* No one-word last lines in the short tile copy. */
  text-wrap: pretty;
}

.lp-tile--lead .lp-tile-copy p {
  max-width: 32cqw;
}

/* Artwork is placed as a share of its tile — left and width of the tile's
   width, top of its height — so each crop is three numbers. `--lp-drift` is
   the scroll drift from motion.js. */
.lp-tile-art {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--w);
  max-width: none;
  /* The white backdrop of each render disappears into the tile. */
  mix-blend-mode: multiply;
  transform: translate3d(0, var(--lp-drift, 0px), 0) scale(var(--lp-art-scale, 1));
  transform-origin: 50% 60%;
  transition: transform 760ms cubic-bezier(0.32, 0.72, 0, 1);
  pointer-events: none;
}

.lp-tile:hover .lp-tile-art {
  --lp-art-scale: 1.012;
}

/* The exact robot-cell scene from the hero demo fills the Physical AI lead. */
.lp-tile--physical .lp-tile-art {
  --x: 3%;
  --y: 21%;
  --w: 94%;
  mix-blend-mode: normal;
}

/* The drone supports the mechanical card without crowding its copy. */
.lp-tile--mechanical .lp-tile-art {
  --x: 37%;
  --y: 17%;
  --w: 78%;
}

/* Beside its copy rather than under it, wheels cropped at the bottom. */
.lp-tile--rover .lp-tile-art {
  --x: 44.3%;
  --y: 12%;
  --w: 60%;
}

@media (max-width: 900px) {
  .lp-areas-grid {
    max-width: 480px;
    margin: 0 auto;
    aspect-ratio: auto;
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }

  .lp-tile,
  .lp-tile--lead {
    grid-row: auto;
    aspect-ratio: auto;
  }

  .lp-tile-copy h3,
  .lp-tile--lead .lp-tile-copy h3 {
    font-size: 26px;
  }

  .lp-tile-copy p,
  .lp-tile--lead .lp-tile-copy p {
    max-width: 30ch;
    font-size: 15px;
  }

  .lp-areas-title br,
  .lp-tile-copy h3 br {
    display: none;
  }

  .lp-tile--physical .lp-tile-art {
    --x: 3%;
    --y: 22%;
    --w: 94%;
  }

  .lp-tile--mechanical .lp-tile-art {
    --x: 34%;
    --y: 26%;
    --w: 80%;
  }

  .lp-tile--rover .lp-tile-art {
    --x: 38%;
    --y: 36%;
    --w: 66%;
  }
}

/* The real project renders have reserved space, never overlap the copy. */
.lp-asset-stage { position: relative; flex: 1; min-height: 0; overflow: hidden; }
.lp-asset-stage img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.lp-tile--mechanical .lp-asset-stage img { mix-blend-mode: multiply; }
.lp-tile--drill { background: #efeae0; }
.lp-tile-copy p, .lp-tile--lead .lp-tile-copy p { max-width: 38ch; }
.lp-asset-caption { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px var(--lp-card-pad) 24px; font-size: 12px; color: var(--lp-muted); }
.lp-tile--physical .lp-asset-caption { color: #bdbab5; }
.lp-asset-caption button { color: inherit; background: transparent; border: 1px solid currentColor; border-radius: 999px; padding: 9px 14px; font: inherit; cursor: pointer; white-space: nowrap; }
.lp-asset-caption button:hover, .lp-asset-caption button[aria-pressed=true] { color: #ee791c; }
.lp-asset-caption button:focus-visible { outline: 3px solid #ff8b29; outline-offset: 4px; }
.lp-proof { padding: clamp(70px, 8vw, 140px) 0 0; }
.lp-proof-head { max-width: 790px; margin: 0 auto 48px; text-align: center; }
.lp-proof-head h2 { font-size: clamp(32px, 3.4vw, 56px); line-height: 1.08; letter-spacing: -.04em; margin: 18px 0 24px; font-weight: 600; }
.lp-proof-head > p:last-child { max-width: 610px; margin: auto; color: var(--lp-muted); font-size: 18px; line-height: 1.6; }
.lp-proof-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--lp-card-gap); }
.lp-proof-card { border: 1px solid #e2ddd3; border-radius: var(--lp-card-radius); padding: clamp(24px, 2.6vw, 42px); background: #efebe2; display: flex; flex-direction: column; }
.lp-proof-tag { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: #7e5c37; }
.lp-proof-card h3 { font-size: clamp(22px, 2vw, 30px); letter-spacing: -.03em; line-height: 1.15; margin: 28px 0 18px; }
.lp-proof-card p { color: var(--lp-muted); line-height: 1.6; font-size: 16px; margin: 0 0 24px; }
.lp-proof-card small { margin-top: auto; color: #777166; font-size: 12px; line-height: 1.6; }
.lp-check-example { display: grid; grid-template-columns: 1fr auto; gap: 14px 12px; padding: 20px; background: #f9f6ef; border-radius: 14px; margin: 0 0 24px; font-size: 12px; }
.lp-check-example > span { grid-column: 1 / -1; font-size: 9px; letter-spacing: .08em; color: #777166; }
.lp-check-example code { font-size: 11px; line-height: 1.5; }
.lp-format-list { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 24px; }
.lp-format-list span { border: 1px solid #d4cec2; border-radius: 7px; padding: 9px 11px; font-size: 12px; font-family: monospace; }
.lp-proof-card--future { background: #eee2d3; }
.lp-loop-label { border-top: 1px solid #d8c7b0; padding: 22px 0; font-size: 13px; line-height: 1.7; }
@media(max-width: 900px) {
  .lp-areas-grid { height: auto; }
  .lp-asset-stage, .lp-asset-stage--dog { height: 300px; flex: none; }
  .lp-proof-grid { grid-template-columns: 1fr; }
  .lp-proof-head > p:last-child { font-size: 16px; }
  .lp-proof-card { min-height: 0; }
}

/* ── CAD as code ───────────────────────────────────────────────────────────
   Heading and lead side by side, then one panel: the model's source in an
   editor on the left, the model it defines in a live canvas on the right.
   The editor follows the app's Monaco setup (monospace, line-number gutter,
   current-line highlight) with a file tab as in the design; its colours are
   the design's warm palette rather than Monaco's blue-leaning vs-dark, so
   the code sits in the page's orange-and-ink scheme. */

.lp-code {
  width: min(var(--lp-content-width, 100%), 100%);
  margin: 0 auto;
  padding: var(--lp-section-space) 0 0;
}

.lp-code-head {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(28px, 5vw, 96px);
  align-items: start;
  margin-bottom: var(--lp-title-gap);
}

.lp-code-title {
  margin: 0;
  max-width: 15ch;
  text-wrap: balance;
}

.lp-code-lead {
  padding-top: clamp(0px, 1.6vw, 26px);
}

.lp-code-lead p {
  margin: 0 0 1em;
  max-width: 60ch;
  color: var(--lp-muted);
  font-size: var(--lp-lead-size);
  line-height: 1.6;
  text-wrap: pretty;
}

.lp-code-lead p:last-child {
  margin-bottom: 0;
}

.lp-code-lead code {
  padding: 1px 5px;
  border-radius: 5px;
  background: rgba(23, 18, 13, 0.06);
  color: var(--lp-ink);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.9em;
}

/* ── The panel ── */

.lp-code-panel {
  --code-bg: #262523;
  --code-chrome: #1d1c1a;
  --code-line: #363431;
  --code-text: #dcd8d1;

  display: grid;
  grid-template-columns: minmax(0, 46fr) minmax(0, 54fr);
  aspect-ratio: 1.6;
  overflow: hidden;
  border-radius: var(--lp-card-radius);
  background: #1f1e1c;
  box-shadow: 0 30px 70px rgba(48, 26, 6, 0.16);
  transition:
    opacity 760ms cubic-bezier(0.32, 0.72, 0, 1),
    transform 760ms cubic-bezier(0.32, 0.72, 0, 1);
}

.js-motion .lp-code-panel {
  opacity: 0;
  transform: translateY(12px);
}

.js-motion .lp-code-panel.is-in {
  opacity: 1;
  transform: none;
}

/* ── Editor ── */

.lp-code-editor {
  /* The code is sized to this column, so the whole file fits at any width. */
  container-type: inline-size;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  background: var(--code-bg);
  border-right: 1px solid var(--code-line);
}

.lp-code-tabs {
  display: flex;
  flex: 0 0 40px;
  background: var(--code-chrome);
  border-bottom: 1px solid var(--code-line);
}

/* The open tab joins the editor below it, the way editor tabs do. */
.lp-code-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: -1px;
  padding: 0 12px 0 14px;
  background: var(--code-bg);
  border-right: 1px solid var(--code-line);
  color: var(--code-text);
  font-size: 12.5px;
  font-weight: 500;
}

.lp-code-tab-icon {
  color: #8f8a83;
}

.lp-code-tab-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  margin-left: 4px;
  border-radius: 5px;
  color: #77736c;
  font-size: 14px;
  line-height: 1;
  transition:
    background 200ms ease-out,
    color 200ms ease-out;
}

.lp-code-tab:hover .lp-code-tab-close {
  background: rgba(255, 255, 255, 0.06);
  color: var(--code-text);
}

.lp-code-source {
  flex: 1;
  min-height: 0;
  margin: 0;
  padding: 1.1em 0 1.2em;
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: #45423e transparent;
  color: var(--code-text);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  /* 58 columns of code plus the gutter: about 63 characters across. */
  font-size: min(13.5px, 2.4cqw);
  line-height: 1.5;
  tab-size: 2;
}

.lp-code-source code {
  display: block;
  min-width: max-content;
  font: inherit;
}

.lp-code-line {
  display: flex;
  transition: background 200ms ease-out;
}

/* Monaco's current-line highlight, following the pointer. */
.lp-code-line:hover {
  background: rgba(255, 255, 255, 0.035);
}

.lp-code-ln {
  flex: 0 0 auto;
  width: 3.6em;
  padding-right: 1.3em;
  color: #6c6862;
  text-align: right;
  user-select: none;
  transition: color 200ms ease-out;
}

.lp-code-line:hover .lp-code-ln {
  color: #b8b3ab;
}

.lp-code-lc {
  padding-right: 1em;
  white-space: pre;
}

.lp-code-source .is-keyword {
  color: #ff8a3d;
}

.lp-code-source .is-string {
  color: #8cc576;
}

.lp-code-source .is-number {
  color: #e8b764;
}

.lp-code-source .is-comment {
  color: #8f8b83;
  font-style: italic;
}

.lp-code-source .is-type {
  color: #e4c28f;
}

.lp-code-source .is-call {
  color: #f1ede6;
}

/* ── Canvas ── */

.lp-code-stage {
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: #1f1e1c;
}

.lp-code-stage > canvas {
  opacity: 0;
  transition: opacity 700ms cubic-bezier(0.32, 0.72, 0, 1);
}

.lp-code-stage.is-ready > canvas {
  opacity: 1;
}

.lp-code-hint {
  position: absolute;
  bottom: 18px;
  left: 50%;
  z-index: 1;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(31, 30, 28, 0.78);
  color: #a9a49c;
  font-size: 11.5px;
  opacity: 0;
  transform: translateX(-50%);
  pointer-events: none;
  transition: opacity 600ms cubic-bezier(0.32, 0.72, 0, 1);
}

.lp-code-stage.is-ready .lp-code-hint {
  opacity: 1;
}

/* The turntable (scripts/demo/turntable.js), for browsers without WebGL: the
   still grid and the part on it, each covering the panel as the live canvas
   does. Sideways drags turn the part; vertical swipes scroll the page. */
.lp-turntable {
  position: absolute;
  inset: 0;
  overflow: hidden;
  touch-action: pan-y;
  user-select: none;
}

.lp-turntable img,
.lp-turntable-part {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.lp-turntable img {
  object-fit: cover;
  pointer-events: none;
}

.lp-turntable-part {
  opacity: 0;
  transform: scale(0.94);
}

.lp-turntable-part.is-shown {
  opacity: 1;
  transform: none;
}

.lp-turntable.is-interactive {
  cursor: grab;
}

.lp-turntable.is-dragging {
  cursor: grabbing;
}

/* Neither WebGL nor its frames: the hint stays and says the preview is
   unavailable, rather than leaving an empty panel. */
.lp-code-stage.is-unavailable .lp-code-hint {
  top: 50%;
  bottom: auto;
  opacity: 1;
  transform: translate(-50%, -50%);
}

/* Once someone has turned the model, the hint has done its job. */
.lp-code-stage.is-touched .lp-code-hint {
  opacity: 0;
}

/* Narrow desktops: the code needs the room more than the canvas does. */
@media (max-width: 1180px) {
  .lp-code-panel {
    grid-template-columns: minmax(0, 56fr) minmax(0, 44fr);
    aspect-ratio: 1.32;
  }
}

@media (max-width: 900px) {
  .lp-code-head {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .lp-code-lead {
    padding-top: 0;
  }

  .lp-code-panel {
    grid-template-columns: 1fr;
    grid-template-rows: auto 340px;
    aspect-ratio: auto;
  }

  .lp-code-editor {
    border-right: 0;
    border-bottom: 1px solid var(--code-line);
  }

  .lp-code-source {
    max-height: 420px;
    font-size: min(12.5px, 2.4cqw);
  }
}

/* ── Pricing ───────────────────────────────────────────────────────────────
   Five individual plans on one row, then Team and Enterprise at three-fifths
   and two-fifths width. Every card is a subgrid over the same four rows — plan and price,
   description, button, features — so the buttons and the first feature line
   up across a row whatever length the copy runs to. Sizes follow the card
   design (a 284 px card): padding a little under a tenth of its width, a full-width 40 px button, 14 px copy
   and features on a 28 px pitch. Pro carries the one orange button, with the
   design's blurred arc of light behind it. */

.lp-pricing {
  width: min(var(--lp-content-width, 100%), 100%);
  margin: 0 auto;
  padding: var(--lp-section-space) 0 0;
}

.lp-pricing-title {
  margin: 0 0 var(--lp-title-gap);
  text-align: center;
}

.lp-pricing-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
}

.lp-plan {
  position: relative;
  /* The Pro glow sits at z-index -1: keep it inside the card, above its paper. */
  isolation: isolate;
  grid-row: span 4;
  display: grid;
  grid-template-rows: subgrid;
  row-gap: 0;
  overflow: hidden;
  padding: 28px 24px 44px;
  border-radius: 16px;
  border: 1px solid #f3e1cf;
  background: #fef9f3;
  color: var(--lp-text);
  transition:
    opacity 760ms cubic-bezier(0.32, 0.72, 0, 1),
    transform 760ms cubic-bezier(0.32, 0.72, 0, 1),
    box-shadow 560ms cubic-bezier(0.32, 0.72, 0, 1),
    border-color 560ms cubic-bezier(0.32, 0.72, 0, 1);
}

.lp-plan--wide {
  grid-column: span 2;
}

.lp-plan--team {
  grid-column: span 3;
}

.js-motion .lp-plan {
  opacity: 0;
  transform: translateY(12px);
}

.js-motion .lp-plan.is-in {
  opacity: 1;
  transform: none;
}

.lp-plan:hover {
  border-color: #ecd3ba;
  box-shadow: 0 12px 32px rgba(80, 52, 20, 0.06);
}

.js-motion .lp-plan.is-in:hover {
  transform: translateY(-2px);
}

/* ── Plan and price ── */

.lp-plan-head {
  position: relative;
}

.lp-plan-name {
  margin: 0;
  font-size: 14px;
  line-height: 18px;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.lp-plan-badge {
  position: absolute;
  top: 0;
  right: 0;
  display: flex;
  align-items: center;
  height: 18px;
  padding: 0 9px;
  border-radius: 999px;
  border: 1px solid rgba(255, 128, 26, 0.07);
  background: #f2ece3;
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.lp-plan-price {
  display: flex;
  align-items: baseline;
  gap: 7px;
  margin: 1px 0 0;
}

.lp-plan-price strong {
  color: var(--lp-ink);
  font-size: 32px;
  line-height: 36px;
  letter-spacing: -0.03em;
  font-weight: 700;
}

.lp-plan-price span {
  color: var(--lp-subtle);
  font-size: 16px;
  letter-spacing: -0.01em;
}

/* ── Description, button, features ── */

.lp-plan-desc {
  margin: 3px 0 0;
  font-size: 14px;
  line-height: 20px;
}

.lp-plan-cta {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  margin-top: 24px;
  border-radius: 999px;
  background: #f0ebe3;
  color: var(--lp-ink);
  font-size: 14.5px;
  font-weight: 600;
  text-decoration: none;
  transition:
    background 0.28s cubic-bezier(0.32, 0.72, 0, 1),
    transform 0.28s cubic-bezier(0.32, 0.72, 0, 1),
    box-shadow 0.28s cubic-bezier(0.32, 0.72, 0, 1);
}

.lp-plan-cta:hover {
  background: #e8e2d8;
}

.lp-plan-cta:active {
  transform: scale(0.985);
}

.lp-plan-cta--primary {
  background: var(--lp-brand);
  color: #fff;
}

.lp-plan-cta--primary:hover {
  background: #f9770f;
}

/*
 * The glow, as drawn in the card design: the upper arc of a wide elliptical
 * ring, blurred, whose band crosses the card just above the button and falls
 * away down both sides. Geometry is kept as shares of the button's width
 * (margins resolve against it), so the arc holds its shape at every card
 * size: the ring is 2.6× the button wide, its hole 76.5% of its size, and its
 * top 21.5% of the button's width above the button.
 */
.lp-plan-cta--primary::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: 0;
  left: 50%;
  width: 259.5%;
  aspect-ratio: 595 / 565;
  margin-top: -21.5%;
  translate: -50% 0;
  border-radius: 50%;
  background: radial-gradient(closest-side, transparent 76.5%, rgba(255, 128, 26, 0.5) 76.5% 100%, transparent 100%);
  filter: blur(32px);
  pointer-events: none;
  transition: scale 900ms cubic-bezier(0.32, 0.72, 0, 1);
}

.lp-plan:hover .lp-plan-cta--primary::before {
  scale: 1.03;
}

.lp-plan-features {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
  font-size: 14px;
  line-height: 20px;
}

.lp-plan-features li {
  display: flex;
  align-items: flex-start;
  gap: 11.5px;
}

/* The design's tick: 10.5 × 7.5 px, centred on the capitals. */
.lp-plan-features li::before {
  content: "";
  flex: none;
  width: 12px;
  height: 9px;
  margin-top: 5.5px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 9' fill='none' stroke='black' stroke-width='1.36' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M0.7 4.6l3.3 3.2L11.2 0.8'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 9' fill='none' stroke='black' stroke-width='1.36' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M0.7 4.6l3.3 3.2L11.2 0.8'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* Laptops and tablets: two plans a row, Team and Enterprise full width. */
@media (max-width: 1180px) {
  .lp-pricing-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .lp-plan--team {
    grid-column: span 2;
  }
}

@media (max-width: 640px) {
  .lp-pricing-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .lp-plan--wide,
  .lp-plan--team {
    grid-column: auto;
  }

  .lp-plan {
    padding: 24px 24px 32px;
  }
}

/* ── FAQ ───────────────────────────────────────────────────────────────────
   Numbered rows on the pricing cards' paper and border. The question row is
   one button; the answer opens under the question text by animating its
   grid row from 0fr to 1fr, so the height is the content's own, never a
   guessed max-height. Closed rows carry the orange +, which turns into a
   plain × as its row opens. */

.lp-faq {
  width: min(var(--lp-content-width, 100%), 100%);
  margin: 0 auto;
  padding: var(--lp-section-space) 0 0;
}

.lp-faq-title {
  margin: 0 0 var(--lp-title-gap);
  text-align: center;
  text-wrap: balance;
}

.lp-faq-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.lp-faq-item {
  --faq-chip: 36px;
  --faq-indent: calc(var(--faq-chip) + clamp(16px, 2vw, 28px));

  border-radius: var(--lp-card-radius);
  border: 1px solid rgba(214, 150, 96, 0.22);
  background: #fffbf6;
  transition:
    opacity 760ms cubic-bezier(0.32, 0.72, 0, 1),
    transform 760ms cubic-bezier(0.32, 0.72, 0, 1),
    border-color 420ms cubic-bezier(0.32, 0.72, 0, 1),
    box-shadow 420ms cubic-bezier(0.32, 0.72, 0, 1);
}

.js-motion .lp-faq-item[data-reveal],
.js-motion .lp-faq-item[data-faq-more] {
  opacity: 0;
  transform: translateY(12px);
}

.js-motion .lp-faq-item.is-in {
  opacity: 1;
  transform: none;
}

.lp-faq-item.is-folded {
  display: none;
}

.lp-faq-item:hover,
.lp-faq-item.is-open {
  border-color: rgba(214, 150, 96, 0.34);
}

.lp-faq-item.is-open {
  box-shadow: 0 10px 30px rgba(80, 52, 20, 0.06);
}

.lp-faq-item h3 {
  margin: 0;
}

.lp-faq-question {
  display: flex;
  align-items: center;
  gap: clamp(16px, 2vw, 28px);
  width: 100%;
  padding: 12px 12px 12px 12px;
  border: 0;
  border-radius: inherit;
  background: none;
  color: #2b2622;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.lp-faq-question:focus-visible {
  outline: 2px solid var(--lp-focus);
  outline-offset: 2px;
}

.lp-faq-num {
  display: grid;
  place-items: center;
  flex: none;
  width: var(--faq-chip);
  height: var(--faq-chip);
  border-radius: 10px;
  background: #f2eee7;
  color: var(--lp-text);
  font-size: 16px;
  font-variant-numeric: tabular-nums;
}

.lp-faq-text {
  flex: 1;
  font-size: clamp(16.5px, 1.35vw, 19px);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.015em;
}

/* + drawn as two bars, so opening can rotate it into × and drop the fill. */
.lp-faq-icon {
  position: relative;
  flex: none;
  width: var(--faq-chip);
  height: var(--faq-chip);
  border-radius: 10px;
  background: var(--lp-brand);
  color: #fff;
  transition:
    background 420ms cubic-bezier(0.32, 0.72, 0, 1),
    color 420ms cubic-bezier(0.32, 0.72, 0, 1),
    transform 520ms cubic-bezier(0.32, 0.72, 0, 1);
}

.lp-faq-icon::before,
.lp-faq-icon::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 13px;
  height: 1.6px;
  margin: -0.8px 0 0 -6.5px;
  border-radius: 2px;
  background: currentColor;
}

.lp-faq-icon::after {
  transform: rotate(90deg);
}

.lp-faq-question:hover .lp-faq-icon {
  background: #f9770f;
}

.lp-faq-item.is-open .lp-faq-icon {
  background: transparent;
  color: var(--lp-ink);
  transform: rotate(45deg);
}

.lp-faq-item.is-open .lp-faq-question:hover .lp-faq-icon {
  background: rgba(23, 18, 13, 0.05);
}

.lp-faq-answer {
  display: grid;
  grid-template-rows: 1fr;
  transition: grid-template-rows 520ms cubic-bezier(0.32, 0.72, 0, 1);
}

.lp-faq-answer > div {
  min-height: 0;
  overflow: hidden;
}

.lp-faq-answer p {
  /* A reading measure for the text itself; the padding sits outside it. */
  max-width: calc(80ch + 12px + var(--faq-indent) + var(--faq-chip) + 24px);
  margin: 0;
  /* Under the question text, clear of the icon on the right. */
  padding: 2px calc(var(--faq-chip) + 24px) 24px calc(12px + var(--faq-indent));
  color: var(--lp-text);
  font-size: clamp(15.5px, 1.2vw, 17.5px);
  line-height: 1.65;
  text-wrap: pretty;
  transition:
    opacity 420ms cubic-bezier(0.32, 0.72, 0, 1),
    transform 520ms cubic-bezier(0.32, 0.72, 0, 1);
}

.lp-faq.is-interactive .lp-faq-item:not(.is-open) .lp-faq-answer {
  grid-template-rows: 0fr;
}

.lp-faq.is-interactive .lp-faq-item:not(.is-open) .lp-faq-answer p {
  opacity: 0;
  transform: translateY(-4px);
}

/* Without the script, every row reads as open and the + has no job. */
.lp-faq:not(.is-interactive) .lp-faq-icon {
  display: none;
}

.lp-faq-more {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 24px auto 0;
  padding: 11px 20px;
  border: 0;
  border-radius: 999px;
  background: #efebe3;
  color: var(--lp-ink);
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition:
    background 0.28s cubic-bezier(0.32, 0.72, 0, 1),
    transform 0.28s cubic-bezier(0.32, 0.72, 0, 1);
}

.lp-faq-more[hidden] {
  display: none;
}

.lp-faq-more:hover {
  background: #e7e2d8;
}

.lp-faq-more:active {
  transform: scale(0.985);
}

@media (max-width: 640px) {
  .lp-faq-item {
    --faq-chip: 32px;
  }

  .lp-faq-question {
    padding: 10px;
    gap: 14px;
  }

  .lp-faq-num {
    font-size: 15px;
  }

  /* The answer takes the row's full width under the number on a phone. */
  .lp-faq-answer p {
    padding: 0 18px 20px calc(10px + var(--faq-indent));
  }
}

/* ── Closing call to action ──────────────────────────────────────────────
   The page's last word, set like the hero: its headline size, a wider lead,
   and the same pair of buttons. */

.lp-closing {
  width: min(var(--lp-content-width, 100%), 100%);
  margin: 0 auto;
  padding: var(--lp-section-space) 0 0;
  text-align: center;
}

.lp-closing-title {
  margin: 0;
  font-size: clamp(32px, 3.2vw, 52px);
  line-height: 1.08;
  letter-spacing: -0.035em;
  font-weight: 700;
}

.lp-closing-lead {
  max-width: 520px;
  margin: 20px auto 0;
  color: var(--lp-muted);
  font-size: var(--lp-lead-size);
  line-height: 1.6;
  text-wrap: balance;
}

.lp-closing-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  margin-top: 32px;
}

.js-motion .lp-closing [data-reveal] {
  opacity: 0;
  transform: translateY(12px);
  transition:
    opacity 760ms cubic-bezier(0.32, 0.72, 0, 1),
    transform 760ms cubic-bezier(0.32, 0.72, 0, 1);
}

.js-motion .lp-closing [data-reveal].is-in {
  opacity: 1;
  transform: none;
}

/* ── Footer ──────────────────────────────────────────────────────────────
   One card on the page's measure: the brand on the left, five columns of
   links on the right, over the brand gradient stepped into grid cells
   (scripts/footer.js). The card keeps a band of bare grid below the links so
   the gradient has room to read. */

.lp-footer {
  position: relative;
  isolation: isolate;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 48px;
  width: min(var(--lp-content-width, var(--lp-max)), calc(100% - 48px));
  margin: 0 auto 40px;
  padding: clamp(56px, 6vw, 84px) clamp(32px, 4vw, 56px) clamp(104px, 10.5vw, 148px);
  overflow: hidden;
  border-radius: var(--lp-surface-radius);
  /* The same gradient, smooth, for when the cells are not painted. */
  background:
    radial-gradient(26% 95% at 30% 100%, #ff801a, rgba(255, 128, 26, 0)),
    radial-gradient(40% 45% at 0% 105%, #ff801a, rgba(255, 128, 26, 0)),
    radial-gradient(18% 50% at 102% 105%, rgba(255, 128, 26, 0.75), rgba(255, 128, 26, 0)),
    #f0ebe3;
}

.lp-footer-cells,
.lp-footer-grid {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.lp-footer-cells {
  image-rendering: pixelated;
  opacity: 0;
}

.lp-footer.is-painted .lp-footer-cells {
  opacity: 1;
}

/* Grid lines in the hero card's style — a crisp line and a soft band — one
   per painted cell, so every step in colour falls on a line. */
.lp-footer-grid {
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.5) 0 1px, transparent 1px 100%),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.5) 0 1px, transparent 1px 100%),
    linear-gradient(to right, rgba(255, 255, 255, 0.2) 0 4px, transparent 4px 100%),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.2) 0 4px, transparent 4px 100%);
  background-size: calc(100% / var(--footer-cols, 28)) calc(100% / var(--footer-rows, 9));
}

.lp-footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  color: var(--lp-ink);
  font-size: clamp(28px, 2.5vw, 36px);
  font-weight: 700;
  letter-spacing: -0.035em;
  text-decoration: none;
}

.lp-footer-brand img {
  width: 1.22em;
  height: 1.22em;
}

.lp-footer-links {
  display: flex;
  gap: clamp(28px, 3vw, 44px);
}

.lp-footer-links div {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.lp-footer-links h2 {
  margin: 0 0 6px;
  color: var(--lp-subtle);
  font-size: 12.5px;
  line-height: 16px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.lp-footer-links a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #2b2622;
  font-size: 16px;
  line-height: 25px;
  text-decoration: none;
  transition: color 0.2s ease;
}

.lp-footer-links a:hover {
  text-decoration: underline 1.5px var(--lp-brand);
  text-underline-offset: 5px;
}

.lp-footer-social a {
  line-height: 27px;
}

.lp-footer-links svg {
  width: 16px;
  height: 16px;
  color: var(--lp-muted);
}

.lp-footer-links a:hover svg {
  color: var(--lp-ink);
}

/* Tablets: the brand above, the columns across the card beneath it. */
@media (max-width: 1080px) {
  .lp-footer {
    flex-direction: column;
    gap: 40px;
  }

  .lp-footer-links {
    align-self: stretch;
    flex-wrap: wrap;
    row-gap: 28px;
  }
}

@media (max-width: 760px) {
  .lp-footer {
    width: calc(100% - 32px);
    margin-bottom: 16px;
    border-radius: 20px;
  }

  .lp-footer-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px 20px;
  }

  /* Taller rows for thumbs. */
  .lp-footer-links a,
  .lp-footer-social a {
    line-height: 34px;
  }

  .lp-closing-actions {
    flex-wrap: wrap;
  }
}

/* ── Camera ──────────────────────────────────────────────────────────────
   scripts/demo/camera.js puts one transform here — the workspace underneath
   never reflows, so pushing in on the composer costs nothing but a composite. */

.lp-camera {
  position: absolute;
  inset: 0;
  transform-origin: 50% 50%;
  will-change: transform;
}

/* ── Workspace frame ─────────────────────────────────────────────────────── */

.lp-demo-frame {
  position: absolute;
  inset: 4.5% 5%;
}

.lp-window {
  position: absolute;
  top: 50%;
  left: 50%;
  width: var(--lp-window-width);
  height: var(--lp-window-height);
  transform-origin: center center;
  /* scripts/hero.js sets --lp-scale from the frame size. */
  transform: translate(-50%, -50%) scale(var(--lp-scale, 0.6));

  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid var(--fc-border);
  background: var(--fc-bg);
  color: var(--fc-text);
  box-shadow: 0 30px 70px rgba(48, 26, 6, 0.28);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  text-align: left;
}

.lp-window-body {
  flex: 1;
  display: flex;
  min-height: 0;
}

/* Still frame of the app: only the composer and the stage take input. */
.lp-window .fc-toolbar,
.lp-window .fc-statusbar,
.lp-window .fc-panel-rail,
.lp-window .fc-agent-header,
.lp-window .fc-agent-body {
  pointer-events: none;
}

.lp-rail-spacer {
  flex: 1;
}

.lp-agent-host {
  /* The editor's default agent panel width. */
  flex: 0 0 345px;
  min-width: 0;
  display: flex;
  border-right: 1px solid var(--fc-border);
}

/*
 * Desktop lock.
 *
 * The app's toolbar collapses its labels through viewport media queries
 * (ui-polish.css, max-width 1280/1120). The hero workspace is a fixed 1560px
 * window that only *looks* small because it is scaled, so those breakpoints
 * would collapse it for the wrong reason. Restore the desktop values inside the
 * window; the numbers are the app's own base declarations.
 */

.lp-window .fc-toolbar {
  padding: 0 10px;
  gap: 8px;
}

.lp-window .fc-toolbar .fc-separator {
  margin: 0 4px;
}

.lp-window .fc-toolbar-file {
  max-width: 340px;
  width: min(340px, 100%);
  padding: 5px 12px;
}

.lp-window .fc-toolbar-shortcut {
  display: inline;
}

.lp-window .fc-toolbar-collapse-label {
  width: auto;
  padding: 0 10px;
  gap: 5px;
}

.lp-window .fc-toolbar-collapse-label > span:last-child {
  display: inline;
}

/* While the camera is pushed in, the background art drifts a little and the
   chrome that is out of the story steps back — depth without a blur filter. */
.lp-demo.is-zoomed .lp-demo-grid,
.lp-demo.is-zoomed .lp-demo-bg {
  transform: translateY(-6px) scale(1.015);
}

.lp-demo-grid,
.lp-demo-bg {
  transition: transform 900ms cubic-bezier(0.22, 1, 0.36, 1);
}

.lp-window.is-dimmed .fc-toolbar,
.lp-window.is-dimmed .fc-panel-rail,
.lp-window.is-dimmed .fc-statusbar,
.lp-window.is-dimmed .lp-stage {
  opacity: 0.55;
}

.lp-window .fc-toolbar,
.lp-window .fc-panel-rail,
.lp-window .fc-statusbar,
.lp-window .lp-stage {
  transition: opacity 600ms cubic-bezier(0.4, 0, 0.2, 1);
}

.lp-window.is-resetting {
  opacity: 0.6;
  transition: opacity 620ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Agent panel ─────────────────────────────────────────────────────────── */

.lp-agent-host .fc-agent-panel {
  width: 100%;
}

/* The composer shows a send arrow at rest and pause/stop while the agent runs,
   as the panel does. */
.lp-window [data-when="running"] {
  display: none;
}

.lp-window [data-mode="running"] [data-when="running"] {
  display: inline-flex;
}

.lp-window [data-mode="running"] #composer-send {
  display: none;
}

#composer-send.is-pressed {
  transform: scale(0.92);
}

#composer-send {
  transition: transform 180ms cubic-bezier(0.2, 0, 0, 1);
}

.fc-task-composer-shell.is-focused {
  outline: 2px solid color-mix(in srgb, var(--fc-accent) 55%, transparent);
  outline-offset: 2px;
  border-radius: 14px;
}

.c-version-thumb {
  overflow: hidden;
  background: var(--fc-bgSurface);
}

.c-version-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ── 3D stage ────────────────────────────────────────────────────────────── */

.lp-stage {
  position: relative;
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  /* The 3D stage renders with an alpha buffer, so this token is the viewport
     colour — the same one the editor uses. */
  background: var(--fc-viewportBg);
}

/* An empty workspace still draws its grid; the canvas takes over once the 3D
   stage has loaded. */
.lp-stage-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, color-mix(in srgb, var(--fc-gridCell) 70%, transparent) 1px, transparent 1px),
    linear-gradient(to bottom, color-mix(in srgb, var(--fc-gridCell) 70%, transparent) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(circle at 50% 55%, #000 30%, transparent 78%);
  opacity: 0.8;
  transition: opacity 500ms ease-out;
}

.lp-stage.is-ready .lp-stage-grid {
  opacity: 0;
}

.lp-stage-canvas {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 400ms ease-out;
}

.lp-stage.is-ready .lp-stage-canvas {
  opacity: 1;
}

.lp-stage-empty {
  position: absolute;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--fc-textDim);
  font-size: 12px;
  letter-spacing: 0.01em;
  transition: opacity 400ms ease-out;
}

.lp-stage.is-loaded .lp-stage-empty {
  opacity: 0;
}

.lp-stage-hint {
  position: absolute;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid var(--fc-border);
  background: color-mix(in srgb, var(--fc-bgPanel) 85%, transparent);
  color: var(--fc-textMuted);
  font-size: 11.5px;
  opacity: 0;
  transition: opacity 500ms ease-out;
}

.lp-demo.is-live .lp-stage-hint,
.lp-demo.is-handed-over .lp-stage-hint {
  opacity: 1;
}

/* ── Pointer ─────────────────────────────────────────────────────────────
   The cursor lives in the card, not in the scaled workspace, so it keeps one
   size however far the camera has pushed in. */

.lp-cursor-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 3;
}

.lp-cursor {
  position: absolute;
  top: 0;
  left: 0;
  width: 20px;
  height: 22px;
  margin: -2px 0 0 -2px;
  opacity: 0;
  filter: drop-shadow(0 4px 10px rgba(16, 10, 4, 0.45));
  transition: opacity 260ms ease-out;
}

.lp-cursor.is-visible {
  opacity: 1;
}

.lp-cursor svg {
  display: block;
  transform-origin: 3px 3px;
  /* Grows with the camera so it reads at the same size as the UI it points at. */
  transform: scale(var(--lp-cursor-scale, 1));
  transition: transform 300ms cubic-bezier(0.22, 1, 0.36, 1);
}

.lp-cursor.is-pressed svg {
  transform: scale(calc(var(--lp-cursor-scale, 1) * 0.86));
}

.lp-cursor-ring {
  position: absolute;
  top: 0;
  left: 0;
  width: 18px;
  height: 18px;
  margin: -9px 0 0 -9px;
  border-radius: 50%;
  border: 2px solid var(--lp-brand);
  opacity: 0;
}

.lp-cursor-ring.is-firing {
  animation: lp-cursor-ring 520ms cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes lp-cursor-ring {
  from {
    opacity: 0.75;
    transform: scale(0.4);
  }
  to {
    opacity: 0;
    transform: scale(2.6);
  }
}

/* ── Replay ──────────────────────────────────────────────────────────────── */

.lp-replay {
  position: absolute;
  right: 22px;
  bottom: 22px;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid rgba(23, 18, 13, 0.1);
  background: rgba(255, 252, 247, 0.9);
  backdrop-filter: blur(10px);
  color: var(--lp-ink);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 10px 26px rgba(80, 52, 20, 0.14);
}

.lp-replay[hidden] {
  display: none;
}

.lp-replay:hover {
  background: #fff;
}

/* ── Status bar ──────────────────────────────────────────────────────────── */

.lp-statusbar-spacer {
  flex: 1;
}

.lp-status-dot {
  font-size: 9px;
}

.lp-window .fc-statusbar {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 28px;
  padding: 2px 12px;
  background: var(--fc-bgPanel);
  border-top: 1px solid var(--fc-border);
  font-size: 11px;
  color: var(--fc-textDim);
  flex-shrink: 0;
}

.lp-window .fc-statusbar-state--ok {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--fc-success);
}

.lp-window .fc-statusbar [data-status] {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.lp-window .fc-statusbar[data-state="ready"] [data-status] {
  color: var(--fc-textDim);
}

.lp-window .fc-statusbar[data-state="working"] [data-status] {
  color: var(--fc-accent);
}

.lp-window .fc-statusbar[data-state="built"] [data-status] {
  color: var(--fc-success);
}

/* ── Reduced motion ──────────────────────────────────────────────────────
   The demo renders its end state instead of playing; nothing here moves. */

@media (prefers-reduced-motion: reduce) {
  .lp-demo-grid,
  .lp-demo-bg,
  .lp-window .fc-toolbar,
  .lp-window .fc-panel-rail,
  .lp-window .fc-statusbar,
  .lp-window .lp-stage,
  .lp-cursor svg,
  #composer-send {
    transition: none;
  }

  .lp-cursor-ring.is-firing {
    animation: none;
  }

  .lp-card,
  .lp-card-media > img,
  .lp-tile,
  .lp-tile-art,
  .lp-code-panel,
  .lp-code-stage > canvas,
  .lp-plan,
  .lp-plan-cta--primary::before,
  .lp-closing [data-reveal],
  .lp-faq-item,
  .lp-faq-icon,
  .lp-faq-answer,
  .lp-faq-answer p,
  .lp-nav-toggle span,
  .lp-nav-menu {
    transition: none;
  }

  .lp-card,
  .lp-tile,
  .js-motion .lp-plan,
  .js-motion .lp-closing [data-reveal],
  .js-motion .lp-faq-item[data-reveal],
  .js-motion .lp-faq-item[data-faq-more],
  .js-motion .lp-code-panel {
    opacity: 1;
    transform: none;
  }
}

/* ── Responsive ──────────────────────────────────────────────────────────── */

@media (max-width: 1080px) {
  .lp-nav-links {
    display: none;
  }

  .lp-nav-actions {
    gap: 10px;
  }

  .lp-nav-toggle,
  .lp-nav-menu {
    display: block;
  }
}

@media (max-width: 760px) {
  .lp-nav-wrap {
    padding: 12px 16px 0;
  }

  .lp-nav {
    height: 54px;
    gap: 12px;
    padding: 0 6px 0 14px;
  }

  .lp-nav-brand {
    font-size: 17px;
  }

  .lp-nav-brand img {
    width: 24px;
    height: 24px;
  }

  .lp-nav-actions {
    gap: 4px;
  }

  .lp-nav-menu {
    width: calc(100% - 32px);
  }

  .lp-nav-cta {
    padding: 9px 16px;
    font-size: 13.5px;
  }

  /* The grid art keeps its 28 × 16 cells at every size; at phone width that
     reads as noise, so it steps back. */
  .lp-demo-grid {
    opacity: 0.45;
  }

  .lp-shell {
    padding: 0 16px 64px;
  }

  .lp-hero {
    padding-top: 36px;
  }

  .lp-demo {
    margin-top: 28px;
  }

  .lp-hero-actions {
    flex-wrap: wrap;
  }

  .lp-demo {
    margin-top: 20px;
    border-radius: 20px;
  }

  .lp-demo-frame {
    inset: 5%;
  }
}
