/* ==========================================================================
   Training Evo app page — Figma "MentalEvo_for adults Training Evo" (desktop 1512)
   Content column 1224px at x=144, the same grid the other app pages use.
   Structure follows sound-evo.css (features, video, CTA) and vision-evo.css
   (hero phone + QR, how-to cards); accents are the brand green.
   ========================================================================== */

.te-page {
    /* the header is fixed at top:24 and is 72 tall, so content starts at 96 */
    padding-top: 96px;
    background: #F8F6F7;
}

.te-container {
    width: 100%;
    max-width: 1264px;
    margin: 0 auto;
    padding: 0 20px;
}

.te-page h1,
.te-page h2,
.te-page h3 {
    font-family: var(--font-serif);
    font-weight: 400;
    color: #112F20;
}

.te-page h2 {
    font-size: 40px;
    line-height: 1.1;
}

.te-badges {
    display: flex;
    align-items: center;
    gap: 16px;
}

.te-badges a {
    display: block;
    transition: transform 0.2s ease;
}

.te-badges a:hover {
    transform: scale(1.04);
}

.te-badges img {
    display: block;
    width: 120px;
    height: 40px;
}

/* ==========================================================================
   Hero — phone + QR card left, identity / lead / badges right
   ========================================================================== */

.te-hero {
    padding: 140px 0 120px;
}

.te-hero-row {
    display: flex;
    align-items: flex-start;
    gap: 24px;
}

.te-hero-visual {
    position: relative;
    width: 600px;
    max-width: 100%;
    flex-shrink: 0;
}

/* The export is the whole 600x753 column frame, phone centred (x 120-480). */
.te-hero-phone {
    display: block;
    width: 100%;
    height: auto;
}

/* White card overlapping the phone's lower right edge: Figma 167x166 at
   x=397 / y=409 inside the 600x753 frame, in % so it scales with the image. */
.te-hero-qr {
    position: absolute;
    top: 54.3%;
    left: 66.2%;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 27.8%;
    aspect-ratio: 167 / 166;
    border: 1px solid #E4EAE5;
    border-radius: 20px;
    background: #FFFFFF;
    box-shadow: 0 4px 27.3px rgba(0, 0, 0, 0.1);
}

.te-hero-qr img {
    display: block;
    width: 64%;
    height: auto;
}

.te-hero-copy {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 600px;
    flex-shrink: 0;
    padding-top: 2px;
}

.te-breadcrumb {
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 29px;
    letter-spacing: 1.28px;
    text-transform: uppercase;
    color: #3B3B3B;
}

.te-breadcrumb a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.te-breadcrumb a:hover {
    color: var(--brand-green);
}

.te-breadcrumb span {
    margin: 0 2px;
}

.te-hero-id {
    display: flex;
    align-items: flex-start;
    gap: 24px;
    margin-top: 13px;
}

.te-hero-icon,
.te-hero-icon img {
    display: block;
    flex-shrink: 0;
    width: 88px;
    height: 88px;
    border-radius: 20px;
}

.te-hero-name {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.te-hero-name h1 {
    font-size: 54px;
    line-height: 1.1;
}

.te-hero-name p {
    font-family: var(--font-sans);
    font-size: 20px;
    line-height: 1.4;
    color: #4F5654;
}

.te-hero-lead {
    margin-top: 32px;
    font-family: var(--font-sans);
    font-size: 20px;
    line-height: 1.4;
    color: #4F5654;
}

.te-hero-copy .te-badges {
    margin-top: 24px;
}

/* ==========================================================================
   Features — accordion on the left, matching app screen on the right
   ========================================================================== */

.te-features-section {
    padding: 120px 0;
}

.te-features-section h2 {
    margin-bottom: 40px;
}

.te-features-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
}

.te-features {
    width: 599px;
    flex-shrink: 0;
    margin: 0;
    padding: 0;
    list-style: none;
}

.te-feature {
    border-bottom: 1px solid #D8E0D9;
}

.te-feature-head {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    width: 100%;
    padding: 16px 0;
    border: none;
    background: none;
    text-align: left;
    cursor: pointer;
    color: #9DA8A5;
    transition: color 0.2s ease;
}

.te-feature:not(.is-active) .te-feature-head {
    padding: 31.7px 0;
}

.te-feature-head:hover {
    color: #4F9A7C;
}

.te-feature.is-active .te-feature-head {
    color: var(--brand-green);
    cursor: default;
}

.te-feature-num {
    flex-shrink: 0;
    font-family: var(--font-serif);
    font-weight: 300;
    font-size: 36px;
    line-height: 1.1;
    color: inherit;
}

.te-feature-title {
    flex: 1 0 0;
    min-width: 1px;
    font-family: var(--font-sans);
    font-weight: 500;
    font-size: 20px;
    line-height: 1.1;
    color: inherit;
}

.te-feature-body {
    display: none;
}

.te-feature.is-active .te-feature-body {
    display: block;
    padding-bottom: 16px;
}

.te-feature-body p {
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.4;
    color: #4F5654;
}

/* The screens are exported as the full 600x569 frame with the bottom fade
   already baked in, so they just fill the column. */
.te-screen {
    width: 600px;
    flex-shrink: 0;
}

.te-screen img {
    display: block;
    width: 100%;
    height: auto;
}

/* ==========================================================================
   Video
   ========================================================================== */

.te-video {
    padding: 120px 0;
}

.te-video-frame {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 724px;
    border-radius: 40px;
    background: #112F20;
    overflow: hidden;
}

.te-video-frame .video-poster {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.te-play {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    padding: 15px;
    border: none;
    border-radius: 100px;
    background: #FFFFFF;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.te-play:hover {
    transform: scale(1.08);
}

.te-play img {
    display: block;
    width: 24px;
    height: 24px;
}

/* ==========================================================================
   Who is Training Evo for?
   ========================================================================== */

.te-who {
    padding: 120px 0;
}

.te-who-head {
    display: flex;
    flex-direction: column;
    gap: 40px;
    margin-bottom: 40px;
}

.te-who-head p {
    max-width: 500px;
    font-family: var(--font-sans);
    font-size: 20px;
    line-height: 1.4;
    color: #4F5654;
}

.te-who-cards {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.te-who-card {
    display: flex;
    flex-direction: column;
    padding: 8px;
    border: 1px solid #E9E9EF;
    border-radius: 24px;
    background: #FEFEFE;
}

.te-who-art {
    display: block;
    aspect-ratio: 584 / 265;
    border-radius: 16px;
    overflow: hidden;
}

.te-who-art img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.te-who-copy {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 40px 24px 32px;
}

.te-who-copy h3 {
    font-size: 26px;
    line-height: 1.1;
    color: var(--brand-green);
}

.te-who-copy p {
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.45;
    color: #4F5654;
}

/* ==========================================================================
   How to Use — three step cards
   ========================================================================== */

.te-howto {
    padding: 120px 0;
}

.te-howto h2 {
    margin-bottom: 40px;
    text-align: center;
}

.te-howto-cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.te-howto-card {
    display: flex;
    flex-direction: column;
    height: 564px;
    padding: 24px 24px 0;
    border: 1px solid #ECEAEC;
    border-radius: 20px;
    background-image: linear-gradient(180deg, #F9E7F2 0%, #FEFEFE 28%, #FEFEFE 100%);
    overflow: hidden;
}

.te-howto-copy {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.te-howto-num {
    font-family: var(--font-serif);
    font-weight: 300;
    font-size: 54px;
    line-height: 1.1;
    color: var(--brand-green);
}

.te-howto-copy p {
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.45;
    color: #4F5654;
}

.te-howto-art {
    display: flex;
    flex: 1 0 0;
    min-height: 1px;
    align-items: flex-end;
    justify-content: center;
}

.te-howto-art img {
    display: block;
    max-width: 100%;
    max-height: 100%;
}

/* ==========================================================================
   Closing call to action
   ========================================================================== */

.te-cta {
    padding: 120px 0;
}

.te-cta-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
    padding: 64px 144px;
    border-radius: 40px;
    background: #DFF0E9;
    text-align: center;
}

.te-cta-copy {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.te-cta-copy h2 {
    font-size: 38px;
}

.te-cta-copy p {
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.45;
    color: #4F5654;
}

/* ==========================================================================
   FAQ — the shared accordion, numbered like the other app pages
   ========================================================================== */

.te-faq .col-faq {
    counter-reset: te-faq;
}

.te-faq .faq-item {
    counter-increment: te-faq;
    border-bottom-color: #DDE6E1;
}

.te-faq .faq-question {
    line-height: 1.4;
}

.te-faq .faq-question > span:first-child::before {
    content: counter(te-faq) ". ";
}

.te-faq .faq-accent {
    color: var(--brand-green);
}

/* Plain ↘ arrow (no circle), 40x40 — also on mobile, where index.css would
   otherwise switch back to the circled chevron. */
.te-faq .faq-arrow {
    width: 40px;
    height: 40px;
    background-image: url('../assets/icons/training-evo/faq-arrow.svg');
}

/* ==========================================================================
   Tablet — relax the fixed 600px halves into flexible ones
   ========================================================================== */

@media (min-width: 769px) and (max-width: 1263px) {
    .te-hero-visual,
    .te-hero-copy,
    .te-features {
        flex: 1 1 0;
        width: auto;
        min-width: 0;
    }

    .te-screen {
        flex: 0 1 460px;
        width: auto;
        min-width: 0;
    }

    .te-cta-card {
        padding: 64px 48px;
    }

    .te-video-frame {
        height: auto;
        aspect-ratio: 1224 / 724;
    }
}

/* ==========================================================================
   Mobile
   ========================================================================== */

@media (max-width: 768px) {
    .te-page h2 {
        font-size: 34px;
        line-height: 1.15;
    }

    .te-hero,
    .te-features-section,
    .te-video,
    .te-who,
    .te-howto,
    .te-cta {
        padding: 64px 0;
    }

    /* ---- hero: copy first, then the phone ---- */

    .te-hero {
        padding-top: 73px;
    }

    .te-hero-row {
        flex-direction: column-reverse;
        gap: 48px;
    }

    .te-hero-visual,
    .te-hero-copy {
        width: 100%;
    }

    /* the image and its QR card scale together; only the corner tightens */
    .te-hero-visual {
        align-self: center;
    }

    .te-hero-qr {
        border-radius: 12px;
    }

    .te-hero-icon,
    .te-hero-icon img {
        width: 56px;
        height: 56px;
        border-radius: 14px;
    }

    .te-hero-id {
        gap: 12px;
    }

    .te-hero-name h1 {
        font-size: 40px;
    }

    .te-hero-name p,
    .te-hero-lead {
        font-size: 16px;
    }

    .te-hero-lead {
        margin-top: 24px;
    }

    /* ---- features: the screen follows whichever row is open ---- */

    .te-features-section h2 {
        margin-bottom: 16px;
    }

    .te-features-row,
    .te-features {
        display: contents;
    }

    .te-features-section .te-container {
        display: flex;
        flex-direction: column;
    }

    .te-feature:nth-child(1) { order: 1; }
    .te-feature:nth-child(2) { order: 3; }
    .te-feature:nth-child(3) { order: 5; }
    .te-feature:nth-child(4) { order: 7; }

    .te-features-row[data-active="1"] .te-screen { order: 2; }
    .te-features-row[data-active="2"] .te-screen { order: 4; }
    .te-features-row[data-active="3"] .te-screen { order: 6; }
    .te-features-row[data-active="4"] .te-screen { order: 8; }

    .te-screen {
        width: 100%;
    }

    /* ---- video ---- */

    .te-video-frame {
        height: 209px;
        border-radius: 24px;
    }

    /* ---- who ---- */

    .te-who-head {
        gap: 16px;
        margin-bottom: 24px;
    }

    .te-who-head p {
        font-size: 16px;
    }

    .te-who-cards {
        grid-template-columns: minmax(0, 1fr);
    }

    .te-who-copy {
        padding: 24px 16px;
    }

    /* ---- how to ---- */

    .te-howto h2 {
        margin-bottom: 24px;
        text-align: left;
    }

    .te-howto-cards {
        grid-template-columns: minmax(0, 1fr);
    }

    .te-howto-card {
        height: 460px;
    }

    .te-howto-num {
        font-size: 44px;
    }

    /* ---- cta ---- */

    .te-cta-card {
        gap: 32px;
        padding: 40px 20px;
        border-radius: 24px;
    }

    .te-cta-copy h2 {
        font-size: 28px;
    }

    .te-cta .te-badges {
        flex-wrap: wrap;
        justify-content: center;
    }
}
