/* Instrument landing — canonical tokens only. Replaces the legacy dark
   landing stylesheet wholesale (orbs/particles/shimmer removed by design). */

.landing {
  background: var(--color-base);
  color: var(--color-ink);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  min-height: 100vh;
}

/* Header — sticky; solid base by default, glass only where fully supported
   (spec §3.1, §7: progressive enhancement, never a transparent unblurred bar). */
.landing-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px clamp(20px, 5vw, 48px);
  background: var(--color-base);
  border-bottom: 1px solid color-mix(in srgb, var(--color-ink) 8%, transparent);
}
@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) and (background: color-mix(in srgb, red 50%, transparent)) {
  .landing-header {
    background: var(--color-glass);
    -webkit-backdrop-filter: blur(12px) saturate(1.4);
    backdrop-filter: blur(12px) saturate(1.4);
  }
}
.landing-wordmark {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-ink);
}
.landing-header nav { display: flex; align-items: center; gap: 18px; }
/* Text painted directly on glass is ink (spec §3.1 — secondary ink is 3.82:1
   on the glass composite over stage; button fills keep their own colors). */
.landing-header .landing-nav-link { font-size: 13px; color: var(--color-ink); text-decoration: none; }
.landing-header .landing-nav-link:hover { text-decoration: underline; }
/* Anchored sections land below the sticky bar (spec §3.2). */
.landing section[id] { scroll-margin-top: 72px; }
.landing-footer .landing-nav-link { font-size: 13px; color: var(--color-ink-secondary); text-decoration: none; }
.landing-footer .landing-nav-link:hover { color: var(--color-ink); }

/* Hero */
/* Bottom padding keeps the fine print off the stage edge (wow-gate fix). */
.landing-hero { padding: clamp(48px, 8vw, 88px) clamp(20px, 5vw, 48px) clamp(48px, 7vw, 72px); text-align: center; }
.landing-eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gs-text-secondary);
  margin-bottom: 16px;
}
.landing-hero h1 {
  font-size: clamp(44px, 6vw, 76px);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.04;
  max-width: 820px;
  margin: 0 auto;
}
.landing-sub {
  font-size: 17px;
  line-height: 1.55;
  color: var(--gs-text-secondary);
  max-width: 640px;
  margin: 20px auto 0;
}
.landing-cta-row { display: flex; gap: 12px; justify-content: center; margin-top: 32px; flex-wrap: wrap; }
.landing-fine { font-size: 12px; color: var(--gs-text-tertiary); margin-top: 14px; }

/* Product frame */
.landing-product {
  max-width: 960px;
  margin: 48px auto 0;
  border: 1px solid var(--gs-border);
  border-bottom: none;
  border-radius: 12px 12px 0 0;
  box-shadow: var(--shadow-e3);
  overflow: hidden;
}
.landing-product__chrome {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  background: var(--gs-bg-card);
  border-bottom: 1px solid var(--gs-border);
}
.landing-product__chrome span {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--gs-bg-card-hover);
}
.landing-product__chrome em {
  font-style: normal;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gs-text-tertiary);
  margin-left: 12px;
}
.landing-product__shot { display: block; width: 100%; height: auto; }

/* Spec strip */
.landing-spec-strip {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  background: var(--gs-bg-card);
  border-top: 1px solid var(--gs-border);
  border-bottom: 1px solid var(--gs-border);
}
.landing-spec-strip > div {
  padding: 18px 28px;
  text-align: center;
  border-right: 1px solid var(--gs-border);
}
.landing-spec-strip > div:last-child { border-right: none; }
.landing-spec-strip strong {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.landing-spec-strip span { display: block; font-size: 12px; color: var(--gs-text-secondary); margin-top: 2px; }

/* Stage — the dark world (spec §3). Scope class so light-theme descendant
   rules cannot bleed through. Only home/index uses it. */
.landing-stage {
  background: var(--color-stage);
  color: var(--color-stage-ink);
  padding: clamp(40px, 6vw, 64px) clamp(20px, 5vw, 48px) 0;
}
.landing-section.landing-stage { padding: clamp(48px, 7vw, 72px) clamp(20px, 5vw, 48px); border-top: none; }

/* Product frame on stage: hairline ring + panel chrome instead of shadow
   (spec §2 — shadows are invisible on stage). */
.landing-stage .landing-product {
  margin: 0 auto; /* stage padding provides the space; the 48px legacy top margin doubled it */
  border: 1px solid var(--color-stage-border);
  border-bottom: none;
  box-shadow: none;
}
.landing-stage .landing-product__chrome {
  background: var(--color-stage-panel);
  border-bottom: 1px solid var(--color-stage-border);
}
.landing-stage .landing-product__chrome span { background: var(--color-stage-border); }
.landing-stage .landing-product__chrome em { color: var(--color-stage-ink-secondary); }

/* Spec strip as instrument cells on stage (spec §3.1). */
.landing-stage .landing-spec-strip {
  background: var(--color-stage);
  border-top: 1px solid var(--color-stage-border);
  border-bottom: none;
  margin: 0 calc(-1 * clamp(20px, 5vw, 48px));
}
.landing-stage .landing-spec-strip > div { border-right: 1px solid var(--color-stage-border); }
.landing-stage .landing-spec-strip > div:last-child { border-right: none; }
.landing-stage .landing-spec-strip strong { color: var(--color-stage-ink); }
.landing-stage .landing-spec-strip span { color: var(--color-stage-ink-secondary); }

/* Descendant text — light-theme rules bleed 3.11:1 otherwise (spec §3.2). */
.landing-section.landing-stage > p { color: var(--color-stage-ink-secondary); }
.landing-section.landing-stage h2 { color: var(--color-stage-ink); }

/* Inverted CTA: the black button's dark-world mirror, all four states
   specified here because the shared hover would go near-black-on-black. */
.landing-stage .gs-btn-primary {
  background: var(--color-stage-ink);
  color: var(--color-stage);
}
.landing-stage .gs-btn-primary:hover:not(:disabled) {
  background: color-mix(in srgb, var(--color-stage-ink) 88%, var(--color-stage));
  color: var(--color-stage);
}
.landing-stage .gs-btn-primary:active:not(:disabled) { transform: scale(0.985); }
:is(.landing-stage, .landing-footer--on-stage) :is(a, button):focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

/* Footer on stage. */
.landing-footer.landing-footer--on-stage {
  background: var(--color-stage);
  border-top: 1px solid var(--color-stage-border);
  color: var(--color-stage-ink-secondary);
}
.landing-footer.landing-footer--on-stage .landing-nav-link { color: var(--color-stage-ink); }
.landing-footer.landing-footer--on-stage .landing-nav-link:hover { color: var(--color-stage-ink-secondary); }

/* Seams: no light hairline against the stage. */
.landing-stage + .landing-section { border-top: none; }

/* Print: browsers strip backgrounds — stage text would vanish (spec §7). */
@media print {
  .landing-stage,
  .landing-section.landing-stage,
  .landing-footer.landing-footer--on-stage {
    background: var(--color-base);
    color: var(--color-ink);
  }
  .landing-section.landing-stage h2,
  .landing-section.landing-stage > p,
  .landing-stage .landing-spec-strip strong,
  .landing-stage .landing-spec-strip span,
  .landing-stage .landing-product__chrome em,
  .landing-footer.landing-footer--on-stage .landing-nav-link { color: var(--color-ink); }
  .landing-header {
    position: static;
    background: var(--color-base);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}

/* Sections */
.landing-section { padding: clamp(48px, 7vw, 72px) clamp(20px, 5vw, 48px); text-align: center; border-top: 1px solid var(--gs-border); }
.landing-kicker { /* mirrors .landing-eyebrow but accent */ font-size: 11px; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; color: var(--gs-accent-blue); }
.landing-section h2 { font-size: clamp(26px, 3.2vw, 34px); font-weight: 600; letter-spacing: -0.025em; margin-top: 10px; }
.landing-section > p { font-size: 15px; color: var(--gs-text-secondary); max-width: 560px; margin: 12px auto 0; }

/* Step + feature cards */
.landing-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; max-width: 1080px; margin: 40px auto 0; text-align: left; list-style: none; padding: 0; }
.landing-features { /* mirrors .landing-steps */ display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; max-width: 960px; margin: 40px auto 0; text-align: left; }
.landing-step, .landing-feature {
  background: var(--gs-bg-elevated);
  border: 1px solid var(--gs-border);
  border-radius: var(--gs-radius-lg);
  padding: 22px;
  box-shadow: var(--shadow-e1);
  transition: border-color var(--t-fast, 150ms) linear;
}
.landing-step:hover, .landing-feature:hover { border-color: var(--gs-border-hover); }
.landing-step__number {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--gs-accent-blue);
  font-variant-numeric: tabular-nums;
}
.landing-step h3, .landing-feature h3 { font-size: 16px; font-weight: 600; margin-top: 8px; }
.landing-step p, .landing-feature p { font-size: 13px; line-height: 1.5; color: var(--gs-text-secondary); margin-top: 6px; }
.landing-feature__icon { color: var(--gs-accent-blue); }

/* Footer */
.landing-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding: 24px clamp(20px, 5vw, 48px);
  border-top: 1px solid var(--gs-border);
  font-size: 13px;
  color: var(--gs-text-secondary);
}

/* Motion — delays are classes, never inline styles (CSP: no unsafe-inline).
   Animation-delay step classes (.reveal-d0..d4, .reveal--late) live in
   instrument-theme.css (token-exempt) since their intended values are
   off the approved duration scale. */
.reveal {
  animation: landing-rise 600ms var(--ease-out-expo, cubic-bezier(0.16, 1, 0.3, 1)) both;
}
[data-reveal] { opacity: 0; transform: translateY(14px); }
[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 600ms var(--ease-out-expo, cubic-bezier(0.16, 1, 0.3, 1)),
              transform 600ms var(--ease-out-expo, cubic-bezier(0.16, 1, 0.3, 1));
}
@keyframes landing-rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Responsive */
@media (max-width: 900px) { .landing-steps { grid-template-columns: repeat(2, 1fr); } .landing-features { grid-template-columns: 1fr; } }
@media (max-width: 720px) {
  .landing-steps { grid-template-columns: 1fr; }
  .landing-header { flex-wrap: wrap; row-gap: 10px; }
  .landing-header nav { gap: 10px; }
  .landing-header .landing-nav-link { display: none; }
  .landing-spec-strip > div { flex-basis: 50%; border-right: none; border-bottom: 1px solid var(--gs-border); }
  .landing-stage .landing-spec-strip > div { border-right: none; border-bottom: 1px solid var(--color-stage-border); }
}

@media (prefers-reduced-motion: reduce) {
  .reveal { animation-duration: 1ms; animation-delay: 0ms; }
  [data-reveal] { opacity: 1; transform: none; transition: none; }
  .landing-step, .landing-feature { transition-duration: 1ms; }
}
