/*
 * Home v3 fold 2: courses (#courses). Prefix .c3-. Tokens only (base.css), mobile-first, min-width 640/768/1024.
 * Four calm level cards (radio dot, duration, name, who it is for), one "Your pick" card with the amber Enquire now,
 * and one quiet line for the other courses (a <details>; on desktop its panel opens over the fold, so the fold never grows).
 * Desktop (1024+) is a one-screen fold (.v3-fold). Nothing is clipped or squeezed: on short screens the fold grows.
 */
.home-v3 .c3 { scroll-margin-top: 88px; }
.home-v3 .c3-alias { position: absolute; top: 0; scroll-margin-top: 88px; }
.home-v3 .c3-card { scroll-margin-top: 88px; }

/* ---------- Head ---------- */
.home-v3 .c3 .c3-head { margin: 0 0 32px; }
.home-v3 .c3 .c3-head .v3-lead { max-width: 65ch; margin-top: 14px; line-height: 1.6; color: var(--mute); }

/* ---------- Level cards ---------- */
.home-v3 .c3-levels { margin: 0; padding: 0; border: 0; min-width: 0; }
.home-v3 .c3-cards { position: relative; display: grid; gap: 14px; }

.home-v3 .c3 .c3-card {
    position: relative; display: flex; flex-direction: column; min-width: 0; padding: 22px 22px 24px;
    background: var(--white); border: 1px solid var(--l200); border-radius: var(--r-card); box-shadow: var(--shadow-card);
    cursor: pointer;
    transition: transform 240ms var(--ease), box-shadow 240ms ease, border-color 240ms ease, background-color 320ms var(--ease);
}
.home-v3 .c3-radio { position: absolute; top: 24px; left: 24px; width: 1px; height: 1px; margin: 0; opacity: 0; pointer-events: none; }

.home-v3 .c3-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 30px; margin-bottom: 16px; }
.home-v3 .c3-dot {
    display: inline-flex; align-items: center; justify-content: center; flex: none; width: 28px; height: 28px; border-radius: 999px;
    border: 2px solid var(--l300); background: var(--white); color: var(--white);
    transition: border-color 220ms ease, background-color 220ms ease, box-shadow 220ms ease;
}
.home-v3 .c3-dot .v3-i { width: 16px; height: 16px; opacity: 0; transform: scale(.4); transition: transform 260ms var(--ease), opacity 160ms ease; }
.home-v3 .c3-days { font-size: 14px; line-height: 1; font-weight: 600; letter-spacing: .04em; color: var(--mute); }
.home-v3 .c3-days-num {
    display: inline-block; margin-right: 2px; font-size: 26px; font-weight: 600; letter-spacing: -.02em; color: var(--ink);
    transform-origin: 100% 80%; transition: transform 240ms var(--ease), color 220ms ease;
}

.home-v3 .c3 .c3-name { font-size: 19px; line-height: 1.3; font-weight: 600; letter-spacing: -.005em; }
.home-v3 .c3-name a {
    position: relative; z-index: 1; color: var(--ink); text-decoration: none;
    background: linear-gradient(currentColor, currentColor) 0 100% / 0 1.5px no-repeat;
    transition: background-size 240ms var(--ease), color 220ms ease;
}
.home-v3 .c3-name a:hover { background-size: 100% 1.5px; color: var(--brand-deep); }
.home-v3 .c3-start { display: block; margin-top: 8px; font-size: 16px; line-height: 1.55; color: var(--mute); cursor: pointer; }
/* the whole card is the label's click target */
.home-v3 .c3-start::after { content: ''; position: absolute; inset: 0; z-index: 0; border-radius: inherit; }

/* Per-card buttons: only without JS (with JS the "Your pick" card owns the actions). */
.home-v3 .c3-actions { position: relative; z-index: 1; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-top: 18px; }
.home-v3 .c3-card-cta { flex: 1 0 auto; white-space: nowrap; background: var(--white); }
.home-v3 .c3-card-view { flex: none; }
html.js-c3 .home-v3 .c3-actions { display: none; }

/* selected (native :has, .is-selected set by JS as the fallback) */
.home-v3 .c3 .c3-card:has(.c3-radio:checked), .home-v3 .c3 .c3-card.is-selected {
    background: var(--l100); border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand), var(--shadow-card);
}
.home-v3 .c3-radio:checked ~ .c3-top .c3-dot { border-color: var(--brand); background: var(--brand); }
.home-v3 .c3-radio:checked ~ .c3-top .c3-dot .v3-i { opacity: 1; transform: scale(1); }
.home-v3 .c3-radio:checked ~ .c3-top .c3-days-num, .home-v3 .c3-radio:checked ~ .c3-name a { color: var(--brand-deep); }
/* With JS one ring slides between the cards instead of each card drawing its own. */
.home-v3 .c3-glide { display: none; }
.home-v3 .c3-cards.has-glide .c3-glide {
    display: block; position: absolute; top: 0; left: 0; z-index: 2; pointer-events: none; border-radius: var(--r-card);
    box-shadow: 0 0 0 2px var(--brand), 0 20px 40px -22px rgba(108, 53, 233, .55);
}
.home-v3 .c3 .c3-cards.has-glide .c3-card:has(.c3-radio:checked), .home-v3 .c3 .c3-cards.has-glide .c3-card.is-selected {
    border-color: transparent; box-shadow: var(--shadow-card);
}
/* focus */
.home-v3 .c3 .c3-card:has(.c3-radio:focus-visible) { outline: var(--focus-light); outline-offset: 4px; }
@media (pointer: fine) {
    .home-v3 .c3 .c3-card:hover { transform: translateY(-3px); border-color: var(--l300); }
    .home-v3 .c3 .c3-card:hover .c3-dot { border-color: var(--brand); box-shadow: 0 0 0 4px var(--l100); }
    .home-v3 .c3 .c3-card:hover .c3-days-num { transform: scale(1.12); }
    /* the selected card stays put so the ring and the card never part */
    .home-v3 .c3 .c3-card:has(.c3-radio:checked):hover, .home-v3 .c3 .c3-card.is-selected:hover { transform: none; border-color: var(--brand); }
    .home-v3 .c3 .c3-cards.has-glide .c3-card:has(.c3-radio:checked):hover, .home-v3 .c3 .c3-cards.has-glide .c3-card.is-selected:hover { border-color: transparent; }
    .home-v3 .c3 .c3-card:has(.c3-radio:checked):hover .c3-dot { box-shadow: none; }
}

/* ---------- Your pick (shown when JS runs; it follows the checked card) ---------- */
.home-v3 .c3-pick { display: none; }
html.js-c3 .home-v3 .c3-pick {
    display: grid; gap: 22px; margin-top: 28px; padding: 24px 22px;
    border-radius: var(--r-panel); background: var(--white); border: 1px solid var(--l200); box-shadow: var(--shadow-card);
}
.home-v3 .c3-pick-text { min-width: 0; }
.home-v3 .c3-pick-line { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 16px; margin-top: 6px; }
.home-v3 .c3 p.c3-pick-name { font-size: 22px; line-height: 1.25; font-weight: 600; letter-spacing: -.01em; color: var(--ink); }
.home-v3 .c3 p.c3-pick-meta { font-size: 16px; line-height: 1.55; font-weight: 500; color: var(--mute); }
.home-v3 .c3-pick-actions { display: grid; gap: 12px; }
.home-v3 .c3-pick-view { min-height: 52px; }

/* ---------- Other courses: one quiet line; rows and topic links behind a native disclosure ---------- */
.home-v3 .c3-other { position: relative; display: grid; gap: 4px; margin-top: 28px; }
.home-v3 .c3 .c3-other-h { font-size: 16px; line-height: 1.55; font-weight: 500; color: var(--mute); }
.home-v3 .c3-other-d { min-width: 0; }
.home-v3 .c3-other-sum {
    display: inline-flex; align-items: center; gap: 8px; min-height: 44px; list-style: none; cursor: pointer;
    font-size: 16px; line-height: 1.4; font-weight: 600; color: var(--brand-deep);
    text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 4px;
    transition: color 160ms ease, text-underline-offset 160ms ease;
}
.home-v3 .c3-other-sum::-webkit-details-marker { display: none; }
.home-v3 .c3-other-sum:hover { text-underline-offset: 6px; }
.home-v3 .c3-other-sum .v3-i { transition: transform 260ms var(--ease); }
.home-v3 .c3-other-d[open] > .c3-other-sum .v3-i { transform: rotate(180deg); }
.home-v3 .c3-other-panel { padding: 16px 0 12px; }
.home-v3 .c3-team {
    display: inline-flex; align-items: center; gap: 8px; min-height: 44px; justify-self: start;
    font-size: 16px; line-height: 1.4; color: var(--ink-2); text-decoration: none;
}
.home-v3 .c3-team strong { color: var(--brand-deep); font-weight: 600; text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 4px; }
.home-v3 .c3-team .v3-i { color: var(--brand-deep); transition: transform 220ms var(--ease); }
.home-v3 .c3-team:hover .v3-i { transform: translateX(4px); }

.home-v3 .c3-rows { display: grid; gap: 12px; }
.home-v3 .c3-row {
    position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "name cta" "meta cta";
    align-items: center; column-gap: 14px; row-gap: 8px; padding: 18px 18px 18px 22px;
    background: var(--white); border: 1px solid var(--l200); border-radius: var(--r-card);
    transition: border-color 200ms ease, box-shadow 200ms ease, transform 240ms var(--ease);
}
.home-v3 .c3-row:hover { border-color: var(--l300); box-shadow: var(--shadow-card); }
.home-v3 .c3-row-name { grid-area: name; font-size: 16px; line-height: 1.4; font-weight: 600; color: var(--ink); text-decoration: none; }
.home-v3 .c3-row-name:hover { color: var(--brand-deep); text-decoration: underline; text-underline-offset: 3px; }
.home-v3 .c3 p.c3-row-meta { grid-area: meta; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; font-size: 14px; line-height: 1.4; color: var(--mute); }
.home-v3 .c3-row-meta .v3-chip { font-size: 13px; padding: 2px 10px; }
.home-v3 .c3-row-time { display: inline-flex; align-items: center; gap: 4px; }
.home-v3 .c3-row-cta {
    grid-area: cta; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    min-width: 44px; min-height: 44px; padding: 0 10px; border-radius: var(--r-btn);
    border: 2px solid var(--l300); color: var(--brand-deep); font-size: 15px; font-weight: 600; text-decoration: none;
    transition: border-color 200ms ease, background-color 200ms ease;
}
.home-v3 .c3-row-cta:hover { border-color: var(--brand); background: var(--l100); }
.home-v3 .c3-row-cta .v3-i { transition: transform 260ms var(--ease); }
.home-v3 .c3-row-cta:hover .v3-i { transform: rotate(90deg); }
.home-v3 .c3-row-cta-t { display: none; }

.home-v3 .c3-more { margin-top: 12px; }
.home-v3 .c3-more > summary {
    display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 4px;
    list-style: none; cursor: pointer; font-weight: 600; color: var(--brand-deep);
    text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 4px;
}
.home-v3 .c3-more > summary::-webkit-details-marker { display: none; }
.home-v3 .c3-more > summary .v3-i { transition: transform 260ms var(--ease); }
.home-v3 .c3-more[open] > summary .v3-i { transform: rotate(180deg); }
.home-v3 .c3-more-close, .home-v3 .c3-more[open] .c3-more-open { display: none; }
.home-v3 .c3-more[open] .c3-more-close { display: inline; }
.home-v3 .c3-more .c3-rows { margin-top: 12px; }

.home-v3 .c3-other-panel .c3-browse { margin-top: 28px; }
.home-v3 .c3-browse-h { margin-bottom: 12px; font-size: 13px; line-height: 1.4; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--mute); }
.home-v3 .c3-browse ul { display: flex; flex-wrap: wrap; gap: 12px; }
.home-v3 .c3-browse a {
    display: inline-flex; align-items: center; min-height: 44px; padding: 8px 18px; border-radius: var(--r-chip);
    background: var(--white); border: 1px solid var(--l300); color: var(--ink-2); font-size: 15px; font-weight: 500; line-height: 1.3; text-decoration: none;
    transition: border-color 200ms ease, color 200ms ease, background-color 200ms ease;
}
.home-v3 .c3-browse a:hover { border-color: var(--brand); color: var(--brand-deep); background: var(--l100); }

/* ---------- 640+ ---------- */
@media (min-width: 640px) {
    .home-v3 .c3-cards { grid-template-columns: 1fr 1fr; gap: 16px; }
    .home-v3 .c3-row-cta { padding: 0 14px; }
    .home-v3 .c3-row-cta-t { display: inline; }
    .home-v3 .c3-pick-actions { grid-template-columns: auto auto; justify-content: start; }
}

/* ---------- 768+ ---------- */
@media (min-width: 768px) {
    .home-v3 .c3 .c3-head { margin-bottom: 40px; }
    .home-v3 .c3 .c3-card { padding: 24px 24px 26px; }
    html.js-c3 .home-v3 .c3-pick { grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 32px; margin-top: 32px; padding: 24px 30px; }
    .home-v3 .c3-rows { grid-template-columns: 1fr 1fr; }
    .home-v3 .c3-other { display: flex; flex-wrap: wrap; align-items: center; gap: 0 10px; margin-top: 28px; }
    .home-v3 .c3-other-d { flex: 0 1 auto; }
    .home-v3 .c3-other-d[open] { flex: 1 1 100%; order: 3; }
    .home-v3 .c3-team { margin-left: auto; }
    .home-v3 .c3-other > .c3-browse { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; }
    .home-v3 .c3-other > .c3-browse .c3-browse-h { margin: 0; }
}

/* ---------- 1024+ (one screen: head, four cards in a row, the pick card, one quiet line) ---------- */
@media (min-width: 1024px) {
    .home-v3 .c3 .c3-head { margin-bottom: clamp(32px, 4.6vh, 52px); }
    .home-v3 .c3-cards { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
    .home-v3 .c3-top { margin-bottom: 20px; }
    html.js-c3 .home-v3 .c3-pick { margin-top: clamp(28px, 4vh, 44px); }
    .home-v3 .c3-other { margin-top: clamp(28px, 3.4vh, 36px); }
    /* The disclosure opens as a panel over the fold, so the fold keeps its one-screen height. */
    .home-v3 .c3-other-d[open] { flex: 0 1 auto; order: 0; }
    .home-v3 .c3-other-panel {
        position: absolute; z-index: 6; left: 0; right: 0; bottom: calc(100% + 10px);
        max-height: min(calc(100vh - 280px), 640px); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--l300) transparent; padding: 26px;
        background: var(--white); border: 1px solid var(--l200); border-radius: var(--r-panel); box-shadow: var(--shadow-panel);
    }
    .home-v3 .c3-rows { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .home-v3 .c3-other-panel .c3-browse { margin-top: 22px; }
}
@media (min-width: 1200px) {
    .home-v3 .c3 .c3-card { padding: 26px 26px 28px; }
    .home-v3 .c3 .c3-name { font-size: 20px; }
}

/* ---------- One-screen fold (same query as .v3-fold in base.css, which also clears the fixed site header) ---------- */
@media (min-width: 1024px) and (min-height: 620px) {
    .home-v3 .c3.v3-fold .c3-alias { scroll-margin-top: 0; }
}

/* ---------- Motion (transform, opacity and colour only; everything is visible if it never runs) ---------- */
@keyframes c3Swap { from { opacity: 0; transform: translate3d(0, 8px, 0); } to { opacity: 1; transform: none; } }
@keyframes c3Pop { 0% { transform: scale(.8); } 60% { transform: scale(1.12); } 100% { transform: scale(1); } }
@media (prefers-reduced-motion: no-preference) {
    .home-v3 .c3-cards.has-glide.is-ready .c3-glide { transition: transform 420ms var(--ease); }
    .home-v3 .c3-pick [data-c3-swap].is-swap { animation: c3Swap 360ms var(--ease) both; }
    .home-v3 .c3-pick [data-c3-swap].is-swap + [data-c3-swap].is-swap { animation-delay: 60ms; }
    .home-v3 .c3-card.is-picked .c3-dot { animation: c3Pop 320ms var(--ease) both; }
}
@media (prefers-reduced-motion: reduce) {
    .home-v3 .c3 .c3-card, .home-v3 .c3-dot, .home-v3 .c3-dot .v3-i, .home-v3 .c3-days-num, .home-v3 .c3-row, .home-v3 .c3-team .v3-i, .home-v3 .c3-row-cta .v3-i { transition: none; }
    .home-v3 .c3 .c3-card:hover, .home-v3 .c3 .c3-card:hover .c3-days-num { transform: none; }
}

@media (forced-colors: active) {
    .home-v3 .c3-glide { display: none !important; }
    .home-v3 .c3 .c3-card:has(.c3-radio:checked), .home-v3 .c3 .c3-card.is-selected { outline: 3px solid Highlight; }
    .home-v3 .c3-radio:checked ~ .c3-top .c3-dot { background: Highlight; }
}
