/*
 * About — page-local styles.
 *
 * Everything is scoped under `.tgd-about`. That is deliberate and
 * load-bearing: the legacy theme sets `html { font-size: 10px }`,
 * `body { font-size: 20px }`, and styles bare `h1-h6`, `p`, `ul`, and `li`
 * globally. Those rules would otherwise win here, so the page pins its own
 * base and neutralizes the inherited element styles below — without leaking
 * any of it back into the shared header and footer.
 *
 * The element resets use `:where()` so they land at zero specificity. Any
 * single class in this file therefore overrides them without `!important`,
 * which keeps the component rules below plain and easy to adjust.
 *
 * Palette follows the TGD brand tokens already in use on the Hire an Expert,
 * Magai and Genius Club pages (violet #8228f4, bright violet #b832ff,
 * magenta #f01b85). The three "ways in" cards keep the exact purples from the
 * previous version of this page (#be85ff, #7100f3, #3d0082).
 */

.tgd-about {
    --abt-violet: #8228f4;
    --abt-violet-bright: #b832ff;
    --abt-violet-deep: #5b13b8;
    --abt-violet-darkest: #2e0b63;
    --abt-magenta: #f01b85;

    --abt-ink: #17152d;
    --abt-ink-soft: #5a5870;
    --abt-ink-faint: #8b88a0;
    --abt-line: #e4e0f2;
    --abt-surface: #ffffff;
    --abt-surface-alt: #faf8ff;
    --abt-tint: #f3edff;

    --abt-shadow-sm: 0 4px 14px rgba(23, 21, 45, .06);
    --abt-shadow-md: 0 18px 44px rgba(70, 30, 140, .10);
    --abt-shadow-lg: 0 30px 70px rgba(70, 30, 140, .16);

    --abt-radius: 20px;
    --abt-radius-lg: 28px;

    /* Single source of vertical rhythm. Every band uses this top and bottom,
       so the gap between any two adjacent sections is always 2x this value. */
    --abt-section-y: 92px;
    --abt-gutter: 24px;

    min-width: 320px;
    background: var(--abt-surface);
    color: var(--abt-ink);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    /*
     * The theme sets `html { font-size: 10px }`. `rem` is always resolved
     * against that root — pinning a size here does not change it — so every
     * type size in this file is stated in px instead. Pinning 16px here is
     * still what `em`, and any unstyled text, fall back to.
     */
    font-size: 16px;
    line-height: 1.55;
    overflow-x: hidden;
}

.tgd-about,
.tgd-about *,
.tgd-about *::before,
.tgd-about *::after {
    box-sizing: border-box;
}

html:has(.tgd-about) {
    scroll-behavior: smooth;
}

/* Neutralize the legacy theme's base element styles inside the page only. */
.tgd-about :where(h1, h2, h3, h4, h5, h6) {
    margin: 0;
    padding: 0;
    color: inherit;
    font-family: inherit;
    font-weight: 700;
    line-height: 1.12;
    letter-spacing: -.02em;
}

.tgd-about :where(p) {
    margin: 0;
    color: inherit;
    font-size: inherit;
    line-height: inherit;
}

.tgd-about :where(ul, ol) {
    margin: 0;
    padding: 0;
    list-style: none;
}

.tgd-about :where(li) {
    margin: 0;
    padding: 0;
    line-height: inherit;
}

.tgd-about :where(figure) {
    margin: 0;
}

.tgd-about :where(img) {
    display: block;
    max-width: 100%;
}

.tgd-about :where(a) {
    color: inherit;
    text-decoration: none;
}

/* ── Layout primitives ────────────────────────────────────────────────── */

.abt-container {
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 var(--abt-gutter);
}

.abt-container--narrow {
    max-width: 880px;
}

.abt-section {
    padding: var(--abt-section-y) 0;
}

.abt-section--tint {
    background: var(--abt-surface-alt);
}

.abt-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    padding: 7px 14px;
    border-radius: 999px;
    background: var(--abt-tint);
    color: var(--abt-violet-deep);
    font-size: 12.48px;
    font-weight: 600;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.abt-section-head {
    max-width: 720px;
    margin: 0 0 56px;
}

.abt-section-head--center {
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

.abt-section-head h2 {
    font-size: clamp(32px, 19.2px + 2.6vw, 49.6px);
}

.abt-section-head h2 em {
    font-style: normal;
    color: var(--abt-violet);
}

.abt-section-head .abt-lede {
    margin-top: 20px;
    color: var(--abt-ink-soft);
    font-size: 17.28px;
    line-height: 1.65;
}

/* ── Buttons ──────────────────────────────────────────────────────────── */

.abt-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 15px 28px;
    border: 1px solid transparent;
    border-radius: 999px;
    font-size: 16px;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    transition: transform .2s ease, box-shadow .2s ease, background .2s ease, color .2s ease;
}

.abt-btn__arrow {
    transition: transform .2s ease;
}

.abt-btn:hover .abt-btn__arrow {
    transform: translateX(4px);
}

.abt-btn--primary {
    background: linear-gradient(120deg, var(--abt-violet) 0%, var(--abt-violet-bright) 100%);
    color: #fff;
    box-shadow: 0 12px 30px rgba(130, 40, 244, .32);
}

.abt-btn--primary:hover {
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 18px 40px rgba(130, 40, 244, .42);
}

.abt-btn--ghost {
    border-color: rgba(255, 255, 255, .45);
    color: #fff;
}

.abt-btn--ghost:hover {
    background: rgba(255, 255, 255, .12);
    color: #fff;
    transform: translateY(-2px);
}

/* ── Hero ─────────────────────────────────────────────────────────────── */

.abt-hero {
    position: relative;
    padding: 104px 0 120px;
    background:
        radial-gradient(1100px 620px at 78% 12%, rgba(184, 50, 255, .55) 0%, rgba(184, 50, 255, 0) 62%),
        radial-gradient(760px 520px at 8% 88%, rgba(240, 27, 133, .30) 0%, rgba(240, 27, 133, 0) 64%),
        linear-gradient(150deg, var(--abt-violet-darkest) 0%, var(--abt-violet-deep) 58%, #7a24d6 100%);
    color: #fff;
    isolation: isolate;
    overflow: hidden;
}

/* Soft drifting light. Pure decoration — stopped under reduced motion. */
.abt-hero__glow {
    position: absolute;
    top: -22%;
    left: 50%;
    width: 900px;
    height: 900px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, .16) 0%, rgba(255, 255, 255, 0) 60%);
    transform: translateX(-50%);
    pointer-events: none;
    z-index: -1;
    animation: abt-drift 18s ease-in-out infinite alternate;
}

@keyframes abt-drift {
    from { transform: translate(-54%, -3%) scale(1); }
    to   { transform: translate(-46%, 4%) scale(1.09); }
}

.abt-hero__grid {
    display: grid;
    grid-template-columns: 1.05fr .95fr;
    gap: 64px;
    align-items: center;
}

.abt-hero .abt-eyebrow {
    background: rgba(255, 255, 255, .14);
    color: #fff;
}

.abt-hero h1 {
    /* The 34.4px floor keeps "We believe knowledge" on one line at 375px
       without running under the site's floating share rail. */
    font-size: clamp(34.4px, 17.6px + 4.2vw, 64px);
    line-height: 1.06;
    letter-spacing: -.035em;
    text-wrap: balance;
}

.abt-hero h1 span {
    display: block;
    background: linear-gradient(100deg, #ffd6f2 0%, #d9b4ff 45%, #9be8ff 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.abt-hero__lede {
    max-width: 30em;
    margin-top: 26px;
    color: rgba(255, 255, 255, .84);
    font-size: 17.92px;
    line-height: 1.68;
}

.abt-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 38px;
}

/*
 * Hero panel — a rounded rectangle cropped from
 * assets/about/img/hero-audience.jpg.
 *
 * The aspect ratio and object-position below frame the scene inside that
 * crop and are tied to this particular photograph. Both need revisiting if
 * the asset is replaced.
 */
.abt-hero__visual {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Soft halo, sized off the panel so the two stay in proportion. */
.abt-hero__visual::before {
    content: "";
    position: absolute;
    width: min(118%, 600px);
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, .17) 0%, rgba(255, 255, 255, .05) 55%, rgba(255, 255, 255, 0) 72%);
    pointer-events: none;
}

.abt-hero__photo {
    position: relative;
    width: min(100%, 520px);
    /* Barely taller than square. A more portrait crop fills the hero better
       but cuts the raised hands either side of him, which is the whole point
       of the picture. */
    aspect-ratio: 9 / 10;
    border: 1px solid rgba(255, 255, 255, .22);
    border-radius: var(--abt-radius-lg);
    overflow: hidden;
    box-shadow: 0 40px 80px rgba(20, 5, 50, .42);
}

.abt-hero__photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* The source is a wide group shot, so this crop keeps the full height and
       takes a portrait slice from it. 44% centres that slice on the man with
       his arms up rather than on the middle of the frame. */
    object-position: 44% 50%;
}

/* Hangs off the panel's bottom-right corner rather than sitting inside it,
   so it covers as little of the photograph as possible. */
.abt-hero__badge {
    position: absolute;
    right: -18px;
    bottom: -22px;
    max-width: 215px;
    padding: 18px 22px;
    border-radius: 18px;
    background: #fff;
    color: var(--abt-ink);
    box-shadow: var(--abt-shadow-lg);
}

.abt-hero__badge strong {
    display: block;
    font-size: 16.32px;
    font-weight: 700;
}

.abt-hero__badge span {
    display: block;
    margin-top: 4px;
    color: var(--abt-ink-soft);
    font-size: 14.08px;
    line-height: 1.45;
}

/* ── Stat band ────────────────────────────────────────────────────────── */

.abt-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: -56px;
    position: relative;
    z-index: 2;
}

.abt-stat {
    padding: 30px 28px;
    border: 1px solid var(--abt-line);
    border-radius: var(--abt-radius);
    background: var(--abt-surface);
    box-shadow: var(--abt-shadow-md);
}

.abt-stat__figure {
    display: block;
    background: linear-gradient(115deg, var(--abt-violet) 0%, var(--abt-magenta) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    font-size: clamp(30.4px, 20.8px + 1.6vw, 40px);
    font-weight: 800;
    letter-spacing: -.03em;
    line-height: 1.1;
}

.abt-stat__label {
    display: block;
    margin-top: 8px;
    color: var(--abt-ink-soft);
    font-size: 15.36px;
    line-height: 1.5;
}

/* ── Pillars ──────────────────────────────────────────────────────────── */

.abt-pillars {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

.abt-pillar {
    display: flex;
    flex-direction: column;
    padding: 36px 32px;
    border: 1px solid var(--abt-line);
    border-radius: var(--abt-radius);
    background: var(--abt-surface);
    box-shadow: var(--abt-shadow-sm);
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}

.abt-pillar:hover {
    transform: translateY(-4px);
    border-color: rgba(130, 40, 244, .35);
    box-shadow: var(--abt-shadow-md);
}

.abt-pillar__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 54px;
    height: 54px;
    margin-bottom: 22px;
    border-radius: 16px;
    background: var(--abt-tint);
    color: var(--abt-violet);
}

.abt-pillar__icon svg {
    width: 26px;
    height: 26px;
}

.abt-pillar h3 {
    font-size: 19.84px;
}

.abt-pillar p {
    margin-top: 12px;
    color: var(--abt-ink-soft);
    font-size: 16px;
    line-height: 1.62;
}

.abt-closing {
    max-width: 760px;
    margin: 56px auto 0;
    padding-top: 36px;
    border-top: 1px solid var(--abt-line);
    color: var(--abt-ink-soft);
    font-size: 17.6px;
    line-height: 1.7;
    text-align: center;
}

/* ── Origin story (editorial + timeline) ──────────────────────────────── */

.abt-origin__grid {
    display: grid;
    grid-template-columns: .82fr 1.18fr;
    gap: 72px;
    align-items: start;
}

/* Sticky heading is the editorial move: the title holds while the story
   scrolls past it. Falls back to a normal block on narrow screens. */
.abt-origin__aside {
    position: sticky;
    top: 110px;
}

.abt-origin__aside h2 {
    font-size: clamp(30.4px, 19.2px + 2.2vw, 44.8px);
}

.abt-origin__aside h2 em {
    font-style: normal;
    color: var(--abt-violet);
}

.abt-origin__aside p {
    margin-top: 18px;
    color: var(--abt-ink-soft);
    font-size: 16.64px;
    line-height: 1.68;
}

.abt-timeline {
    position: relative;
    padding-left: 38px;
}

/* The spine. Fades out at the bottom so it ends softly. */
.abt-timeline::before {
    content: "";
    position: absolute;
    top: 8px;
    bottom: 8px;
    left: 9px;
    width: 2px;
    background: linear-gradient(180deg, var(--abt-violet) 0%, rgba(184, 50, 255, .35) 72%, rgba(184, 50, 255, 0) 100%);
}

.abt-step {
    position: relative;
    padding-bottom: 46px;
}

.abt-step:last-child {
    padding-bottom: 0;
}

.abt-step::before {
    content: "";
    position: absolute;
    top: 6px;
    left: -38px;
    width: 20px;
    height: 20px;
    border: 4px solid var(--abt-surface-alt);
    border-radius: 50%;
    background: var(--abt-violet);
    box-shadow: 0 0 0 2px var(--abt-violet);
}

.abt-step__label {
    display: block;
    margin-bottom: 8px;
    color: var(--abt-violet);
    font-size: 12.8px;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.abt-step h3 {
    font-size: 21.12px;
}

.abt-step p {
    margin-top: 12px;
    color: var(--abt-ink-soft);
    font-size: 16.32px;
    line-height: 1.68;
}

.abt-origin__note {
    margin-top: 40px;
    padding: 26px 30px;
    border-left: 4px solid var(--abt-violet);
    border-radius: 0 var(--abt-radius) var(--abt-radius) 0;
    background: var(--abt-tint);
    color: var(--abt-ink);
    font-size: 16.96px;
    line-height: 1.66;
}

/* ── Global reach ─────────────────────────────────────────────────────── */

.abt-reach {
    position: relative;
    padding: var(--abt-section-y) 0;
    background:
        radial-gradient(900px 480px at 82% 20%, rgba(184, 50, 255, .42) 0%, rgba(184, 50, 255, 0) 64%),
        linear-gradient(140deg, #23085a 0%, var(--abt-violet-deep) 100%);
    color: #fff;
    overflow: hidden;
}

.abt-reach__grid {
    display: grid;
    grid-template-columns: 1.05fr .95fr;
    gap: 64px;
    align-items: center;
}

.abt-reach .abt-eyebrow {
    background: rgba(255, 255, 255, .14);
    color: #fff;
}

.abt-reach h2 {
    font-size: clamp(30.4px, 19.2px + 2.3vw, 46.4px);
}

.abt-reach h2 em {
    font-style: normal;
    background: linear-gradient(100deg, #ffd6f2 0%, #d9b4ff 50%, #9be8ff 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.abt-reach p {
    margin-top: 20px;
    max-width: 34em;
    color: rgba(255, 255, 255, .82);
    font-size: 17.28px;
    line-height: 1.7;
}

/* Language chips — a visual stand-in for "courses travel across languages".
   Decorative: the list is a sample, not a complete or ranked set. */
.abt-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 32px;
}

.abt-chip {
    padding: 9px 16px;
    border: 1px solid rgba(255, 255, 255, .26);
    border-radius: 999px;
    background: rgba(255, 255, 255, .08);
    font-size: 14.72px;
    font-weight: 500;
}

.abt-chip--more {
    background: rgba(255, 255, 255, .92);
    border-color: transparent;
    color: var(--abt-violet-deep);
    font-weight: 700;
}

.abt-reach__panel {
    padding: 38px 36px;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: var(--abt-radius-lg);
    background: rgba(255, 255, 255, .07);
    backdrop-filter: blur(6px);
}

.abt-reach__panel h3 {
    font-size: 19.2px;
}

.abt-reach__list {
    margin-top: 22px;
    display: grid;
    gap: 18px;
}

.abt-reach__list li {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    color: rgba(255, 255, 255, .86);
    font-size: 16px;
    line-height: 1.55;
}

.abt-reach__list svg {
    flex: 0 0 auto;
    width: 22px;
    height: 22px;
    margin-top: 1px;
    color: #9be8ff;
}

/* ── Team ─────────────────────────────────────────────────────────────── */

.abt-team__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 26px;
}

.abt-person {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--abt-line);
    border-radius: var(--abt-radius);
    background: var(--abt-surface);
    box-shadow: var(--abt-shadow-sm);
    overflow: hidden;
    transition: transform .25s ease, box-shadow .25s ease;
}

.abt-person:hover {
    transform: translateY(-4px);
    box-shadow: var(--abt-shadow-md);
}

.abt-person__photo {
    position: relative;
    aspect-ratio: 1 / 1;
    background: var(--abt-tint);
    overflow: hidden;
}

.abt-person__photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    transition: transform .5s ease;
}

.abt-person:hover .abt-person__photo img {
    transform: scale(1.04);
}

.abt-person__body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 24px 24px 28px;
}

.abt-person__role {
    display: block;
    margin-bottom: 8px;
    background: linear-gradient(115deg, var(--abt-violet) 0%, var(--abt-magenta) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    font-size: 12.8px;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.abt-person h3 {
    font-size: 19.2px;
}

.abt-person__bio {
    margin-top: 12px;
    color: var(--abt-ink-soft);
    font-size: 15.68px;
    line-height: 1.62;
}

.abt-person__bio p {
    margin: 0;
}

.abt-person__bio p + p {
    margin-top: 10px;
}

/* ── Ways in ──────────────────────────────────────────────────────────── */

.abt-paths {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

.abt-path {
    display: flex;
    flex-direction: column;
    padding: 34px 30px 30px;
    /* The 8px top rule is the one visual idea carried over from the previous
       design; each card keeps its own purple from that version. */
    border-top: 8px solid var(--abt-path-accent, var(--abt-violet));
    border-radius: 4px 4px var(--abt-radius) var(--abt-radius);
    background: var(--abt-surface);
    box-shadow: var(--abt-shadow-sm);
    transition: transform .25s ease, box-shadow .25s ease;
}

.abt-path:hover {
    transform: translateY(-4px);
    box-shadow: var(--abt-shadow-md);
}

.abt-path--learners  { --abt-path-accent: #be85ff; }
.abt-path--creators  { --abt-path-accent: #7100f3; }
.abt-path--affiliates { --abt-path-accent: #3d0082; }

.abt-path h3 {
    font-size: 19.52px;
}

.abt-path p {
    margin-top: 12px;
    color: var(--abt-ink-soft);
    font-size: 16px;
    line-height: 1.62;
}

.abt-path__link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: auto;
    padding-top: 26px;
    color: var(--abt-violet-deep);
    font-weight: 600;
}

.abt-path__link span {
    transition: transform .2s ease;
}

.abt-path:hover .abt-path__link span {
    transform: translateX(4px);
}

/* ── Responsive ───────────────────────────────────────────────────────── */

@media (max-width: 1080px) {
    .tgd-about {
        --abt-section-y: 76px;
    }

    .abt-hero__grid,
    .abt-reach__grid {
        gap: 44px;
    }

    .abt-origin__grid {
        gap: 48px;
    }

    .abt-team__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 860px) {
    .tgd-about {
        --abt-section-y: 64px;
    }

    .abt-hero {
        padding: 72px 0 96px;
    }

    .abt-hero__grid,
    .abt-reach__grid,
    .abt-origin__grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .abt-origin__aside {
        position: static;
    }

    /* At phone width the card would cover most of the photo, so it drops
       below the panel instead of floating over it. */
    .abt-hero__visual {
        flex-direction: column;
        align-items: stretch;
    }

    .abt-hero__badge {
        position: static;
        max-width: none;
        margin-top: 14px;
    }

    .abt-stats,
    .abt-pillars,
    .abt-paths {
        grid-template-columns: 1fr;
    }

    .abt-stats {
        margin-top: -40px;
    }
}

@media (max-width: 620px) {
    .tgd-about {
        --abt-gutter: 16px;
    }

    .abt-hero__actions .abt-btn {
        width: 100%;
        justify-content: center;
    }

    .abt-team__grid {
        grid-template-columns: 1fr;
    }

    .abt-reach__panel {
        padding: 28px 24px;
    }
}

/* ── Motion ───────────────────────────────────────────────────────────── */

/*
 * Elements animated by page.js start visible here. The script hides them at
 * runtime immediately before building each animation, so if GSAP fails to
 * load the page simply renders static instead of blank.
 */
@media (prefers-reduced-motion: reduce) {
    html:has(.tgd-about) {
        scroll-behavior: auto;
    }

    .tgd-about *,
    .tgd-about *::before,
    .tgd-about *::after {
        animation: none !important;
        transition: none !important;
    }
}
