/* Homepage rhythm. Loaded only on the front page after component styles. */
body.home {
    --tf-home-max: 1180px;
    --tf-page-gutter: clamp(20px, 3.6vw, 52px);
    --tf-home-space: clamp(88px, 6.9vw, 104px);
    --tf-home-group: clamp(28px, 2.5vw, 36px);
    --tf-home-card-gap: clamp(24px, 2vw, 30px);
    --tf-home-card-pad: clamp(24px, 2.3vw, 32px);
    --tf-home-compact-pad: 22px;
    --tf-home-radius: 14px;
    --tf-type-heading-1: clamp(48px, 3.9vw, 56px);
    --tf-type-heading-2: clamp(34px, 2.8vw, 40px);
    --tf-type-heading-3: clamp(20px, 1.65vw, 24px);
    --tf-type-lead: clamp(16px, 1.25vw, 17px);
    --tf-type-body: 16px;
    --tf-type-small: 14px;
    --tf-type-compact: 14px;
    --tf-type-label: 12px;
    --tf-type-button: 14px;
    --tf-home-neutral: #f7f5ef;
    --tf-home-line: #dce4da;
}
.home main :is(.tf-trust, .tf-fit, .tf-difference, .tf-home-section) { padding-block: var(--tf-home-space); }
.home main :is(.tf-home-width, .tf-trust, .tf-difference-inner) { width: var(--tf-home-measure); }
.home main .tf-fit { --tf-fit-inner-width: var(--tf-home-measure); }
.home main :is(.tf-fit, .tf-approach, .tf-learning, .tf-next) { background-color: var(--tf-home-neutral); }
.home main :is(.tf-difference, .tf-programmes, .tf-food, .tf-faq, .tf-stories) { background-color: #fff; }
.home main :is(.tf-home-heading,.tf-fit-intro) { margin-block-end: var(--tf-home-group); }
.home main :is(.tf-home-intro,.tf-trust-intro,.tf-fit-intro p:not(.tf-fit-kicker)) { margin-block-start: 14px; line-height: 1.6; }
.home main :is(.tf-home-kicker,.tf-fit-kicker,.tf-trust-kicker) { letter-spacing: .09em; }
.home main :is(.tf-hero-cta,.tf-home-cta,.tf-fit-button,.tf-difference-cta) { min-height: 44px; font-size: var(--tf-type-button); }
.home main .tf-home-centred-action { margin-block-start: 24px; }

.home .tf-hero .tf-hero-slide { min-height: clamp(540px, 69svh, 645px); }
.home .tf-hero .tf-hero-copy { margin-inline-start: max(var(--tf-page-gutter),calc((100% - var(--tf-home-max)) / 2)); padding-block: 52px 68px; }
.home .tf-hero .tf-hero-copy :is(h1,h2) { text-wrap: balance; }
.home .tf-hero .tf-hero-copy > p { line-height: 1.62; margin-block-start: 18px; }
.home .tf-hero .tf-hero-actions { margin-block-start: 24px; }

.home .tf-trust-top { gap: var(--tf-home-card-gap); }
.home .tf-trust-stats { margin-block-start: 24px; }
.home .tf-trust-label,.home .tf-trust-credentials p { line-height: 1.5; }
.home .tf-trust-credentials { margin-block-start: 22px; padding-block-start: 24px; }
.home .tf-trust-logo { min-height: 54px; }
.home .tf-trust-logo img { max-height: 46px; object-fit: contain; }

.home main :is(.tf-fit-grid,.tf-programmes-grid,.tf-food-grid,.tf-learning-grid,.tf-questions-grid,.tf-next-layout) { gap: var(--tf-home-card-gap); }
.home main :is(.tf-fit-card,.tf-programme-card,.tf-founder-feature,.tf-story-card,.tf-food-card,.tf-learning-card,.tf-questions-panel,.tf-resources-panel,.tf-next-card,.tf-difference-panel) { border-radius: var(--tf-home-radius); }
.home main :is(.tf-fit-copy,.tf-programme-copy,.tf-programme-family .tf-programme-copy,.tf-programme-adults,.tf-founder-content,.tf-difference-panel,.tf-questions-panel,.tf-resources-panel,.tf-next-card) { padding: var(--tf-home-card-pad); }
.home .tf-fit-copy { display: flex; flex: 1; flex-direction: column; align-items: flex-start; }
.home .tf-fit-card { display: flex; flex-direction: column; }
.home .tf-fit-copy p { margin-block: 12px 22px; line-height: 1.6; }
.home .tf-fit-copy .tf-fit-button { margin-block-start: auto; }
.home .tf-difference-panel { background-color: var(--tf-home-neutral); border: 1px solid var(--tf-home-line); }
.home .tf-difference-meals { padding: 14px; background-color: #fff; border-radius: 10px; }
.home .tf-difference-tab { padding-block: 9px; }
.home .tf-difference-tab + .tf-difference-tab { margin-block-start: 6px; }
.home .tf-difference :is(.tf-difference-description,.tf-difference-leads p) { line-height: 1.6; }
.home .tf-difference-action { margin-block-start: 20px; }

.home .tf-approach-grid { gap: var(--tf-home-card-gap); }
.home .tf-approach-pillars { gap: 14px; margin-block: 20px; }
.home .tf-approach-pillars li { gap: 12px; padding: 16px; background-color: #fff; border-radius: 12px; }
.home .tf-approach-pillars p { font-size: var(--tf-type-small); line-height: 1.55; }
.home .tf-programme-description { line-height: 1.58; margin-block: 12px 20px; }
.home .tf-programme-small .tf-programme-description { font-size: var(--tf-type-small); }
.home .tf-programme-adults > .tf-home-cta { position: static; }
.home .tf-programme-adults > :is(h3,p) { max-width: 62ch; }
.home .tf-journey-grid { margin-block-start: var(--tf-home-group); }
.home .tf-journey-steps { gap: 14px; }
.home .tf-journey-steps li > div { padding: 13px 17px; }
.home .tf-journey-steps p { line-height: 1.55; }
.home .tf-journey-steps h3 { margin-block-end: 5px; }
.home .tf-stories-intro { padding-block: 16px 22px; }
.home main .tf-stories-track { margin-top: 0 !important; }
.home .tf-story-card figure,
.home .tf-food-card .tf-food-copy,
.home .tf-learning-card .tf-learning-copy { padding: var(--tf-home-compact-pad); }
.home .tf-story-card blockquote p { line-height: 1.65; }
.home .tf-questions-list li { padding-block: 14px; }
.home .tf-questions-list li p,.home .tf-faq details p { line-height: 1.65; }
.home .tf-faq summary { min-height: 44px; padding-block: 13px; }
.home .tf-faq-leaf,.home .tf-next-leaf { display: none; }
.home .tf-next-card p { margin-block: 12px 20px; line-height: 1.6; }
.home .tf-footer { padding-block-start: clamp(42px, 5vw, 68px); }
.home .tf-footer-inner { width: var(--tf-home-measure); max-width: var(--tf-home-max); }
.home .tf-footer-links :is(a,span) { font-size: 14px; line-height: 1.52; }
.home .tf-footer-links li { margin-block: 4px; }
.home .tf-footer-wordmark { max-width: 680px; opacity: .65; }

@media (max-width: 900px) {
    body.home {
        --tf-home-space: clamp(52px, 8vw, 64px);
        --tf-home-group: 24px;
        --tf-home-card-gap: 18px;
        --tf-home-card-pad: 22px;
        --tf-home-compact-pad: 20px;
        --tf-type-heading-1: clamp(34px, 5.4vw, 40px);
        --tf-type-heading-2: clamp(28px, 4.2vw, 32px);
        --tf-type-heading-3: clamp(18px, 2.9vw, 20px);
        --tf-type-body: 15px;
        --tf-type-lead: 16px;
    }
    .home .tf-hero .tf-hero-slide { min-height: 0; }
    .home .tf-hero .tf-hero-copy { margin-inline-start: 0; padding: 32px var(--tf-page-gutter) 22px; }
    .home .tf-hero .tf-hero-actions { margin-block-start: 20px; }
    .home .tf-fit-copy { padding: var(--tf-home-card-pad); }
}
@media (min-width: 641px) and (max-width: 900px) {
    .home .tf-fit-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
    .home .tf-fit-copy { padding-inline: 16px; }
}
@media (max-width: 560px) {
    .home .tf-hero .tf-hero-copy :is(h1,h2) { text-wrap: initial; }
    .home .tf-next-card p { max-width: 76%; }
    .home .tf-footer .tf-footer-grid > * { padding-block: 13px; }
}

/* Keep qualifications visually separate from the number-led statistics. */
.home .tf-trust .tf-trust-label {
    text-transform: none;
    letter-spacing: normal;
}
.home .tf-trust .tf-trust-credentials {
    gap: clamp(10px, 1.4vw, 16px);
}
.home .tf-trust .tf-trust-credentials > li {
    padding: 16px 10px;
    border: 1px solid var(--tf-home-line);
    border-radius: var(--tf-home-radius);
    background: var(--tf-home-neutral);
}
.home .tf-trust .tf-trust-credentials p {
    overflow-wrap: anywhere;
    font-size: var(--tf-type-small);
}

/* Keep the plan card below the portrait in the existing journey column. */
.home .tf-journey .tf-journey-visual {
    display: grid;
    align-content: start;
    gap: 16px;
    padding: 0;
}
.home .tf-journey .tf-journey-plan {
    position: static;
    width: 100%;
}
@media (min-width: 901px) {
    .home .tf-stories .tf-stories-shell {
        grid-template-columns: minmax(0,.42fr) minmax(0,1fr);
        gap: clamp(20px,3.6vw,48px);
        border-radius: clamp(24px,2.6vw,34px);
        padding: 0 0 18px clamp(24px,3.8vw,48px);
    }
    .home .tf-stories .tf-stories-intro {
        padding-block: clamp(32px,3.6vw,48px) 22px;
    }
    .home .tf-stories .tf-stories-track {
        margin-top: clamp(-36px,-3vw,-26px) !important;
        gap: clamp(10px,1vw,15px);
    }
    .home .tf-stories .tf-story-card {
        border-radius: clamp(22px,2.5vw,32px);
    }
    .home .tf-stories .tf-stories-track > .tf-story-card:nth-child(1) {
        margin-block-start: clamp(24px,2.4vw,32px);
    }
    .home .tf-stories .tf-stories-track > .tf-story-card:nth-child(2) {
        margin-block-start: 0;
    }
    .home .tf-stories .tf-stories-track > .tf-story-card:nth-child(3) {
        margin-block-start: clamp(13px,1.35vw,18px);
    }
    .home .tf-stories .tf-story-controls {
        gap: 5px;
        padding: 6px 9px 0;
    }
}
@media (max-width: 900px) {
    .home .tf-stories .tf-stories-track > .tf-story-card:nth-child(n) {
        margin-block-start: 0;
    }
}

.home .tf-questions-list li:has(.tf-question-read) {
    grid-template-columns: auto minmax(0,1fr) auto;
    gap: clamp(8px,1vw,14px);
}
.home .tf-question-read {
    display: inline-grid;
    place-items: center;
    min-height: 44px;
    padding-inline: 13px;
    border: 1px solid #1b513c;
    border-radius: 999px;
    color: #10412e;
    background: #fff;
    font-size: var(--tf-type-button);
    font-weight: 750;
    text-decoration: none;
}
.home .tf-question-read:is(:hover,:focus-visible) { background: #10412e; color: #fff; }
.home .tf-resources-panel .tf-resources-features {
    display: grid;
    grid-template-columns: repeat(2,minmax(0,1fr));
    gap: 10px;
    margin-block: 16px 22px;
}
.home .tf-resources-panel .tf-resources-features > li {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    min-height: 58px;
    padding: 8px 10px;
    border: 1px solid var(--tf-home-line);
    border-radius: 10px;
    background: #ffffffb8;
    line-height: 1.35;
}
.home .tf-resources-features > li > a {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    color: inherit;
    text-decoration: none;
}
.home .tf-resources-features > li > a:hover { text-decoration: underline; }
.home .tf-resources-features svg { flex: 0 0 24px; color: #10412e; }
@media (max-width: 440px) {
    .home .tf-resources-panel .tf-resources-features { grid-template-columns: minmax(0,1fr); }
}
