/* Hero Story — animated narrative for hero panel.
   Sits inside .hero-art (560px max, square-ish).
   All scenes share a deep purple stage background.
*/

#hero-story-mount {
  position: absolute; inset: 0;
}

.hs-stage {
  position: absolute; inset: 0;
  background: linear-gradient(160deg, #3B0E6A 0%, #1E0438 100%);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-xl), 0 0 0 1px rgba(255,255,255,.05) inset;
  overflow: hidden;
  color: #fff;
  display: flex; flex-direction: column;
  padding: 22px 22px 18px;
  gap: 14px;
  isolation: isolate;
}
.hs-bg-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(circle at center, #000 30%, transparent 78%);
  z-index: 0;
}
.hs-bg-glow {
  position: absolute; inset: 0;
  background:
    radial-gradient(60% 50% at 80% 0%, rgba(241,197,24,.18) 0%, transparent 60%),
    radial-gradient(45% 50% at 0% 100%, rgba(123,61,184,.4) 0%, transparent 60%);
  z-index: 0;
  pointer-events: none;
}

.hs-stage > * { position: relative; z-index: 1; }

/* ───── Tabs (channel selector) ───── */
.hs-tabs {
  display: flex; gap: 6px; flex-wrap: wrap;
}
.hs-tab {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 10px 5px 8px;
  border-radius: 999px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.08);
  color: rgba(255,255,255,.7);
  font-family: var(--font-body);
  font-size: 11px; font-weight: 600;
  letter-spacing: .04em;
  cursor: pointer;
  transition: all .25s var(--ease-out);
}
.hs-tab:hover { color: #fff; border-color: rgba(255,255,255,.18); }
.hs-tab .hs-tab-dot {
  width: 5px; height: 5px; border-radius: 99px;
  background: rgba(255,255,255,.35);
  transition: all .25s var(--ease-out);
}
.hs-tab.on {
  background: rgba(241,197,24,.16);
  border-color: rgba(241,197,24,.42);
  color: #F1C518;
}
.hs-tab.on .hs-tab-dot {
  background: #F1C518;
  box-shadow: 0 0 0 4px rgba(241,197,24,.18);
}

/* ───── Scene wrap ───── */
.hs-scene-wrap {
  flex: 1;
  position: relative;
  display: flex; align-items: stretch;
  min-height: 0;
}
.hs-scene-card {
  position: relative;
  flex: 1;
  display: flex; flex-direction: column;
  gap: 12px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 18px;
  padding: 16px 18px;
  animation: hs-card-in .42s var(--ease-out) both;
  min-height: 0;
}
@keyframes hs-card-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.hs-eyebrow {
  font-size: 10px; font-weight: 700;
  letter-spacing: .18em; text-transform: uppercase;
  color: #F1C518;
}
.hs-scene-inner {
  flex: 1; min-height: 0; display: flex;
  position: relative;
}
.hs-scene-foot {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(255,255,255,.08);
}
.hs-headline {
  font-family: var(--font-body); font-weight: 600;
  font-size: 14px; color: rgba(255,255,255,.9);
  letter-spacing: -.01em;
}
.hs-metric {
  font-family: var(--font-display); font-weight: 300;
  font-size: 22px; line-height: 1; color: #F1C518;
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
}

/* ───── Curve ───── */
.hs-curve {
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 14px;
  padding: 10px 14px 8px;
  position: relative;
}
.hs-curve-head {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 4px;
}
.hs-curve-eyebrow {
  font-size: 9.5px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase;
  color: rgba(255,255,255,.55);
}
.hs-curve-val {
  font-family: var(--font-display); font-weight: 400;
  color: #F1C518; font-size: 16px; letter-spacing: -.01em;
  font-variant-numeric: tabular-nums;
}
.hs-curve-svg { width: 100%; height: 56px; display: block; }

/* ───── Play button ───── */
.hs-play {
  position: absolute; top: 14px; right: 14px;
  z-index: 2;
  width: 26px; height: 26px; border-radius: 99px;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(0,0,0,.32);
  color: #fff; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all .2s var(--ease-out);
  backdrop-filter: blur(6px);
}
.hs-play:hover { background: rgba(241,197,24,.22); border-color: rgba(241,197,24,.42); color: #F1C518; }

/* ════════════════════════════════════════════════════════════
   SCENES
   ════════════════════════════════════════════════════════════ */

.hs-scene { width: 100%; height: 100%; display: flex; flex-direction: column; }

/* SEO scene */
.hs-search-bar {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 14px; border-radius: 999px;
  background: rgba(255,255,255,.95); color: var(--brand-purple-900);
  font-size: 12px; font-weight: 500;
  margin-bottom: 12px; flex-shrink: 0;
}
.hs-search-typed { color: var(--brand-purple-900); white-space: nowrap; overflow: hidden; }
.hs-cursor {
  display: inline-block; width: 1.5px; height: 11px;
  background: var(--brand-purple-700); margin-left: 1px; vertical-align: -2px;
  animation: hs-blink 1s steps(1) infinite;
}
@keyframes hs-blink { 50% { opacity: 0; } }

.hs-results { list-style: none; padding: 0; margin: 0; flex: 1; display: flex; flex-direction: column; gap: 6px; }
.hs-result {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.05);
  transition: all .42s var(--ease-out);
}
.hs-result-fav {
  width: 22px; height: 22px; border-radius: 6px;
  background: rgba(255,255,255,.1);
  flex-shrink: 0;
}
.hs-result-lines { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.hs-line { display: block; height: 6px; border-radius: 3px; background: rgba(255,255,255,.18); }
.hs-line-1 { width: 70%; }
.hs-line-2 { width: 45%; height: 4px; background: rgba(255,255,255,.1); }
.hs-result-tag {
  font-size: 9px; font-weight: 800; letter-spacing: .12em;
  padding: 2px 6px; border-radius: 4px;
  background: #F1C518; color: var(--brand-purple-900);
}
.hs-result-us {
  background: rgba(241,197,24,.12);
  border-color: rgba(241,197,24,.42);
  transform: translateX(0);
  box-shadow: 0 4px 14px rgba(241,197,24,.15);
}
.hs-result-us .hs-result-fav {
  background: linear-gradient(135deg, #F1C518, #C9A412);
}
.hs-result-us .hs-line-1 { background: rgba(255,255,255,.45); }
.hs-result-us .hs-line-2 { background: rgba(255,255,255,.25); }

/* Ads scene */
.hs-ads { display: flex; flex-direction: column; height: 100%; }
.hs-ads-head {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 10px;
}
.hs-ads-label { font-size: 11px; font-weight: 600; color: rgba(255,255,255,.65); letter-spacing: .04em; }
.hs-ads-roas {
  font-family: var(--font-display); font-weight: 400;
  color: #F1C518; font-size: 15px; letter-spacing: -.01em;
  font-variant-numeric: tabular-nums;
}
.hs-ads-bars {
  flex: 1; display: flex; align-items: flex-end; gap: 6px;
  min-height: 70px;
}
.hs-ads-bar {
  flex: 1;
  background: rgba(255,255,255,.06);
  border-radius: 6px 6px 0 0;
  position: relative; overflow: hidden;
  min-height: 4px;
  transition: height .25s var(--ease-out);
}
.hs-ads-bar-fill {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: linear-gradient(180deg, #F1C518 0%, rgba(241,197,24,.5) 100%);
  border-radius: 6px 6px 0 0;
}
.hs-ads-bar:last-child .hs-ads-bar-fill {
  background: linear-gradient(180deg, #F5D24A 0%, #F1C518 100%);
  box-shadow: 0 0 12px rgba(241,197,24,.5);
}
.hs-ads-x {
  display: flex; justify-content: space-between;
  font-size: 9px; color: rgba(255,255,255,.4);
  margin-top: 6px; letter-spacing: .08em; text-transform: uppercase;
}

/* Social scene */
.hs-social { display: flex; flex-direction: column; gap: 10px; }
.hs-social-head {
  display: flex; justify-content: space-between; align-items: baseline;
}
.hs-social-handle {
  font-size: 12px; font-weight: 600; color: #fff;
  letter-spacing: -.01em;
}
.hs-social-count {
  font-family: var(--font-display); font-weight: 400;
  color: #F1C518; font-size: 14px;
  font-variant-numeric: tabular-nums;
}
.hs-social-count em { font-style: normal; font-size: 10px; color: rgba(255,255,255,.5); margin-left: 4px; }
.hs-social-feed { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.hs-social-row {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.05);
  opacity: 0; transform: translateY(6px);
  transition: opacity .35s var(--ease-out), transform .35s var(--ease-out);
}
.hs-social-row.in { opacity: 1; transform: none; }
.hs-avatar {
  width: 22px; height: 22px; border-radius: 99px;
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--brand-purple-400), var(--brand-purple-600));
}
.hs-avatar[data-i="1"] { background: linear-gradient(135deg, #F1C518, #C9A412); }
.hs-avatar[data-i="2"] { background: linear-gradient(135deg, #7B3DB8, #4A0E85); }
.hs-avatar[data-i="3"] { background: linear-gradient(135deg, #F5D24A, #F1C518); }
.hs-avatar[data-i="4"] { background: linear-gradient(135deg, #A77FD0, #5B14A0); }
.hs-avatar[data-i="5"] { background: linear-gradient(135deg, #FAE38A, #C9A412); }
.hs-social-lines { flex: 1; display: flex; flex-direction: column; gap: 3px; }
.hs-social-heart { color: #F1C518; opacity: .8; flex-shrink: 0; }

/* Web scene */
.hs-web { display: flex; flex-direction: column; gap: 10px; }
.hs-web-head {
  display: flex; align-items: center; gap: 6px;
  padding: 7px 12px; border-radius: 8px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.06);
}
.hs-dot { width: 7px; height: 7px; border-radius: 99px; }
.dot-r { background: #F87171; } .dot-y { background: #FBBF24; } .dot-g { background: #34D399; }
.hs-web-url {
  font-size: 11px; color: rgba(255,255,255,.65);
  margin-left: 8px; font-family: var(--font-mono); letter-spacing: .02em;
}
.hs-web-body {
  flex: 1; display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: center;
}
.hs-gauge {
  position: relative; width: 110px;
  display: flex; flex-direction: column; align-items: center;
}
.hs-gauge-val {
  position: absolute; top: 26px; left: 0; right: 0;
  text-align: center;
  font-family: var(--font-display); font-weight: 300; font-size: 26px;
  color: #F1C518; letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
}
.hs-gauge-label {
  font-size: 9px; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: rgba(255,255,255,.5);
  margin-top: -2px;
}
.hs-web-stats { display: flex; flex-direction: column; gap: 6px; }
.hs-web-stat {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 7px 10px;
  background: rgba(255,255,255,.04);
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,.05);
}
.hs-web-stat-label {
  font-size: 9.5px; font-weight: 700; letter-spacing: .14em;
  color: rgba(255,255,255,.5); text-transform: uppercase;
}
.hs-web-stat-val {
  font-family: var(--font-mono); font-weight: 600; font-size: 12px;
  color: #fff;
  font-variant-numeric: tabular-nums;
}
.hs-web-stat-val.good { color: #34D399; }

/* Email scene */
.hs-email { display: flex; flex-direction: column; gap: 8px; }
.hs-email-eyebrow {
  font-size: 9.5px; font-weight: 700; letter-spacing: .14em;
  color: rgba(255,255,255,.5); text-transform: uppercase;
}
.hs-email-svg { flex: 1; min-height: 0; width: 100%; }
.hs-email-stats {
  display: grid; grid-template-columns: 1fr 1fr 1fr;
  gap: 6px; padding-top: 4px;
}
.hs-email-stat {
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.05);
  border-radius: 8px;
  padding: 6px 8px;
  display: flex; flex-direction: column; gap: 2px;
}
.hs-email-stat .num {
  font-family: var(--font-display); font-weight: 400; font-size: 14px;
  color: #F1C518; letter-spacing: -.01em;
  font-variant-numeric: tabular-nums;
}
.hs-email-stat .lbl {
  font-size: 9px; font-weight: 700; letter-spacing: .12em;
  color: rgba(255,255,255,.45); text-transform: uppercase;
}

/* Reduced motion: hide curve fill animation, slow tabs */
@media (prefers-reduced-motion: reduce) {
  .hs-scene-card { animation: none; }
}

/* ════════════════════════════════════════════════════════════
   Tweak-driven body classes
   ════════════════════════════════════════════════════════════ */

/* Mustard accent underline on hero headline */
.tw-no-accent .hero-title .accent { background-image: none; }

/* Primary CTA color swap */
.tw-cta-mustard .btn-primary,
.tw-cta-mustard .hero-ctas .btn-primary {
  background: #F1C518;
  color: var(--brand-purple-900);
  border-color: #F1C518;
}
.tw-cta-mustard .btn-primary:hover {
  background: #F5D24A;
  border-color: #F5D24A;
}

/* Hide hero eyebrow */
.tw-no-eyebrow .hero-eyebrow { display: none !important; }

/* Hero background tone variants */
body[data-hero-tone="cream"] .hero {
  background: linear-gradient(180deg, #FAF6EC 0%, #F4EDD9 100%);
}
body[data-hero-tone="deep"] .hero {
  background: linear-gradient(180deg, #2A0855 0%, #1E0438 100%);
  color: #fff;
}
body[data-hero-tone="deep"] .hero-title,
body[data-hero-tone="deep"] .hero-eyebrow,
body[data-hero-tone="deep"] .hero-sub {
  color: #fff;
}
body[data-hero-tone="deep"] .hero-sub { color: rgba(255,255,255,.78); }
body[data-hero-tone="deep"] .hero-eyebrow {
  background: rgba(241,197,24,.16);
  border-color: rgba(241,197,24,.35);
  color: #F5D24A;
}

/* Smaller frame on mobile */
@media (max-width: 600px) {
  .hs-stage { padding: 16px 16px 14px; }
  .hs-tab-label { display: none; }
  .hs-tab { padding: 6px 8px; }
  .hs-tab .hs-tab-dot { margin: 0; }
  .hs-curve-svg { height: 44px; }
}
