/* Single-viewport stage for Hostraum — no page scroll */

html.is-stage,
html.is-stage body {
  height: 100%;
  max-height: 100dvh;
  overflow: hidden;
}

html.is-stage {
  scroll-behavior: auto;
  scroll-padding-top: 0;
}

body.is-stage {
  --header-height: 64px;
}

body.is-stage .scroll-progress {
  position: fixed;
  z-index: 80;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: rgba(244, 240, 232, 0.08);
  pointer-events: none;
}

body.is-stage .scroll-progress span {
  display: block;
  width: 100%;
  height: 100%;
  transform-origin: left center;
  transform: scaleX(0);
  background: linear-gradient(90deg, var(--ember), var(--ember-hot));
  /* No transition — scrub updates every frame; easing fought the wheel and felt laggy */
  transition: none;
}

body.is-stage .site-header {
  background: transparent;
  border-bottom: 0;
  backdrop-filter: none;
}

body.is-stage .site-header.is-scrolled {
  background: transparent;
  box-shadow: none;
}

body.is-stage .header-inner {
  min-height: var(--header-height);
  padding-block: 0.85rem;
  width: min(1480px, calc(100% - clamp(2rem, 4vw, 4.5rem)));
}

@media (min-width: 1600px) {
  body.is-stage .header-inner {
    width: min(1680px, calc(100% - 4.5rem));
  }
}

body.is-stage .main-nav,
body.is-stage .nav-toggle,
body.is-stage .mobile-nav,
body.is-stage .hero-scroll,
body.is-stage .hero-media,
body.is-stage .hero-shade {
  display: none !important;
}

body.is-stage .header-actions {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-left: auto;
}

body.is-stage .lang-switch {
  display: inline-flex;
  gap: 0.35rem;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

body.is-stage .lang-switch a {
  color: var(--muted);
  text-decoration: none;
  padding: 0.35rem 0.45rem;
}

body.is-stage .lang-switch a[aria-current="page"] {
  color: var(--text);
}

body.is-stage .header-mail {
  appearance: none;
  background: none;
  border: 0;
  border-bottom: 1px solid rgba(255, 107, 44, 0.45);
  border-radius: 0;
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-size: 0.86rem;
  padding: 0 0 0.1rem;
  text-decoration: none;
}

body.is-stage .header-mail:hover {
  color: var(--ember-hot);
  border-bottom-color: var(--ember-hot);
}

body.is-stage #main {
  position: relative;
  height: 100dvh;
  min-height: 100dvh;
  overflow: hidden;
}

body.is-stage .hero {
  position: relative;
  z-index: 4;
  height: 100dvh;
  min-height: 100dvh;
  display: grid;
  align-items: stretch;
  padding: 0;
  /* Let the fixed WebGL layer (z-index 2) show through — solid ink was covering the board. */
  background: transparent;
  overflow: visible;
}

body.is-stage .hero-inner {
  position: relative;
  z-index: 5;
  display: grid;
  grid-template-columns: minmax(280px, 0.72fr) minmax(0, 1.28fr);
  align-items: center;
  gap: clamp(1.25rem, 3.5vw, 3rem);
  width: min(1480px, calc(100% - clamp(2rem, 4vw, 4.5rem)));
  margin: 0 auto;
  padding:
    calc(var(--header-height) + 1rem)
    0
    clamp(2.2rem, 4.5vh, 3.2rem);
  min-height: 100%;
}

@media (min-width: 1600px) {
  body.is-stage .hero-inner {
    width: min(1680px, calc(100% - 4.5rem));
    grid-template-columns: minmax(300px, 0.68fr) minmax(0, 1.32fr);
  }
}

/* Side-by-side never grows an inner scrollbar. Short windows use the stacked layout below. */
body.is-stage .hero-copy {
  overflow: visible;
  scrollbar-width: none;
}

body.is-stage .hero-copy::-webkit-scrollbar {
  width: 0;
  height: 0;
}

body.is-stage .hero-copy {
  position: relative;
  z-index: 8;
  max-width: 28rem;
  padding: 0.85rem 1.1rem 0.85rem 0.85rem;
  /* Soft left wash so copy stays readable over the board */
  background: linear-gradient(
    105deg,
    rgba(5, 8, 10, 0.92) 0%,
    rgba(5, 8, 10, 0.72) 62%,
    rgba(5, 8, 10, 0.2) 100%
  );
  /* Neutralize travel-fade translateY(0) — any transform traps position:fixed demos */
  transform: none !important;
  filter: none !important;
  opacity: 1 !important;
}

body.is-stage .hero-actions {
  transform: none !important;
  filter: none !important;
  opacity: 1 !important;
}

body.is-stage .hero-eyebrow {
  display: inline-flex;
  margin: 0 0 0.7rem;
  color: var(--ember-hot);
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

body.is-stage .hero h1 {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(2.15rem, 4.6vw, 3.65rem);
  font-weight: 650;
  line-height: 0.96;
  letter-spacing: -0.035em;
  max-width: 12ch;
}

body.is-stage .hero h1 span {
  display: block;
}

body.is-stage .hero-lead {
  margin: 0.9rem 0 0;
  max-width: 36ch;
  color: var(--muted);
  font-size: clamp(0.92rem, 1.35vw, 1.05rem);
  line-height: 1.5;
}

body.is-stage .hero-actions {
  margin-top: 1.15rem;
}

body.is-stage .stage-integ.integ-stage {
  margin-top: 1.35rem;
  padding: 0;
  gap: 0.95rem;
}

body.is-stage .stage-scope__kicker {
  display: block;
  margin: 0 0 0.4rem;
  color: var(--ember-hot);
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

body.is-stage .stage-scope {
  display: grid;
  gap: 0.3rem;
  margin: 0 0 0.35rem;
  padding: 0.75rem 0.9rem;
  border: 1px solid rgba(244, 240, 232, 0.1);
  background: linear-gradient(135deg, rgba(255, 107, 44, 0.07), rgba(12, 17, 22, 0.55));
}

body.is-stage .stage-scope__lead {
  margin: 0;
  color: var(--text);
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.88rem;
  font-weight: 650;
  letter-spacing: -0.015em;
  line-height: 1.4;
}

body.is-stage .stage-scope__os {
  margin: 0;
  color: var(--muted);
  font-size: 0.74rem;
  letter-spacing: 0.02em;
}

body.is-stage .integ-group__note {
  margin: 0.15rem 0 0.45rem;
  color: #9aa7ad;
  font-size: 0.72rem;
  line-height: 1.35;
}

body.is-stage .integ-group__note span {
  color: #c4ced3;
}

body.is-stage .integ-group__more {
  margin: 0.15rem 0 0;
  max-width: 28rem;
  color: #9aa7ad;
  font-size: 0.74rem;
  line-height: 1.4;
}

body.is-stage .stage-integ .integ-stage__eyebrow {
  margin: 0;
  font-size: 0.72rem;
}

body.is-stage .stage-integ .integ-stage__title,
body.is-stage .stage-integ .integ-stage__lead {
  display: none;
}

body.is-stage .stage-integ .integ-group {
  display: grid;
  gap: 0.45rem;
}

body.is-stage .stage-integ .integ-group__label {
  margin: 0;
  color: var(--muted);
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

body.is-stage .stage-integ .integ-tags {
  margin-top: 0;
  gap: 0.45rem;
}

body.is-stage .stage-integ .integ-tag {
  min-height: 36px;
  padding: 0 11px 0 9px;
  font-size: 0.78rem;
  background: rgba(12, 17, 22, 0.88);
}

body.is-stage .stage-integ .integ-methods {
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

body.is-stage .stage-integ .integ-methods li {
  padding: 8px 10px;
}

body.is-stage .stage-integ .integ-card--methods {
  max-height: min(62vh, 520px);
}

/* Stage demos: card only beside the picker; close floats above top-right. */
body.is-stage .stage-integ .integ-example,
body.is-stage.is-integ-open > [data-integ-example] {
  position: fixed;
  z-index: 88;
  inset: auto;
  top: calc(var(--header-height) + 7.5rem);
  left: min(30rem, 38vw);
  right: auto;
  bottom: auto;
  width: min(360px, calc(100vw - 2.5rem));
  max-height: calc(100dvh - 6.5rem);
  margin: 0;
  padding: 0;
  display: block;
  transform: none;
  background: transparent;
  pointer-events: none;
  filter: none;
  box-sizing: border-box;
}

body.is-stage .stage-integ .integ-example[hidden],
body.is-stage.is-integ-open > [data-integ-example][hidden] {
  display: none;
}

body.is-stage .integ-example__sheet,
body.is-stage.is-integ-open > [data-integ-example] .integ-example__sheet {
  position: relative;
  z-index: 1;
  width: 100%;
  max-height: calc(100dvh - 6.5rem);
  display: block;
  border: 0;
  border-radius: 0;
  overflow: visible;
  background: transparent;
  box-shadow: none;
  pointer-events: none;
}

body.is-stage .integ-example__head,
body.is-stage.is-integ-open > [data-integ-example] .integ-example__head,
body.is-stage .integ-example__badge,
body.is-stage.is-integ-open > [data-integ-example] .integ-example__badge,
body.is-stage .integ-example__step,
body.is-stage.is-integ-open > [data-integ-example] .integ-example__step {
  display: none !important;
}

body.is-stage .integ-example__panel,
body.is-stage.is-integ-open > [data-integ-example] .integ-example__panel {
  max-width: none;
  margin: 0;
  padding: 0;
  overflow: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  background: transparent;
  pointer-events: auto;
  max-height: calc(100dvh - 6.5rem);
  border-radius: 12px;
}

body.is-stage .stage-integ .integ-card,
body.is-stage.is-integ-open > [data-integ-example] .integ-card {
  max-height: none;
  overflow: visible;
  border-radius: 12px;
  border-color: rgba(244, 240, 232, 0.16);
  background:
    linear-gradient(180deg, rgba(255, 107, 44, 0.05), transparent 42%),
    #0c1116;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.45);
}

body.is-stage .stage-integ .integ-card.is-focus,
body.is-stage.is-integ-open > [data-integ-example] .integ-card.is-focus {
  border-color: rgba(255, 107, 44, 0.42);
}

body.is-stage .integ-chips--billing {
  justify-content: flex-start;
  margin: 0 0 0.85rem;
}

body.is-stage .integ-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  justify-content: center;
  margin: 0.35rem 0 0;
  padding: 0;
  list-style: none;
}

body.is-stage .integ-chips li,
body.is-stage .integ-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.28rem 0.55rem;
  border: 1px solid rgba(244, 240, 232, 0.12);
  border-radius: 999px;
  background: rgba(244, 240, 232, 0.04);
  color: #b7c2c7;
  font: 650 10px/1 "Space Grotesk", sans-serif;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

body.is-stage .integ-chips--dark {
  justify-content: flex-start;
}

body.is-stage .integ-pill--ok {
  border-color: rgba(72, 187, 120, 0.4);
  background: rgba(72, 187, 120, 0.12);
  color: #8fefb4;
}

body.is-stage .integ-2fa {
  display: grid;
  gap: 0.55rem;
  padding: 0.75rem 0.8rem;
  border: 1px solid rgba(255, 107, 44, 0.28);
  border-radius: 8px;
  background: rgba(255, 107, 44, 0.06);
}

body.is-stage .integ-2fa__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

body.is-stage .integ-2fa__head strong {
  color: #f4f0e8;
  font: 650 12px/1 "Space Grotesk", sans-serif;
}

body.is-stage .integ-2fa__hint {
  margin: 0;
  color: #8b969c;
  font: 450 11px/1.3 "Manrope", sans-serif;
}

body.is-stage .integ-otp {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0.3rem;
}

body.is-stage .integ-otp i {
  display: grid;
  place-items: center;
  min-height: 34px;
  border: 1px solid rgba(244, 240, 232, 0.16);
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.35);
  color: #f4f0e8;
  font: 700 14px/1 "Space Grotesk", sans-serif;
  font-style: normal;
}

body.is-stage .integ-admin__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

body.is-stage .integ-admin__user {
  margin: 0.2rem 0 0;
  color: #9aa7ad;
  font: 500 11px/1.3 "Manrope", sans-serif;
}

body.is-stage .integ-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.4rem;
}

body.is-stage .integ-stats div {
  display: grid;
  gap: 0.15rem;
  padding: 0.55rem 0.45rem;
  border: 1px solid rgba(244, 240, 232, 0.1);
  border-radius: 8px;
  background: rgba(244, 240, 232, 0.03);
  text-align: center;
}

body.is-stage .integ-stats b {
  color: #f4f0e8;
  font: 700 14px/1 "Space Grotesk", sans-serif;
}

body.is-stage .integ-stats span {
  color: #7f8b91;
  font: 500 10px/1 "Manrope", sans-serif;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

body.is-stage .integ-order {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.7rem 0.8rem;
  border: 1px solid rgba(244, 240, 232, 0.1);
  border-radius: 8px;
  background: rgba(244, 240, 232, 0.03);
}

body.is-stage .integ-order span {
  color: #9aa7ad;
  font: 500 12px/1.3 "Manrope", sans-serif;
}

body.is-stage .integ-order strong {
  color: #f7f4ed;
  font: 650 22px/1 "Space Grotesk", sans-serif;
  letter-spacing: -0.03em;
}

body.is-stage .integ-order small {
  color: #8b969c;
  font-size: 0.55em;
  font-weight: 500;
}

body.is-stage .integ-order--light {
  background: #fff;
  border-color: #e2e8ee;
}

body.is-stage .integ-order--light span {
  color: #5b6b7a;
}

body.is-stage .integ-order--light strong {
  color: #111;
}

body.is-stage .integ-cardface {
  position: relative;
  display: grid;
  gap: 1.1rem;
  padding: 1rem 1.05rem 0.95rem;
  border-radius: 12px;
  background:
    radial-gradient(circle at 88% 18%, rgba(255, 107, 44, 0.35), transparent 42%),
    linear-gradient(135deg, #1a2229, #0d1216 58%, #151b21);
  border: 1px solid rgba(244, 240, 232, 0.12);
  overflow: hidden;
}

body.is-stage .integ-cardface span {
  color: rgba(244, 240, 232, 0.72);
  font: 700 11px/1 "Space Grotesk", sans-serif;
  letter-spacing: 0.14em;
}

body.is-stage .integ-cardface b {
  color: #f4f0e8;
  font: 600 1.05rem/1 "Space Grotesk", sans-serif;
  letter-spacing: 0.12em;
}

body.is-stage .integ-cardface em {
  justify-self: end;
  color: #9aa7ad;
  font: 500 12px/1 "Manrope", sans-serif;
  font-style: normal;
}

body.is-stage .integ-card--login .integ-btn--login,
body.is-stage .integ-card--admin .integ-btn--login {
  background: var(--ember);
  color: #120b08;
  border-radius: 6px;
}

body.is-stage .integ-card--google .integ-chips li {
  border-color: #e4e8ec;
  background: #f7f8fa;
  color: #5f6368;
}

body.is-stage .hero-stage {
  display: block;
  position: relative;
  min-height: min(72dvh, 760px);
  align-self: stretch;
  /* Hit target must receive drag — do not null the stage itself. */
  pointer-events: auto;
  z-index: 6;
}

body.is-stage .stage-hw-claim {
  position: absolute;
  left: 50%;
  /* Sit just under the board, not down by the footer */
  bottom: clamp(2.4rem, 6.5vh, 3.6rem);
  z-index: 7;
  margin: 0;
  width: max-content;
  max-width: calc(100% - 1rem);
  color: var(--ember-hot);
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(1rem, 1.7vw, 1.35rem);
  font-weight: 650;
  letter-spacing: -0.02em;
  text-align: center;
  transform: translateX(-50%);
  pointer-events: none;
}

body.is-stage .hero-stage .core-hit--hero {
  pointer-events: auto;
  touch-action: none;
  cursor: grab;
}

body.is-stage .hero-stage .core-hit--hero.is-dragging {
  cursor: grabbing;
}

body.is-stage .core-hit--hero {
  position: absolute;
  /* Leave a tight band above the caption */
  top: 0.35rem;
  right: 0;
  bottom: clamp(3.6rem, 8.5vh, 4.8rem);
  left: 0;
  z-index: 6;
}

body.is-stage .core-story {
  position: absolute;
  inset: 0;
  height: 100dvh;
  min-height: 100dvh;
  pointer-events: none;
  opacity: 0;
  z-index: 1;
}

body.is-stage .core-story__sticky,
body.is-stage .core-story__layout {
  height: 100%;
  min-height: 100%;
  display: block;
  padding: 0;
  margin: 0;
  width: 100%;
}

/* Dock target must match the visible hero stage or the WebGL board collapses. */
body.is-stage .core-inspect,
body.is-stage .core-hit--story {
  position: absolute;
  top: calc(var(--header-height) + 1.25rem);
  right: max(1.25rem, calc((100vw - min(1180px, calc(100% - 2.5rem))) / 2));
  width: min(48vw, 640px);
  height: min(68dvh, 720px);
  min-height: min(68dvh, 720px);
}

body.is-stage .core-viewport {
  z-index: 2;
  pointer-events: none;
}

body.is-stage .core-viewport.is-past-hero,
body.is-stage .core-viewport.is-past-story {
  opacity: 1;
  visibility: visible;
  /* Keep canvas non-interactive — drag goes through .core-hit--hero */
  pointer-events: none;
}

body.is-stage .core-callouts {
  z-index: 5;
  pointer-events: none;
}

body.is-stage .core-callout {
  max-width: min(12.5rem, 28vw);
}

body.is-stage .site-footer {
  position: fixed;
  z-index: 20;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0.7rem 0 0.85rem;
  background: linear-gradient(180deg, transparent, rgba(5, 8, 10, 0.72) 45%);
  border-top: 0;
  pointer-events: none;
}

body.is-stage .site-footer .footer-inner {
  pointer-events: auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem 1.2rem;
  width: min(1180px, calc(100% - 2.5rem));
  margin: 0 auto;
  font-size: 0.75rem;
  color: var(--muted);
}

body.is-stage .site-footer .footer-brand,
body.is-stage .site-footer p {
  display: none;
}

body.is-stage .site-footer nav {
  display: inline-flex;
  gap: 0.9rem;
}

body.is-stage .site-footer a {
  color: var(--muted);
  text-decoration: none;
}

body.is-stage .site-footer a:hover {
  color: var(--text);
}

body.is-stage .assemble-note {
  display: none !important;
}

body.is-stage .integ-example__close,
body.is-stage.is-integ-open > [data-integ-example] .integ-example__close {
  position: absolute;
  top: -2.65rem;
  right: 0;
  z-index: 2;
  appearance: none;
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  margin: 0;
  padding: 0;
  border: 1px solid rgba(244, 240, 232, 0.16);
  border-radius: 10px;
  background: rgba(12, 17, 22, 0.92);
  color: #c4ced3;
  cursor: pointer;
  line-height: 0;
  flex-shrink: 0;
  pointer-events: auto;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  transition: background 140ms ease, border-color 140ms ease, color 140ms ease;
}

body.is-stage .contact-sheet__close {
  appearance: none;
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin: 0;
  padding: 0;
  border: 1px solid rgba(244, 240, 232, 0.12);
  border-radius: 10px;
  background: rgba(244, 240, 232, 0.04);
  color: #c4ced3;
  cursor: pointer;
  line-height: 0;
  flex-shrink: 0;
  transition: background 140ms ease, border-color 140ms ease, color 140ms ease;
}

body.is-stage .integ-example__close:hover,
body.is-stage.is-integ-open > [data-integ-example] .integ-example__close:hover,
body.is-stage .contact-sheet__close:hover {
  color: var(--text);
  border-color: rgba(244, 240, 232, 0.28);
  background: rgba(244, 240, 232, 0.08);
}

body.is-stage .integ-example__close:focus-visible,
body.is-stage.is-integ-open > [data-integ-example] .integ-example__close:focus-visible,
body.is-stage .contact-sheet__close:focus-visible {
  outline: 2px solid rgba(255, 107, 44, 0.55);
  outline-offset: 2px;
}

body.is-stage .integ-field {
  display: grid;
  gap: 0.3rem;
}

body.is-stage .integ-field input {
  width: 100%;
  border: 0;
  background: transparent;
  color: inherit;
  font: 600 13px/1.2 "Manrope", sans-serif;
  outline: none;
  padding: 0;
}

body.is-stage .integ-card--login .integ-field,
body.is-stage .integ-card--google .integ-field {
  cursor: text;
}

body.is-stage .integ-otp input {
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 34px;
  border: 1px solid rgba(244, 240, 232, 0.16);
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.35);
  color: #f4f0e8;
  font: 700 14px/1 "Space Grotesk", sans-serif;
  text-align: center;
  outline: none;
}

body.is-stage .integ-otp input:focus {
  border-color: rgba(255, 107, 44, 0.65);
  box-shadow: 0 0 0 2px rgba(255, 107, 44, 0.18);
}

body.is-stage .integ-google {
  pointer-events: auto;
  cursor: pointer;
}

body.is-stage .integ-google.is-done {
  border-color: rgba(72, 187, 120, 0.45);
  background: rgba(72, 187, 120, 0.12);
  color: #8fefb4;
}

body.is-stage .integ-btn {
  appearance: none;
  border: 0;
  width: 100%;
  cursor: pointer;
}

body.is-stage .integ-btn:disabled {
  opacity: 0.85;
  cursor: default;
}

body.is-stage .integ-btn--ghost {
  background: rgba(244, 240, 232, 0.06);
  color: var(--text);
  border: 1px solid rgba(244, 240, 232, 0.12);
}

body.is-stage .integ-success {
  margin: 0.2rem 0 0.55rem;
  padding: 0.85rem 0.9rem;
  border: 1px solid rgba(72, 187, 120, 0.35);
  border-radius: 8px;
  background: rgba(72, 187, 120, 0.1);
  color: #8fefb4;
  font: 650 13px/1.3 "Space Grotesk", sans-serif;
  text-align: center;
}

body.is-stage .integ-card.is-paid .integ-btn--stripe,
body.is-stage .integ-card.is-paid .integ-btn--paypal {
  background: #2f9e5d;
  color: #fff;
}

body.is-stage [data-demo-tiles] li {
  cursor: pointer;
}

body.is-stage [data-demo-tiles] li.is-on {
  border-color: rgba(255, 107, 44, 0.55);
  background: rgba(255, 107, 44, 0.12);
}

body.is-stage .hero-eyebrow,
body.is-stage .hero-lead {
  display: none;
}

@media (max-width: 1100px), (max-height: 820px) {
  /* Narrow or short windows: board on top, copy below, one page scroll. */
  html.is-stage,
  html.is-stage body {
    height: auto;
    max-height: none;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  body.is-stage {
    --header-height: 56px;
    --stage-board-h: min(42dvh, 340px);
    --stage-footer-h: 3.1rem;
  }

  body.is-stage #main,
  body.is-stage .hero {
    height: auto;
    max-height: none;
    min-height: 0;
    overflow: visible;
  }

  body.is-stage .hero-inner {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
    align-content: start;
    align-items: stretch;
    gap: 0.75rem;
    padding:
      calc(var(--header-height) + 0.35rem)
      0
      calc(var(--stage-footer-h) + 1.5rem + env(safe-area-inset-bottom, 0px));
    width: min(100% - 1.35rem, 1180px);
    height: auto;
    min-height: 0;
    max-height: none;
    box-sizing: border-box;
  }

  body.is-stage .hero-stage {
    display: block;
    position: relative;
    inset: auto;
    grid-row: 1;
    width: 100%;
    min-height: var(--stage-board-h);
    height: var(--stage-board-h);
    margin: 0;
    order: 0;
    z-index: 3;
  }

  body.is-stage .stage-hw-claim {
    left: 50%;
    font-size: 0.9rem;
    bottom: 0.55rem;
  }

  body.is-stage .core-hit--hero {
    top: 0.2rem;
    bottom: 2.1rem;
    left: 0;
    right: 0;
  }

  body.is-stage .hero-copy {
    position: relative;
    z-index: 8;
    grid-row: 2;
    max-width: none;
    width: 100%;
    min-height: 0;
    height: auto;
    max-height: none;
    overflow: visible;
    touch-action: auto;
    padding: 0.1rem 0.05rem 0.5rem;
    background: linear-gradient(
      180deg,
      rgba(5, 8, 10, 0.2) 0%,
      rgba(5, 8, 10, 0.92) 12%,
      rgba(5, 8, 10, 0.98) 32%
    );
  }

  body.is-stage .hero h1 {
    max-width: 11ch;
    font-size: clamp(1.85rem, 8.6vw, 2.55rem);
    line-height: 0.98;
  }

  body.is-stage .hero-actions {
    margin-top: 0.75rem;
  }

  body.is-stage .hero-actions .button {
    width: 100%;
    min-height: 46px;
    justify-content: center;
  }

  body.is-stage .stage-integ.integ-stage {
    margin-top: 0.85rem;
    gap: 0.7rem;
  }

  body.is-stage .stage-integ .integ-group__label {
    margin-bottom: 0.35rem;
  }

  body.is-stage .stage-integ .integ-tags {
    gap: 0.4rem;
  }

  body.is-stage .stage-integ .integ-tag {
    min-height: 40px;
    padding: 0.45rem 0.7rem;
    font-size: 0.76rem;
  }

  /* Mobile: bottom sheet preview with room for the floating close */
  body.is-stage .stage-integ .integ-example,
  body.is-stage.is-integ-open > [data-integ-example] {
    top: auto;
    right: max(0.75rem, env(safe-area-inset-right, 0px));
    left: max(0.75rem, env(safe-area-inset-left, 0px));
    bottom: calc(var(--stage-footer-h, 3.1rem) + 0.35rem + env(safe-area-inset-bottom, 0px));
    width: auto;
    max-height: min(58dvh, 480px);
    padding-top: 2.7rem;
    box-sizing: border-box;
  }

  body.is-stage .integ-example__sheet,
  body.is-stage.is-integ-open > [data-integ-example] .integ-example__sheet {
    width: 100%;
    max-width: 100%;
    max-height: min(54dvh, 450px);
  }

  body.is-stage .integ-example__panel,
  body.is-stage.is-integ-open > [data-integ-example] .integ-example__panel {
    max-height: min(50dvh, 420px);
  }

  body.is-stage.is-integ-open .hero-copy {
    padding-bottom: min(48dvh, 380px);
  }

  body.is-stage.is-integ-open .core-callouts {
    opacity: 0.35;
    pointer-events: none;
  }

  body.is-stage .hero-stage .core-hit--hero {
    touch-action: none;
  }

  body.is-stage .stage-integ .integ-tags {
    display: flex;
    flex-wrap: wrap;
  }

  body.is-stage .stage-integ .integ-tag {
    flex: 1 1 auto;
    justify-content: center;
    min-width: calc(33.33% - 0.4rem);
  }

  body.is-stage .stage-scope {
    padding: 0.65rem 0.75rem;
  }

  body.is-stage .stage-scope__lead {
    font-size: 0.8rem;
  }

  body.is-stage .integ-example__close,
  body.is-stage.is-integ-open > [data-integ-example] .integ-example__close,
  body.is-stage .contact-sheet__close {
    width: 38px;
    height: 38px;
  }

  body.is-stage .integ-example__close,
  body.is-stage.is-integ-open > [data-integ-example] .integ-example__close {
    top: 0;
    right: 0;
  }

  body.is-stage .site-header .header-inner {
    width: min(100% - 1.35rem, 1180px);
    padding-block: 0.65rem;
  }

  body.is-stage .integ-group__note {
    font-size: 0.68rem;
  }

  body.is-stage .header-mail {
    display: none;
  }

  body.is-stage .site-footer {
    padding: 0.35rem 0 calc(0.45rem + env(safe-area-inset-bottom, 0px));
  }

  body.is-stage .site-footer .footer-inner {
    width: min(100% - 1.35rem, 1180px);
    font-size: 0.68rem;
    gap: 0.35rem 0.85rem;
  }

  /* Callouts stay on — compact layout in JS frames them to the board band */
  body.is-stage .core-callout {
    max-width: min(9.5rem, 42vw);
  }

  body.is-stage .core-callout strong {
    font-size: 8px;
  }

  body.is-stage .core-callout span {
    font-size: 11px;
  }

  /* Kill legacy mobile scroll-fade from the old long page */
  body.is-stage.is-hero-faded .hero-copy,
  body.is-stage.is-hero-faded .hero-actions {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
    pointer-events: auto !important;
  }

  body.is-stage .core-viewport {
    clip-path: none !important;
    -webkit-clip-path: none !important;
  }

}

@media (max-width: 560px) {
  body.is-stage {
    --stage-board-h: min(36dvh, 280px);
  }

  body.is-stage .hero h1 {
    font-size: clamp(1.75rem, 9vw, 2.35rem);
  }

  body.is-stage .stage-integ .integ-group__label {
    font-size: 0.68rem;
  }

  body.is-stage .stage-integ .integ-tag {
    min-height: 38px;
    font-size: 0.72rem;
    padding: 0.4rem 0.58rem;
    min-width: calc(50% - 0.4rem);
  }

  body.is-stage .stage-integ .integ-example,
  body.is-stage.is-integ-open > [data-integ-example] {
    max-height: min(54dvh, 440px);
    bottom: calc(var(--stage-footer-h, 3.1rem) + 0.2rem + env(safe-area-inset-bottom, 0px));
  }

  body.is-stage.is-integ-open .hero-copy {
    padding-bottom: min(58dvh, 460px);
  }

  body.is-stage .contact-sheet__panel {
    width: 100%;
    max-width: none;
  }
}

body.is-stage .contact-sheet {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 1.25rem;
}

body.is-stage .contact-sheet[hidden] {
  display: none;
}

body.is-stage .contact-sheet__backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(5, 8, 10, 0.72);
  cursor: pointer;
}

body.is-stage .contact-sheet__panel {
  position: relative;
  z-index: 1;
  width: min(420px, 100%);
  padding: 1.85rem 1.55rem 1.45rem;
  border: 1px solid rgba(244, 240, 232, 0.12);
  border-radius: 14px;
  background: #0c1116;
  box-shadow: 0 28px 64px rgba(0, 0, 0, 0.55);
  text-align: center;
}

body.is-stage .contact-sheet__close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
}

body.is-stage .contact-sheet__eyebrow {
  margin: 0 0 0.55rem;
  color: var(--ember-hot);
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

body.is-stage .contact-sheet__panel h2 {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(1.55rem, 3vw, 2rem);
  font-weight: 650;
  letter-spacing: -0.03em;
}

body.is-stage .contact-sheet__lead {
  margin: 0.7rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.45;
}

body.is-stage .contact-sheet__mailwrap {
  display: grid;
  justify-items: center;
  gap: 0.45rem;
  margin-top: 1.45rem;
}

body.is-stage .contact-sheet__mail {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0.55rem 0.85rem;
  border: 1px solid rgba(255, 107, 44, 0.35);
  border-radius: 10px;
  background: rgba(255, 107, 44, 0.06);
  color: var(--text);
  cursor: pointer;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(0.98rem, 2.6vw, 1.08rem);
  font-weight: 650;
  letter-spacing: -0.01em;
  text-decoration: none;
  transition: background 140ms ease, border-color 140ms ease, color 140ms ease, transform 140ms ease;
}

body.is-stage .contact-sheet__mail:hover {
  color: var(--ember-hot);
  border-color: rgba(255, 107, 44, 0.65);
  background: rgba(255, 107, 44, 0.12);
}

body.is-stage .contact-sheet__mail:active {
  transform: scale(0.985);
}

body.is-stage .contact-sheet__mail.is-copied {
  border-color: rgba(72, 187, 120, 0.55);
  background: rgba(72, 187, 120, 0.12);
  color: #b7f0cb;
}

body.is-stage .contact-sheet__copied {
  margin: 0;
  min-height: 1.1em;
  color: #5ed98a;
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 180ms ease, transform 180ms ease;
}

body.is-stage .contact-sheet__copied.is-on {
  opacity: 1;
  transform: translateY(0);
}

body.is-stage .contact-sheet__copied.is-fail {
  color: #f0b35a;
}


body.is-contact-open {
  overflow: hidden;
}

@media (max-width: 920px) {
  body.is-stage .contact-sheet {
    place-items: end center;
    padding: 0;
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }

  body.is-stage .contact-sheet__panel {
    width: 100%;
    max-width: 100%;
    border-radius: 14px 14px 0 0;
    padding: 1.45rem 1.25rem calc(1.25rem + env(safe-area-inset-bottom, 0px));
  }
}

@media (prefers-reduced-motion: reduce) {
  body.is-stage .scroll-progress span {
    transition: none;
  }
}
