/*
 * THITO inner pages: About Us, Contact Us, Our Partners
 * Loaded after css/homepage.css, which provides the design tokens, navigation,
 * buttons, section headings, feature grid, CTA panel and footer styles.
 * Everything here is scoped to .th-page or th- prefixed classes.
 */

/* Extra buttons -------------------------------------------------------------- */

.th-page .th-btn--ghost,
.th-page .th-btn--ghost:focus {
    background: #fff;
    color: var(--th-ink);
    box-shadow: inset 0 0 0 1px var(--th-line);
}

.th-page .th-btn--ghost:hover {
    color: var(--th-ink);
    box-shadow: inset 0 0 0 1px var(--th-ink);
}

/* For use on the charcoal panels */
.th-page .th-btn--light,
.th-page .th-btn--light:focus {
    background: transparent;
    color: #fff;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .35);
}

.th-page .th-btn--light:hover {
    color: #fff;
    background: rgba(255, 255, 255, .08);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .7);
}

.th-page .th-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    color: var(--th-brand-ink);
    border-bottom: 1px solid transparent;
    transition: border-color .2s, gap .2s;
}

.th-page .th-link .th-icon { width: 18px; height: 18px; }

.th-page .th-link:hover {
    color: var(--th-brand-ink);
    border-bottom-color: currentColor;
    gap: 10px;
}

/* Page hero ------------------------------------------------------------------- */

.th-pagehero {
    position: relative;
    overflow: hidden;
    padding: 72px 0 88px;
    background: var(--th-bg-warm);
    border-bottom: 1px solid var(--th-line);
}

/* Faint brand ring, echoing the homepage hero */
.th-pagehero::after {
    content: "";
    position: absolute;
    right: -180px;
    top: -220px;
    width: 560px;
    height: 560px;
    border-radius: 50%;
    border: 1px solid #F1D9C3;
    pointer-events: none;
}

.th-pagehero--compact { padding: 80px 0 72px; }

.th-pagehero__grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr);
    gap: 48px;
    align-items: center;
}

.th-pagehero__copy { position: relative; z-index: 1; max-width: 640px; }
.th-pagehero__copy--wide { max-width: 780px; }

.th-page .th-pagehero__title {
    margin: 0 0 20px;
    font-size: clamp(38px, 5vw, 60px);
    line-height: 1.06;
    font-weight: 700;
    letter-spacing: -.035em;
    color: var(--th-ink);
}

.th-pagehero__title span { color: var(--th-brand-ink); }

.th-page .th-pagehero__lead {
    max-width: 600px;
    font-size: 19px;
    line-height: 1.65;
    color: var(--th-muted);
}

.th-pagehero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 32px;
}

.th-pagehero__visual {
    position: relative;
    display: flex;
    justify-content: center;
}

.th-pagehero__visual::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: var(--th-brand-soft);
    transform: translate(-50%, -50%);
}

.th-pagehero .th-phone--hero { --th-phone-w: 290px; }

/* In-page section navigation */
.th-subnav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 36px;
}

.th-page .th-subnav a {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 0 16px;
    border-radius: 999px;
    border: 1px solid var(--th-line);
    background: #fff;
    font-size: 14px;
    font-weight: 500;
    color: var(--th-ink-2);
    transition: border-color .2s, color .2s, background-color .2s;
}

.th-page .th-subnav a:hover { border-color: var(--th-ink); color: var(--th-ink); }

.th-page .th-subnav a.is-active {
    background: var(--th-ink);
    border-color: var(--th-ink);
    color: #fff;
}

/* About: story ------------------------------------------------------------------ */

.th-story__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
}

.th-story__card {
    padding: 40px;
    border: 1px solid var(--th-line);
    border-radius: var(--th-radius);
    background: #fff;
}

.th-story__card--accent {
    background: var(--th-brand-tint);
    border-color: #F3DCC8;
}

.th-story__label {
    display: inline-block;
    margin-bottom: 20px;
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--th-bg-warm);
    border: 1px solid var(--th-line);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--th-muted);
}

.th-story__card--accent .th-story__label {
    background: #fff;
    border-color: #F3DCC8;
    color: var(--th-brand-ink);
}

.th-page .th-story__card h3 {
    margin: 0 0 12px;
    font-size: 24px;
    line-height: 1.25;
    font-weight: 600;
    letter-spacing: -.015em;
}

.th-story__card p { color: var(--th-muted); }

/* About: mission & vision ---------------------------------------------------------- */

.th-mv { border-top: 1px solid var(--th-line); }

.th-page .th-mv__intro { margin-top: 16px; }

.th-mv__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
}

.th-mv__card {
    position: relative;
    overflow: hidden;
    padding: 48px 40px 44px;
    border-radius: var(--th-radius);
    background: var(--th-charcoal);
    color: #D6CFC8;
}

.th-mv__card::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 3px;
    background: var(--th-brand);
}

.th-mv__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    margin-bottom: 28px;
    border-radius: 14px;
    background: var(--th-brand);
    color: var(--th-ink);
}

.th-mv__icon .th-icon { width: 24px; height: 24px; }

.th-page .th-mv__card h3 {
    margin: 0 0 14px;
    font-size: 26px;
    line-height: 1.2;
    font-weight: 700;
    letter-spacing: -.02em;
    color: #fff;
}

.th-mv__card p { font-size: 16px; line-height: 1.75; }

/* About: capabilities ----------------------------------------------------------------- */

.th-page .th-features__grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.th-page .th-more { margin-top: 32px; text-align: center; }

/* About: leadership --------------------------------------------------------------------- */

.th-founder {
    display: grid;
    grid-template-columns: 360px minmax(0, 1fr);
    gap: 56px;
    align-items: center;
    margin-bottom: 40px;
    padding: 32px;
    border: 1px solid var(--th-line);
    border-radius: 24px;
    background: var(--th-bg-warm);
}

.th-founder__photo {
    margin: 0;
    overflow: hidden;
    border-radius: 16px;
    background: #E9E6E3;
    aspect-ratio: 400 / 478;
}

.th-founder__photo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.th-founder__copy { padding-right: 24px; }

.th-page .th-founder__copy h3 {
    margin: 0;
    font-size: clamp(26px, 3vw, 34px);
    line-height: 1.15;
    font-weight: 700;
    letter-spacing: -.02em;
}

.th-page .th-founder__role {
    margin: 6px 0 28px;
    font-size: 16px;
    font-weight: 500;
    color: var(--th-muted);
}

.th-page .th-founder__note {
    margin: 0;
    padding: 0 0 0 24px;
    border-left: 2px solid var(--th-brand);
    font-size: 19px;
    line-height: 1.65;
    color: var(--th-ink-2);
}

.th-page .th-founder__note p { margin: 0; }

.th-page .th-leaders__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.th-leader {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    border: 1px solid var(--th-line);
    border-radius: var(--th-radius);
    background: #fff;
    transition: border-color .2s;
}

.th-leader:hover { border-color: #DCCFC2; }

.th-leader__avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    flex: none;
    border-radius: 50%;
    background: var(--th-brand-tint);
    border: 1px solid #F3DCC8;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: .02em;
    color: var(--th-brand-ink);
}

.th-page .th-leader__name {
    margin: 0 0 2px;
    font-size: 16px;
    line-height: 1.35;
    font-weight: 600;
}

.th-page .th-leader__role {
    font-size: 14px;
    color: var(--th-muted);
}

/* Contact ------------------------------------------------------------------------------- */

.th-contact { padding-top: 80px; }

.th-contact__grid {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
    gap: 32px;
    align-items: start;
}

.th-contact__formwrap {
    padding: 40px;
    border: 1px solid var(--th-line);
    border-radius: 24px;
    background: #fff;
    box-shadow: var(--th-shadow-md);
    scroll-margin-top: calc(var(--th-nav-h) + 16px);
}

.th-page .th-contact__heading {
    margin: 0 0 6px;
    font-size: 26px;
    line-height: 1.2;
    font-weight: 700;
    letter-spacing: -.02em;
}

.th-page .th-contact__hint {
    margin-bottom: 28px;
    font-size: 14px;
    color: var(--th-muted);
}

.th-form__row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 16px;
}

.th-field { margin-bottom: 20px; }

.th-page .th-field label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--th-ink);
}

.th-page .th-field input,
.th-page .th-field textarea {
    display: block;
    width: 100%;
    min-height: 48px;
    padding: 12px 14px;
    border: 1px solid #DDD5CC;
    border-radius: 12px;
    background: #fff;
    font: inherit;
    font-size: 16px;
    line-height: 1.5;
    color: var(--th-ink);
    box-shadow: none;
    transition: border-color .2s, box-shadow .2s;
    -webkit-appearance: none;
    appearance: none;
}

.th-page .th-field textarea { min-height: 150px; resize: vertical; }

.th-page .th-field input:hover,
.th-page .th-field textarea:hover { border-color: #C9BDB1; }

.th-page .th-field input:focus,
.th-page .th-field textarea:focus {
    border-color: var(--th-brand-ink);
    box-shadow: 0 0 0 3px rgba(239, 118, 18, .22);
    outline: none !important;
}

.th-page .th-field.is-invalid input,
.th-page .th-field.is-invalid textarea {
    border-color: #B42318;
    background: #FFFBFA;
}

.th-page .th-field.is-invalid input:focus,
.th-page .th-field.is-invalid textarea:focus { box-shadow: 0 0 0 3px rgba(180, 35, 24, .18); }

.th-page .th-field__error {
    margin-top: 6px;
    font-size: 14px;
    font-weight: 500;
    color: #B42318;
}

.th-page .th-field__error:empty { display: none; }

.th-page .th-form__submit {
    width: 100%;
    min-height: 52px;
    margin-top: 4px;
    border: 0;
    font-size: 16px;
    cursor: pointer;
}

.th-page .th-form__submit:disabled {
    opacity: .7;
    cursor: progress;
    transform: none;
}

.th-form__status {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 24px;
    padding: 14px 16px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.5;
}

.th-form__status[hidden] { display: none; }

.th-form__status.is-success {
    background: #ECFDF3;
    border: 1px solid #ABEFC6;
    color: #067647;
}

.th-form__status.is-error {
    background: #FEF3F2;
    border: 1px solid #FECDCA;
    color: #B42318;
}

.th-page .th-form__status:focus { outline: none !important; }

.th-contact__list {
    overflow: hidden;
    border: 1px solid var(--th-line);
    border-radius: 24px;
    background: #fff;
}

.th-contact__item {
    display: flex;
    gap: 16px;
    padding: 24px 28px;
}

.th-contact__item + .th-contact__item { border-top: 1px solid var(--th-line); }

.th-contact__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    flex: none;
    border-radius: 12px;
    background: var(--th-brand-tint);
    color: var(--th-brand-ink);
}

.th-page .th-contact__item h3 {
    margin: 0 0 4px;
    font-size: 13px;
    line-height: 1.4;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--th-muted);
}

.th-page .th-contact__item address {
    margin: 0;
    font-style: normal;
    line-height: 1.55;
    color: var(--th-ink);
}

.th-page .th-contact__item a {
    font-weight: 600;
    color: var(--th-ink);
    word-break: break-word;
    border-bottom: 1px solid var(--th-line);
    transition: border-color .2s, color .2s;
}

.th-page .th-contact__item a:hover { color: var(--th-brand-ink); border-bottom-color: currentColor; }

.th-contact__map {
    margin-top: 16px;
    overflow: hidden;
    border: 1px solid var(--th-line);
    border-radius: 24px;
    background: var(--th-bg-warm);
    aspect-ratio: 4 / 3;
}

.th-contact__map iframe {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
}

/* Contact: support panel ---------------------------------------------------------------- */

.th-support { padding-top: 0; }

.th-support__panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    padding: 56px;
    border-radius: 24px;
    background: var(--th-charcoal);
    color: #D6CFC8;
}

.th-page .th-support__panel .th-h2 { margin-bottom: 12px; color: #fff; }

.th-support__copy p { font-size: 17px; line-height: 1.65; }

.th-support__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
}

.th-page .th-social {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    flex: none;
    margin: 0;
    padding: 0;
    list-style: none;
}

.th-page .th-social a {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 168px;
    min-height: 48px;
    padding: 0 18px;
    border-radius: 12px;
    border: 1px solid #3D3632;
    font-size: 15px;
    font-weight: 500;
    color: #EDE8E3;
    transition: border-color .2s, background-color .2s, color .2s;
}

.th-page .th-social a .fa { width: 18px; font-size: 17px; text-align: center; }

.th-page .th-social a:hover {
    border-color: var(--th-brand);
    background: rgba(239, 118, 18, .1);
    color: #fff;
}

/* Partners ------------------------------------------------------------------------------- */

.th-partners { padding: 88px 0 24px; }

.th-page .th-partners__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 340px));
    justify-content: center;
    gap: 24px;
}

/* Desktop: all partners side by side in one row */
@media (min-width: 1024px) {
    .th-page .th-partners__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.th-partner {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--th-line);
    border-radius: 20px;
    background: #fff;
    transition: border-color .25s var(--th-ease), box-shadow .25s var(--th-ease), transform .25s var(--th-ease);
}

.th-partner:hover {
    border-color: #DCCFC2;
    box-shadow: var(--th-shadow-md);
    transform: translateY(-2px);
}

.th-partner__logo {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 16 / 10;
    padding: 32px 40px;
    background: #fff;
}

.th-partner__logo img {
    display: block;
    width: 100%;
    height: 100%;
    max-height: 150px;
    object-fit: contain;
}

.th-page .th-partner__name {
    padding: 16px 24px;
    border-top: 1px solid var(--th-line);
    background: var(--th-bg-warm);
    font-size: 15px;
    font-weight: 600;
    text-align: center;
    color: var(--th-ink);
}

.th-cta--partners .th-cta__copy { max-width: 640px; }

/* Responsive ---------------------------------------------------------------------------------- */

@media (max-width: 1023px) {
    .th-pagehero__grid { grid-template-columns: minmax(0, 1fr) minmax(0, .75fr); }

    .th-pagehero .th-phone--hero { --th-phone-w: 250px; }

    .th-pagehero__visual::before { width: 320px; height: 320px; }

    .th-page .th-features__grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

    .th-founder { grid-template-columns: 280px minmax(0, 1fr); gap: 36px; }

    .th-page .th-leaders__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

    .th-contact__grid { grid-template-columns: minmax(0, 1fr); }

    .th-contact__aside {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        gap: 16px;
    }

    .th-contact__map { margin-top: 0; aspect-ratio: auto; min-height: 280px; }

    .th-support__panel { flex-direction: column; align-items: flex-start; padding: 48px; }
}

@media (max-width: 767px) {
    .th-pagehero { padding: 40px 0 64px; }
    .th-pagehero--compact { padding: 48px 0 56px; }

    .th-pagehero::after { display: none; }

    .th-pagehero__grid { grid-template-columns: minmax(0, 1fr); gap: 40px; }

    .th-page .th-pagehero__lead { font-size: 17px; }

    .th-pagehero .th-phone--hero { --th-phone-w: 240px; }

    .th-pagehero__visual::before { width: 290px; height: 290px; }

    .th-subnav { margin-top: 28px; }

    .th-story__grid,
    .th-mv__grid { grid-template-columns: minmax(0, 1fr); gap: 16px; }

    .th-story__card { padding: 28px 24px; }

    .th-mv__card { padding: 36px 24px 32px; }

    .th-founder {
        grid-template-columns: minmax(0, 1fr);
        gap: 28px;
        padding: 20px;
        border-radius: 20px;
    }

    .th-founder__photo { max-width: 280px; }

    .th-founder__copy { padding: 0 4px 8px; }

    .th-page .th-founder__note { font-size: 17px; padding-left: 18px; }

    .th-contact { padding-top: 48px; }

    .th-contact__formwrap { padding: 28px 20px; border-radius: 20px; }

    .th-form__row { grid-template-columns: minmax(0, 1fr); }

    .th-contact__aside { grid-template-columns: minmax(0, 1fr); }

    .th-contact__list,
    .th-contact__map { border-radius: 20px; }

    .th-contact__item { padding: 20px; }

    .th-support__panel { padding: 36px 24px; border-radius: 20px; }

    .th-page .th-social { width: 100%; }

    .th-page .th-social a { min-width: 0; }

    .th-support__actions .th-btn { width: 100%; }

    .th-partners { padding: 56px 0 8px; }
}

@media (max-width: 479px) {
    .th-page .th-features__grid--3,
    .th-page .th-leaders__grid { grid-template-columns: minmax(0, 1fr); }

    .th-pagehero__actions .th-btn { width: 100%; }

    .th-page .th-btn { white-space: normal; text-align: center; }
}

/* Balanced line breaks for large headings (progressive enhancement) */
.th-page .th-pagehero__title,
.th-page .th-h2 { text-wrap: balance; }

/* Full-width buttons on mobile would sit under the CTA accent arc */
@media (max-width: 767px) {
    .th-cta--partners .th-cta__panel::before { display: none; }
}

/* ===================================================================================
 * Vibrant theme layer for the inner pages (see the matching layer in homepage.css)
 * =================================================================================== */

.th-pagehero {
    padding-top: calc(var(--th-nav-h) + 64px);
    padding-bottom: 120px;
    border-bottom: 0;
    background:
        radial-gradient(760px 480px at 85% 20%, rgba(251, 166, 94, .36), transparent 62%),
        radial-gradient(560px 380px at 0% 100%, rgba(239, 118, 18, .1), transparent 60%),
        linear-gradient(180deg, #FFF7F0 0%, #FFE9D6 100%);
}

.th-pagehero--compact { padding-top: calc(var(--th-nav-h) + 72px); padding-bottom: 112px; }

/* Wave edge replaces the faint ring */
.th-pagehero::after {
    display: block;
    top: auto;
    right: 0;
    left: 0;
    bottom: -1px;
    width: auto;
    height: 64px;
    border: 0;
    border-radius: 0;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 72' preserveAspectRatio='none'%3E%3Cpath fill='%23ffffff' d='M0 40C180 8 360 0 540 18s360 50 540 44 270-34 360-46v56H0z'/%3E%3C/svg%3E") bottom / 100% 100% no-repeat;
}

.th-page .th-pagehero__title {
    font-family: var(--th-font-display);
    font-size: clamp(42px, 5.6vw, 68px);
    font-weight: 800;
    line-height: 1.03;
    letter-spacing: -.03em;
}

.th-pagehero__title span { color: var(--th-accent); }

.th-pagehero__visual::before {
    background: var(--th-grad);
    box-shadow: 0 36px 70px -30px rgba(227, 95, 0, .55);
}

.th-pagehero__visual::after {
    content: "";
    position: absolute;
    top: 8%;
    left: 66%;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .3);
}

.th-page .th-subnav a { border-color: rgba(239, 118, 18, .2); font-weight: 600; }
.th-page .th-subnav a:hover { border-color: var(--th-brand); color: var(--th-ink); }

.th-page .th-subnav a.is-active {
    background: var(--th-grad);
    border-color: transparent;
    color: var(--th-ink);
}

/* About: story */
.th-story__card { border-radius: 22px; box-shadow: 0 10px 28px -20px rgba(120, 60, 10, .3); }

.th-story__card--accent {
    position: relative;
    overflow: hidden;
    border: 0;
    background: var(--th-grad);
}

.th-story__card--accent::before {
    content: "";
    position: absolute;
    right: -70px;
    top: -90px;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .2);
}

.th-story__card--accent > * { position: relative; }

.th-story__card--accent .th-story__label { background: #fff; border-color: #fff; color: var(--th-ink); }
.th-page .th-story__card--accent h3 { color: var(--th-ink); }
.th-story__card--accent p { color: #2A2522; }

.th-page .th-story__card h3 { font-size: 26px; font-weight: 800; }

/* About: mission (charcoal) & vision (app orange) */
.th-mv__card { border-radius: 22px; }

.th-mv__card + .th-mv__card {
    background: var(--th-grad);
    color: #2A2522;
}

.th-mv__card + .th-mv__card::before { display: none; }

.th-mv__card + .th-mv__card .th-mv__icon { background: var(--th-ink); color: var(--th-brand-light); }

.th-page .th-mv__card + .th-mv__card h3 { color: var(--th-ink); }

.th-mv__icon { background: var(--th-grad); }

.th-page .th-mv__card h3 { font-size: 30px; font-weight: 800; }

/* About: leadership */
.th-founder {
    border: 0;
    background: linear-gradient(135deg, #FFF4EA 0%, #FFE6D0 100%);
}

.th-page .th-founder__copy h3 { font-weight: 800; }

.th-leader { border-radius: 18px; }
.th-leader:hover { border-color: rgba(239, 118, 18, .35); }

.th-leader__avatar {
    border: 0;
    background: var(--th-grad);
    font-family: var(--th-font-display);
    font-weight: 800;
    color: var(--th-ink);
}

/* Contact */
.th-contact__formwrap {
    position: relative;
    overflow: hidden;
    border-color: rgba(239, 118, 18, .15);
    box-shadow: 0 24px 48px -28px rgba(120, 60, 10, .4);
}

.th-contact__formwrap::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 5px;
    background: var(--th-grad);
}

.th-page .th-contact__heading { font-weight: 800; }

.th-contact__icon { background: var(--th-grad); color: var(--th-ink); }

.th-contact__list,
.th-contact__map { border-color: rgba(239, 118, 18, .15); }

.th-support__panel {
    background:
        radial-gradient(600px 360px at 0% 0%, rgba(239, 118, 18, .35), transparent 60%),
        radial-gradient(500px 340px at 100% 100%, rgba(251, 166, 94, .2), transparent 60%),
        var(--th-ink);
}

.th-page .th-support__panel .th-h2 span { color: var(--th-brand-light); }

.th-page .th-social a:hover { border-color: var(--th-brand-light); }

/* Partners */
/* No card: just the logo with the name under it */
.th-partner { border: 0; border-radius: 0; background: none; }

.th-partner:hover {
    box-shadow: none;
    transform: translateY(-4px);
}

.th-page .th-partner__name {
    border-top: 0;
    background: none;
    font-family: var(--th-font-display);
    font-size: 17px;
    font-weight: 700;
}

@media (max-width: 1023px) {
    .th-pagehero { padding-top: calc(var(--th-nav-h) + 48px); }
}

@media (max-width: 767px) {
    .th-pagehero { padding-top: calc(var(--th-nav-h) + 32px); padding-bottom: 88px; }
    .th-pagehero--compact { padding-top: calc(var(--th-nav-h) + 40px); padding-bottom: 80px; }
    .th-pagehero::after { display: block; height: 36px; }
    .th-pagehero__visual::after { width: 110px; height: 110px; }
}

/* About: leadership cards are buttons that switch the photo in the large frame ------------- */
.th-page .th-leader { padding: 0; }

.th-page .th-leader__btn {
    display: flex;
    align-items: center;
    gap: 16px;
    width: 100%;
    height: 100%;
    padding: 20px;
    border: 0;
    border-radius: inherit;
    background: none;
    font: inherit;
    text-align: left;
    color: inherit;
    cursor: pointer;
}

.th-page .th-leader__text { display: block; min-width: 0; }
.th-page .th-leader__name,
.th-page .th-leader__role { display: block; }

.th-page .th-leader:has(.th-leader__btn[aria-pressed="true"]) {
    border-color: var(--th-brand);
    box-shadow: 0 0 0 2px rgba(239, 118, 18, .25), 0 14px 30px -20px rgba(227, 95, 0, .55);
}

.th-page .th-leader__btn:focus-visible { outline-offset: -4px; border-radius: 16px; }

/* Initials portrait, shown in the large frame for people without a photo yet */
.th-founder__photo { position: relative; }

.th-founder__initials {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(circle at 72% 22%, rgba(255, 255, 255, .28) 0 22%, transparent 23%),
        var(--th-grad);
    font-family: var(--th-font-display);
    font-size: clamp(64px, 9vw, 112px);
    font-weight: 800;
    letter-spacing: .02em;
    color: var(--th-ink);
}

.th-founder__initials[hidden] { display: none; }

.th-founder__photo img { transition: opacity .25s ease; }
.th-founder__photo.is-swapping img,
.th-founder__photo.is-swapping .th-founder__initials { opacity: 0; }
.th-founder__initials { transition: opacity .25s ease; }

/* Healthzone: Explore-style video grid (like Instagram's search tab) ------------------- */
.th-page .th-explore__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 4px;
    max-width: 935px;
    margin: 0 auto;
    padding: 0;
    list-style: none;
}

.th-tile {
    position: relative;
    overflow: hidden;
    aspect-ratio: 1;
    background: var(--th-charcoal);
    container-type: size;
}

/* One tall tile per 2-row block, alternating right / left */
.th-tile--tall { aspect-ratio: auto; grid-row: span 2; }
.th-tile--tall-end { grid-column: 3; }
.th-tile--tall-start { grid-column: 1; }

.th-tile picture { display: contents; }

/* Shorts: the 9:16 player covers the tile (cropped like Instagram) */
.th-tile__media {
    position: absolute;
    top: 50%;
    left: 50%;
    width: max(100cqw, 100cqh * 9 / 16);
    height: max(100cqh, 100cqw * 16 / 9);
    border: 0;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

/* Long videos: the whole 16:9 still, over a blurred copy of itself that fills the square */
.th-tile .th-tile__blur {
    position: absolute;
    inset: -10%;
    width: 120%;
    height: 120%;
    max-width: none;
    object-fit: cover;
    filter: blur(18px) brightness(.75);
}

.th-tile .th-tile__thumb {
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: auto;
    transform: translateY(-50%);
}

/* The whole tile is the button */
.th-tile__open {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: flex;
    align-items: flex-end;
    padding: 12px;
    border: 0;
    background: transparent;
    font: inherit;                  /* site font, not the system (Apple) button font */
    color: #fff;
    text-align: left;
    cursor: pointer;
}

.th-tile__badge {
    position: absolute;
    top: 10px;
    right: 10px;
    display: inline-flex;
    align-items: center;
    gap: 2px;
    font-family: var(--th-font-display);   /* Urbanist, like the headlines */
    font-size: 13px;
    font-weight: 700;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .6));
}

/* Hover (mouse only): darken and show the title, like Instagram's hover stats */
.th-tile__title {
    font-size: 15px;
    font-weight: 600;
    line-height: 1.35;
    opacity: 0;
    transform: translateY(6px);
    transition: opacity .2s ease, transform .2s var(--th-ease);
}

.th-tile__open::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(to top, rgba(0, 0, 0, .7), rgba(0, 0, 0, .15) 60%);
    opacity: 0;
    transition: opacity .2s ease;
}

@media (hover: hover) {
    .th-tile__open:hover::before,
    .th-tile__open:hover .th-tile__title { opacity: 1; transform: none; }
}

.th-tile__open:focus-visible { outline: 3px solid var(--th-brand); outline-offset: -3px; }
.th-tile__open:focus-visible::before,
.th-tile__open:focus-visible .th-tile__title { opacity: 1; transform: none; }

@media (max-width: 767px) {
    /* Edge to edge, 2px gaps, as in the Instagram app */
    .th-page .th-explore__grid { gap: 2px; margin: 0 -20px; }
    .th-tile__badge { top: 6px; right: 6px; font-size: 11px; }
    .th-tile__badge svg { width: 16px; height: 16px; }
}

/* Viewer ------------------------------------------------------------------------------ */
.th-viewer-open,
.th-viewer-open body { overflow: hidden; }

.th-viewer {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 56px 72px;
}

.th-viewer[hidden] { display: none; }

.th-viewer__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(12, 10, 9, .88);
}

.th-viewer__box {
    position: relative;
    margin: 0;
    max-width: 100%;
}

.th-viewer__media {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    background: #000;
}

/* Long videos: 16:9 as large as fits; shorts: 9:16 as tall as fits */
.th-viewer[data-type="video"] .th-viewer__media { width: min(1100px, calc(100vw - 144px), (100vh - 150px) * 16 / 9); aspect-ratio: 16 / 9; }
.th-viewer[data-type="short"] .th-viewer__media { height: min(860px, 100vh - 150px); aspect-ratio: 9 / 16; }

.th-viewer__media iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.th-page .th-viewer__title {
    max-width: 640px;
    margin: 12px auto 0;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.4;
    text-align: center;
    color: #fff;
}

.th-viewer__btn {
    position: absolute;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .14);
    color: #fff;
    cursor: pointer;
    transition: background-color .2s;
}

.th-viewer__btn:hover { background: rgba(255, 255, 255, .26); }
.th-viewer__btn:focus-visible { outline: 3px solid var(--th-brand-light); outline-offset: 2px; }

.th-viewer__close { top: 12px; right: 12px; }
.th-viewer__prev { left: 16px; top: 50%; transform: translateY(-50%); }
.th-viewer__next { right: 16px; top: 50%; transform: translateY(-50%); }

@media (max-width: 767px) {
    .th-viewer { padding: 60px 0 76px; }
    .th-viewer[data-type="video"] .th-viewer__media { width: 100vw; border-radius: 0; }
    .th-viewer[data-type="short"] .th-viewer__media { height: auto; width: min(100vw, (100svh - 160px) * 9 / 16); margin-inline: auto; }
    .th-viewer__close { top: 10px; right: 10px; }
    /* Arrows move under the video on phones */
    .th-viewer__prev,
    .th-viewer__next { top: auto; bottom: 16px; transform: none; }
    .th-viewer__prev { left: calc(50% - 56px); }
    .th-viewer__next { right: calc(50% - 56px); }
    .th-page .th-viewer__title { padding: 0 16px; font-size: 14px; }
}

/* About, phones only: leadership as an accordion — the names form one list and the card
   (photo, name, role, mission) opens under the selected name. js/homepage.js keeps the card in a
   slot under that name and slides the slots open and shut. The card is compact here so the name,
   the photo and the text fit on one phone screen together. */
@media (max-width: 767px) {
    /* overflow-anchor: the browser must not nudge the scroll while a slot above shrinks (the script glides it) */
    .th-page .th-leaders__grid.is-accordion { grid-template-columns: minmax(0, 1fr); gap: 12px; overflow-anchor: none; }

    .th-leaders__grid.is-accordion .th-leader { flex-direction: column; align-items: stretch; }
    .th-page .th-leaders__grid.is-accordion .th-leader__btn { height: auto; }   /* desktop stretches it to the card; here the card is underneath */

    .th-founder-slot { overflow: hidden; }

    .th-leaders__grid.is-accordion .th-founder {
        margin: 0 12px 12px;
        padding: 16px;
        gap: 16px;
        border-radius: 16px;
    }

    .th-leaders__grid.is-accordion .th-founder__photo { width: 180px; max-width: 60%; }
    .th-leaders__grid.is-accordion .th-founder__copy { padding: 0 2px 4px; }
    .th-page .th-leaders__grid.is-accordion .th-founder__note { margin-top: 16px; font-size: 16px; line-height: 1.6; }
}

/* Healthzone: Videos / Blogs switch ---------------------------------------------------- */
.th-hz-tabs {
    display: flex;
    gap: 4px;
    width: max-content;
    margin: 0 auto 40px;
    padding: 5px;
    border: 1px solid rgba(239, 118, 18, .18);
    border-radius: 999px;
    background: #fff;
    box-shadow: 0 12px 30px -20px rgba(227, 95, 0, .45);
}

.th-hz-tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 26px;
    border: 0;
    border-radius: 999px;
    background: none;
    font-family: var(--th-font-display);
    font-size: 16px;
    font-weight: 700;
    line-height: 1;
    color: var(--th-muted);
    cursor: pointer;
    transition: background-color .25s var(--th-ease), color .25s var(--th-ease);
}

.th-hz-tab:hover { color: var(--th-ink); }
.th-hz-tab.is-active { background: var(--th-brand); color: #fff; }
.th-hz-tab:focus-visible { outline: 3px solid var(--th-brand-light); outline-offset: 2px; }

.th-hz-panel[hidden] { display: none; }

/* Opening healthzone.php#blogs scrolls here: keep the switch clear of the fixed navbar */
#health-videos { scroll-margin-top: calc(var(--th-nav-h) + 8px); }

/* The panel being left fades out quickly; the chosen panel's heading and items drop in from
   above, one after another */
.th-hz-panel.is-leaving { opacity: 0; transform: translateY(8px); transition: opacity .18s ease, transform .18s ease; }

.th-hz-panel.is-falling .th-fall {
    animation: th-fall .7s cubic-bezier(.22, 1, .36, 1) both;
    animation-delay: calc(var(--i, 0) * 60ms);
}

@keyframes th-fall {
    from { opacity: 0; transform: translateY(-60px); }
    to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
    .th-hz-panel.is-leaving { transition: none; }
    .th-hz-panel.is-falling .th-fall { animation: none; }
}

/* Blog cards */
.th-page .th-blogs__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
    max-width: 1080px;
    margin: 0 auto;
    padding: 0;
    list-style: none;
}

.th-blogs__grid > li { display: flex; }

.th-blog {
    display: flex;
    flex-direction: column;
    width: 100%;
    overflow: hidden;
    border: 1px solid rgba(239, 118, 18, .15);
    border-radius: 22px;
    background: #fff;
    transition: border-color .25s var(--th-ease), box-shadow .25s var(--th-ease), transform .25s var(--th-ease);
}

.th-blog:hover {
    border-color: rgba(239, 118, 18, .4);
    box-shadow: 0 22px 40px -22px rgba(227, 95, 0, .45);
    transform: translateY(-4px);
}

/* Placeholder cover until each post has its own image */
.th-blog__cover {
    display: grid;
    place-items: center;
    aspect-ratio: 16 / 10;
    background: linear-gradient(135deg, var(--th-brand-tint), var(--th-brand-soft));
    color: var(--th-brand);
}

.th-blog__body {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 10px;
    padding: 20px 22px 22px;
}

.th-page .th-blog__meta {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    color: var(--th-brand-ink);
}

.th-page .th-blog__title {
    margin: 0;
    font-family: var(--th-font-display);
    font-size: 20px;
    font-weight: 700;
    line-height: 1.25;
    color: var(--th-ink);
}

.th-page .th-blog__excerpt {
    margin: 0;
    font-size: 15px;
    line-height: 1.6;
    color: var(--th-muted);
}

.th-blog__more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: auto;
    padding-top: 6px;
    font-size: 15px;
    font-weight: 600;
    color: var(--th-brand-ink);
}

@media (max-width: 1023px) {
    .th-page .th-blogs__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
}

@media (max-width: 600px) {
    .th-hz-tabs { margin-bottom: 28px; }
    .th-hz-tab { padding: 10px 22px; font-size: 15px; }
    .th-page .th-blogs__grid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
}

/* Blog cards with a real post: the whole card is the link, with its cover image */
a.th-blog { color: inherit; text-decoration: none; }
a.th-blog:focus-visible { outline: 3px solid var(--th-brand-light); outline-offset: 3px; }
picture.th-blog__cover { display: block; overflow: hidden; }
.th-blog__cover img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--th-ease); }
a.th-blog:hover .th-blog__cover img { transform: scale(1.04); }
a.th-blog:hover .th-blog__more svg { transform: translateX(3px); }
.th-blog__more svg { transition: transform .25s var(--th-ease); }

/* Blog post page (blog.php) ------------------------------------------------------------- */
.th-post__hero { padding-bottom: 48px; }
.th-post__head { max-width: 760px; margin: 0 auto; text-align: center; }

.th-post__back {
    display: flex;
    align-items: center;
    gap: 6px;
    width: max-content;
    margin: 0 auto 22px;
    font-size: 15px;
    font-weight: 600;
    color: var(--th-brand-ink);
    text-decoration: none;
}
.th-post__back:hover { text-decoration: underline; text-underline-offset: 3px; }

.th-page .th-post__title {
    margin: 14px 0 12px;
    font-family: var(--th-font-display);
    font-size: clamp(32px, 4.6vw, 52px);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -.02em;
    color: var(--th-ink);
}

.th-page .th-post__meta { margin: 0; font-size: 15px; font-weight: 600; color: var(--th-muted); }

.th-post { padding-top: 0; }

.th-post__cover {
    display: block;
    max-width: 880px;
    margin: 0 auto 48px;
    overflow: hidden;
    border-radius: 24px;
    box-shadow: 0 30px 60px -36px rgba(227, 95, 0, .45);
}
.th-post__cover img { display: block; width: 100%; height: auto; }

.th-post__body { max-width: 700px; margin: 0 auto; }

.th-page .th-post__body p {
    margin: 0 0 18px;
    font-size: 18px;
    line-height: 1.75;
    color: #3D3632;
}

.th-page .th-post__body .th-post__lead { font-size: 20px; color: var(--th-ink); }

.th-page .th-post__body h2 {
    margin: 40px 0 12px;
    font-family: var(--th-font-display);
    font-size: 26px;
    font-weight: 700;
    line-height: 1.25;
    color: var(--th-ink);
}

.th-post__more { margin-top: 28px; }

@media (max-width: 600px) {
    .th-post__hero { padding-bottom: 32px; }
    .th-post__cover { margin-bottom: 32px; border-radius: 18px; }
    .th-page .th-post__body p { font-size: 17px; }
    .th-page .th-post__body .th-post__lead { font-size: 18px; }
    .th-page .th-post__body h2 { margin-top: 32px; font-size: 22px; }
}

/* Blog post: subheadings, bullet lists and 👉 tips */
.th-page .th-post__body h3 {
    margin: 28px 0 10px;
    font-family: var(--th-font-display);
    font-size: 21px;
    font-weight: 700;
    line-height: 1.3;
    color: var(--th-ink);
}

.th-page .th-post__body h2 + h3 { margin-top: 16px; }

.th-page .th-post__body ul {
    margin: 0 0 18px;
    padding: 0;
    list-style: none;
}

.th-page .th-post__body li {
    position: relative;
    margin: 0 0 8px;
    padding-left: 26px;
    font-size: 18px;
    line-height: 1.6;
    color: #3D3632;
}

.th-page .th-post__body li::before {
    content: "";
    position: absolute;
    top: .62em;
    left: 6px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--th-brand);
}

.th-page .th-post__body .th-post__tip {
    padding: 14px 18px;
    border-left: 4px solid var(--th-brand);
    border-radius: 0 14px 14px 0;
    background: var(--th-brand-tint);
    font-weight: 500;
    color: var(--th-ink);
}

@media (max-width: 600px) {
    .th-page .th-post__body h3 { font-size: 19px; }
    .th-page .th-post__body li { font-size: 17px; }
}
.th-page .th-post__body li strong { font-weight: 700; color: var(--th-ink); }
.th-page .th-post__body .th-post__label { margin: 22px 0 8px; font-weight: 700; color: var(--th-ink); }

/* Blog post text: justified (both edges straight); hyphenation keeps the word gaps even,
   especially on narrow phone screens */
.th-page .th-post__body p,
.th-page .th-post__body li {
    text-align: justify;
    -webkit-hyphens: auto;
    hyphens: auto;
}

/* Blogs tab: page numbers under the grid (9 posts per page) */
.th-pager {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin: 40px auto 0;
}

.th-pager__num,
.th-pager__step {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    padding: 0 12px;
    border: 1px solid rgba(239, 118, 18, .2);
    border-radius: 999px;
    background: #fff;
    font-family: var(--th-font-display);
    font-size: 16px;
    font-weight: 700;
    color: var(--th-ink);
    text-decoration: none;
    transition: background-color .2s var(--th-ease), color .2s var(--th-ease), border-color .2s var(--th-ease);
}

.th-pager__num:hover,
.th-pager__step:hover { border-color: var(--th-brand); color: var(--th-brand-ink); }
.th-pager__num.is-current { border-color: var(--th-brand); background: var(--th-brand); color: #fff; }
.th-pager a:focus-visible { outline: 3px solid var(--th-brand-light); outline-offset: 2px; }

@media (max-width: 600px) {
    .th-pager { gap: 6px; margin-top: 28px; }
    .th-pager__num,
    .th-pager__step { min-width: 38px; height: 38px; padding: 0 8px; font-size: 15px; }
}

/* Links inside blog posts (sources) */
.th-page .th-post__body a:not(.th-btn) {
    color: var(--th-brand-ink);
    text-decoration: underline;
    text-underline-offset: 3px;
    overflow-wrap: anywhere;
}

/* Tables inside blog posts (scroll sideways on narrow screens instead of squeezing) */
.th-post__table {
    margin: 8px 0 22px;
    overflow-x: auto;
    border: 1px solid rgba(239, 118, 18, .18);
    border-radius: 14px;
}

.th-post__table table { width: 100%; border-collapse: collapse; }

.th-post__table th,
.th-post__table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--th-line);
    font-size: 16px;
    line-height: 1.5;
    text-align: left;
    vertical-align: top;
    color: #3D3632;
}

.th-post__table th {
    background: var(--th-brand-tint);
    font-family: var(--th-font-display);
    font-weight: 700;
    color: var(--th-ink);
}

.th-post__table tr:last-child td { border-bottom: 0; }
.th-post__table td:first-child { font-weight: 600; color: var(--th-ink); }

@media (max-width: 600px) {
    .th-post__table th,
    .th-post__table td { padding: 10px 12px; font-size: 15px; }
}


/* Blog cards: cover images are wide banners (686 x 250) */
picture.th-blog__cover { aspect-ratio: 686 / 250; }

/* Blog page numbers on phones: first, last and the pages next to the current one, "…" between */
.th-pager__gap { display: none; }
@media (max-width: 600px) {
    .th-pager { flex-wrap: nowrap; }
    .th-pager__num.is-far { display: none; }
    .th-pager__gap { display: inline-flex; align-items: center; min-width: 20px; justify-content: center; font-weight: 700; color: var(--th-muted); }
}

/* Healthzone: YouTube Shorts tiles show their vertical cover, cropped to the tile like Instagram */
.th-tile .th-tile__cover { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* Contact form spam trap: off-screen, never visible to people */
.th-form__trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* Partner role under the name (e.g. "Digital Banking Partner") */
.th-page .th-partner__role {
    display: block;
    margin-top: 4px;
    font-family: 'Inter', 'Inter Fallback', system-ui, sans-serif;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .02em;
    color: var(--th-brand-ink);
}
