/* Motion layer: decorative shapes, the scroll-drawn bridge line, and every entrance.
   Shapes and heading squiggles are static design; all movement sits behind prefers-reduced-motion + .has-motion. */

/* Lenis (smooth scroll) base rules */
html.lenis, html.lenis body { height: auto; }
html.lenis { scroll-behavior: auto; }
.lenis.lenis-stopped { overflow: clip; }
.lenis.lenis-smooth iframe { pointer-events: none; }

/* ---------- Decorative shapes ---------- */
main { position: relative; }
.hero, .concerns { overflow: clip; }
.feature-zone, .final-cta { position: relative; isolation: isolate; overflow: clip; }
.deco { position: absolute; z-index: -1; display: block; border-radius: 50%; pointer-events: none; }
.deco--fill { background: var(--deco-color); }
.deco--ring { border: 3px solid var(--deco-color); }
.deco--dash { border-style: dashed; }
.deco--sky { --deco-color: var(--color-sky); }
.deco--sky-deep { --deco-color: var(--color-sky-deep); }
.deco--blue { --deco-color: var(--color-blue); }
.deco--wood { --deco-color: var(--color-wood); }
.deco--white { --deco-color: var(--color-white); }
.deco--bubble { --deco-color: var(--color-bubble); }

.deco--hero-a { width: 15rem; height: 15rem; left: -5rem; bottom: -5rem; }
.deco--hero-b { width: 1.1rem; height: 1.1rem; left: 33%; top: 16%; }
.deco--hero-c { width: 6rem; height: 6rem; left: 36%; top: 58%; }
.deco--hero-d { width: 4.5rem; height: 4.5rem; right: 44%; bottom: 10%; }
.deco--hero-e { width: 0.8rem; height: 0.8rem; left: 4%; top: 22%; }
.deco--concerns-a { width: 10rem; height: 10rem; left: 40%; top: 45%; border-width: 2px; }
.deco--concerns-b { width: 0.9rem; height: 0.9rem; right: 47%; bottom: 3rem; }
.deco--sky-a { width: 7rem; height: 7rem; left: 8%; bottom: 10%; }
.deco--sky-b { width: 3rem; height: 3rem; right: 14%; top: 22%; }
.deco--sky-c { width: 4rem; height: 4rem; left: 18%; top: 18%; border-width: 2px; }
.deco--sky-d { width: 11rem; height: 11rem; right: -3rem; bottom: -3rem; }
.deco--feature-a { width: 20rem; height: 20rem; left: -8rem; top: 6rem; }
.deco--feature-b { width: 8rem; height: 8rem; right: -2rem; top: 32%; }
.deco--feature-c { width: 1.3rem; height: 1.3rem; right: 9%; top: 5rem; }
.deco--feature-d { width: 0.8rem; height: 0.8rem; left: 7%; top: 58%; }
.deco--feature-e { width: 13rem; height: 13rem; right: -4rem; bottom: 14rem; }
.deco--feature-f { width: 3rem; height: 3rem; left: 12%; bottom: 6rem; }
.deco--final-a { width: 11rem; height: 11rem; left: 6%; top: 18%; }
.deco--final-b { width: 1.1rem; height: 1.1rem; right: 16%; top: 26%; }
.deco--final-c { width: 6rem; height: 6rem; right: 8%; bottom: -2rem; }
.feature-zone > .container, .final-cta__inner { position: relative; z-index: 1; }

@media (max-width: 1359px) { .deco--hero-e { display: none; } }
@media (min-width: 641px) and (max-width: 1100px) { .deco--hero-c { display: none; } }
@media (max-width: 640px) {
  /* Small screens: shapes stay in the open margins of each section, never over the photo subject or body text. */
  .deco--hero-a, .deco--hero-b, .deco--hero-c, .deco--hero-d, .deco--hero-e, .deco--concerns-b, .deco--sky-b, .deco--sky-c, .deco--feature-c, .deco--feature-d, .deco--final-b { display: none; }
  .deco--concerns-a { width: 7rem; height: 7rem; left: auto; right: -2rem; top: 1.5rem; }
  .deco--sky-a { width: 4rem; height: 4rem; left: -1rem; bottom: 8%; }
  .deco--sky-d { width: 7rem; height: 7rem; }
  .deco--feature-a { width: 12rem; height: 12rem; left: -6rem; }
  .deco--feature-b { width: 5rem; height: 5rem; right: -2.5rem; }
  .deco--feature-e { width: 8rem; height: 8rem; right: -3rem; }
  .deco--final-a { width: 6rem; height: 6rem; left: -2.5rem; top: auto; bottom: 1.5rem; }
  .deco--final-c { width: 4rem; height: 4rem; right: -1.5rem; top: 1.5rem; bottom: auto; }
}

/* Hand-drawn squiggle under section headings */
.concerns h2::after, .feature-zone h2::after, .final-cta h2::after {
  content: ""; display: block; width: 5.5rem; height: 0.7rem; margin: 0.6rem auto 0; background: var(--color-wood);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 96 12'%3E%3Cpath d='M3 8c9-6 15-6 22 0s14 6 22 0 15-6 22 0 14 6 24 0' fill='none' stroke='%23000' stroke-width='3.2' stroke-linecap='round'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 96 12'%3E%3Cpath d='M3 8c9-6 15-6 22 0s14 6 22 0 15-6 22 0 14 6 24 0' fill='none' stroke='%23000' stroke-width='3.2' stroke-linecap='round'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
}
.concerns h2::after, .pricing h2::after { margin-inline-start: 0; }
.pricing h2::after { width: 4rem; }

/* ---------- The bridge: one line drawn down the page margins, ending at the final LINE button ---------- */
.bridge { position: absolute; z-index: 5; top: 0; left: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.bridge__path { fill: none; stroke: var(--color-ink); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.bridge__node { fill: var(--color-white); stroke: var(--color-ink); stroke-width: 2; transform-box: fill-box; transform-origin: center; }
.bridge__node--goal { fill: var(--color-line); stroke: var(--color-white); stroke-width: 3; }
@media (max-width: 1239px) { .bridge { display: none; } }

@media (prefers-reduced-motion: no-preference) {
  /* ---------- Opening: the photo zooms out of a circle, the headline pops in letter by letter ---------- */
  .js-ready .hero__photo img { animation: hero-zoom 1600ms var(--ease-out) both; }
  .js-ready .hero__prelude { animation: rise 700ms var(--ease-out) 200ms both; }
  .hero h1.is-split .char { display: inline-block; animation: char-pop 900ms var(--ease-spring) both; animation-delay: calc(300ms + var(--i) * 35ms); }
  .js-ready .hero__lead { animation: rise 800ms var(--ease-out) 1100ms both; }
  .js-ready .hero__card { animation: card-drop 1000ms var(--ease-spring) 1250ms both; }
  .js-ready .hero__whisper { animation: rise 1000ms var(--ease-out) 1700ms both; }

  .js-ready .deco { animation: deco-pop 900ms var(--ease-spring) both, deco-float var(--float, 7s) var(--ease-in-out) infinite alternate; }
  .deco:nth-of-type(2n) { --float: 5.5s; }
  .deco:nth-of-type(3n) { --float: 8.5s; }
  .js-ready .deco--hero-a { animation-delay: 500ms, 0s; }
  .js-ready .deco--hero-b { animation-delay: 900ms, 0s; }
  .js-ready .deco--hero-c { animation-delay: 1100ms, 0s; }
  .js-ready .deco--hero-d { animation-delay: 1300ms, 0s; }
  .js-ready .deco--hero-e { animation-delay: 700ms, 0s; }

  .has-motion .concerns__photo img, .has-motion .sky-cta__photo { scale: 1.18; }
  .has-motion .bridge__node { transform: scale(0); transition: transform 600ms var(--ease-spring); }
  .has-motion .bridge__node.is-on { transform: none; }
  .has-motion .bridge__node--goal.is-on { animation: goal-pulse 1600ms var(--ease-out) 600ms 3; }

  /* ---------- Benefits: icons spin into place ---------- */
  .has-motion [data-motion="benefit"] img { opacity: 0; transform: rotate(-200deg) scale(0); transition: opacity 300ms var(--ease-out), transform 900ms var(--ease-spring); }
  .has-motion [data-motion="benefit"] p { opacity: 0; transform: translateY(1rem); transition: opacity 500ms var(--ease-out), transform 700ms var(--ease-out); }
  .has-motion [data-motion="benefit"].is-visible img, .has-motion [data-motion="benefit"].is-visible p { opacity: 1; transform: none; }
  .has-motion .benefit:nth-child(2) img, .has-motion .benefit:nth-child(2) p { transition-delay: 120ms; }
  .has-motion .benefit:nth-child(3) img, .has-motion .benefit:nth-child(3) p { transition-delay: 240ms; }
  .has-motion .benefit:nth-child(4) img, .has-motion .benefit:nth-child(4) p { transition-delay: 360ms; }

  /* ---------- Concerns: the photo wipes open, each worry slides in and gets its tick drawn ---------- */
  .has-motion .concerns__photo img { clip-path: inset(0 0 0 45%); transform: scale(1.2); transition: clip-path 1100ms var(--ease-out), transform 1300ms var(--ease-out); }
  .has-motion .concerns__photo.is-visible img { clip-path: inset(0); transform: none; }
  .has-motion [data-motion="concerns"] h2 { opacity: 0; transform: translateY(1.5rem) rotate(-3deg); transition: opacity 500ms var(--ease-out), transform 900ms var(--ease-spring); }
  .has-motion [data-motion="concerns"] .check-list li { opacity: 0; transform: translateX(-3rem); transition: opacity 400ms var(--ease-out), transform 800ms var(--ease-spring); transition-delay: var(--d); }
  .has-motion [data-motion="concerns"] .check-list li::after { clip-path: inset(0 100% 0 0); transition: clip-path 350ms var(--ease-out); transition-delay: calc(var(--d) + 450ms); }
  .has-motion [data-motion="concerns"].is-visible h2, .has-motion [data-motion="concerns"].is-visible .check-list li { opacity: 1; transform: none; }
  .has-motion [data-motion="concerns"].is-visible .check-list li::after { clip-path: inset(0); }
  .check-list li:nth-child(1) { --d: 150ms; }
  .check-list li:nth-child(2) { --d: 260ms; }
  .check-list li:nth-child(3) { --d: 370ms; }
  .check-list li:nth-child(4) { --d: 480ms; }
  .check-list li:nth-child(5) { --d: 590ms; }

  /* Squiggles draw after their heading lands */
  .has-motion :is([data-motion="concerns"], [data-motion="pricing"], [data-motion="final"]) h2::after,
  .has-motion h2[data-motion="heading"]::after { clip-path: inset(0 100% 0 0); transition: clip-path 700ms var(--ease-out) 450ms; }
  .has-motion :is([data-motion="concerns"], [data-motion="pricing"], [data-motion="final"]).is-visible h2::after,
  .has-motion h2[data-motion="heading"].is-visible::after { clip-path: inset(0); }

  /* ---------- Sky: the card expands to full bleed (JS), bubbles rise, the headline pops ---------- */
  .has-motion [data-motion="sky"] .sky-cta__eyebrow, .has-motion [data-motion="sky"] .sky-cta__text { opacity: 0; transform: translateY(1.2rem); transition: opacity 600ms var(--ease-out), transform 800ms var(--ease-out); }
  .has-motion [data-motion="sky"] .sky-cta__text { transition-delay: 900ms; }
  .has-motion [data-motion="sky"] .sky-cta__pill { opacity: 0; transform: scale(0) rotate(-12deg); transition: opacity 300ms var(--ease-out) 200ms, transform 800ms var(--ease-spring) 200ms; }
  .has-motion [data-motion="sky"] h2.is-split .char { display: inline-block; opacity: 0; transform: translateY(1em) rotate(20deg) scale(0.4); transition: opacity 300ms var(--ease-out), transform 800ms var(--ease-spring); transition-delay: calc(350ms + var(--i) * 40ms); }
  .has-motion [data-motion="sky"].is-visible :is(.sky-cta__eyebrow, .sky-cta__text, .sky-cta__pill),
  .has-motion [data-motion="sky"].is-visible h2.is-split .char { opacity: 1; transform: none; }
  .has-motion [data-motion="sky"] .line-button, .has-motion [data-motion="final"] .line-button { opacity: 0; }
  .has-motion [data-motion="sky"].is-visible .line-button { animation: button-pop 1000ms var(--ease-spring) 1050ms both; }

  /* ---------- Features ---------- */
  .has-motion h2[data-motion="heading"] { opacity: 0; transform: translateY(2rem) scale(0.92); transition: opacity 500ms var(--ease-out), transform 900ms var(--ease-spring); }
  .has-motion h2[data-motion="heading"].is-visible { opacity: 1; transform: none; }
  .has-motion [data-motion="feature"] { opacity: 0; transform: translateY(4rem) rotate(-8deg) scale(0.85); transition: opacity 400ms var(--ease-out), transform 1000ms var(--ease-spring); }
  .has-motion [data-motion="feature"]:nth-child(2n) { transform: translateY(4rem) rotate(8deg) scale(0.85); }
  .has-motion [data-motion="feature"] img { transform: rotate(-180deg) scale(0); transition: transform 900ms var(--ease-spring) 250ms; }
  .has-motion [data-motion="feature"].is-visible, .has-motion [data-motion="feature"].is-visible img { opacity: 1; transform: none; }
  .has-motion .feature-card:nth-child(2), .has-motion .feature-card:nth-child(2) img { transition-delay: 120ms; }
  .has-motion .feature-card:nth-child(3), .has-motion .feature-card:nth-child(3) img { transition-delay: 240ms; }
  .has-motion .feature-card:nth-child(4), .has-motion .feature-card:nth-child(4) img { transition-delay: 360ms; }

  .has-motion [data-motion="pricing"] { opacity: 0; transform: translateX(-4rem) rotate(-4deg); transition: opacity 500ms var(--ease-out), transform 1000ms var(--ease-spring); }
  .has-motion [data-motion="pricing"] .pricing__items > div { opacity: 0; transform: translateY(1.5rem); transition: opacity 400ms var(--ease-out), transform 700ms var(--ease-spring); }
  .has-motion [data-motion="pricing"] .pricing__items > div:nth-child(1) { transition-delay: 300ms; }
  .has-motion [data-motion="pricing"] .pricing__items > div:nth-child(2) { transition-delay: 420ms; }
  .has-motion [data-motion="pricing"] .pricing__items > div:nth-child(3) { transition-delay: 540ms; }
  .has-motion [data-motion="pricing"] .pricing__items > div:nth-child(4) { transition-delay: 660ms; }
  .has-motion [data-motion="pricing"] .pricing__items > div:nth-child(5) { transition-delay: 780ms; }
  .has-motion [data-motion="pricing"] .pricing__items > div:nth-child(6) { transition-delay: 900ms; }
  .has-motion [data-motion="pricing"].is-visible, .has-motion [data-motion="pricing"].is-visible .pricing__items > div { opacity: 1; transform: none; }

  .has-motion [data-motion="topic"] { opacity: 0; transform: perspective(900px) rotateX(-75deg) translateY(2rem); transform-origin: 50% 0; transition: opacity 400ms var(--ease-out), transform 1000ms var(--ease-spring); }
  .has-motion [data-motion="topic"].is-visible { opacity: 1; transform: none; }
  .has-motion .topic-card:nth-child(2) { transition-delay: 140ms; }
  .has-motion .topic-card:nth-child(3) { transition-delay: 280ms; }

  .has-motion [data-motion="step"] { opacity: 0; transform: translateY(-3rem) rotate(-6deg); transition: opacity 400ms var(--ease-out), transform 900ms var(--ease-spring); }
  .has-motion [data-motion="step"]:nth-child(2n) { transform: translateY(-3rem) rotate(6deg); }
  .has-motion [data-motion="step"].is-visible { opacity: 1; transform: none; }
  .has-motion .step-card:nth-child(2) { transition-delay: 150ms; }
  .has-motion .step-card:nth-child(3) { transition-delay: 300ms; }
  .has-motion .step-card:nth-child(4) { transition-delay: 450ms; }
  .has-motion .step-card::before { transform: scaleX(0); transform-origin: left center; transition: transform 600ms var(--ease-out) 400ms; }
  .has-motion .step-card.is-visible::before { transform: scaleX(1); }
  .has-motion .step-card__number { background: var(--color-white); color: var(--color-blue); transition: background-color 350ms var(--ease-out) 500ms, color 350ms var(--ease-out) 500ms; }
  .has-motion .step-card.is-visible .step-card__number { background: var(--color-blue); color: var(--color-white); }
  .has-motion .step-card:not(:last-child)::after { opacity: 0; transform: translateX(-0.75rem); transition: opacity 350ms var(--ease-out) 700ms, transform 500ms var(--ease-spring) 700ms; }
  .has-motion .step-card.is-visible:not(:last-child)::after { opacity: 1; transform: none; }

  /* ---------- Final call: heading, then the button pops and rings ---------- */
  .has-motion [data-motion="final"] h2, .has-motion [data-motion="final"] p { opacity: 0; transform: translateY(2rem); transition: opacity 500ms var(--ease-out), transform 900ms var(--ease-spring); }
  .has-motion [data-motion="final"] p { transition-delay: 200ms; }
  .has-motion [data-motion="final"].is-visible :is(h2, p) { opacity: 1; transform: none; }
  .has-motion [data-motion="final"].is-visible .line-button { position: relative; animation: button-pop 1000ms var(--ease-spring) 450ms both; }
  .has-motion [data-motion="final"].is-visible .line-button::after { content: ""; position: absolute; inset: -2px; border: 2px solid var(--color-line); border-radius: inherit; animation: ring-out 1200ms var(--ease-out) 1400ms 2 both; }
}

@keyframes rise { from { opacity: 0; transform: translateY(1rem); } to { opacity: 1; transform: none; } }
@keyframes hero-zoom { from { clip-path: circle(16% at 62% 42%); transform: scale(1.5); } to { clip-path: circle(120% at 62% 42%); transform: none; } }
@keyframes char-pop { from { opacity: 0; transform: translateY(0.8em) rotate(-28deg) scale(0.3); } 50% { opacity: 1; } to { opacity: 1; transform: none; } }
@keyframes card-drop { from { opacity: 0; transform: translateY(5rem) rotate(7deg) scale(0.8); } to { opacity: 1; transform: none; } }
@keyframes deco-pop { from { scale: 0; } to { scale: 1; } }
@keyframes deco-float { from { transform: translate3d(0, 0, 0) rotate(0deg); } to { transform: translate3d(0.6rem, -1.2rem, 0) rotate(14deg); } }
@keyframes button-pop { from { opacity: 0; scale: 0.5; } to { opacity: 1; scale: 1; } }
@keyframes ring-out { from { opacity: 0.8; transform: scale(1); } to { opacity: 0; transform: scale(1.12, 1.5); } }
@keyframes goal-pulse { 50% { transform: scale(1.6); } }
