html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: #0A0A0B; color: #F4F1EC; }
img { max-width: 100%; height: auto; }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 3px solid #FF6B3D; outline-offset: 3px; }
details > summary { list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 44px; }
details > summary::-webkit-details-marker { display: none; }
details > summary::after { content: "+"; font-size: 28px; font-weight: 400; line-height: 1; color: #FF6B3D; flex: none; transition: transform .2s; }
details[open] > summary::after { transform: rotate(45deg); }
[id] { scroll-margin-top: 16px; }

.order-input { width: 100%; box-sizing: border-box; }
.order-input:focus { outline: none; border-color: #0A0A0B !important; box-shadow: 0 0 0 3px rgba(255,107,61,.35); }
.order-input[aria-invalid="true"] { border-color: #B3261E !important; }
.order-field-error { color: #B3261E; font-size: 13px; font-weight: 700; line-height: 1.35; }
.order-field .iti { width: 100%; display: block; }
.order-field .iti__selected-flag { padding: 0 8px 0 16px; border-radius: 16px 0 0 16px; }
.order-field .iti--separate-dial-code .iti__selected-dial-code { font-size: 17px; color: #0A0A0B; }
.order-field .iti__country-list { color: #0A0A0B; border-radius: 12px; max-width: min(360px, 80vw); white-space: normal; }
.order-submit[disabled] { opacity: .7; cursor: progress !important; }
.order-submit .spinner { display: none; width: 20px; height: 20px; border: 3px solid rgba(10,10,11,.25); border-top-color: #0A0A0B; border-radius: 50%; animation: spin .8s linear infinite; }
.order-submit.is-loading .spinner { display: inline-block; }
.order-submit.is-loading .arrow { display: none; }
@keyframes spin { to { transform: rotate(360deg); } }

.order-submit .label { white-space: nowrap; }
.order-submit svg, .order-submit .spinner { flex: none; }

/* ---------- motion ---------- */
/* equalizer bars */
.wave-bar { transform-origin: 50% 50%; animation: eq var(--dur, 1.2s) ease-in-out var(--delay, 0s) infinite alternate; will-change: transform; }
@keyframes eq { 0% { transform: scaleY(.45); } 100% { transform: scaleY(1); } }

/* reveal on scroll (class is added by JS, so without JS everything stays visible) */
.reveal, .m-pain > div.reveal, .m-program > div.reveal, .m-lesson > div.reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.2,1); transition-delay: var(--rd, 0s); }
.reveal.is-in, .m-pain > div.reveal.is-in, .m-program > div.reveal.is-in, .m-lesson > div.reveal.is-in { opacity: 1; transform: none; }

/* floating bot card in the hero */
.m-hero-media > div { animation: float 6s ease-in-out infinite; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

/* card hover (mouse only) */
.m-pain > div, .m-program > div, .m-lesson > div { transition: transform .25s ease, border-color .25s ease, background-color .25s ease; }
@media (hover: hover) {
  .m-pain > div:hover, .m-program > div:hover, .m-lesson > div:hover { transform: translateY(-4px); border-color: #3A3A40 !important; background-color: #18181B !important; }
  .m-btn-hero, .m-btn-full, .order-submit { transition: transform .2s ease, box-shadow .2s ease; }
  .m-btn-hero:hover, .m-btn-full:hover, .order-submit:not([disabled]):hover { transform: translateY(-2px); }
}

/* ---------- sticky buy bar (phones only) ---------- */
.sticky-cta { display: none; }

/* ---------- phones ---------- */
@media (max-width: 640px) {
  body { font-size: 16px; }
  body:has(.sticky-cta) { padding-bottom: 84px; }

  /* hero */
  .m-btn-hero { flex: 1 1 100%; justify-content: center; min-height: 56px !important; font-size: 17px !important; padding: 0 20px !important; }
  .m-hero-media { max-width: 340px !important; margin: 0 auto 32px !important; }
  .m-wave { height: 56px !important; gap: 2px !important; }

  /* pains: 2x2 compact */
  .m-pain { grid-template-columns: 1fr 1fr !important; gap: 10px !important; }
  .m-pain > div { padding: 16px !important; border-radius: 18px !important; gap: 6px !important; }
  .m-pain > div > div:nth-child(1) { font-size: 15px !important; line-height: 1.3; }
  .m-pain > div > div:nth-child(2) { font-size: 13px !important; line-height: 1.4; }

  /* about: photo under the text, not too tall */
  .m-about { gap: 28px !important; }
  .m-about > img { aspect-ratio: 4 / 3 !important; max-width: none !important; flex-basis: 100% !important; }

  /* how a lesson is built: 2 columns of compact cards */
  .m-lesson { grid-template-columns: 1fr 1fr !important; gap: 10px !important; }
  .m-lesson > div { padding: 16px !important; border-radius: 18px !important; gap: 8px !important; }
  .m-lesson > div > div:nth-child(1) { font-size: 24px !important; }
  .m-lesson > div > div:nth-child(2) { font-size: 15px !important; line-height: 1.35; }

  /* how it works: 2x2 compact */
  .m-steps { grid-template-columns: 1fr 1fr !important; gap: 22px 14px !important; }
  .m-steps > div { padding-top: 14px !important; gap: 6px !important; }
  .m-steps > div > div:nth-child(1) { font-size: 28px !important; }
  .m-steps > div > div:nth-child(2) { font-size: 16px !important; line-height: 1.25; }
  .m-steps > div > div:nth-child(3) { font-size: 14px !important; line-height: 1.4; }

  /* program: compact cards */
  .m-program { gap: 10px !important; }
  .m-program > div { padding: 18px 20px !important; border-radius: 20px !important; gap: 6px !important; }
  .m-program > div > div:nth-child(2) { font-size: 18px !important; }
  .m-program > div > div:nth-child(3) { font-size: 14px !important; line-height: 1.45; }

  /* teacher & final CTA photos */
  .m-teacher-img { aspect-ratio: 1 / 1 !important; max-width: none !important; flex-basis: 100% !important; }
  .m-cta-img { aspect-ratio: 4 / 3 !important; flex-basis: 100% !important; }

  /* offer: form first */
  .m-offer-form { order: -1; padding: 20px !important; border-radius: 24px !important; gap: 18px !important; }
  .m-offer-form > div { gap: 18px !important; }
  .m-price > div:first-child { font-size: 52px !important; }
  .m-timer { gap: 4px !important; }
  .m-timer > div:not([aria-hidden]) { padding: 10px 2px 6px !important; border-radius: 12px !important; }
  .m-timer > div:not([aria-hidden]) > div:first-child { font-size: 26px !important; }
  .m-timer > div:not([aria-hidden]) > div:last-child { font-size: 11px !important; margin-top: 2px !important; }
  .m-timer > [aria-hidden] { font-size: 20px !important; padding-top: 10px !important; }
  .order-input { min-height: 54px !important; font-size: 16px !important; }
  .order-submit { min-height: 62px !important; font-size: 18px !important; padding: 0 20px !important; }
  .m-btn-full { align-self: stretch !important; justify-content: center; padding: 0 20px !important; }

  /* sticky buy bar */
  .sticky-cta {
    display: flex; position: fixed; z-index: 50; left: 12px; right: 12px; bottom: max(12px, env(safe-area-inset-bottom));
    min-height: 56px; padding: 0 22px; border-radius: 999px; align-items: center; justify-content: space-between; gap: 12px;
    background: #FF6B3D; color: #0A0A0B; text-decoration: none; font: 700 17px/1 Manrope, system-ui, sans-serif;
    box-shadow: 0 10px 30px rgba(0,0,0,.45); transform: translateY(160%); transition: transform .25s ease;
  }
  .sticky-cta b { font-family: Unbounded, sans-serif; font-size: 16px; }
  .sticky-cta.is-visible { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .sticky-cta { transition: none; }
  .wave-bar, .m-hero-media > div { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
  .order-submit .spinner { animation-duration: 2s; }
}
