/*
  Public product site — simrigagent.com landing page.

  Glass theme (no .theme-operator on <body>), so every panel here reads the
  same semantic tokens as the rest of the public site and inherits the
  translucent look automatically. See DESIGN_SYSTEM.md §0.

  Layout-only dimensions (container widths, screenshot aspect ratios, the
  marquee's travel distance) are declared once as --lp-* custom properties
  below rather than sprinkled as literals. They are page geometry, not
  design-system values — there is no token for "how wide is a marketing
  container", and inventing global ones for a single page would be worse.
  Everything that DOES have a token — colour, spacing, radius, shadow, font
  size, breakpoint — uses it.
*/

.lp {
  --lp-shell: 1200px;
  --lp-shell-narrow: 760px;
  --lp-nav-h: 64px;
  --lp-shot-ratio: 16 / 10;
}

/* ── Shared shell + section rhythm ─────────────────────────────────── */

.lp-shell {
  width: 100%;
  max-width: var(--lp-shell);
  margin-inline: auto;
  padding-inline: var(--f1-space-6);
}

.lp-shell--narrow {
  max-width: var(--lp-shell-narrow);
}

.lp-section {
  padding-block: var(--f1-space-16);
}

/* Alternating bands, so a long page still reads as distinct chapters
   without needing a border between every section. */
.lp-section--alt {
  background: var(--f1-surface);
  border-block: 1px solid var(--f1-border);
}

.lp-head {
  max-width: var(--lp-shell-narrow);
  margin-bottom: var(--f1-space-12);
}

.lp-kicker {
  color: var(--f1-red);
  font-size: var(--f1-text-xs);
  font-weight: var(--f1-weight-bold);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin: 0 0 var(--f1-space-3);
}

.lp-h2 {
  font-size: var(--f1-text-2xl);
  font-weight: var(--f1-weight-black);
  line-height: 1.1;
  margin: 0 0 var(--f1-space-4);
}

.lp-h3 {
  font-size: var(--f1-text-xl);
  font-weight: var(--f1-weight-bold);
  line-height: 1.2;
  margin: 0 0 var(--f1-space-4);
}

.lp-lede {
  color: var(--f1-text-dim);
  font-size: var(--f1-text-base);
  line-height: 1.7;
  margin: 0;
}

/* Keyboard users land here first; visually hidden until focused. */
.lp-skip {
  position: absolute;
  left: var(--f1-space-4);
  top: 0;
  transform: translateY(-200%);
  z-index: var(--f1-z-toast);
  background: var(--f1-red);
  color: var(--f1-text);
  padding: var(--f1-space-3) var(--f1-space-5);
  border-radius: var(--f1-radius-sm);
  font-weight: var(--f1-weight-bold);
  transition: transform 0.18s ease;
}

.lp-skip:focus {
  transform: translateY(var(--f1-space-3));
}

/* ── Sticky nav ────────────────────────────────────────────────────── */

.lp-nav {
  position: sticky;
  top: 0;
  z-index: var(--f1-z-modal);
  background: var(--f1-panel);
  backdrop-filter: blur(var(--f1-blur));
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s ease, background 0.25s ease;
}

/* Set by landing.js once the page has scrolled past the hero's top — the
   border would otherwise sit as a stray line across the hero. */
.lp-nav.is-stuck {
  border-bottom-color: var(--f1-border);
  box-shadow: var(--f1-shadow-md);
}

.lp-nav-inner {
  max-width: var(--lp-shell);
  margin-inline: auto;
  padding-inline: var(--f1-space-6);
  /* Vertical room so the Book a demo button never touches the bar's edges. */
  padding-block: var(--f1-space-3);
  min-height: var(--lp-nav-h);
  display: flex;
  align-items: center;
  gap: var(--f1-space-6);
}

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

.lp-brand-mark {
  width: 32px;
  height: 32px;
  border-radius: var(--f1-radius-full);
}

.lp-brand-text {
  font-weight: var(--f1-weight-black);
  font-size: var(--f1-text-lg);
  letter-spacing: 0.02em;
}

.lp-brand-accent {
  color: var(--f1-red);
}

.lp-nav-links {
  display: flex;
  align-items: center;
  gap: var(--f1-space-6);
  margin-inline-start: auto;
}

.lp-nav-links a {
  color: var(--f1-text-dim);
  text-decoration: none;
  font-size: var(--f1-text-md);
  font-weight: var(--f1-weight-semibold);
  padding-block: var(--f1-space-2);
  border-bottom: 2px solid transparent;
  transition: color 0.18s ease, border-color 0.18s ease;
}

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

/* Scroll-spy state, set from landing.js. */
.lp-nav-links a.is-current {
  color: var(--f1-text);
  border-bottom-color: var(--f1-red);
}

.lp-nav-cta {
  display: flex;
  align-items: center;
  gap: var(--f1-space-3);
  flex: none;
}

.lp-nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-inline-start: auto;
  background: none;
  border: 1px solid var(--f1-border);
  border-radius: var(--f1-radius-sm);
  color: var(--f1-text);
  cursor: pointer;
}

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

.lp-hero {
  position: relative;
  padding-top: var(--f1-space-16);
  overflow: hidden;
}

.lp-hero-glow {
  position: absolute;
  inset-inline: 0;
  top: 0;
  height: 60%;
  background: radial-gradient(ellipse at 50% 0%, var(--f1-red-glow), transparent 70%);
  opacity: 0.35;
  pointer-events: none;
}

.lp-hero-inner {
  position: relative;
  text-align: center;
}

.lp-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--f1-space-2);
  background: var(--f1-surface);
  border: 1px solid var(--f1-border);
  border-radius: var(--f1-radius-full);
  padding: var(--f1-space-2) var(--f1-space-4);
  color: var(--f1-text-dim);
  font-size: var(--f1-text-sm);
  font-weight: var(--f1-weight-semibold);
  margin: 0 0 var(--f1-space-6);
}

.lp-eyebrow-dot {
  width: 7px;
  height: 7px;
  border-radius: var(--f1-radius-full);
  background: var(--f1-green);
  box-shadow: 0 0 8px var(--f1-green);
  animation: lpPulse 2.4s ease-in-out infinite;
}

@keyframes lpPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

/* clamp() on hero display text only — DESIGN_SYSTEM.md §1.2 allows it here
   and nowhere else on this page. */
.lp-hero-title {
  font-size: clamp(var(--f1-text-2xl), 7vw, var(--f1-text-3xl));
  font-weight: var(--f1-weight-black);
  line-height: 1.02;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  margin: 0 0 var(--f1-space-6);
}

.lp-grad {
  background: linear-gradient(100deg, var(--f1-red), var(--f1-yellow));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lp-hero-sub {
  max-width: var(--lp-shell-narrow);
  margin: 0 auto var(--f1-space-8);
  color: var(--f1-text-dim);
  font-size: var(--f1-text-base);
  line-height: 1.75;
}

.lp-hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--f1-space-4);
}

.lp-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--f1-space-4);
  margin: var(--f1-space-12) 0 0;
}

.lp-stat {
  background: var(--f1-panel);
  border: 1px solid var(--f1-border);
  border-radius: var(--f1-radius-panel);
  padding: var(--f1-space-5) var(--f1-space-4);
}

.lp-stat dt {
  color: var(--f1-text-dim);
  font-size: var(--f1-text-xs);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: var(--f1-space-2);
}

.lp-stat dd {
  margin: 0;
  font-family: var(--f1-mono);
  font-size: var(--f1-text-2xl);
  font-weight: var(--f1-weight-bold);
  font-variant-numeric: tabular-nums;
  color: var(--f1-text);
  line-height: 1;
}

.lp-hero-shot {
  margin-top: var(--f1-space-16);
}

/* ── Screenshot frame ──────────────────────────────────────────────── */

.lp-frame {
  margin: 0;
  background: var(--f1-panel);
  border: 1px solid var(--f1-border);
  border-radius: var(--f1-radius-panel);
  overflow: hidden;
  box-shadow: var(--f1-shadow-lg);
}

.lp-frame--lg {
  box-shadow: var(--f1-shadow-lg), 0 0 80px var(--f1-red-glow);
}

.lp-frame-bar {
  display: flex;
  align-items: center;
  gap: var(--f1-space-2);
  padding: var(--f1-space-3) var(--f1-space-4);
  background: var(--f1-surface);
  border-bottom: 1px solid var(--f1-border);
}

.lp-frame-dot {
  width: 10px;
  height: 10px;
  border-radius: var(--f1-radius-full);
  background: var(--f1-border-solid-bright, var(--f1-text-faint));
  flex: none;
}

.lp-frame-url {
  margin-inline-start: var(--f1-space-4);
  font-family: var(--f1-mono);
  font-size: var(--f1-text-xs);
  color: var(--f1-text-faint);
}

/* A button, not a div: the screenshot opens a lightbox, so it has to be
   reachable and activatable from the keyboard. */
.lp-frame-img {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
  line-height: 0;
}

.lp-frame-img img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: var(--lp-shot-ratio);
  object-fit: cover;
  object-position: top center;
}

.lp-frame figcaption {
  padding: var(--f1-space-4) var(--f1-space-5);
  color: var(--f1-text-dim);
  font-size: var(--f1-text-md);
  line-height: 1.6;
  border-top: 1px solid var(--f1-border);
}

/* ── Marquee ───────────────────────────────────────────────────────── */

.lp-marquee {
  border-block: 1px solid var(--f1-border);
  background: var(--f1-surface);
  overflow: hidden;
  padding-block: var(--f1-space-4);
}

.lp-marquee-track {
  display: flex;
  width: max-content;
  animation: lpScroll 38s linear infinite;
}

.lp-marquee-row {
  display: flex;
  align-items: center;
  gap: var(--f1-space-6);
  margin: 0;
  padding: 0 var(--f1-space-6);
  list-style: none;
  color: var(--f1-text-dim);
  font-size: var(--f1-text-md);
  font-weight: var(--f1-weight-semibold);
  white-space: nowrap;
}

/* The row is duplicated in the template, so travelling exactly -50% puts
   the copy where the original started — a seamless loop. */
@keyframes lpScroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ── How it works ──────────────────────────────────────────────────── */

.lp-steps {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: var(--f1-space-5);
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: none;
}

.lp-step {
  position: relative;
  background: var(--f1-panel);
  border: 1px solid var(--f1-border);
  border-radius: var(--f1-radius-panel);
  padding: var(--f1-space-6) var(--f1-space-5);
}

.lp-step-n {
  font-family: var(--f1-mono);
  font-size: var(--f1-text-sm);
  color: var(--f1-red);
  letter-spacing: 0.1em;
}

.lp-step-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin: var(--f1-space-3) 0 var(--f1-space-4);
  border-radius: var(--f1-radius-sm);
  background: var(--f1-surface-strong);
  color: var(--f1-red);
}

.lp-step h3 {
  font-size: var(--f1-text-lg);
  font-weight: var(--f1-weight-bold);
  margin: 0 0 var(--f1-space-3);
  line-height: 1.25;
}

.lp-step p {
  margin: 0;
  color: var(--f1-text-dim);
  font-size: var(--f1-text-md);
  line-height: 1.65;
}

/* ── Tabs ──────────────────────────────────────────────────────────── */

.lp-tablist {
  display: flex;
  flex-wrap: wrap;
  gap: var(--f1-space-2);
  margin-bottom: var(--f1-space-6);
}

.lp-tab {
  display: inline-flex;
  align-items: center;
  gap: var(--f1-space-2);
  min-height: 44px;
  padding: var(--f1-space-2) var(--f1-space-4);
  background: var(--f1-surface);
  border: 1px solid var(--f1-border);
  border-radius: var(--f1-radius-full);
  color: var(--f1-text-dim);
  font-family: inherit;
  font-size: var(--f1-text-md);
  font-weight: var(--f1-weight-semibold);
  cursor: pointer;
  transition: color 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.lp-tab:hover {
  color: var(--f1-text);
  border-color: var(--f1-text-faint);
}

.lp-tab.is-active {
  background: var(--f1-red);
  border-color: var(--f1-red);
  color: var(--f1-text);
  box-shadow: var(--f1-shadow-glow);
}

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

.lp-panel {
  animation: lpFade 0.35s ease;
}

@keyframes lpFade {
  from { opacity: 0; transform: translateY(var(--f1-space-2)); }
  to { opacity: 1; transform: none; }
}

/* ── Bento grid ────────────────────────────────────────────────────── */

.lp-bento {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--f1-space-4);
}

.lp-cell {
  position: relative;
  overflow: hidden;
  background: var(--f1-panel);
  border: 1px solid var(--f1-border);
  border-radius: var(--f1-radius-panel);
  padding: var(--f1-space-6);
  transition: border-color 0.2s ease, transform 0.2s ease;
}

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

.lp-cell:hover {
  border-color: var(--f1-text-faint);
  transform: translateY(-2px);
}

/* Pointer-tracked spotlight. --mx/--my are written by landing.js on
   pointermove; both default to a centred position so a card that has never
   been hovered (or a touch device that never fires pointermove) still
   renders correctly. */
.lp-cell::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    240px circle at var(--mx, 50%) var(--my, 0%),
    var(--f1-red-glow),
    transparent 70%
  );
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}

.lp-cell:hover::before {
  opacity: 0.25;
}

.lp-cell > * {
  position: relative;
}

.lp-cell-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  margin-bottom: var(--f1-space-4);
  border-radius: var(--f1-radius-sm);
  background: var(--f1-surface-strong);
  color: var(--f1-red);
}

.lp-cell h3 {
  font-size: var(--f1-text-lg);
  font-weight: var(--f1-weight-bold);
  margin: 0 0 var(--f1-space-3);
  line-height: 1.25;
}

.lp-cell p {
  margin: 0;
  color: var(--f1-text-dim);
  font-size: var(--f1-text-md);
  line-height: 1.65;
}

/* ── Split feature rows ────────────────────────────────────────────── */

.lp-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: var(--f1-space-12);
  margin-bottom: var(--f1-space-16);
}

.lp-split--flip .lp-split-text {
  order: 2;
}

.lp-split p {
  color: var(--f1-text-dim);
  font-size: var(--f1-text-base);
  line-height: 1.75;
  margin: 0 0 var(--f1-space-5);
}

.lp-ticks {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: var(--f1-space-3);
}

.lp-ticks li {
  position: relative;
  padding-inline-start: var(--f1-space-6);
  color: var(--f1-text);
  font-size: var(--f1-text-md);
  line-height: 1.55;
}

.lp-ticks li::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 7px;
  width: 8px;
  height: 8px;
  border-radius: var(--f1-radius-full);
  background: var(--f1-red);
}

.lp-split-media {
  box-shadow: var(--f1-shadow-md);
}

/* ── Spec strip ────────────────────────────────────────────────────── */

.lp-specs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--f1-space-4);
}

.lp-spec {
  background: var(--f1-panel);
  border: 1px solid var(--f1-border);
  border-radius: var(--f1-radius-md);
  padding: var(--f1-space-5);
}

.lp-spec dt {
  color: var(--f1-text-dim);
  font-size: var(--f1-text-xs);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: var(--f1-space-2);
}

.lp-spec dd {
  margin: 0;
  font-size: var(--f1-text-base);
  font-weight: var(--f1-weight-semibold);
}

/* ── FAQ ───────────────────────────────────────────────────────────── */

.lp-faq {
  display: grid;
  gap: var(--f1-space-3);
}

.lp-faq-item {
  background: var(--f1-panel);
  border: 1px solid var(--f1-border);
  border-radius: var(--f1-radius-panel);
  overflow: hidden;
}

.lp-faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--f1-space-4);
  min-height: 44px;
  padding: var(--f1-space-5) var(--f1-space-6);
  cursor: pointer;
  font-size: var(--f1-text-base);
  font-weight: var(--f1-weight-semibold);
  list-style: none;
}

.lp-faq-item summary::-webkit-details-marker {
  display: none;
}

.lp-faq-mark {
  display: flex;
  color: var(--f1-text-dim);
  transition: transform 0.22s ease;
  flex: none;
}

.lp-faq-item[open] .lp-faq-mark {
  transform: rotate(180deg);
}

.lp-faq-body {
  padding: 0 var(--f1-space-6) var(--f1-space-5);
}

.lp-faq-body p {
  margin: 0;
  color: var(--f1-text-dim);
  font-size: var(--f1-text-md);
  line-height: 1.7;
}

/* ── Final CTA + footer ────────────────────────────────────────────── */

.lp-cta {
  position: relative;
  padding-block: var(--f1-space-16);
  text-align: center;
  border-top: 1px solid var(--f1-border);
  background:
    radial-gradient(ellipse at 50% 100%, var(--f1-red-glow), transparent 65%),
    var(--f1-surface);
}

.lp-cta-inner .lp-lede {
  margin: 0 auto var(--f1-space-8);
}

.lp-footer {
  border-top: 1px solid var(--f1-border);
  padding-block: var(--f1-space-10);
}

.lp-footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--f1-space-6);
}

.lp-footer-brand {
  display: flex;
  align-items: center;
  gap: var(--f1-space-3);
}

.lp-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--f1-space-5);
  margin-inline-start: auto;
}

.lp-footer-links a {
  color: var(--f1-text-dim);
  text-decoration: none;
  font-size: var(--f1-text-md);
}

.lp-footer-links a:hover {
  color: var(--f1-text);
}

.lp-footer-note {
  width: 100%;
  margin: 0;
  color: var(--f1-text-faint);
  font-size: var(--f1-text-sm);
}

/* ── Lightbox ──────────────────────────────────────────────────────── */

.lp-lightbox {
  position: fixed;
  inset: 0;
  z-index: var(--f1-z-toast);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--f1-space-8);
  background: var(--f1-overlay);
  backdrop-filter: blur(var(--f1-blur));
}

/* display:flex above is one class and [hidden] is one attribute — same
   specificity, author CSS wins the tie, so without this the lightbox would
   sit permanently open over the page. */
.lp-lightbox[hidden] {
  display: none;
}

.lp-lightbox-figure {
  margin: 0;
  max-width: 100%;
  max-height: 100%;
}

.lp-lightbox-figure img {
  display: block;
  max-width: 100%;
  max-height: 80vh;
  width: auto;
  height: auto;
  border-radius: var(--f1-radius-md);
  border: 1px solid var(--f1-border);
}

.lp-lightbox-figure figcaption {
  margin-top: var(--f1-space-4);
  text-align: center;
  color: var(--f1-text-dim);
  font-size: var(--f1-text-md);
}

.lp-lightbox-close {
  position: absolute;
  top: var(--f1-space-6);
  right: var(--f1-space-6);
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--f1-surface);
  border: 1px solid var(--f1-border);
  border-radius: var(--f1-radius-sm);
  color: var(--f1-text);
  cursor: pointer;
}

/* ── Scroll reveal ─────────────────────────────────────────────────── */

[data-reveal] {
  opacity: 0;
  transform: translateY(var(--f1-space-5));
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* Nothing on this page depends on motion to be understood, so honour the
   OS preference by turning all of it off rather than merely shortening it. */
@media (prefers-reduced-motion: reduce) {
  [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .lp-marquee-track,
  .lp-eyebrow-dot,
  .lp-panel {
    animation: none;
  }
}

/* ── Responsive — only the three documented breakpoints ────────────── */

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

  /* Opened by landing.js: the links become a stacked drawer under the bar. */
  .lp-nav-links.is-open {
    display: flex;
    position: absolute;
    inset-inline: 0;
    top: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin: 0;
    padding: var(--f1-space-3) var(--f1-space-6) var(--f1-space-5);
    background: var(--f1-panel);
    backdrop-filter: blur(var(--f1-blur));
    border-bottom: 1px solid var(--f1-border);
    box-shadow: var(--f1-shadow-lg);
  }

  .lp-nav-links.is-open a {
    padding-block: var(--f1-space-4);
    border-bottom: 1px solid var(--f1-border);
  }


  .lp-nav-toggle {
    display: flex;
  }

  .lp-nav-inner {
    position: relative;
  }

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

  .lp-bento {
    grid-template-columns: repeat(2, 1fr);
  }

  .lp-split {
    grid-template-columns: 1fr;
    gap: var(--f1-space-8);
  }

  /* With one column the flip would push the image above its own heading. */
  .lp-split--flip .lp-split-text {
    order: 0;
  }
}

@media (max-width: 768px) {
  .lp-section {
    padding-block: var(--f1-space-12);
  }

  .lp-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .lp-specs {
    grid-template-columns: repeat(2, 1fr);
  }

  .lp-footer-links {
    margin-inline-start: 0;
  }
}

@media (max-width: 480px) {
  .lp-shell {
    padding-inline: var(--f1-space-4);
  }

  .lp-nav-inner {
    padding-inline: var(--f1-space-4);
  }

  .lp-steps,
  .lp-bento,
  .lp-specs {
    grid-template-columns: 1fr;
  }

  .lp-cell--wide {
    grid-column: span 1;
  }

  .lp-hero-actions .btn-f1 {
    width: 100%;
    justify-content: center;
  }

  .lp-frame-url {
    display: none;
  }

  .lp-lightbox {
    padding: var(--f1-space-4);
  }
}
