/*
 * Home v3 fold 5: PROOF, prefix .pf-
 * Calm layout: .pf-main = the answer, one slim rating line, two buttons. .pf-side = ONE card with three tabs
 * (Reviews: one featured review at a time; What's included; By role). The fold reaches one screen by showing less,
 * so there are no height tiers and nothing shrinks on short screens: a short viewport simply gets a taller fold.
 * Mobile-first. Source order = reading order. Tokens only (base.css / skin.css); fonts come from skin.css.
 * Without JavaScript (.pf-js is set by proof.js) the tabs stay hidden and every panel and review is listed in full.
 * Motion: transform, opacity and colour only, all inside prefers-reduced-motion: no-preference.
 */

/* ---------- Grid ---------- */
.home-v3 .pf-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 40px; }
.home-v3 .pf-main { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; align-content: start; }
.home-v3 .pf-side { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; align-content: start; }
.home-v3 .pf-grid > *, .home-v3 .pf-main > *, .home-v3 .pf-side > * { min-width: 0; }

/* ---------- 1. Head: the direct answer ---------- */
.home-v3 .pf-head .v3-h2 { margin-top: 0; }
.home-v3 .pf-answer { margin-top: 20px; max-width: 56ch; }
.home-v3 .pf-answer p { font-size: 17px; line-height: 1.65; color: var(--ink-2); }

/* ---------- 2. Rating line (the only big rating display on the page) ---------- */
.home-v3 .pf-rating {
    display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px;
    padding-top: 28px; border-top: 1px solid var(--l200);
}
.home-v3 .pf-rating-num {
    font-size: 52px; font-weight: 700; line-height: 1; letter-spacing: -.03em; color: var(--ink);
    font-variant-numeric: tabular-nums; white-space: nowrap;
}
.home-v3 .pf-rating-num span { margin-left: 4px; font-size: .4em; font-weight: 600; letter-spacing: 0; color: var(--mute); }
.home-v3 .pf-rating-rate { display: grid; justify-items: start; gap: 8px; min-width: 0; }
.home-v3 .pf-meter { position: relative; display: inline-block; line-height: 0; }
.home-v3 .pf-meter-base, .home-v3 .pf-meter-fill { display: flex; gap: 4px; }
.home-v3 .pf-meter-base { color: var(--l300); }
.home-v3 .pf-meter-fill { position: absolute; inset: 0 auto 0 0; overflow: hidden; white-space: nowrap; color: var(--amber); }
.home-v3 .pf-meter svg { width: 22px; height: 22px; flex: none; }
.home-v3 .pf-rating-label { font-size: 16px; line-height: 1.55; color: var(--ink-2); }

/* ---------- 3. Actions ---------- */
.home-v3 .pf-actions { display: flex; flex-wrap: wrap; gap: 12px 16px; }
.home-v3 .pf-actions .v3-btn { flex: 1 1 240px; min-height: 52px; }

/* ---------- Tabs: a segmented control with a sliding highlight ---------- */
.home-v3 .pf-tabs {
    position: relative; display: grid; grid-template-columns: repeat(var(--pf-n, 3), minmax(0, 1fr));
    padding: 4px; border: 1px solid var(--l200); border-radius: var(--r-chip); background: var(--l100);
}
.home-v3 .pf-tabs[hidden] { display: none; }
.home-v3 .pf-tabs-pill {
    position: absolute; top: 4px; bottom: 4px; left: 4px; width: calc((100% - 8px) / var(--pf-n, 3));
    border-radius: var(--r-chip); background: var(--white); box-shadow: var(--shadow-card); pointer-events: none;
    transform: translateX(calc(var(--pf-i, 0) * 100%));
}
.home-v3 .pf-tab {
    position: relative; z-index: 1; min-height: 44px; padding: 8px 6px; border: 0; border-radius: var(--r-chip);
    background: none; color: var(--mute); font-size: 14px; font-weight: 600; line-height: 1.25; text-align: center; cursor: pointer;
}
.home-v3 .pf-tab:hover { color: var(--ink); }
.home-v3 .pf-tab[aria-selected="true"] { color: var(--brand-deep); }
.home-v3 .pf-tab:focus-visible { outline: var(--focus-light); outline-offset: 2px; }

/* ---------- The card: one panel on show at a time ---------- */
.home-v3 .pf-stack {
    display: grid; grid-template-columns: minmax(0, 1fr);
    padding: 26px 22px; border: 1px solid var(--l200); border-radius: var(--r-panel);
    background: var(--white); box-shadow: var(--shadow-card);
}
.home-v3 .pf-panel { display: grid; grid-template-columns: minmax(0, 1fr); min-width: 0; }
.home-v3 .pf-panel + .pf-panel { margin-top: 32px; padding-top: 32px; border-top: 1px solid var(--l200); } /* no-JS list */
.home-v3 .pf-panel-in { display: flex; flex-direction: column; min-width: 0; }
.home-v3 .pf-panel:focus-visible { outline: var(--focus-light); outline-offset: 8px; border-radius: 8px; }
.home-v3 .pf-panel .v3-h3 { margin-bottom: 20px; }
/* With JS the panels share one grid cell, so the card is as tall as its tallest panel and never jumps. */
.home-v3 .pf-js .pf-stack > .pf-panel { grid-area: 1 / 1; margin-top: 0; padding-top: 0; border-top: 0; }
.home-v3 .pf-js .pf-panel.is-off { visibility: hidden; }
.home-v3 .pf-js .pf-panel.is-off > .pf-panel-in { opacity: 0; }

/* ---------- Panel 1: the featured review ---------- */
.home-v3 .pf-review-list { display: grid; grid-template-columns: minmax(0, 1fr); flex: 1 1 auto; }
.home-v3 .pf-review-item { display: flex; min-width: 0; }
.home-v3 .pf-review-item + .pf-review-item { margin-top: 32px; padding-top: 32px; border-top: 1px solid var(--l200); } /* no-JS list */
.home-v3 .pf-review-list.is-paged > .pf-review-item { grid-area: 1 / 1; margin-top: 0; padding-top: 0; border-top: 0; }
.home-v3 .pf-review-list.is-paged > .pf-review-item.is-off { visibility: hidden; opacity: 0; }

.home-v3 .pf-review { position: relative; display: flex; flex-direction: column; gap: 20px; width: 100%; margin: 0; }
.home-v3 .pf-review > * { position: relative; }
.home-v3 .pf-quote-mark { display: block; height: 30px; font-size: 76px; font-weight: 700; line-height: 1; color: var(--brand); pointer-events: none; user-select: none; }
.home-v3 .pf-review-title { font-size: 18px; font-weight: 600; line-height: 1.35; color: var(--ink); }
.home-v3 .pf-review blockquote { margin: 0; padding: 0; border: 0; }
.home-v3 .pf-review blockquote p { font-size: 18px; font-weight: 500; line-height: 1.6; color: var(--ink); }
/* Clamp only when JS is on, so no-JS visitors always see the full text.
   "Read full review" (shown only when the text really overflows) opens it in place. */
.home-v3 .pf-js .pf-clamp > p { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: var(--pf-clamp, 10); overflow: hidden; }
.home-v3 .pf-js .pf-clamp.is-open > p { display: block; -webkit-line-clamp: unset; overflow: visible; }
.home-v3 .pf-readmore { align-self: flex-start; margin-block: -8px; font-size: 16px; }
.home-v3 .pf-review figcaption {
    display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 14px; align-items: center; margin-top: auto; padding-top: 4px;
}
.home-v3 .pf-avatar {
    display: inline-flex; align-items: center; justify-content: center;
    width: 48px; height: 48px; border-radius: 50%; background: var(--l100); color: var(--brand-deep);
    font-size: 16px; font-weight: 600; letter-spacing: .02em;
}
.home-v3 .pf-who { display: grid; gap: 2px; min-width: 0; }
.home-v3 .pf-who strong { font-size: 17px; font-weight: 600; line-height: 1.35; color: var(--ink); }
.home-v3 .pf-who span { font-size: 15px; line-height: 1.45; color: var(--mute); }
.home-v3 .pf-review-top { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; }
.home-v3 .pf-stars { flex: none; }
.home-v3 .pf-stars { display: inline-flex; gap: 2px; }
.home-v3 .pf-star { width: 16px; height: 16px; color: var(--l200); }
.home-v3 .pf-star.is-on { color: var(--brand); }
.home-v3 .pf-review time { font-size: 13px; line-height: 1.45; color: var(--mute); }

/* Foot of the reviews panel: previous / "1 of 6" / next, and the link to every review */
.home-v3 .pf-reviews-foot {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 20px;
    margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--l200);
}
.home-v3 .pf-pager { display: flex; align-items: center; gap: 12px; }
.home-v3 .pf-pager[hidden] { display: none; }
.home-v3 .pf-pager-btn {
    display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; flex: none;
    border: 1.5px solid var(--l300); border-radius: 50%; background: var(--white); color: var(--brand-deep); cursor: pointer;
}
.home-v3 .pf-pager-btn:hover { border-color: var(--brand); background: var(--l100); }
.home-v3 .pf-pager-btn:focus-visible { outline: var(--focus-light); outline-offset: 2px; }
.home-v3 .pf-pager-prev .v3-i { transform: rotate(90deg); }
.home-v3 .pf-pager-next .v3-i { transform: rotate(-90deg); }
.home-v3 .pf-pager-btn[aria-disabled="true"] { border-color: var(--l200); background: transparent; color: var(--l300); cursor: default; }
.home-v3 .pf-pager-status { min-width: 52px; font-size: 15px; font-weight: 600; line-height: 1.4; text-align: center; white-space: nowrap; color: var(--ink-2); }
.home-v3 .pf-all { font-size: 16px; }

/* ---------- Panel 2: what every booking includes ---------- */
.home-v3 .pf-lines { margin: 0; }
.home-v3 .pf-line { display: flex; align-items: baseline; justify-content: space-between; gap: 6px 20px; padding: 13px 0; border-top: 1px solid var(--l200); }
.home-v3 .pf-line dt, .home-v3 .pf-line dd { margin: 0; font-size: 16px; line-height: 1.55; }
.home-v3 .pf-line dt { flex: none; color: var(--mute); font-weight: 400; }
.home-v3 .pf-line dd { min-width: 0; font-weight: 600; color: var(--ink); text-align: right; }
.home-v3 .pf-incl { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.home-v3 .pf-tick { color: var(--brand); stroke-width: 2.5; }
.home-v3 .pf-total { padding-top: 18px; border-top: 2px solid var(--ink); font-size: 18px; font-weight: 700; line-height: 1.35; color: var(--ink); }

/* ---------- Panel 3: role links and the course path ---------- */
.home-v3 .pf-role-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.home-v3 .pf-role-grid li { display: flex; min-width: 0; }
.home-v3 .pf-role {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    width: 100%; min-height: 64px; padding: 14px 18px; border: 1px solid var(--l200); border-radius: var(--r-choice);
    background: var(--white); color: var(--ink); text-decoration: none;
}
.home-v3 .pf-role-text { display: grid; gap: 2px; min-width: 0; }
.home-v3 .pf-role-text strong { font-size: 16px; font-weight: 600; line-height: 1.35; color: var(--ink); }
.home-v3 .pf-role-text span { font-size: 14px; line-height: 1.45; color: var(--mute); }
.home-v3 .pf-role-arrow { flex: none; width: 20px; height: 20px; color: var(--brand-deep); }
.home-v3 .pf-role:hover, .home-v3 .pf-role:focus-visible { border-color: var(--brand); background: var(--l50); color: var(--ink); text-decoration: none; }
.home-v3 .pf-path { margin-top: 24px; font-size: 16px; line-height: 1.7; color: var(--mute); }
.home-v3 .pf-inline {
    padding-block: 6px; color: var(--brand-deep); font-weight: 600;
    text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 3px;
}
.home-v3 .pf-inline:hover { color: var(--ink); }

/* Prompt after the card (phones and tablets only) */
.home-v3 .pf-prompt { display: flex; flex-wrap: wrap; align-items: center; column-gap: 12px; margin-top: 8px; font-size: 16px; font-weight: 500; line-height: 1.55; color: var(--ink); }
.home-v3 .pf-prompt .v3-link { min-height: 48px; }

/* ---------- Motion ---------- */
@media (prefers-reduced-motion: no-preference) {
    /* tabs: the white highlight slides to the chosen tab */
    .home-v3 .pf-tabs-pill { transition: transform 360ms var(--ease); }
    .home-v3 .pf-tab { transition: color 200ms var(--ease); }
    /* panels: cross-fade with a small rise */
    .home-v3 .pf-js .pf-panel.is-off { transition: visibility 0s linear 220ms; }
    .home-v3 .pf-js .pf-panel-in { transition: opacity 340ms var(--ease) 60ms, transform 340ms var(--ease) 60ms; }
    .home-v3 .pf-js .pf-panel.is-off > .pf-panel-in { transform: translateY(12px); transition: opacity 200ms var(--ease), transform 200ms var(--ease); }
    /* reviews: the old one slides out one way while the new one slides in from the other */
    .home-v3 .pf-review-list.is-paged > .pf-review-item { transition: opacity 380ms var(--ease) 80ms, transform 380ms var(--ease) 80ms; }
    .home-v3 .pf-review-list.is-paged > .pf-review-item.is-off { transition: opacity 220ms var(--ease), transform 220ms var(--ease), visibility 0s linear 220ms; }
    .home-v3 .pf-review-list.is-paged > .pf-review-item.is-before { transform: translateX(-28px); }
    .home-v3 .pf-review-list.is-paged > .pf-review-item.is-after { transform: translateX(28px); }
    /* pager buttons: the chevron nudges the way it points */
    .home-v3 .pf-pager-btn { transition: background-color 200ms var(--ease), border-color 200ms var(--ease), color 200ms var(--ease), transform 200ms var(--ease); }
    .home-v3 .pf-pager-btn .v3-i { transition: transform 200ms var(--ease); }
    .home-v3 .pf-pager-prev:not([aria-disabled="true"]):hover .v3-i { transform: rotate(90deg) translateY(3px); }
    .home-v3 .pf-pager-next:not([aria-disabled="true"]):hover .v3-i { transform: rotate(-90deg) translateY(3px); }
    .home-v3 .pf-pager-btn:not([aria-disabled="true"]):active { transform: scale(.94); }
    /* rating: the stars pop one after another on hover */
    .home-v3 .pf-rating:hover .pf-meter-fill svg { animation: pfPop 420ms var(--ease) backwards; }
    .home-v3 .pf-rating:hover .pf-meter-fill svg:nth-child(2) { animation-delay: 50ms; }
    .home-v3 .pf-rating:hover .pf-meter-fill svg:nth-child(3) { animation-delay: 100ms; }
    .home-v3 .pf-rating:hover .pf-meter-fill svg:nth-child(4) { animation-delay: 150ms; }
    .home-v3 .pf-rating:hover .pf-meter-fill svg:nth-child(5) { animation-delay: 200ms; }
    /* included: the ticks pop in when the panel opens */
    .home-v3 .pf-js .pf-panel:not(.is-off) .pf-tick { animation: pfPop 420ms var(--ease) 160ms backwards; }
    .home-v3 .pf-js .pf-panel:not(.is-off) .pf-line:nth-child(2) .pf-tick { animation-delay: 230ms; }
    .home-v3 .pf-js .pf-panel:not(.is-off) .pf-line:nth-child(3) .pf-tick { animation-delay: 300ms; }
    /* role links and inline links */
    .home-v3 .pf-role { transition: border-color 200ms var(--ease), background-color 200ms var(--ease), transform 200ms var(--ease), box-shadow 200ms var(--ease); }
    .home-v3 .pf-role:hover { transform: translateY(-2px); box-shadow: var(--shadow-card); }
    .home-v3 .pf-role-arrow { transition: transform 200ms var(--ease); }
    .home-v3 .pf-role:hover .pf-role-arrow, .home-v3 .pf-role:focus-visible .pf-role-arrow { transform: translateX(4px); }
    .home-v3 .pf-inline { transition: color 160ms var(--ease); }
}
@keyframes pfPop { from { transform: scale(.4); opacity: 0; } 60% { transform: scale(1.15); opacity: 1; } to { transform: none; opacity: 1; } }

/* ---------- Phones and tablets: no one-screen fold, so the card takes the height of the panel on show ---------- */
@media (max-width: 1023px) {
    .home-v3 .pf-js .pf-panel.is-off { display: none; }
}
@media (max-width: 1023px) and (prefers-reduced-motion: no-preference) {
    .home-v3 .pf-js .pf-panel:not(.is-off) > .pf-panel-in { animation: pfRise 340ms var(--ease) backwards; }
}
@keyframes pfRise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* ---------- >=480: role links two by two ---------- */
@media (min-width: 480px) {
    .home-v3 .pf-role-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .home-v3 .pf-tab { font-size: 15px; padding-inline: 12px; }
    /* stars and date sit at the end of the name row */
    .home-v3 .pf-review figcaption { grid-template-columns: auto minmax(0, 1fr) auto; }
    .home-v3 .pf-review-top { grid-column: auto; flex-direction: column; align-items: flex-end; gap: 4px; }
    .home-v3 .pf-actions .v3-btn { flex: 0 1 auto; }
}

/* ---------- Tablet 768-1023 ---------- */
@media (min-width: 768px) {
    .home-v3 .pf-grid { gap: 48px; }
    .home-v3 .pf-main { gap: 32px; }
    .home-v3 .pf-answer p { font-size: 18px; }
    .home-v3 .pf-rating-num { font-size: 56px; }
    .home-v3 .pf-stack { padding: 32px; }
    .home-v3 .pf-review blockquote p { font-size: 20px; }
}

/* ---------- Desktop >=1024: two calm columns, centred on each other ---------- */
@media (min-width: 1024px) {
    .home-v3 .pf { --pf-clamp: 8; }
    .home-v3 .pf-grid { grid-template-columns: minmax(0, 4fr) minmax(0, 6fr); column-gap: clamp(40px, 5vw, 72px); align-items: center; }
    .home-v3 .pf-answer { margin-top: 24px; }
    .home-v3 .pf-prompt { display: none; }
    /* the quotation mark hangs in the card's left margin, beside the first line (no height of its own) */
    .home-v3 .pf-review > .pf-quote-mark { position: absolute; top: -4px; left: -30px; height: auto; font-size: 60px; }
}
@media (min-width: 1024px) and (min-height: 900px) {
    .home-v3 .pf-main { gap: 40px; }
    .home-v3 .pf-side { gap: 24px; }
    .home-v3 .pf-stack { padding: 40px; }
    .home-v3 .pf-review { gap: 24px; }
    .home-v3 .pf-review blockquote p { font-size: 22px; }
    .home-v3 .pf-rating-num { font-size: 64px; }
    .home-v3 .pf-meter svg { width: 24px; height: 24px; }
    .home-v3 .pf-review > .pf-quote-mark { left: -36px; font-size: 64px; }
}

@media (forced-colors: active) {
    .home-v3 .pf-stack, .home-v3 .pf-role, .home-v3 .pf-pager-btn, .home-v3 .pf-tabs { border: 1px solid CanvasText; }
    .home-v3 .pf-tab[aria-selected="true"] { outline: 2px solid Highlight; outline-offset: -2px; }
    .home-v3 .pf-pager-btn[aria-disabled="true"] { border-color: GrayText; color: GrayText; }
    .home-v3 .pf-meter-fill { color: Highlight; }
}
