/* =============================================================
   TheraLink — Public Homepage
   public/css/public-home.css

   Loads after:
     fonts/filament/filament/inter/index.css
     css/filament/public/home.css  (nav / footer / .tl-btn / --tl-* / --marketing-*)

   Covers (homepage-only scope):
     • Homepage layout tokens (non-color: radii, shadows, layout)
     • Hero — editorial warm-surface, thread motif, restrained CTA
     • Thread divider — reusable motif between sections
     • Content sections: how-it-works, testimonials, final CTA
     • Plan cards — billing-period toggle DOM contract PRESERVED exactly:
         #tl-public-plans, #tl-plans-payload
         [data-billing-months], [data-plan-id]
         [data-pricing-root], [data-discount-root]
         .tl-public-plans__* class names unchanged
     • Scroll-reveal progressive enhancement
     • Responsive breakpoints
   ============================================================= */

/* =====================================================
   1. HOMEPAGE LAYOUT TOKENS
      Color tokens live in home.css :root (--marketing-*).
      These are geometry / spacing / shadow tokens scoped to
      the homepage layout only.
   ===================================================== */
:root {
    --hp-content-max:    72rem;
    --hp-content-pad:    clamp(1.25rem, 5vw, 4rem);
    --hp-section-gap:    3.5rem;

    --hp-radius-sm:      0.5rem;
    --hp-radius:         1rem;
    --hp-radius-lg:      1.5rem;
    --hp-radius-xl:      2rem;
    --hp-radius-pill:    9999px;

    --hp-shadow-xs: 0 1px 2px rgba(0,0,0,.05);
    --hp-shadow-sm: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.04);
    --hp-shadow:    0 4px 6px -1px rgba(0,0,0,.08), 0 2px 4px -2px rgba(0,0,0,.06);
    --hp-shadow-md: 0 10px 15px -3px rgba(0,0,0,.08), 0 4px 6px -4px rgba(0,0,0,.06);
    --hp-shadow-lg: 0 20px 25px -5px rgba(0,0,0,.08), 0 8px 10px -6px rgba(0,0,0,.04);
}

/* =====================================================
   2. SVG SPRITE HELPER
   ===================================================== */
.tl-icon-sprite {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
    pointer-events: none;
}

.tl-icon {
    display: inline-block;
    width: 1em;
    height: 1em;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
    vertical-align: middle;
}

/* =====================================================
   3. SHARED CONTENT PRIMITIVES
   ===================================================== */

/* Kicker label */
.tl-kicker {
    display: inline-block;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--tl-blue);
}

/* Main content wrapper */
.tl-ph-main {
    overflow-x: hidden;
}

/* Section scaffold */
.tl-section {
    padding-block: var(--hp-section-gap);
    padding-inline: var(--hp-content-pad);
}

.tl-section__heading {
    max-width: 42rem;
    margin-inline: auto;
    text-align: center;
    margin-bottom: 2rem;
}

.tl-section__heading .tl-kicker {
    display: block;
    margin-bottom: 0.75rem;
}

.tl-section__heading h2 {
    margin: 0;
    font-family: var(--tl-display);
    font-size: clamp(1.625rem, 3.5vw, 2.25rem);
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -0.025em;
    color: var(--tl-blue);
}

/*
 * Section rhythm: white → solid blue → white → solid green.
 * Cards stay cream/white; only the section canvas changes.
 */
.tl-section--workflow {
    background: var(--tl-surface);
}

.tl-section--trust {
    background: var(--tl-section-solid-blue);
}

.tl-section--plans {
    background: var(--tl-surface);
}

.tl-section--cta {
    background: var(--tl-section-solid-green);
}

/* Cream type on solid section canvases (headings live on the fill). */
.tl-section--trust .tl-section__heading h2 {
    color: var(--tl-on-solid);
}

/* Kickers use cream (not accent-green) — small type needs ≥4.5:1. */
.tl-section--trust .tl-section__heading .tl-kicker {
    color: var(--tl-on-solid-muted);
}

/* =====================================================
   4. SCROLL-REVEAL  (progressive enhancement)
      JS adds .js-reveal to <html>, then .tl-reveal--in
      or .is-revealed when elements enter the viewport.
   ===================================================== */
.js-reveal .tl-reveal {
    opacity: 0;
    transform: translateY(1.125rem);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.js-reveal .tl-reveal--in {
    opacity: 1;
    transform: none;
}

.js-reveal .tl-reveal.tl-reveal--stagger-2 { transition-delay: 0.1s; }
.js-reveal .tl-reveal.tl-reveal--stagger-3 { transition-delay: 0.2s; }

@media (prefers-reduced-motion: reduce) {
    .js-reveal .tl-reveal,
    .js-reveal .tl-reveal--in {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* =====================================================
   4b. DATA-REVEAL — scroll-triggered stagger
       CSS gates on .js-ready (set synchronously by the
       inline <script> in <head>). JS adds .is-revealed
       via IntersectionObserver. The inline <script> also
       registers a 2 s timeout fallback.
       No-JS path: .js-ready never set → elements visible.
   ===================================================== */
@media (prefers-reduced-motion: no-preference) {
    .js-ready [data-reveal] {
        opacity: 0;
        transform: translateY(1rem);
        transition: opacity 0.5s ease-out, transform 0.5s ease-out;
    }

    .js-ready [data-reveal].is-revealed {
        opacity: 1;
        transform: none;
    }

    .tl-steps > [data-reveal]:nth-child(2)              { transition-delay: 0.10s; }
    .tl-steps > [data-reveal]:nth-child(3)              { transition-delay: 0.20s; }

    .tl-public-plans__grid > [data-reveal]:nth-child(2) { transition-delay: 0.10s; }
    .tl-public-plans__grid > [data-reveal]:nth-child(3) { transition-delay: 0.20s; }
    .tl-public-plans__grid > [data-reveal]:nth-child(4) { transition-delay: 0.30s; }
    .tl-public-plans__grid > [data-reveal]:nth-child(n+5) { transition-delay: 0.40s; }
}

/* =====================================================
   5. HERO — "The Handoff"
      Full-bleed diagonal gradient, dark nav overlay,
      floating demo cards connected by animated thread.
   ===================================================== */

/* Dark gradient nav lives in home.css (shared across all four public pages). */

.tl-ph-hero {
    position: relative;
    min-height: 0;
    background: var(--hero-gradient);
    /* Clear fixed pill nav (12px offset + bar) — keep hero compact below it. */
    padding-top: calc(12px + env(safe-area-inset-top) + var(--tl-nav-height) + 1.25rem);
    padding-bottom: 2rem;
    padding-inline: var(--hp-content-pad);
    display: flex;
    align-items: center;
    overflow-x: clip;
    overflow-y: visible;
}

.tl-ph-hero__inner {
    max-width: var(--hp-content-max);
    width: 100%;
    margin-inline: auto;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.95fr);
    gap: clamp(2.5rem, 6vw, 5rem);
    align-items: center;
}

/* --- Copy column --- */
.tl-ph-hero__copy {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.tl-ph-hero__eyebrow {
    margin: 0 0 1.25rem;
    font-family: var(--tl-font);
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    line-height: 1.5;
    color: var(--hero-accent-green);
}

.tl-ph-hero__highlight {
    color: var(--hero-cream);
    font-weight: 700;
}

.tl-ph-hero__heading {
    margin: 0 0 1.5rem;
    font-family: var(--tl-display);
    font-size: clamp(2rem, 4.2vw, 3.25rem);
    font-weight: 600;
    line-height: 1.12;
    letter-spacing: -0.02em;
    color: var(--hero-cream);
    max-width: 18ch;
    text-wrap: balance;
}

.tl-ph-hero__support {
    margin: 0 0 2rem;
    font-size: clamp(0.9375rem, 1.6vw, 1.0625rem);
    line-height: 1.82;
    color: var(--hero-cream-muted);
    max-width: 52ch;
}

.tl-ph-hero__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.875rem;
}

.tl-ph-hero__cta {
    min-height: 50px;
    border-radius: 12px;
    font-weight: 700;
    text-decoration: none;
}

.tl-ph-hero__cta--primary {
    color: var(--hero-grad-1);
    background: var(--hero-accent-green);
    border: 1px solid var(--hero-accent-green);
    box-shadow: 0 10px 24px rgba(10, 31, 46, 0.28);
}

.tl-ph-hero__cta--primary:hover {
    background: color-mix(in srgb, var(--hero-accent-green) 88%, var(--hero-cream));
    border-color: color-mix(in srgb, var(--hero-accent-green) 88%, var(--hero-cream));
    transform: translateY(-1px);
}

.tl-ph-hero__cta--ghost {
    color: var(--hero-cream);
    background: transparent;
    border: 1.5px solid rgba(250, 249, 246, 0.55);
    box-shadow: none;
}

.tl-ph-hero__cta--ghost:hover {
    background: rgba(250, 249, 246, 0.1);
    border-color: var(--hero-cream);
    transform: translateY(-1px);
}

/* -------------------------------------------------------
   Hero stagger reveal
   ------------------------------------------------------- */
@media (prefers-reduced-motion: no-preference) {
    .js-ready [data-hero-animate] {
        opacity: 0;
        transform: translateY(14px);
        transition: opacity 0.65s ease-out, transform 0.65s ease-out;
    }

    .js-ready .hero-ready [data-hero-animate] {
        opacity: 1;
        transform: none;
    }

    .js-ready .hero-ready .tl-ph-hero__eyebrow  { transition-delay: 0.05s; }
    .js-ready .hero-ready .tl-ph-hero__heading  { transition-delay: 0.18s; }
    .js-ready .hero-ready .tl-ph-hero__support  { transition-delay: 0.32s; }
    .js-ready .hero-ready .tl-ph-hero__actions  { transition-delay: 0.46s; }
}

/* --- Handoff scene (right column) --- */
.tl-ph-hero__scene {
    position: relative;
    min-height: clamp(320px, 42vw, 420px);
}

.tl-ph-handoff {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: inherit;
}

.tl-ph-handoff__thread {
    position: absolute;
    inset: 0;
    z-index: 1;
    width: 100%;
    height: 100%;
    overflow: visible;
    pointer-events: none;
}

.tl-ph-handoff__path {
    fill: none;
    stroke: url(#tl-handoff-grad);
    stroke-width: 2.5;
    stroke-linecap: round;
    vector-effect: non-scaling-stroke;
    opacity: 0.9;
}

.tl-ph-handoff__endpoint {
    opacity: 0.95;
}

.tl-ph-handoff__pulse {
    filter: drop-shadow(0 0 5px rgba(95, 211, 174, 0.95));
}

.tl-ph-handoff__card {
    position: absolute;
    z-index: 2;
    width: 54%;
    max-width: 15.5rem;
    padding: 1.125rem 1.25rem;
    border-radius: 1rem;
    background: var(--hero-cream);
    border: 1px solid rgba(10, 31, 46, 0.08);
    box-shadow:
        0 18px 40px rgba(10, 31, 46, 0.22),
        0 4px 12px rgba(10, 31, 46, 0.12);
}

/* Card % positions share the SVG viewBox space so the thread
   meets the bottom-left of SESSION NOTE and top-left of WHATSAPP. */
.tl-ph-handoff__card--therapist {
    top: 4%;
    left: 42%;
    animation: tl-handoff-float-a 6s ease-in-out infinite;
}

.tl-ph-handoff__card--patient {
    top: 60%;
    left: 10%;
    animation: tl-handoff-float-b 7.2s ease-in-out infinite;
    animation-delay: 1.1s;
}

.tl-ph-handoff__card-label {
    margin: 0 0 0.5rem;
    font-size: 0.6875rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.tl-ph-handoff__card--therapist .tl-ph-handoff__card-label {
    color: var(--tl-blue);
}

.tl-ph-handoff__card--patient .tl-ph-handoff__card-label {
    color: var(--tl-green);
}

.tl-ph-handoff__card-title {
    margin: 0 0 0.375rem;
    font-family: var(--tl-font);
    font-size: 0.9375rem;
    font-weight: 700;
    line-height: 1.35;
    color: var(--marketing-ink);
}

.tl-ph-handoff__card-meta {
    margin: 0 0 0.625rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--tl-text-secondary);
}

.tl-ph-handoff__card-body {
    margin: 0;
    font-size: 0.8125rem;
    line-height: 1.55;
    color: var(--tl-text-secondary);
}

/* Ambient — only two small filled dots, parked beside the thread */
.tl-ph-handoff__ambient {
    position: absolute;
    z-index: 1;
    pointer-events: none;
    border-radius: 50%;
}

.tl-ph-handoff__ambient--dot-a {
    top: 52%;
    left: 30%;
    width: 7px;
    height: 7px;
    background: var(--hero-accent-green);
    opacity: 0.55;
    animation: tl-handoff-pulse 4.2s ease-in-out infinite;
}

.tl-ph-handoff__ambient--dot-b {
    top: 56%;
    left: 22%;
    width: 5px;
    height: 5px;
    background: rgba(250, 249, 246, 0.7);
    opacity: 0.5;
    animation: tl-handoff-pulse 5.5s ease-in-out infinite 0.8s;
}

@keyframes tl-handoff-float-a {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-10px); }
}

@keyframes tl-handoff-float-b {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-14px); }
}

@keyframes tl-handoff-pulse {
    0%, 100% { opacity: 0.35; transform: scale(1); }
    50%      { opacity: 0.75; transform: scale(1.12); }
}

@media (prefers-reduced-motion: reduce) {
    .tl-ph-handoff__card--therapist,
    .tl-ph-handoff__card--patient,
    .tl-ph-handoff__ambient {
        animation: none !important;
    }

    .tl-ph-handoff__pulse {
        display: none;
    }
}

/* =====================================================
   5b. THREAD DIVIDER — reusable section separator
       Replaces plain <hr> between sections. Two endpoint
       dots (accent + accent-soft) connected by a thin
       gradient line — the brand thread motif in miniature.
   ===================================================== */
/* .tl-thread-divider lives in home.css (shared short filament). */

/* =====================================================
   6. HOW IT WORKS
   ===================================================== */
.tl-steps {
    max-width: var(--hp-content-max);
    margin-inline: auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.tl-step {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    padding: 2rem;
    background: var(--tl-surface);
    border: 1px solid rgba(15, 23, 42, 0.09);
    border-radius: var(--hp-radius-lg);
    box-shadow: var(--hp-shadow-xs);
}

@media (prefers-reduced-motion: no-preference) {
    .tl-step {
        transition: box-shadow 0.18s ease-out, transform 0.18s ease-out, border-color 0.18s ease-out;
    }

    .tl-step:hover {
        box-shadow: var(--hp-shadow-md);
        transform: translateY(-3px);
        border-color: rgba(32, 127, 191, 0.22);
    }

    .tl-step__icon {
        transition: box-shadow 0.18s ease-out, transform 0.18s ease-out;
    }

    .tl-step:hover .tl-step__icon {
        box-shadow: 0 0 0 4px rgba(32, 127, 191, 0.16);
        transform: scale(1.04);
    }

    .tl-step:hover .tl-step__icon--green {
        box-shadow: 0 0 0 4px rgba(76, 175, 147, 0.18);
    }
}

.tl-step__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 50%;
    background: var(--tl-blue);
    color: #ffffff;
    flex-shrink: 0;
}

.tl-step__icon--green {
    background: var(--tl-green);
}

.tl-step__icon .tl-home-icon {
    color: #ffffff;
}

.tl-step__body h3 {
    margin: 0 0 0.5rem;
    font-family: var(--tl-display);
    font-size: 1.0625rem;
    font-weight: 600;
    color: var(--marketing-ink);
    letter-spacing: -0.01em;
}

.tl-step__body p {
    margin: 0;
    font-size: 0.9375rem;
    line-height: 1.72;
    color: var(--marketing-muted);
}

/* =====================================================
   7. TESTIMONIALS — infinite auto marquee
   ===================================================== */
.tl-testimonials {
    --tl-testimonial-gap: 1.25rem;
    --tl-testimonial-card-w: min(22rem, 78vw);
    max-width: none;
    margin-inline: calc(-1 * var(--hp-content-pad));
}

.tl-testimonials__viewport {
    overflow: hidden;
    mask-image: linear-gradient(
        to right,
        transparent,
        #000 4%,
        #000 96%,
        transparent
    );
    -webkit-mask-image: linear-gradient(
        to right,
        transparent,
        #000 4%,
        #000 96%,
        transparent
    );
}

.tl-testimonials__track {
    display: flex;
    width: max-content;
    gap: 0;
    padding-block: 0.25rem;
}

.tl-testimonials__set {
    display: flex;
    flex-shrink: 0;
    gap: var(--tl-testimonial-gap);
    padding-inline-end: var(--tl-testimonial-gap);
}

.tl-testimonials.is-animated .tl-testimonials__track {
    animation: tl-testimonials-marquee 48s linear infinite;
}

.tl-testimonials.is-paused .tl-testimonials__track,
.tl-testimonials:hover .tl-testimonials__track,
.tl-testimonials:focus-within .tl-testimonials__track {
    animation-play-state: paused;
}

@keyframes tl-testimonials-marquee {
    from { transform: translate3d(0, 0, 0); }
    to   { transform: translate3d(-50%, 0, 0); }
}

.tl-testimonial-card {
    flex: 0 0 var(--tl-testimonial-card-w);
    margin: 0;
    padding: 1.5rem 1.5rem 1.375rem;
    border-radius: var(--hp-radius-lg);
    border: 1px solid rgba(250, 249, 246, 0.16);
    background: var(--marketing-surface, #ffffff);
    box-shadow: var(--hp-shadow-xs);
}

.tl-testimonial-card__stars {
    display: flex;
    align-items: center;
    gap: 0.2rem;
    margin-bottom: 0.875rem;
    color: #D4A017;
}

.tl-testimonial-card__star {
    flex-shrink: 0;
    display: block;
}

.tl-testimonial-card__quote {
    margin: 0;
    font-family: var(--tl-font);
    font-size: 0.9375rem;
    line-height: 1.7;
    color: var(--marketing-muted, #4b5563);
}

@media (prefers-reduced-motion: reduce) {
    .tl-testimonials.is-animated .tl-testimonials__track {
        animation: none;
    }

    .tl-testimonials__track {
        flex-wrap: wrap;
        width: min(100%, var(--hp-content-max));
        margin-inline: auto;
        justify-content: center;
        gap: var(--tl-testimonial-gap);
        padding-inline: var(--hp-content-pad);
    }

    .tl-testimonials__set {
        display: contents;
    }

    .tl-testimonials__set[aria-hidden="true"] {
        display: none;
    }

    .tl-testimonials__viewport {
        mask-image: none;
        -webkit-mask-image: none;
        overflow: visible;
    }
}

/* =====================================================
   8. PLANS SECTION
      IMPORTANT: All .tl-public-plans__* class names,
      data-* attributes, and the #tl-public-plans /
      #tl-plans-payload IDs are referenced by
      public-home.js billing-period toggle. Do NOT rename
      any selector in this section without updating the JS.
   ===================================================== */

.tl-public-plans {
    max-width: var(--hp-content-max);
    margin-inline: auto;
}

/* Billing period toggle */
.tl-public-plans__billing-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2.5rem;
    flex-wrap: wrap;
}

.tl-public-plans__billing-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--marketing-muted);
    white-space: nowrap;
}

.tl-public-plans__billing-toggle {
    display: inline-flex;
    background: rgba(15, 23, 42, 0.04);
    border: 1px solid rgba(15, 23, 42, 0.09);
    border-radius: var(--hp-radius-pill);
    padding: 0.25rem;
    gap: 0.25rem;
}

.tl-public-plans__billing-toggle-btn {
    appearance: none;
    border: none;
    background: transparent;
    padding: 0.375rem 1rem;
    border-radius: var(--hp-radius-pill);
    font-family: inherit;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--marketing-muted);
    cursor: pointer;
    line-height: 1;
    transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
    white-space: nowrap;
}

.tl-public-plans__billing-toggle-btn:hover {
    color: var(--marketing-ink);
}

.tl-public-plans__billing-toggle-btn--active {
    background: var(--tl-blue);
    color: var(--tl-surface);
    font-weight: 600;
    box-shadow: var(--hp-shadow-sm);
}

/* Plan card grid — wide enough for priced plans + the static Custom clinic card */
.tl-public-plans__grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
    align-items: stretch;
    max-width: 68rem;
    margin-inline: auto;
}

/* Individual plan card */
.tl-public-plans__card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    flex: 1 1 18rem;
    max-width: 22rem;
    min-height: 100%;
    background: var(--tl-surface);
    border: 1px solid rgba(15, 23, 42, 0.09);
    border-radius: var(--hp-radius-lg);
    padding: 1.875rem;
    box-shadow: var(--hp-shadow-sm);
}

@media (prefers-reduced-motion: no-preference) {
    .tl-public-plans__card {
        transition: box-shadow 0.22s ease, transform 0.22s ease;
    }

    .tl-public-plans__card:hover {
        box-shadow: var(--hp-shadow-md);
        transform: translateY(-3px);
    }

    .tl-public-plans__card--recommended:hover {
        box-shadow:
            0 0 0 2px var(--tl-blue),
            var(--hp-shadow-lg);
    }
}

.tl-public-plans__card--recommended {
    border-color: transparent;
    box-shadow:
        0 0 0 2px var(--tl-blue),
        var(--hp-shadow-md);
}

.tl-public-plans__card--unavailable {
    opacity: 0.62;
    pointer-events: none;
}

/* Custom clinic build — distinct from priced / recommended plan cards */
.tl-public-plans__card--custom {
    border-color: rgba(76, 175, 147, 0.32);
    background:
        linear-gradient(165deg, rgba(76, 175, 147, 0.08) 0%, transparent 42%),
        var(--tl-surface);
}

@media (prefers-reduced-motion: no-preference) {
    .tl-public-plans__card--custom:hover {
        box-shadow:
            0 0 0 1px rgba(76, 175, 147, 0.35),
            var(--hp-shadow-md);
    }
}

.tl-public-plans__clinic-label {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--tl-green);
    margin: 0 0 0.5rem;
}

.tl-public-plans__clinic-label::before {
    content: '';
    display: inline-block;
    width: 0.4375rem;
    height: 0.4375rem;
    border-radius: 50%;
    background: var(--tl-green);
}

.tl-public-plans__custom-lede {
    margin: 0;
    font-size: 0.875rem;
    line-height: 1.55;
    color: var(--marketing-muted);
}

.tl-public-plans__recommendation {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--tl-blue);
    margin-bottom: 0.5rem;
}

.tl-public-plans__recommendation::before {
    content: '';
    display: inline-block;
    width: 0.4375rem;
    height: 0.4375rem;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--marketing-accent), var(--marketing-accent-soft));
}

.tl-public-plans__card-name {
    margin: 0;
    font-family: var(--tl-display);
    font-size: 1.1875rem;
    font-weight: 600;
    letter-spacing: -0.015em;
    color: var(--marketing-ink);
}

/* Pricing area */
.tl-public-plans__pricing {
    min-height: 3rem;
    display: flex;
    align-items: flex-start;
}

.tl-public-plans__contact-price {
    margin: 0;
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--marketing-ink);
}

.tl-public-plans__pricing-unavailable {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.tl-public-plans__pricing-unavailable-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--marketing-muted);
}

.tl-public-plans__pricing-unavailable-copy {
    margin: 0;
    font-size: 0.8125rem;
    color: var(--marketing-muted);
    line-height: 1.5;
}

.tl-public-plans__price {
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.25rem 0.5rem;
    line-height: 1;
}

.tl-public-plans__price-original {
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--marketing-muted);
    text-decoration: line-through;
    align-self: center;
}

.tl-public-plans__price-amount {
    font-size: 1.875rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--marketing-ink);
}

.tl-public-plans__price-qualifier {
    font-size: 0.8125rem;
    color: var(--marketing-muted);
    align-self: flex-end;
    padding-bottom: 0.25rem;
}

/* Billing-period price crossfade — JS adds .is-fading before innerHTML swap */
@media (prefers-reduced-motion: no-preference) {
    [data-pricing-root],
    [data-discount-root] {
        transition: opacity 0.15s ease-out;
    }

    [data-pricing-root].is-fading,
    [data-discount-root].is-fading {
        opacity: 0;
    }
}

/* Discount badge */
.tl-public-plans__discount-badge {
    display: inline-flex;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: rgba(32, 127, 191, 0.06);
    border: 1px solid rgba(32, 127, 191, 0.2);
    border-radius: var(--hp-radius-sm);
}

.tl-public-plans__discount-icon {
    flex-shrink: 0;
    width: 0.875rem;
    height: 0.875rem;
    color: var(--tl-blue);
    margin-top: 0.1rem;
}

.tl-public-plans__discount-copy {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.tl-public-plans__discount-label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--tl-blue);
}

.tl-public-plans__discount-expiry {
    font-size: 0.75rem;
    color: var(--marketing-muted);
    line-height: 1.4;
}

/* Feature list */
.tl-public-plans__features {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
    flex: 1;
}

.tl-public-plans__features li {
    display: flex;
    align-items: flex-start;
    gap: 0.625rem;
    font-size: 0.875rem;
    line-height: 1.55;
    color: var(--tl-text);
}

.tl-public-plans__feature-icon {
    flex-shrink: 0;
    width: 1rem;
    height: 1rem;
    color: var(--tl-green);
    margin-top: 0.15rem;
}

.tl-public-plans__limits {
    font-weight: 600;
    color: var(--marketing-ink) !important;
}

/* Plan CTA button */
.tl-public-plans__cta {
    width: 100%;
    justify-content: center;
    text-align: center;
    margin-top: auto;
    padding-top: 0.5rem;
}

/* =====================================================
   9. FINAL CTA SECTION
   ===================================================== */
.tl-cta {
    --tl-cta-ink: var(--tl-blue-dark, #0B4F8A);
    --tl-cta-muted: color-mix(in srgb, var(--tl-text-secondary, #6B7280) 88%, var(--tl-text, #111827));
    max-width: var(--hp-content-max);
    margin-inline: auto;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(250, 249, 246, 0.22);
    border-radius: var(--hp-radius-xl);
    background:
        radial-gradient(circle at 92% 8%, rgba(76, 175, 147, 0.22), transparent 36%),
        radial-gradient(circle at 8% 100%, rgba(32, 127, 191, 0.16), transparent 40%),
        linear-gradient(135deg, #F7FBFF 0%, #F3FAF7 55%, #EEF8F4 100%);
    box-shadow:
        0 1px 2px rgba(15, 23, 42, 0.04),
        0 18px 40px rgba(10, 31, 46, 0.14);
}

.tl-cta::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: linear-gradient(180deg, var(--tl-blue), var(--tl-green));
}

.tl-cta__inner {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    max-width: 40rem;
    padding: clamp(1.75rem, 3.5vw, 2.75rem) clamp(1.75rem, 4vw, 3rem);
}

.tl-cta__inner .tl-kicker {
    display: block;
    margin: 0 0 0.75rem;
    color: var(--tl-blue);
}

.tl-cta__inner h2 {
    margin: 0;
    font-family: var(--tl-display);
    font-size: clamp(1.5rem, 3vw, 2.125rem);
    font-weight: 600;
    letter-spacing: -0.03em;
    line-height: 1.2;
    color: var(--tl-cta-ink);
    text-wrap: balance;
}

.tl-cta__lead {
    margin: 0.875rem 0 0;
    max-width: 36rem;
    font-size: 1rem;
    line-height: 1.7;
    color: var(--tl-cta-muted);
}

.tl-cta__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.tl-cta__actions .tl-btn {
    min-height: 2.75rem;
}

.tl-cta__trust {
    margin: 1.5rem 0 0;
    padding-top: 1.125rem;
    border-top: 1px solid rgba(15, 23, 42, 0.08);
    font-size: 0.8125rem;
    letter-spacing: 0.01em;
    line-height: 1.5;
    color: color-mix(in srgb, var(--tl-cta-muted) 92%, var(--tl-cta-ink));
}

@media (prefers-reduced-motion: no-preference) {
    .tl-cta {
        transition: box-shadow 0.22s ease-out, transform 0.22s ease-out, border-color 0.22s ease-out;
    }

    .tl-cta:hover {
        transform: translateY(-2px);
        border-color: rgba(250, 249, 246, 0.35);
        box-shadow:
            0 1px 2px rgba(15, 23, 42, 0.04),
            0 22px 48px rgba(10, 31, 46, 0.18);
    }
}

/* =====================================================
   10. BTN ARROW HELPER
   ===================================================== */
.tl-btn__arrow {
    margin-left: 0.375rem;
}

/* =====================================================
   11. RESPONSIVE — compact desktop (≤ 1120px)
   ===================================================== */
@media (max-width: 1120px) {
    .tl-ph-hero__inner {
        gap: clamp(1.75rem, 4vw, 3rem);
    }

    .tl-ph-hero__heading {
        font-size: clamp(1.875rem, 3.6vw, 2.75rem);
    }

    .tl-ph-handoff__card {
        width: 58%;
        max-width: 14.5rem;
    }
}

/* =====================================================
   12. RESPONSIVE — tablet (≤ 960px)
   ===================================================== */
@media (max-width: 960px) {
    :root {
        --hp-section-gap: 2.75rem;
    }

    .tl-ph-hero {
        min-height: 0;
        padding-top: calc(12px + env(safe-area-inset-top) + var(--tl-nav-height) + 1rem);
        padding-bottom: 1.5rem;
        align-items: flex-start;
    }

    .tl-ph-hero__inner {
        grid-template-columns: 1fr;
        gap: 2.25rem;
    }

    /* Mobile/tablet: document-flow card stack — not scaled absolute coords */
    .tl-ph-hero__scene {
        order: -1;
        width: min(100%, 34rem);
        margin-inline: auto;
        min-height: 0;
    }

    .tl-ph-hero__copy {
        align-items: center;
        text-align: center;
        max-width: 40rem;
        margin-inline: auto;
    }

    .tl-ph-hero__support {
        max-width: 48ch;
    }

    .tl-ph-hero__actions {
        justify-content: center;
    }

    .tl-ph-handoff {
        display: grid;
        grid-template-columns: 1fr 1fr;
        align-items: stretch;
        gap: 0.75rem;
        width: 100%;
        height: auto;
        min-height: 0;
    }

    .tl-ph-handoff__thread,
    .tl-ph-handoff__ambient {
        display: none;
    }

    .tl-ph-handoff__card {
        position: relative;
        inset: auto;
        top: auto;
        left: auto;
        right: auto;
        bottom: auto;
        z-index: auto;
        width: 100%;
        max-width: none;
        animation: none !important;
        padding: 0.9rem 1rem;
    }

    .tl-ph-handoff__card--therapist,
    .tl-ph-handoff__card--patient {
        top: auto;
        left: auto;
    }

    .tl-ph-hero__heading {
        max-width: 18ch;
    }

    .tl-section__heading {
        margin-bottom: 1.75rem;
    }

    .tl-steps {
        grid-template-columns: 1fr;
        max-width: 38rem;
        gap: 1rem;
    }

    .tl-step {
        flex-direction: row;
        align-items: flex-start;
        gap: 1.125rem;
        padding: 1.5rem 1.625rem;
    }

    .tl-step__body h3 {
        margin-bottom: 0.35rem;
    }

    .tl-cta {
        border-radius: var(--hp-radius-lg);
    }

    .tl-cta__inner {
        align-items: center;
        text-align: center;
        max-width: none;
        padding: 2rem 1.75rem;
    }

    .tl-cta__lead {
        max-width: 34rem;
    }

    .tl-cta__actions {
        justify-content: center;
        width: 100%;
    }

    .tl-cta__actions .tl-btn {
        min-width: 10.5rem;
        justify-content: center;
    }

    .tl-cta__trust {
        width: 100%;
        text-align: center;
    }

    .tl-public-plans__grid {
        max-width: none;
    }
}

/* =====================================================
   13. RESPONSIVE — mobile (≤ 600px)
   ===================================================== */
@media (max-width: 600px) {
    :root {
        --hp-section-gap: 2.25rem;
        --hp-content-pad: 1.25rem;
    }

    .tl-ph-hero {
        padding-top: calc(12px + env(safe-area-inset-top) + var(--tl-nav-height) + 0.75rem);
        padding-bottom: 1.25rem;
        min-height: 0;
    }

    .tl-ph-hero__inner {
        gap: 1.75rem;
    }

    .tl-ph-hero__eyebrow {
        font-size: 0.75rem;
        margin-bottom: 1rem;
    }

    .tl-ph-hero__heading {
        font-size: clamp(1.75rem, 7.5vw, 2.125rem);
        letter-spacing: -0.02em;
        margin-bottom: 1.125rem;
        max-width: none;
    }

    .tl-ph-hero__support {
        font-size: 0.9375rem;
        line-height: 1.7;
        margin-bottom: 1.5rem;
    }

    .tl-ph-hero__scene {
        width: 100%;
        min-height: 0;
    }

    .tl-ph-handoff {
        gap: 0.625rem;
    }

    .tl-ph-handoff__card {
        width: 100%;
        max-width: none;
        padding: 0.75rem 0.8rem;
        border-radius: 0.875rem;
        box-shadow:
            0 10px 22px rgba(10, 31, 46, 0.18),
            0 2px 8px rgba(10, 31, 46, 0.1);
    }

    .tl-ph-handoff__card-title {
        font-size: 0.8125rem;
    }

    .tl-ph-handoff__card-body {
        font-size: 0.7rem;
        line-height: 1.4;
    }

    .tl-ph-handoff__card--therapist,
    .tl-ph-handoff__card--patient {
        top: auto;
        left: auto;
    }

    .tl-ph-hero__actions {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        max-width: 22rem;
    }

    .tl-ph-hero__cta {
        width: 100%;
        justify-content: center;
    }

    .tl-section__heading {
        margin-bottom: 1.5rem;
    }

    .tl-section__heading h2 {
        font-size: clamp(1.375rem, 5.5vw, 1.75rem);
    }

    .tl-steps {
        grid-template-columns: 1fr;
        max-width: none;
    }

    .tl-step {
        padding: 1.25rem 1.125rem;
        gap: 0.95rem;
        border-radius: var(--hp-radius);
    }

    .tl-step__icon {
        width: 2.5rem;
        height: 2.5rem;
    }

    .tl-step__body p {
        font-size: 0.875rem;
        line-height: 1.65;
    }

    .tl-testimonials {
        --tl-testimonial-gap: 1rem;
        --tl-testimonial-card-w: min(18.5rem, 84vw);
    }

    .tl-testimonial-card {
        padding: 1.25rem 1.2rem 1.15rem;
        border-radius: var(--hp-radius);
    }

    .tl-public-plans__billing-bar {
        flex-direction: column;
        align-items: center;
        gap: 0.75rem;
        margin-bottom: 1.75rem;
    }

    .tl-public-plans__billing-toggle {
        width: 100%;
        max-width: 22rem;
        justify-content: stretch;
    }

    .tl-public-plans__billing-toggle-btn {
        flex: 1 1 0;
        text-align: center;
        padding-inline: 0.5rem;
    }

    .tl-public-plans__grid {
        max-width: none;
        gap: 1rem;
    }

    .tl-public-plans__card {
        flex: 1 1 100%;
        max-width: none;
        padding: 1.5rem 1.25rem;
        border-radius: var(--hp-radius);
    }

    .tl-cta {
        border-radius: var(--hp-radius);
    }

    .tl-cta__inner {
        padding: 1.5rem 1.25rem 1.625rem;
    }

    .tl-cta__inner h2 {
        font-size: clamp(1.35rem, 5.5vw, 1.625rem);
    }

    .tl-cta__lead {
        font-size: 0.9375rem;
    }

    .tl-cta__actions {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
        margin-top: 1.25rem;
    }

    .tl-cta__actions .tl-btn {
        width: 100%;
        min-width: 0;
        justify-content: center;
    }

    .tl-cta__trust {
        margin-top: 1.25rem;
        padding-top: 1rem;
        font-size: 0.75rem;
    }
}

/* =====================================================
   14. RESPONSIVE — narrow phones (≤ 380px)
   ===================================================== */
@media (max-width: 380px) {
    :root {
        --hp-content-pad: 1rem;
    }

    .tl-ph-hero__scene {
        min-height: 0;
    }

    /* Narrow phones: stack cards so copy stays readable */
    .tl-ph-handoff {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .tl-ph-handoff__card {
        width: 100%;
        max-width: none;
        padding: 0.7rem 0.85rem;
    }

    .tl-ph-handoff__card-meta {
        display: none;
    }

    .tl-ph-handoff__card-body {
        display: none;
    }

    .tl-step {
        flex-direction: column;
        gap: 0.875rem;
    }
}
