/* =====================================================
   TheraLink — About page
   Loads after home.css (shared tokens, nav, footer, .tl-btn).

   Section rhythm (matches homepage):
     Hero (dark gradient) → white features → solid blue trust
     → white audience → CTA panel on white
   ===================================================== */

.tl-about-page {
    --tl-about-blue: var(--tl-blue);
    --tl-about-blue-dark: var(--tl-blue-dark);
    --tl-about-green: var(--tl-green);
    --tl-about-green-dark: var(--tl-green-dark);
    --tl-about-surface: var(--tl-surface);
    --tl-about-text: var(--tl-text);
    --tl-about-muted: var(--tl-text-secondary);
    --tl-about-border: var(--tl-border);
    --tl-about-text-soft: color-mix(in srgb, var(--tl-text-secondary) 84%, var(--tl-text));
    --tl-about-radius: 12px;
    background: var(--tl-about-surface);
    color: var(--tl-about-text);
}

.tl-about-main {
    /* Title band extends under fixed nav (same pattern as homepage hero). */
    padding-top: 0;
    overflow: clip;
    scroll-margin-top: calc(var(--tl-nav-height) + env(safe-area-inset-top) + 12px);
}

.tl-about-main:focus {
    outline: none;
}

.tl-about-container {
    width: min(100%, 1220px);
    margin-inline: auto;
}

.tl-about-section {
    padding: clamp(2.5rem, 5vw, 3.5rem) clamp(20px, 5vw, 72px);
}

.tl-about-eyebrow {
    margin: 0 0 16px;
    color: var(--tl-about-blue-dark);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.17em;
    line-height: 1.3;
    text-transform: uppercase;
}

.tl-about-page h1,
.tl-about-page h2 {
    margin: 0;
    font-family: var(--tl-display);
    text-wrap: balance;
}

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

.tl-about-page h3 {
    margin: 0;
    font-family: var(--tl-display);
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--tl-about-text);
    font-size: clamp(1.0625rem, 1.8vw, 1.25rem);
    line-height: 1.25;
}

.tl-about-page p {
    text-wrap: pretty;
}

.tl-about-section-heading {
    max-width: 800px;
    margin: 0 auto clamp(1.5rem, 3vw, 2rem);
    text-align: center;
}

.tl-about-section-heading h2 {
    max-width: 790px;
    margin-inline: auto;
}

.tl-about-section-heading__lead {
    max-width: 640px;
    margin: 1.25rem auto 0;
    color: var(--tl-about-muted);
    font-size: 1.0625rem;
    line-height: 1.7;
}

/* =====================================================
   1. HERO
   ===================================================== */

.tl-about-hero {
    padding:
        calc(12px + env(safe-area-inset-top) + var(--tl-nav-height) + 1.25rem)
        clamp(20px, 5vw, 72px)
        2rem;
    background: var(--hero-gradient);
    overflow: hidden;
}

.tl-about-hero__grid {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(440px, 0.92fr);
    align-items: center;
    gap: clamp(44px, 7vw, 96px);
}

.tl-about-hero__copy {
    position: relative;
    z-index: 1;
    min-width: 0;
}

.tl-about-hero .tl-about-eyebrow {
    margin: 0 0 1.25rem;
    color: var(--hero-accent-green);
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    line-height: 1.5;
}

/*
 * Hero headline contrast — must beat home.css `.tl-main h1 { color: var(--tl-blue) }`
 * (equal 0,1,1 specificity). Brand-blue on the blue gradient band is nearly invisible;
 * cream on the dark navy→blue stop is the correct dark-band treatment (matches Home).
 */
body.tl-about-page .tl-about-hero h1 {
    max-width: 18ch;
    font-family: var(--tl-display);
    font-size: clamp(2rem, 4.2vw, 3.25rem);
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.12;
    color: var(--hero-cream, #FAF9F6);
    opacity: 1;
    text-wrap: balance;
}

.tl-about-hero__lead {
    max-width: 52ch;
    margin: 1.5rem 0 0;
    color: var(--hero-cream-muted, rgba(250, 249, 246, 0.88));
    opacity: 1;
    font-size: clamp(0.9375rem, 1.6vw, 1.0625rem);
    line-height: 1.82;
}

.tl-about-availability {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    max-width: 690px;
    margin: 22px 0 0;
    color: var(--hero-cream);
    font-size: 1rem;
    font-weight: 650;
    line-height: 1.6;
}

.tl-about-availability__dot {
    width: 10px;
    height: 10px;
    margin-top: 0.48em;
    flex: 0 0 10px;
    border: 2px solid rgba(10, 31, 46, 0.35);
    border-radius: 50%;
    background: var(--hero-accent-green);
    box-shadow: 0 0 0 3px rgba(95, 211, 174, 0.28);
}

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

.tl-about-hero .tl-about-actions .tl-btn--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));
}

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

.tl-about-hero .tl-about-actions .tl-btn--secondary:hover {
    background: rgba(250, 249, 246, 0.1);
    border-color: var(--hero-cream);
}

.tl-about-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 30px;
}

.tl-about-actions .tl-btn {
    min-width: 154px;
}

/* Connection map (hero visual) */

.tl-connection-map {
    position: relative;
    width: 100%;
    aspect-ratio: 1.12;
    min-width: 0;
    overflow: hidden;
    border: 1px solid rgba(32, 127, 191, 0.14);
    border-radius: 20px;
    background:
        linear-gradient(rgba(32, 127, 191, 0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(32, 127, 191, 0.045) 1px, transparent 1px),
        rgba(255, 255, 255, 0.72);
    background-size: 28px 28px;
    box-shadow: 0 28px 56px rgba(31, 42, 55, 0.1);
    isolation: isolate;
    animation: tl-about-map-enter 700ms cubic-bezier(0.2, 0.75, 0.25, 1) both;
}

.tl-connection-map::before {
    content: "";
    position: absolute;
    inset: 18%;
    z-index: -1;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(76, 175, 147, 0.14), rgba(32, 127, 191, 0.04) 48%, transparent 72%);
}

.tl-connection-map__paths {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: visible;
}

.tl-connection-map__paths path {
    fill: none;
    vector-effect: non-scaling-stroke;
}

.tl-connection-map__connector {
    stroke: url(#about-connection-gradient);
    stroke-width: 3;
    stroke-linecap: round;
    stroke-dasharray: 7 9;
    animation: tl-about-path-flow 10s linear infinite;
}

.tl-connection-map__node,
.tl-connection-map__hub {
    position: absolute;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(31, 42, 55, 0.1);
    background: var(--tl-about-surface);
    box-shadow: 0 12px 26px rgba(31, 42, 55, 0.09);
}

.tl-connection-map__node {
    gap: 7px;
    min-width: 0;
    min-height: 46px;
    padding: 9px 12px;
    border-radius: 12px;
    color: var(--tl-about-muted);
    font-size: 0.8125rem;
    font-weight: 750;
    white-space: nowrap;
}

.tl-connection-map__node .tl-about-icon {
    color: var(--tl-about-blue);
}

.tl-connection-map__node--person {
    min-width: 112px;
    color: var(--tl-about-text);
}

.tl-connection-map__node--patient {
    top: 9%;
    left: 4%;
}

.tl-connection-map__node--therapist {
    right: 4%;
    bottom: 9%;
}

.tl-connection-map__node--appointments {
    top: 4%;
    left: 50%;
    transform: translateX(-50%);
}

.tl-connection-map__node--records {
    top: 50%;
    right: 2%;
    transform: translateY(-50%);
}

.tl-connection-map__node--sessions {
    bottom: 4%;
    left: 50%;
    transform: translateX(-50%);
}

.tl-connection-map__node--reports {
    top: 50%;
    left: 2%;
    transform: translateY(-50%);
}

.tl-connection-map__hub {
    top: 50%;
    left: 50%;
    flex-direction: column;
    width: 142px;
    height: 142px;
    border-color: rgba(32, 127, 191, 0.24);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    box-shadow:
        0 0 0 12px rgba(255, 255, 255, 0.68),
        0 18px 42px rgba(32, 127, 191, 0.18);
}

.tl-connection-map__hub-mark {
    display: grid;
    width: 38px;
    height: 38px;
    margin-bottom: 7px;
    place-items: center;
    border-radius: 50%;
    color: var(--tl-about-surface);
    background: linear-gradient(135deg, var(--tl-about-blue), var(--tl-about-green));
    font-size: 0.75rem;
    font-weight: 850;
    letter-spacing: -0.03em;
}

.tl-connection-map__hub strong {
    font-size: 0.95rem;
}

.tl-connection-map__hub small {
    margin-top: 3px;
    color: var(--tl-about-muted);
    font-size: 0.8125rem;
}

/* =====================================================
   Shared cards + circular icon badges (homepage style)
   ===================================================== */

.tl-about-card-grid {
    display: grid;
    gap: 20px;
}

.tl-about-card-grid--three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.tl-about-card {
    min-width: 0;
    padding: 28px;
    border: 1px solid var(--tl-about-border);
    border-radius: var(--tl-about-radius);
    background: var(--tl-about-surface);
    transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

@media (hover: hover) and (pointer: fine) {
    .tl-about-card:hover {
        transform: translateY(-4px);
        border-color: rgba(32, 127, 191, 0.24);
        box-shadow: 0 20px 42px rgba(31, 42, 55, 0.09);
    }
}

.tl-about-card h3 {
    margin-bottom: 11px;
}

.tl-about-card p {
    margin: 0;
    color: var(--tl-about-muted);
    font-size: 1rem;
    line-height: 1.6;
}

/* Circular solid badges — match homepage .tl-step__icon */
.tl-about-icon-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    margin-bottom: 1.25rem;
    flex-shrink: 0;
    border-radius: 50%;
    background: var(--tl-blue);
    color: #ffffff;
}

.tl-about-icon-badge--green {
    background: var(--tl-green);
}

.tl-about-icon-badge .tl-about-icon {
    color: #ffffff;
    stroke-width: 1.75;
}

.tl-about-icon {
    stroke-width: 1.75;
}

/* =====================================================
   2. FEATURES (white)
   ===================================================== */

.tl-about-capabilities {
    background: var(--tl-surface);
}

/* =====================================================
   3. TRUST (solid blue)
   ===================================================== */

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

.tl-about-trust .tl-about-eyebrow {
    color: var(--tl-on-solid-muted);
}

.tl-about-trust .tl-about-section-heading h2 {
    color: var(--tl-on-solid);
}

.tl-about-trust .tl-about-section-heading__lead {
    color: var(--tl-on-solid-muted);
}

.tl-about-trust__cards .tl-about-card {
    box-shadow: 0 12px 28px rgba(10, 31, 46, 0.18);
}

/* Cream ring so blue badges stay distinct on solid blue canvas */
.tl-about-trust .tl-about-icon-badge {
    box-shadow: 0 0 0 2px rgba(250, 249, 246, 0.92);
}

/* =====================================================
   4. AUDIENCE (white)
   ===================================================== */

.tl-about-audience {
    background: var(--tl-surface);
}

.tl-about-audience__cards .tl-about-card {
    border-top: 3px solid var(--tl-about-blue);
}

.tl-about-audience__cards .tl-about-card:nth-child(2) {
    border-top-color: var(--tl-green);
}

.tl-about-audience__cards .tl-about-card:nth-child(3) {
    border-top-color: var(--tl-about-green);
}

.tl-about-audience__note {
    display: flex;
    align-items: center;
    gap: 18px;
    max-width: 980px;
    margin: 30px auto 0;
    padding: 18px 20px;
    border: 1px solid rgba(76, 175, 147, 0.24);
    border-radius: var(--tl-about-radius);
    color: var(--tl-about-text-soft);
    background: var(--tl-pale-green);
    font-size: 1rem;
    line-height: 1.6;
}

.tl-about-audience__note span {
    flex: 0 0 auto;
    padding: 6px 9px;
    border-radius: 8px;
    color: var(--tl-about-green-dark);
    background: rgba(76, 175, 147, 0.13);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

/* =====================================================
   5. FINAL CTA
   ===================================================== */

.tl-about-final {
    padding-top: clamp(2.5rem, 5vw, 3.5rem);
    padding-bottom: clamp(2.5rem, 5vw, 3.5rem);
    background: var(--tl-surface);
}

.tl-about-final__panel {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 32px;
    padding: clamp(34px, 6vw, 60px);
    overflow: hidden;
    border: 1px solid rgba(32, 127, 191, 0.16);
    border-radius: 20px;
    background:
        radial-gradient(circle at 90% 12%, rgba(76, 175, 147, 0.16), transparent 30%),
        linear-gradient(135deg, var(--tl-pale-blue) 0%, var(--tl-pale-green) 100%);
}

.tl-about-final__copy {
    position: relative;
    z-index: 1;
    max-width: 760px;
}

.tl-about-final__copy h2 {
    font-size: clamp(1.75rem, 3.2vw, 2.5rem);
}

.tl-about-final__copy > p:last-child {
    max-width: 690px;
    margin: 20px 0 0;
    color: var(--tl-about-text-soft);
    font-size: 1.0625rem;
    line-height: 1.7;
}

.tl-about-final__actions {
    position: relative;
    z-index: 1;
    justify-content: flex-end;
    margin-top: 0;
}

.tl-about-final__connector {
    position: absolute;
    top: 22px;
    right: 30px;
    width: 110px;
    height: 46px;
    opacity: 0.3;
}

.tl-about-final__connector::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 18px;
    right: 18px;
    height: 2px;
    background: linear-gradient(90deg, var(--tl-about-blue), var(--tl-about-green));
}

.tl-about-final__connector span {
    position: absolute;
    top: 50%;
    width: 18px;
    height: 18px;
    border: 4px solid var(--tl-about-blue);
    border-radius: 50%;
    background: var(--tl-about-surface);
    transform: translateY(-50%);
}

.tl-about-final__connector span:first-child {
    left: 0;
}

.tl-about-final__connector span:last-child {
    right: 0;
    border-color: var(--tl-about-green);
}

/* =====================================================
   Motion
   ===================================================== */

@keyframes tl-about-map-enter {
    from {
        opacity: 0;
        transform: translateY(14px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes tl-about-path-flow {
    to {
        stroke-dashoffset: -96;
    }
}

/* =====================================================
   Responsive
   ===================================================== */

@media (max-width: 1080px) {
    .tl-about-hero__grid {
        grid-template-columns: 1fr;
        gap: 44px;
    }

    .tl-about-hero__copy {
        max-width: 760px;
    }

    .tl-connection-map {
        width: min(100%, 620px);
        margin-inline: auto;
    }

    .tl-about-card-grid--three {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .tl-about-final__panel {
        grid-template-columns: 1fr;
    }

    .tl-about-final__actions {
        justify-content: flex-start;
    }
}

@media (max-width: 768px) {
    .tl-about-section,
    .tl-about-hero {
        padding-inline: 20px;
    }

    .tl-about-card-grid--three {
        grid-template-columns: 1fr;
    }

    .tl-about-audience__note {
        align-items: flex-start;
        flex-direction: column;
        gap: 12px;
    }

    /*
     * Mobile diagram: vertical connected list (option a).
     * Radial + dashed connectors collapse into an unreadable square below ~768px;
     * a stacked list with a thread rail keeps the "connected care" idea readable.
     */
    .tl-connection-map {
        aspect-ratio: auto;
        display: flex;
        flex-direction: column;
        gap: 0.625rem;
        padding: 1.125rem 1rem 1.125rem 2.75rem;
        overflow: visible;
        background-size: 22px 22px;
    }

    .tl-connection-map::before {
        display: none;
    }

    /* Vertical thread rail — brand motif without cramped radial spokes */
    .tl-connection-map::after {
        content: "";
        position: absolute;
        top: 1.5rem;
        bottom: 1.5rem;
        left: 1.35rem;
        width: 2px;
        border-radius: 999px;
        background: linear-gradient(
            180deg,
            var(--tl-about-blue),
            var(--tl-about-green)
        );
        opacity: 0.45;
        z-index: 0;
        pointer-events: none;
    }

    .tl-connection-map__paths {
        display: none;
    }

    .tl-connection-map__hub,
    .tl-connection-map__node {
        position: relative;
        inset: auto;
        top: auto;
        right: auto;
        bottom: auto;
        left: auto;
        transform: none;
        width: 100%;
        min-width: 0;
        z-index: 1;
    }

    .tl-connection-map__hub {
        order: -1;
        display: grid;
        grid-template-columns: auto minmax(0, 1fr);
        grid-template-rows: auto auto;
        align-items: center;
        column-gap: 0.75rem;
        width: 100%;
        height: auto;
        min-height: 0;
        padding: 0.85rem 1rem;
        border-radius: 14px;
        box-shadow: 0 10px 22px rgba(32, 127, 191, 0.12);
    }

    .tl-connection-map__hub-mark {
        grid-row: 1 / span 2;
        width: 34px;
        height: 34px;
        margin-bottom: 0;
    }

    .tl-connection-map__hub strong {
        grid-column: 2;
        font-size: 0.95rem;
        line-height: 1.2;
    }

    .tl-connection-map__hub small {
        grid-column: 2;
        margin-top: 2px;
        display: block;
    }

    .tl-connection-map__node {
        justify-content: flex-start;
        gap: 0.625rem;
        min-height: 48px;
        padding: 0.7rem 0.9rem;
        border-radius: 12px;
        font-size: 0.875rem;
        white-space: normal;
    }

    .tl-connection-map__node--person {
        min-width: 0;
        color: var(--tl-about-text);
    }

    .tl-connection-map__node--patient { order: 1; }
    .tl-connection-map__node--appointments { order: 2; }
    .tl-connection-map__node--records { order: 3; }
    .tl-connection-map__node--sessions { order: 4; }
    .tl-connection-map__node--reports { order: 5; }
    .tl-connection-map__node--therapist { order: 6; }

    /* Endpoint dots on the rail (sit in the left gutter) */
    .tl-connection-map__hub::before,
    .tl-connection-map__node::before {
        content: "";
        position: absolute;
        left: -1.4rem;
        top: 50%;
        width: 9px;
        height: 9px;
        border-radius: 50%;
        transform: translate(-50%, -50%);
        background: var(--tl-about-blue);
        box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.92);
        z-index: 2;
    }

    .tl-connection-map__hub::before,
    .tl-connection-map__node--therapist::before {
        background: var(--tl-about-green);
    }
}

@media (max-width: 480px) {
    .tl-about-hero {
        padding-top: calc(12px + env(safe-area-inset-top) + var(--tl-nav-height) + 0.75rem);
        padding-bottom: 1.25rem;
    }

    body.tl-about-page .tl-about-hero h1 {
        font-size: clamp(1.85rem, 7vw, 2.35rem);
        line-height: 1.12;
        max-width: none;
    }

    .tl-about-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .tl-about-actions .tl-btn {
        width: 100%;
        min-width: 0;
    }

    .tl-connection-map {
        padding: 1rem 0.85rem 1rem 2.5rem;
        gap: 0.5rem;
        border-radius: 16px;
    }

    .tl-connection-map::after {
        left: 1.2rem;
    }

    .tl-connection-map__hub {
        padding: 0.75rem 0.85rem;
        border-radius: 12px;
    }

    .tl-connection-map__hub-mark {
        width: 30px;
        height: 30px;
        font-size: 0.6875rem;
    }

    .tl-connection-map__node {
        min-height: 44px;
        padding: 0.65rem 0.75rem;
        font-size: 0.8125rem;
    }

    .tl-connection-map__hub::before,
    .tl-connection-map__node::before {
        left: -1.3rem;
        width: 8px;
        height: 8px;
    }

    .tl-about-card {
        padding: 24px;
    }

    .tl-about-final__panel {
        padding: 32px 24px;
        border-radius: 16px;
    }

    .tl-about-final__connector {
        right: 14px;
        opacity: 0.18;
    }
}

@media (max-width: 380px) {
    .tl-connection-map {
        padding-left: 2.35rem;
    }

    .tl-connection-map::after {
        left: 1.1rem;
    }

    .tl-connection-map__node {
        font-size: 0.8rem;
    }

    .tl-connection-map__hub::before,
    .tl-connection-map__node::before {
        left: -1.25rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .tl-about-page *,
    .tl-about-page *::before,
    .tl-about-page *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
