/* UX-03 - homepage hierarchy. Loaded only by index.php. */

/* "Read more" disclosures (native <details>: works without JavaScript, content stays in the page) */
html[data-site-page="home"] .read-more { width: 100%; }
html[data-site-page="home"] .read-more > summary {
    display: inline-flex; align-items: center; gap: 6px;
    cursor: pointer; list-style: none;
    color: #089e9e; font-weight: 600; font-size: 14px; line-height: 1.4;
}
html[data-site-page="home"] .read-more > summary::-webkit-details-marker { display: none; }
html[data-site-page="home"] .read-more > summary::after { content: "+"; font-size: 18px; line-height: 1; }
html[data-site-page="home"] .read-more[open] > summary::after { content: "\2013"; }
html[data-site-page="home"] .read-more > summary:focus-visible { outline: 2px solid #089e9e; outline-offset: 3px; border-radius: 4px; }
html[data-site-page="home"] .read-more > p { margin-top: 12px; }

/* Journey cards: five lines of copy, the "Learn more" link carries the rest */
html[data-site-page="home"] .bb-card .lesson-card-description {
    display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 5;
    line-clamp: 5; overflow: hidden;
}

/* Journey carousel (wide screens only): the shorter copy no longer needs the tall card.
   Narrow screens keep the original sizing, where card height follows the content. */
@media (min-width: 1025px) {
    html[data-site-page="home"] .bb-card { min-height: 440px; }
    html[data-site-page="home"] .bb-carousel { height: 500px; }
}

/* Barriers: centre the shorter text column against its image */
html[data-site-page="home"] .higher-standard .child .box > .ctr.flex-column { justify-content: center; }

/* A11Y-02 - contrast and links that rely on colour (homepage).
   Root cause: the brand teal #089e9e is only 3.28:1 against white (3.01:1 on #f5f5f5, 2.87:1 on the grey
   "See more" surface), below the WCAG AA minimum of 4.5:1 for normal text. Links also carry no underline
   (a { text-decoration: none }), so inline links were told apart from body copy by colour alone.
   #067575 is 5.51:1 on white, 5.06:1 on #f5f5f5 and 5.51:1 against white text. Scoped to the homepage like the rest of this
   file; the same tokens can be promoted to all-subjectsnew.css (and the variant builder re-run) to fix the other pages. */
html[data-site-page="home"] { --a11y-teal: #067575; }

/* White text on teal: buttons, price tag, "Learn more" pills, active tab. Hover/active states keep their own
   rules (they swap to a white or black surface), so only the resting state is darkened. */
html[data-site-page="home"] :is(
    .bg-color-skyblue,
    .hero-section .price-tag,
    .bb-carousel .lesson-anchor,
    .footer-section button,
    .tab-btn.active,
    .form-section button,
    .mobile-trial-form-section button,
    .footer-newsletter button,
    .contact-us-page button
):not(:hover) {
    background-color: var(--a11y-teal);
    border-color: var(--a11y-teal);
}

/* Teal text on white / light grey */
html[data-site-page="home"] :is(a.anchor-link-skyblue-B, .subjects-more-btn):not(:hover) {
    color: var(--a11y-teal);
}
/* .form-consent a has no hover colour of its own, so it keeps the darker teal in every state */
html[data-site-page="home"] .form-consent a {
    color: var(--a11y-teal);
}

/* The darker teal is for light surfaces. On the black footer the original teal is already 6.39:1, the darker one would drop to 3.81:1. */
html[data-site-page="home"] footer .form-consent a {
    color: #089e9e;
}

/* Links inside running text: underline so they are not distinguished by colour alone (WCAG 1.4.1).
   Navigation lists, buttons, card links and image links are left as they are. */
html[data-site-page="home"] :is(main p, main li, .form-consent) a:not(.lesson-anchor):not([class*="btn"]):not(:has(> img)),
html[data-site-page="home"] a.anchor-link-skyblue-B {
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}
html[data-site-page="home"] :is(main p, main li, .form-consent) a:not(.lesson-anchor):not([class*="btn"]):not(:has(> img)):hover,
html[data-site-page="home"] a.anchor-link-skyblue-B:hover {
    text-decoration-thickness: 2px;
}

/* Keyboard focus on those links: a visible ring that does not depend on the link colour */
html[data-site-page="home"] :is(main p, main li, .form-consent) a:not(.lesson-anchor):not([class*="btn"]):focus-visible,
html[data-site-page="home"] a.anchor-link-skyblue-B:focus-visible {
    outline: 2px solid var(--a11y-teal);
    outline-offset: 2px;
    border-radius: 2px;
}
