/* CHIDO animation and density pass: preserve the original design language. */

/* Type scale: maintain the project's 14px accessibility floor. */
h1 { font-size: clamp(44px, 5.3vw, 79px); }
h2 { font-size: clamp(32px, 3.8vw, 59px); }
.story-panel h1, .story-panel h2 { font-size: clamp(43px, 4.8vw, 72px); }
.dark-text h2 { font-size: clamp(39px, 4.2vw, 63px); }
.final-cta h2 { font-size: clamp(40px, 4.7vw, 70px); }
.shop-hero-content h1 { font-size: clamp(41px, 4.45vw, 67px); }
.signup-story h1 { font-size: clamp(42px, 4.35vw, 64px); }
.section-head { margin-bottom: 38px; }
.section-head h2 { margin-bottom: 15px; }

/* Chapter transitions are autonomous and sequential after the scroll trigger. */
.hero-copy .story-panel {
  height: 100%;
  opacity: 0;
  visibility: hidden;
  transform: translate3d(var(--story-enter-x, 45px), 8px, 0);
  filter: blur(5px);
  transition: opacity .58s cubic-bezier(.18,.75,.26,1),
              transform .6s cubic-bezier(.16,.77,.22,1),
              filter .58s ease, visibility 0s linear .58s;
  pointer-events: none;
  will-change: opacity, transform;
}
.hero-copy .story-panel.is-active {
  opacity: 1;
  visibility: visible;
  transform: translate3d(0, 0, 0);
  filter: blur(0);
  transition-delay: 0s;
  pointer-events: auto;
}
.hero-copy .story-panel.is-leaving {
  opacity: 0;
  visibility: visible;
  transform: translate3d(var(--story-exit-x, -42px), -6px, 0);
  filter: blur(3px);
  transition-duration: .27s;
  transition-delay: 0s;
  pointer-events: none;
}
.scroll-experience { height: 328vh; }
.hero-copy { top: 12%; }
.hero-orbit { animation: heroHaloBreathe 15s ease-in-out infinite alternate; }
@keyframes heroHaloBreathe {
  from { border-color: #7e9e9135; }
  to { border-color: #7e9e916a; }
}

/* Bring related sections closer without removing any content. */
.section { padding-top: 88px; padding-bottom: 88px; }
.section-sm { padding-top: 57px; padding-bottom: 57px; }
.insight-strip { padding-top: 88px; padding-bottom: 84px; gap: 5vw; }
.insight-columns strong { margin-top: 15px; }
.feature-card { min-height: 455px; }
.feature-illustration { height: 225px; }
.upload-illustration, .plans-illustration { height: 220px; }
.feature-bottom { padding-bottom: 25px; }
.dark-stage { min-height: 540px; padding-top: 64px; padding-bottom: 64px; }
.extras-section .section-head { margin-bottom: 32px; }
.extras-grid { gap: 13px; perspective: 1100px; }
.extra-card { min-height: 194px; padding: 23px 20px; }
.extras-action { margin-top: 35px; }
.pricing-card { min-height: 315px; }
.pricing-placeholder { padding: 14px 0; }
.registration-strip { padding-top: 47px; padding-bottom: 47px; }
.shop-products { padding-top: 75px; }

/* Each feature sheet lands with a tiny spring overshoot and reverses on scroll up. */
.extras-grid .extra-card {
  --hover-shift: 0px;
  opacity: var(--fall-opacity, 1);
  transform-origin: center 93%;
  transform: perspective(850px)
    translate3d(0, calc(var(--fall-y, 0px) + var(--hover-shift)), 0)
    rotateX(var(--fall-rotate, 0deg))
    rotateZ(var(--fall-tilt, 0deg))
    scale(var(--fall-scale, 1));
  transition: box-shadow .25s ease;
  backface-visibility: hidden;
  will-change: transform, opacity;
}
.extras-grid .extra-card:hover { --hover-shift: -5px; box-shadow: 0 17px 35px #1b40301a; }

/* Other cards rise subtly once they become visible. */
.reveal { transition: opacity .85s cubic-bezier(.2,.7,.2,1), transform .85s cubic-bezier(.16,.83,.25,1); }
.feature-card.reveal { transform: translateY(43px) rotateX(5deg); transform-origin: bottom center; }
.feature-card.reveal.visible { transform: translateY(0) rotateX(0); }
.feature-card.reveal.visible:hover { transform: translateY(-5px); }
.feature-grid .feature-card:nth-child(2) { transition-delay: .11s; }
.feature-grid .feature-card:nth-child(3) { transition-delay: .21s; }

/* Typing CTA and breathing concentric orbit. */
.final-cta {
  min-height: 560px;
  padding: 91px 25px 46px;
  isolation: isolate;
}
.final-cta .eyebrow { margin-bottom: 5px; }
.final-cta h2 { margin: 10px 0 13px; }
.final-cta > p:not(.eyebrow) { font-size: 16px; }
.final-orbit {
  width: 550px;
  height: 550px;
  top: -20px;
  box-shadow: 0 0 0 52px #b5cfbf14, 0 0 0 104px #b5cfbf0a;
  animation: orbitBreathing 16s ease-in-out infinite alternate;
  pointer-events: none;
}
.final-orbit::before,
.final-orbit::after {
  content: '';
  position: absolute;
  inset: -14px;
  border: 1px dashed #93b7a15a;
  border-radius: 50%;
  animation: orbitSpin 50s linear infinite;
}
.final-orbit::after {
  inset: 31px;
  border-style: solid;
  border-color: #d0c4a76c transparent #d0c4a76c transparent;
  animation-duration: 31s;
  animation-direction: reverse;
}
@keyframes orbitBreathing {
  from { transform: translateX(-50%) scale(.94) rotate(-3deg); opacity: .56; }
  to { transform: translateX(-50%) scale(1.045) rotate(3deg); opacity: .88; }
}
@keyframes orbitSpin { to { transform: rotate(360deg); } }
.typewriter-line { display: block; position: relative; }
.typewriter-measure { visibility: hidden; }
.typewriter-text { position: absolute; inset: 0; text-align: center; }
.typing-active .typewriter-text::after {
  content: '';
  display: inline-block;
  width: 3px;
  height: .75em;
  vertical-align: -.08em;
  margin-inline-start: 3px;
  border-radius: 2px;
  background: #ca775b;
  animation: blinkCursor .68s steps(1) infinite;
}
@keyframes blinkCursor { 50% { opacity: 0; } }
.cta-type-second {
  display: block;
  opacity: var(--typed-reveal, 1);
  transform: translateY(var(--typed-y, 0px));
  transition: opacity .2s, transform .25s;
}
.final-cta .pulse-button { margin-top: 20px; margin-bottom: 22px; }
.big-contact { gap: 3px; }
.big-contact strong { font-size: clamp(19px, 2vw, 27px); }

/* A compact footer across breakpoints. */
.site-footer { padding-top: 37px; padding-bottom: 17px; }
.footer-main { grid-template-columns: 1.5fr 1fr 1fr 1.25fr; gap: 25px; padding-bottom: 24px; }
.footer-main > div { gap: 7px; }
.footer-main strong { font-size: 16px; }
.footer-brand > strong { font-size: 23px; }
.footer-brand .brand-icon { width: 35px; height: 35px; border-radius: 10px; }
.footer-brand p { margin: 1px 0 0; line-height: 1.7; }
.footer-main a, .footer-main p, .footer-main span { font-size: 14px; }
.footer-contact span { font-size: 14px; }
.footer-bottom { padding-top: 13px; gap: 12px; }

@media (max-width: 1150px) {
  .footer-main { grid-template-columns: 1.2fr 1fr 1fr 1.15fr; gap: 17px; }
  .footer-contact { grid-column: auto; }
}

@media (max-width: 920px) {
  .scroll-experience { height: 305vh; }
  .hero-copy { top: 5%; }
  .story-panel h1, .story-panel h2 { font-size: clamp(39px, 7vw, 57px); }
  .section { padding: 68px 25px; }
  .section-sm { padding: 54px 25px; }
  .insight-strip { padding: 65px 25px; }
  .dark-stage { min-height: auto; padding: 58px 25px; }
  .final-cta { min-height: 0; padding: 75px 24px 56px; }
  .final-orbit { top: -17px; width: 520px; height: 520px; }
  .final-cta .pulse-button { margin-top: 20px; }
  .footer-main { grid-template-columns: 1fr 1fr 1fr; gap: 22px; }
  .footer-brand { grid-column: 1/-1; display: grid !important; grid-template-columns: auto 1fr; align-items: center !important; column-gap: 11px; }
  .footer-brand p { grid-column: 2; }
  .footer-contact { grid-column: auto; }
}

@media (max-width: 540px) {
  h1 { font-size: clamp(36px, 9vw, 45px); }
  h2 { font-size: clamp(29px, 7.5vw, 38px); }
  .story-panel h1, .story-panel h2 { font-size: clamp(34px, 8.7vw, 46px); }
  .scroll-experience { height: 300vh; }
  .hero-copy { top: 5%; }
  .hero-copy .story-panel { transition-duration: .58s, .6s, .58s; }
  .section { padding: 57px 19px; }
  .section-sm { padding: 43px 19px; }
  .section-head { margin-bottom: 25px; }
  .section-head h2 { font-size: 32px; }
  .insight-strip { padding: 54px 19px; gap: 18px; }
  .feature-grid { gap: 12px; }
  .feature-illustration { height: 205px; }
  .extra-card { min-height: 197px; padding: 17px 13px; }
  .extras-grid { gap: 9px; }
  .extras-action { margin-top: 21px; }
  .pricing-card { padding: 22px; }
  .dark-stage { padding: 48px 19px; gap: 34px; }
  .dark-text h2 { font-size: 39px; }
  .final-cta { padding: 69px 17px 48px; }
  .final-cta h2 { font-size: clamp(33px, 8.1vw, 42px); }
  .final-cta > p:not(.eyebrow) { font-size: 15px; }
  .final-orbit { width: 365px; height: 365px; top: 35px; }
  .registration-strip { padding: 33px 19px; gap: 16px; }
  .registration-strip h2 { font-size: 30px; }
  .site-footer { padding: 28px 19px 15px; }
  .footer-main { grid-template-columns: 1fr 1fr; gap: 22px 14px; padding-bottom: 20px; }
  .footer-main > div { gap: 7px; }
  .footer-brand { grid-column: 1/-1; }
  .footer-brand p { max-width: none; }
  .footer-contact {
    grid-column: 1/-1;
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-between;
    align-items: center !important;
    flex-wrap: wrap;
    column-gap: 15px;
  }
  .footer-bottom { padding-top: 10px; gap: 7px; }
  .footer-bottom span:nth-child(2) { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  /* Hero story and card sheets always animate, even with reduced-motion on. */
  .hero-orbit, .final-orbit, .final-orbit::before, .final-orbit::after,
  .typing-active .typewriter-text::after { animation: none; }
  /* The product sheets use an explicitly requested always-on animation. */
  .feature-card.reveal { transform: none; }
}
