/*
 * Public-facing typography, spacing and CTA refinements.
 * Deliberately scoped to the public page container; the member area and
 * shared navigation keep their existing styles.
 */
#public-content {
    --public-ink: #eee9f7;
    --public-muted: #c6bdd8;
    --public-gold: #d9bd79;
    --public-cta-radius: 0.8rem;
}

#public-content p {
    line-height: 1.75;
}

#public-content .public-home-body,
#public-content .public-page-body,
#public-content .benefits-page-section,
#public-content .stats-section > .container {
    max-width: 76rem;
    padding-inline: clamp(1.25rem, 3vw, 2rem);
}

#public-content .public-home-body {
    padding-block: clamp(3rem, 5vw, 5rem);
}

#public-content .public-home-body > section + section {
    margin-top: clamp(3rem, 6vw, 5rem);
}

#public-content .stats-section {
    padding-block: clamp(2.5rem, 4vw, 3.5rem);
}

#public-content .public-body-copy p {
    font-size: 1rem;
    line-height: 1.8;
}

#public-content .public-body-copy .public-quote {
    font-size: 1.125rem;
}

#public-content .hero-cta {
    margin-top: clamp(2rem, 4vw, 3rem);
}

#public-content .public-page-hero--team {
    padding-top: clamp(7rem, 13vh, 9rem);
    padding-bottom: clamp(2rem, 4vw, 3.25rem);
}

#public-content .public-page-title {
    margin-inline: auto;
    color: var(--public-ink);
    font-size: clamp(2.25rem, 4.2vw, 3.25rem);
    line-height: 1.2;
    letter-spacing: 0.015em;
    text-wrap: balance;
}

/* Team-only title treatment; retain the shared public title sizing and rhythm. */
#public-content .public-page-hero--team .public-team-title {
    position: relative;
    display: inline-block;
    color: #e8d9ff;
    background-image: linear-gradient(
        108deg,
        #c9a9f1 0%,
        #f4e7c3 34%,
        #dfc788 51%,
        #d7b4f2 73%,
        #f3e5c0 100%
    );
    background-size: 220% 100%;
    background-position: 0% 50%;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 18px rgba(180, 139, 225, 0.19);
    transition: background-position 1.8s ease, text-shadow 1.8s ease;
    animation: tms-team-title-shimmer 8s ease-in-out infinite;
}

@keyframes tms-team-title-shimmer {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

#public-content .public-page-hero--team .public-team-title::before {
    position: absolute;
    top: 0.18em;
    right: -0.82em;
    width: 0.34rem;
    height: 0.34rem;
    border: 1px solid rgba(244, 226, 178, 0.88);
    border-radius: 50%;
    background: radial-gradient(circle, #fff4d2 0 14%, #d5b56d 34%, rgba(213, 181, 109, 0) 74%);
    box-shadow: 0 0 11px rgba(237, 210, 145, 0.56);
    content: "";
    pointer-events: none;
}

#public-content .public-page-hero--team .public-team-title::after {
    position: absolute;
    right: 10%;
    bottom: -0.42em;
    left: 10%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(193, 158, 231, 0.72) 25%, rgba(245, 224, 169, 0.9) 50%, rgba(193, 158, 231, 0.72) 75%, transparent);
    box-shadow: 0 0 9px rgba(207, 177, 241, 0.35);
    content: "";
    pointer-events: none;
}

#public-content .public-page-hero--team .public-team-title:hover {
    background-position: 100% 50%;
    text-shadow: 0 0 22px rgba(195, 157, 239, 0.32);
}

@media (forced-colors: active) {
    #public-content .public-page-hero--team .public-team-title {
        color: CanvasText;
        -webkit-text-fill-color: CanvasText;
        background-image: none;
        text-shadow: none;
        animation: none;
    }
}

/* The homepage hero remains the luminous signature moment; all other
   section headings use a quieter, consistent hierarchy. */
#public-content .public-section-title {
    color: var(--public-ink);
    font-size: clamp(1.8rem, 3.4vw, 2.65rem);
    line-height: 1.25;
    letter-spacing: 0.012em;
    text-shadow: 0 0 10px rgba(164, 126, 207, 0.2);
    text-wrap: balance;
}

#public-content .public-card-title {
    color: #f0eaf7;
    font-size: clamp(1rem, 1.5vw, 1.3rem);
    line-height: 1.4;
    letter-spacing: 0.01em;
    text-shadow: none;
    text-wrap: balance;
}

#public-content .public-card-copy {
    color: var(--public-muted);
    font-size: 1rem;
    line-height: 1.75;
}

#public-content .public-page-body {
    padding-top: clamp(1.75rem, 4vw, 3rem);
}

#public-content .public-page-intro .benefits-page-section {
    padding-top: clamp(7rem, 13vh, 9rem);
    padding-bottom: clamp(3rem, 6vw, 4.5rem);
}

#public-content .public-cta {
    display: inline-flex;
    min-height: 3rem;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.4rem;
    border-radius: var(--public-cta-radius);
    font-family: inherit;
    font-size: 0.98rem;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: 0.025em;
    text-align: center;
    text-decoration: none;
    transition: transform 180ms ease, background-color 180ms ease,
        border-color 180ms ease, box-shadow 180ms ease;
}

#public-content .public-cta--primary {
    border: 1px solid rgba(222, 195, 130, 0.48);
    color: #fbf5e8;
    background: linear-gradient(135deg, #6d4b93, #8b66aa);
    box-shadow: 0 7px 20px rgba(42, 26, 62, 0.3);
}

#public-content .public-cta--primary:hover {
    border-color: rgba(231, 208, 153, 0.78);
    background: linear-gradient(135deg, #78589a, #9875b2);
    box-shadow: 0 9px 24px rgba(51, 33, 71, 0.38);
    transform: translateY(-2px);
}

#public-content .public-cta--secondary {
    border: 1px solid rgba(196, 181, 253, 0.4);
    color: #e9def5;
    background: rgba(31, 23, 48, 0.7);
}

#public-content .public-cta--secondary:hover {
    border-color: rgba(216, 198, 244, 0.72);
    color: #fff;
    background: rgba(54, 38, 77, 0.82);
    transform: translateY(-2px);
}

#public-content .public-cta:focus-visible {
    outline: 3px solid #dec98c;
    outline-offset: 4px;
}

#public-content .benefits-card-grid .public-cta {
    width: 100%;
    margin-top: 1.5rem;
}

#public-content .home-membership-cta-link {
    min-height: 3rem;
    padding-inline: 1.5rem;
}

@media (max-width: 767px) {
    #public-content .public-page-hero--team {
        padding-top: 6.25rem;
        padding-bottom: 1.75rem;
    }

    #public-content .public-page-body {
        padding-top: 1.5rem;
    }

    #public-content .public-page-intro .benefits-page-section {
        padding-top: 6.25rem;
        padding-bottom: 2.5rem;
    }

    #public-content .public-card-title {
        font-size: 1.05rem;
    }

    #public-content .public-home-body {
        padding-block: 2.5rem;
    }

    #public-content .public-home-body > section + section {
        margin-top: 3rem;
    }

    #public-content #about > .grid {
        gap: 2.5rem;
    }

    #public-content .join-section {
        padding: 2.5rem 1.25rem;
    }

    #public-content .public-cta {
        min-height: 3rem;
        padding-inline: 1rem;
    }
}
