:root {
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* --- Sticky nav --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  max-width: 100%;
  background: transparent;
  transition: background .3s var(--ease-out), box-shadow .3s, backdrop-filter .3s;
}
.site-header.is-stuck {
  background: rgba(255, 249, 242, .9);
  box-shadow: 0 10px 30px rgba(51, 43, 58, .07);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

/* --- Announcement pulse --- */
.announcement a {
  display: inline-block;
  animation: linkPulse 2.4s ease-in-out infinite;
}

/* --- Hero entrance --- */
.hero h1 {
  animation: riseIn .8s var(--spring) both;
}
.hero-copy {
  animation: riseIn .8s var(--spring) .08s both;
}
.product-frame {
  animation: riseIn .9s var(--spring) .16s both;
  transition: box-shadow .35s;
}
.hero-actions {
  animation: riseIn .8s var(--spring) .24s both;
}
.micro-proof {
  animation: riseIn .8s var(--spring) .32s both;
}

.hero::before {
  animation: blobDrift 18s ease-in-out infinite;
}
.hero::after {
  animation: blobDrift 22s ease-in-out infinite reverse;
}

.product-frame:hover {
  box-shadow: 0 42px 100px rgba(90, 65, 55, .16);
}

/* --- Rotating headline word --- */
.hero-rotate {
  display: inline-block;
  position: relative;
  min-width: 0;
  height: 1.15em;
  padding: 0;
  overflow: hidden;
  vertical-align: bottom;
  color: var(--coral);
  font-style: normal;
  white-space: nowrap;
}
.hero-rotate-word {
  display: block;
  line-height: 1.15;
  white-space: nowrap;
  will-change: transform, opacity;
}
.hero-rotate-word.is-out {
  animation: wordOut .38s var(--ease-out) forwards;
}
.hero-rotate-word.is-in {
  animation: wordIn .5s var(--spring) forwards;
}

/* --- Buttons --- */
.button {
  position: relative;
  overflow: visible;
  transition: transform .25s var(--spring), background .2s, box-shadow .25s, border-color .2s;
}
.button:hover { transform: translateY(-3px) scale(1.02); }
.button:active { transform: scale(.97); }
.button:disabled,
.button:disabled:hover,
.button:disabled:active { transform: none; }
.button.primary {
  overflow: hidden;
}
.button.primary::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(105deg, transparent 35%, rgba(255,255,255,.45) 50%, transparent 65%);
  transform: translateX(-120%);
  pointer-events: none;
  z-index: 1;
}
.button.primary:hover::after {
  animation: shineSweep .65s ease;
}
.button.primary:hover {
  box-shadow: 0 12px 28px rgba(255, 107, 87, .28);
}
.button span {
  display: inline-block;
  transition: transform .25s var(--spring);
}
.button:hover span { transform: translateX(3px); }

/* --- Chat bubbles + typing --- */
.message {
  animation: bubbleIn .42s var(--spring) both;
}
.typing-row .bubble {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 36px;
  width: auto;
  padding: 10px 14px;
}
.typing-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--violet);
  animation: typingBounce 1s ease-in-out infinite;
}
.typing-dot:nth-child(2) { animation-delay: .15s; }
.typing-dot:nth-child(3) { animation-delay: .3s; }

.demo-modal.is-open .demo-modal-card {
  animation: riseIn .45s var(--spring) both;
}
.hero-lead-success span,
.success span {
  animation: popIn .5s var(--spring) both;
}

.composer button {
  transition: transform .2s var(--spring), background .2s;
}
.composer button:hover { transform: scale(1.08) rotate(-8deg); }

/* --- Scroll reveals (only after JS opts in) --- */
.motion-on .reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .7s var(--ease-out), transform .7s var(--spring);
}
.motion-on .reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.motion-on .reveal[data-delay="1"] { transition-delay: .06s; }
.motion-on .reveal[data-delay="2"] { transition-delay: .12s; }
.motion-on .reveal[data-delay="3"] { transition-delay: .18s; }
.motion-on .reveal[data-delay="4"] { transition-delay: .24s; }
.motion-on .reveal[data-delay="5"] { transition-delay: .3s; }
.motion-on .reveal-left {
  transform: translateX(-24px);
}
.motion-on .reveal-right {
  transform: translateX(28px);
}
.motion-on .reveal-left.is-visible,
.motion-on .reveal-right.is-visible {
  transform: translateX(0);
}

/* --- Cards & strips --- */
.pain {
  transition: transform .3s var(--spring), border-color .25s, box-shadow .3s;
}
.pain:hover,
.motion-on .pain.reveal.is-visible:hover {
  transform: translateX(10px);
  border-color: #cdbfe9;
  box-shadow: 0 12px 32px rgba(119, 98, 216, .12);
}
.pain-icon {
  transition: transform .3s var(--spring);
}
.pain:hover .pain-icon { transform: scale(1.12) rotate(-6deg); }

.value-icon {
  animation: iconPulse 2.8s ease-in-out infinite;
}
.value:nth-child(2) .value-icon { animation-delay: .4s; }
.value:nth-child(3) .value-icon { animation-delay: .8s; }

.flow-card {
  transition: transform .35s var(--spring), border-color .3s, box-shadow .35s, background .3s;
}
.flow-card:hover,
.motion-on .flow-card.reveal.is-visible:hover {
  transform: translateY(-8px);
  border-color: rgba(255,255,255,.35);
  box-shadow: 0 24px 50px rgba(0,0,0,.28);
}
.flow-card:nth-child(3) {
  animation: violetGlow 3.2s ease-in-out infinite;
}
.flow-symbol {
  transition: transform .35s var(--spring);
}
.flow-card:hover .flow-symbol { transform: scale(1.12) rotate(8deg); }

.channel-card {
  transition: transform .3s var(--spring), border-color .25s, box-shadow .3s;
}
.channel-card:hover,
.motion-on .channel-card.reveal.is-visible:hover {
  transform: translateY(-8px) rotate(-.6deg);
  border-color: var(--coral);
  box-shadow: 0 18px 40px rgba(255, 107, 87, .14);
}
.channel-card:hover .channel-logo {
  animation: wiggle .5s var(--spring);
}

.channel-marquee {
  overflow: hidden;
  margin: 8px 0 28px;
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.channel-marquee-track {
  display: flex;
  align-items: center;
  gap: 36px;
  width: max-content;
  animation: marquee 22s linear infinite;
}
.channel-marquee:hover .channel-marquee-track {
  animation-play-state: paused;
}
.channel-marquee-track img {
  width: 32px;
  height: 32px;
  object-fit: contain;
  opacity: .75;
}

.tab {
  transition: transform .2s var(--spring), background .2s, color .2s, border-color .2s;
}
.tab:hover { transform: translateY(-2px); }
.tab.active { transform: none; }

@keyframes tabProgress {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

.outcome {
  transition: transform .3s var(--spring), background .3s;
}
.outcome:hover,
.motion-on .outcome.reveal.is-visible:hover {
  transform: translateY(-4px);
  background: var(--paper);
}
.outcome-num {
  display: inline-block;
}
.motion-on .outcome.reveal .outcome-num {
  opacity: 0;
}
.motion-on .outcome.reveal.is-visible .outcome-num {
  animation: popIn .5s var(--spring) .15s both;
}

.tier {
  transition: transform .35s var(--spring), box-shadow .35s, border-color .3s;
}
.tier:hover,
.motion-on .tier.reveal.is-visible:hover {
  transform: translateY(-6px);
  border-color: #cdbfe9;
  box-shadow: 0 22px 50px rgba(90, 65, 55, .12);
}
.tier-featured {
  animation: glowPulse 3.2s ease-in-out infinite;
}
.motion-on .tier-featured.reveal.is-visible {
  transform: scale(1.03);
}
.tier-featured:hover,
.motion-on .tier-featured.reveal.is-visible:hover {
  transform: scale(1.03) translateY(-6px);
}

.market-pill {
  transition: transform .25s var(--spring), background .2s, border-color .2s;
}
.market-pill:hover,
.motion-on .market-pill.reveal.is-visible:hover {
  transform: translateY(-3px) scale(1.04);
  border-color: var(--coral);
  background: var(--peach);
}

.mission-card,
.vision-card {
  transition: transform .3s var(--spring), box-shadow .3s, border-color .25s;
}
.mission-card:hover,
.vision-card:hover,
.motion-on .mission-card.reveal.is-visible:hover,
.motion-on .vision-card.reveal.is-visible:hover {
  transform: translateY(-4px);
  border-color: #cdbfe9;
  box-shadow: 0 16px 36px rgba(90, 65, 55, .08);
}

.lock {
  animation: lockBob 3.4s ease-in-out infinite;
}

.pricing::before {
  animation: blobDrift 20s ease-in-out infinite;
}
.pricing::after {
  animation: blobDrift 16s ease-in-out infinite reverse;
}
.conversion::before {
  animation: blobDrift 24s ease-in-out infinite;
}

/* --- FAQ --- */
.faq details summary {
  transition: color .2s;
}
.faq details summary:hover { color: var(--violet); }
.faq details summary::after {
  display: inline-block;
  transition: transform .3s var(--spring);
}
.faq details[open] summary::after {
  content: "−";
  transform: none;
}
.faq-panel {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  transition: grid-template-rows .35s var(--ease-out), opacity .28s ease;
}
.faq details[open] .faq-panel {
  grid-template-rows: 1fr;
  opacity: 1;
}
.faq-panel > * { overflow: hidden; min-height: 0; }

/* --- Keyframes --- */
@keyframes riseIn {
  from { opacity: 0; transform: translateY(22px) scale(.98); }
  to { opacity: 1; transform: none; }
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}
@keyframes bubbleIn {
  from { opacity: 0; transform: translateY(10px) scale(.92); }
  to { opacity: 1; transform: none; }
}
@keyframes popIn {
  from { opacity: 0; transform: scale(.4); }
  to { opacity: 1; transform: scale(1); }
}
@keyframes lockBob {
  0%, 100% { transform: translateY(0) rotate(0); }
  50% { transform: translateY(-8px) rotate(-4deg); }
}
@keyframes blobDrift {
  0%, 100% { transform: translate(0, 0) scale(1); }
  40% { transform: translate(28px, -18px) scale(1.08); }
  70% { transform: translate(-16px, 22px) scale(.94); }
}
@keyframes wordOut {
  to { transform: translateY(-110%); opacity: 0; }
}
@keyframes wordIn {
  from { transform: translateY(110%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
@keyframes shineSweep {
  from { transform: translateX(-120%); }
  to { transform: translateX(120%); }
}
@keyframes typingBounce {
  0%, 80%, 100% { transform: translateY(0); opacity: .45; }
  40% { transform: translateY(-5px); opacity: 1; }
}
@keyframes iconPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}
@keyframes wiggle {
  0% { transform: rotate(0); }
  30% { transform: rotate(-12deg) scale(1.12); }
  60% { transform: rotate(10deg) scale(1.08); }
  100% { transform: rotate(0) scale(1); }
}
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
@keyframes violetGlow {
  0%, 100% { box-shadow: 0 0 0 rgba(119, 98, 216, 0); }
  50% { box-shadow: 0 18px 48px rgba(119, 98, 216, .45); }
}
@keyframes glowPulse {
  0%, 100% { box-shadow: 0 36px 90px rgba(255, 107, 87, .28); }
  50% { box-shadow: 0 42px 110px rgba(255, 107, 87, .48); }
}
@keyframes linkPulse {
  0%, 100% { opacity: .85; transform: translateX(0); }
  50% { opacity: 1; transform: translateX(3px); }
}

@media (max-width: 1023px) {
  .tier-featured:hover,
  .motion-on .tier-featured.reveal.is-visible,
  .motion-on .tier-featured.reveal.is-visible:hover {
    transform: none;
  }
}
@media (max-width: 639px) {
  .hero-rotate {
    display: inline-block;
    margin-inline: 0;
    max-width: 100%;
  }
}

@media (hover: none) {
  .button:hover,
  .button:active,
  .pain:hover,
  .flow-card:hover,
  .channel-card:hover,
  .tier:hover,
  .tier-featured:hover {
    transform: none;
  }
  .button.primary:hover::after {
    animation: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero h1,
  .hero-copy,
  .product-frame,
  .hero-actions,
  .micro-proof,
  .hero::before,
  .hero::after,
  .value-icon,
  .flow-card:nth-child(3),
  .tier-featured,
  .lock,
  .pricing::before,
  .pricing::after,
  .conversion::before,
  .announcement a,
  .channel-marquee-track,
  .message,
  .demo-modal.is-open .demo-modal-card,
  .hero-lead-success span,
  .success span,
  .outcome-num,
  .hero-rotate-word.is-out,
  .hero-rotate-word.is-in,
  .case-carousel.is-playing .tab.active::after {
    animation: none !important;
  }
  .motion-on .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .button:hover,
  .button:active,
  .pain:hover,
  .flow-card:hover,
  .channel-card:hover,
  .tier:hover,
  .tier-featured:hover {
    transform: none;
  }
  .button.primary:hover::after {
    animation: none;
  }
  .case-track { transition: none; }
  .faq-panel,
  .faq details[open] .faq-panel {
    transition: none;
  }
}
