/* =========================================================================
   Stalldo landing — marketing layer (loads AFTER styles.css + demo-kit css).
   Consumes styles.css tokens exclusively. New section grammar for the rebuilt
   landing experience: story hero · chapters · wound vignettes · demo stage
   (the climax) · momentum bar · plaque · moments · big claims · doors.
   ========================================================================= */

/* ───────────────────────── story hero ───────────────────────── */
.hero--story { min-height: min(92vh, 860px); display: grid; align-items: center; padding-bottom: 88px; }
.hero--story .hero__inner { width: 100%; }
.scene { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.scene canvas { display: block; }
.scene--hero { opacity: .8; }
.hero--story .hero__inner { position: relative; z-index: 1; }
.hero--story .hero__copy { position: relative; }
/* soft veil behind the copy so the scene never fights the words */
.hero--story .hero__copy::before {
  content: ""; position: absolute; inset: -40px -48px -40px -60px; z-index: -1; border-radius: var(--r-xl);
  background: radial-gradient(ellipse 90% 90% at 40% 45%, color-mix(in srgb, var(--bg) 88%, transparent) 30%, transparent 75%);
}
.hero__headline-accent { color: var(--primary); display: block; }
.hero__proof-chip {
  display: inline-flex; align-items: center; gap: 10px; margin-top: 26px;
  border: 1px solid var(--border); background: color-mix(in srgb, var(--surface) 82%, transparent);
  border-radius: var(--r-full); padding: 9px 16px; font-size: 13.5px; font-weight: 600; color: var(--text-secondary);
  backdrop-filter: blur(6px);
}
.hero__proof-chip b { color: var(--primary); font-weight: 800; }
.hero__scene-caption {
  position: absolute; right: clamp(16px, 5vw, 48px); bottom: 18px; z-index: 1;
  font-size: 12px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase;
  color: color-mix(in srgb, var(--text-secondary) 75%, transparent);
}
/* single-column story hero: the scene owns the right half of the viewport */
.hero--story .hero__inner--single { display: block; max-width: var(--maxw); }
.hero--story .hero__inner--single .hero__copy { max-width: 600px; }
.scene--hero-right { left: 32%; }
@media (max-width: 899px) {
  .hero--story { min-height: 0; }
  .scene--hero { opacity: .38; }
  .scene--hero-right { left: 0; }
  .hero--story .hero__copy::before { inset: -24px -20px; }
  .hero__scene-caption { display: none; }
}

/* persona doors (home hero) */
.persona-doors { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.door {
  display: inline-flex; align-items: center; gap: 8px; padding: 9px 15px;
  border-radius: var(--r-full); border: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface) 88%, transparent); color: var(--text);
  font-size: 13.5px; font-weight: 700; cursor: pointer; transition: all .2s var(--ease); text-decoration: none;
}
.door:hover { border-color: var(--primary); transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.door__ic { font-size: 15px; }

/* ───────────────────────── chapters (act headers) ───────────────────────── */
.chapter { display: flex; align-items: baseline; gap: 18px; margin-bottom: 18px; }
.chapter__num {
  font-size: clamp(44px, 6vw, 68px); font-weight: 800; line-height: 1; letter-spacing: -.04em;
  color: transparent; -webkit-text-stroke: 1.5px color-mix(in srgb, var(--primary) 42%, transparent);
}
.chapter__label { font-size: 13px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--primary); }

/* ───────────────────────── the wound (pain vignettes) ───────────────────────── */
.wound__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 34px; }
.vignette {
  position: relative; border-radius: var(--r-lg); border: 1px solid var(--border-subtle);
  background: var(--surface); padding: 20px; box-shadow: var(--shadow-sm);
  transform: rotate(var(--tilt, 0deg)); transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.vignette:nth-child(1) { --tilt: -1.1deg; } .vignette:nth-child(2) { --tilt: .7deg; } .vignette:nth-child(3) { --tilt: -.5deg; }
.vignette:hover { transform: rotate(0) translateY(-4px); box-shadow: var(--shadow-md); }
.vignette__meta { display: flex; justify-content: space-between; align-items: center; font-size: 11.5px; font-weight: 700; color: var(--text-secondary); margin-bottom: 12px; letter-spacing: .02em; }
.vignette__meta .warn { color: var(--warning); }
.vignette__stack { display: grid; gap: 8px; }
.vignette__bubble {
  max-width: 92%; padding: 9px 13px; border-radius: 14px 14px 14px 4px;
  background: var(--bg-form); border: 1px solid var(--border-subtle);
  font-size: 13px; line-height: 1.45; color: var(--text);
}
.vignette__bubble--me { justify-self: end; border-radius: 14px 14px 4px 14px; background: color-mix(in srgb, var(--primary) 14%, var(--surface)); }
.vignette__bubble--faded { opacity: .55; }
.vignette__count {
  justify-self: center; font-size: 12px; font-weight: 800; color: var(--warning);
  background: color-mix(in srgb, var(--warning) 14%, transparent); border-radius: var(--r-full); padding: 4px 12px;
}
.vignette--notif .vignette__stack { gap: 6px; }
.vignette__notif {
  display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: var(--r-md);
  background: var(--bg-form); border: 1px solid var(--border-subtle); font-size: 12.5px; line-height: 1.4;
}
.vignette__notif b { display: block; font-size: 12.5px; }
.vignette__notif .when { margin-left: auto; font-size: 11px; color: var(--text-secondary); white-space: nowrap; }
.vignette__notif--late { border-color: color-mix(in srgb, var(--warning) 45%, transparent); }
.vignette__note {
  background: color-mix(in srgb, var(--warning) 16%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--warning) 30%, transparent);
  border-radius: 4px; padding: 12px; font-size: 13px; line-height: 1.5; color: var(--text);
  box-shadow: var(--shadow-sm); transform: rotate(.6deg);
}
.vignette__note s { opacity: .6; }
.vignette__scrap { font-size: 12px; color: var(--text-secondary); }
.vignette__pile { display: flex; flex-wrap: wrap; gap: 6px; }
.vignette__chip { font-size: 11.5px; font-weight: 700; padding: 5px 10px; border-radius: 6px; background: var(--bg-form); border: 1px dashed var(--border); color: var(--text-secondary); }
.vignette__punchline { margin-top: 12px; font-size: 13px; font-weight: 700; color: var(--warning); }
.wound__resolve {
  margin-top: 30px; display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  border: 1px solid color-mix(in srgb, var(--primary) 30%, transparent);
  background: color-mix(in srgb, var(--primary-light) 55%, var(--surface));
  border-radius: var(--r-lg); padding: 20px 24px;
}
.wound__resolve-arrow { font-size: 24px; color: var(--primary); font-weight: 800; }
.wound__resolve p { font-size: 16px; font-weight: 600; color: var(--text); max-width: 60ch; }
.wound__resolve p b { color: var(--primary); }
@media (max-width: 860px) { .wound__grid { grid-template-columns: 1fr; } .vignette { --tilt: 0deg; } }

/* ───────────────────────── big claim band ───────────────────────── */
.big-claim { text-align: center; max-width: 20ch; margin: 0 auto; font-size: clamp(30px, 5.4vw, 56px); font-weight: 800; letter-spacing: -.03em; line-height: 1.08; }
.big-claim .hl { color: var(--primary); }
.big-claim__sub { text-align: center; margin: 18px auto 0; max-width: 52ch; color: var(--text-secondary); font-size: 17px; line-height: 1.6; }

/* ───────────────────────── THE PROVING GROUND (demo stage — the climax) ───────────────────────── */
.stage {
  position: relative; overflow: hidden; color: #eef5f0;
  background:
    radial-gradient(ellipse 90% 60% at 70% -10%, color-mix(in srgb, var(--accent) 26%, transparent), transparent 60%),
    linear-gradient(165deg, var(--primary-dark), color-mix(in srgb, var(--primary-dark) 60%, #0b100e));
  padding: clamp(56px, 9vh, 96px) clamp(16px, 5vw, 48px);
}
.stage::before { /* faint grid texture */
  content: ""; position: absolute; inset: 0; opacity: .12; pointer-events: none;
  background-image: linear-gradient(rgba(255,255,255,.16) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.16) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse 90% 70% at 50% 20%, #000 20%, transparent 78%);
}
.stage > * { position: relative; max-width: var(--maxw); margin-inline: auto; }
.stage__head { max-width: 62ch; margin-bottom: 30px; }
.stage__head .eyebrow { color: #9be7c4; }
.stage__head h2 { color: #fff; font-size: clamp(28px, 4.4vw, 46px); font-weight: 800; margin: 4px 0 14px; letter-spacing: -.02em; }
.stage__head .lede { color: rgba(238,245,240,.75); }
.stage__badges { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 26px; }
.stage__badge {
  display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 700;
  color: #cfe9da; border: 1px solid rgba(255,255,255,.22); border-radius: var(--r-full); padding: 7px 14px;
  background: rgba(255,255,255,.06);
}
.stage__badge .dot { background: #9be7c4; box-shadow: 0 0 0 4px rgba(155,231,196,.18); }

.stage__layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: clamp(20px, 3.5vw, 44px); align-items: start; }
.stage__tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.stage-tab {
  padding: 10px 17px; border-radius: var(--r-full); border: 1px solid rgba(255,255,255,.22);
  background: rgba(255,255,255,.05); color: #dcefe4; font-size: 14px; font-weight: 700; cursor: pointer;
  transition: all .2s var(--ease);
}
.stage-tab:hover { border-color: #9be7c4; transform: translateY(-1px); }
.stage-tab.active { background: #fff; color: var(--primary-dark); border-color: #fff; }
.stage__panels { position: relative; }
.stage__panel { display: none; animation: stageIn .45s var(--ease); }
.stage__panel.active { display: grid; justify-items: center; }
@keyframes stageIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.stage__panel stalldo-demo { display: block; width: 100%; max-width: 420px; }
.stage__panel .sdk-frame--bare[data-frame="phone"] { margin-inline: auto; }
/* phone screens clip value columns below ~340px content width — give the
   marketing-layer frames the full app width */
.stage__panel .sdk-frame--bare[data-frame="phone"],
.feat__demo .sdk-frame--bare[data-frame="phone"] { width: min(100%, 384px); }

.stage__aside { display: grid; gap: 16px; position: sticky; top: 90px; }
.stage__hint {
  border: 1px solid rgba(255,255,255,.16); border-radius: var(--r-lg); padding: 20px;
  background: rgba(255,255,255,.05); backdrop-filter: blur(4px);
}
.stage__hint h3 { color: #fff; font-size: 15px; margin-bottom: 10px; }
.stage__hint ol { margin: 0; padding-left: 18px; display: grid; gap: 8px; color: rgba(238,245,240,.82); font-size: 13.5px; line-height: 1.5; }
.stage__hint .btn { margin-top: 14px; width: 100%; }
.stage__tour { background: rgba(255,255,255,.1); color: #fff; border: 1px solid rgba(255,255,255,.25); }
.stage__tour:hover { background: rgba(255,255,255,.16); }

/* the offline kill-switch */
.stage__switch {
  display: flex; align-items: center; gap: 14px; border-radius: var(--r-lg); padding: 18px 20px;
  border: 1px solid rgba(255,255,255,.16); background: rgba(255,255,255,.05); cursor: pointer; text-align: left;
  transition: border-color .25s var(--ease);
}
.stage__switch:hover { border-color: #9be7c4; }
.stage__switch-track {
  flex-shrink: 0; width: 46px; height: 26px; border-radius: var(--r-full); background: rgba(255,255,255,.22);
  position: relative; transition: background .25s var(--ease);
}
.stage__switch-track::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%;
  background: #fff; transition: transform .25s var(--ease);
}
.stage__switch-copy b { display: block; color: #fff; font-size: 14px; }
.stage__switch-copy span { color: rgba(238,245,240,.7); font-size: 12.5px; line-height: 1.45; display: block; margin-top: 3px; }
.stage--offline .stage__switch-track { background: var(--warning); }
.stage--offline .stage__switch-track::after { transform: translateX(20px); }
.stage__offline-note {
  display: none; align-items: center; gap: 10px; border-radius: var(--r-md); padding: 12px 14px;
  background: color-mix(in srgb, var(--warning) 22%, transparent); border: 1px solid color-mix(in srgb, var(--warning) 45%, transparent);
  color: #ffe9c9; font-size: 13px; font-weight: 600; line-height: 1.45;
  animation: stageIn .4s var(--ease);
}
.stage--offline .stage__offline-note { display: flex; }
.stage--offline .stage__panels { filter: saturate(.92); }
.stage--offline::before { opacity: .06; }

.stage__cta {
  margin-top: 40px; display: flex; flex-wrap: wrap; align-items: center; gap: 16px 22px;
  border-top: 1px solid rgba(255,255,255,.14); padding-top: 30px;
}
.stage__cta p { color: rgba(238,245,240,.85); font-size: 16.5px; font-weight: 600; max-width: 46ch; }
.stage__cta .btn--primary { background: #fff; color: var(--primary-dark); }
.stage__cta .btn--primary:hover { box-shadow: 0 14px 40px rgba(0,0,0,.35); }
@media (max-width: 980px) {
  .stage__layout { grid-template-columns: 1fr; }
  .stage__aside { position: static; grid-template-columns: 1fr 1fr; }
}
@media (max-width: 700px) { .stage__aside { grid-template-columns: 1fr; } }

/* ───────────────────────── momentum bar ───────────────────────── */
.momentum {
  position: fixed; left: 50%; bottom: 14px; transform: translate(-50%, 130%); z-index: 95;
  display: flex; align-items: center; gap: 14px; padding: 10px 12px 10px 20px;
  border-radius: var(--r-full); border: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface) 90%, transparent); backdrop-filter: blur(12px) saturate(140%);
  box-shadow: var(--shadow-lg); transition: transform .45s var(--ease);
  max-width: min(92vw, 560px);
}
.momentum--visible { transform: translate(-50%, 0); }
.momentum__wave { font-size: 13px; font-weight: 700; color: var(--text); white-space: nowrap; }
.momentum__wave .dot { display: inline-block; vertical-align: middle; margin-right: 7px; }
.momentum__wave small { display: block; font-weight: 600; color: var(--text-secondary); font-size: 11.5px; }
.momentum .btn { white-space: nowrap; }
@media (max-width: 560px) { .momentum__wave small { display: none; } }

/* ───────────────────────── engraved stall plaque ───────────────────────── */
.plaque-scene { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 5vw, 56px); align-items: center; }
.plaque {
  justify-self: center; width: min(400px, 100%); border-radius: 14px; padding: 26px 28px;
  background: linear-gradient(160deg, #3a4a44, #232e2a 55%, #2c3833);
  border: 1px solid rgba(255,255,255,.14);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.14), var(--shadow-lg);
  display: grid; grid-template-columns: 1fr auto; gap: 6px 18px; align-items: center;
  position: relative;
}
.plaque::after { /* screw heads */
  content: ""; position: absolute; inset: 10px; border-radius: 8px; pointer-events: none;
  border: 1px solid rgba(255,255,255,.07);
}
.plaque__name { font-size: 26px; font-weight: 800; letter-spacing: .04em; color: #e9f2ec; text-shadow: 0 1px 0 rgba(0,0,0,.5); }
.plaque__sub { grid-column: 1; font-size: 12.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: rgba(233,242,236,.55); }
.plaque__qr {
  grid-row: 1 / span 2; grid-column: 2; width: 78px; height: 78px; border-radius: 8px; background: #e9f2ec; padding: 7px;
  display: grid; place-items: center;
}
.plaque__qr svg { width: 100%; height: 100%; }
.plaque__hint { grid-column: 1 / -1; margin-top: 10px; font-size: 11.5px; color: rgba(233,242,236,.5); letter-spacing: .04em; }
.plaque-scene__copy h3 { font-size: clamp(22px, 3vw, 30px); font-weight: 800; margin-bottom: 12px; }
.plaque-scene__copy p { color: var(--text-secondary); font-size: 16.5px; line-height: 1.65; max-width: 48ch; }
@media (max-width: 820px) { .plaque-scene { grid-template-columns: 1fr; } }

/* ───────────────────────── moments (JTBD story cards) ───────────────────────── */
.moments { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }
.moment {
  background: var(--surface); border: 1px solid var(--border-subtle); border-radius: var(--r-lg);
  padding: 24px; box-shadow: var(--shadow-sm); display: grid; gap: 10px; align-content: start;
}
.moment__ic { font-size: 26px; }
.moment__when { font-size: 14.5px; font-weight: 700; color: var(--text); line-height: 1.45; }
.moment__then { font-size: 14px; color: var(--text-secondary); line-height: 1.55; }
.moment__then b { color: var(--primary); }

/* ───────────────────────── depth cards: pack ribbon refinement ───────────────────────── */
.feature { position: relative; transition: transform .3s var(--ease), box-shadow .3s var(--ease); }
.feature:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.feat__demo { width: 100%; display: grid; justify-items: center; }
.feat__demo stalldo-demo { display: block; width: 100%; max-width: 400px; }

/* ───────────────────────── trust band refinement ───────────────────────── */
.trustgrid--4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1020px) { .trustgrid--4 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 620px) { .trustgrid--4 { grid-template-columns: 1fr; } }
.provenance {
  margin-top: 22px; text-align: center; color: var(--text-secondary); font-size: 14px;
}
.provenance b { color: var(--primary); }

/* ───────────────────────── scene inside sections (small) ───────────────────────── */
.scene--panel { position: relative; inset: auto; height: 320px; border-radius: var(--r-lg); overflow: hidden; }

/* ───────────────────────── footer persona links ───────────────────────── */
.footer__col--roles a { text-transform: none; }

/* ───────────────────────── reveal stagger helpers ───────────────────────── */
.reveal-d1 { transition-delay: .08s; } .reveal-d2 { transition-delay: .16s; } .reveal-d3 { transition-delay: .24s; }
@media (prefers-reduced-motion: reduce) { .reveal-d1, .reveal-d2, .reveal-d3 { transition-delay: 0s; } }

/* ───────────────────────── in-page anchor targets ───────────────────────── */
[data-usecase] { scroll-margin-top: 90px; }

/* ───────────────────────── small-screen overflow guards ───────────────────────── */
@media (max-width: 620px) {
  .nav__persona { display: none; }
  .nav { gap: 10px; }
  .nav__actions { gap: 8px; }
  .hero__capture { flex-direction: column; align-items: stretch; max-width: none; }
  .hero__capture .btn { width: 100%; white-space: normal; }
  .nav__actions .btn { font-size: 13px; padding: 8px 12px; max-width: 44vw; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
  .momentum { padding: 8px 8px 8px 16px; gap: 10px; }
  .momentum .btn { font-size: 13px; padding: 8px 12px; }
  .stage__cta .btn { white-space: normal; }
}
