/*
 * Quick pages (practitioner-worlds plugin, component "quick-page"): pages made in Arjan world or Linda world with
 * the simple form. Headings in Kanit, text in Figtree (self-hosted, /assets/fonts/fonts.css).
 * Each section is 300, 500, 800 or 1200 pixels wide. Sections sit next to each other in rows of at most 1200
 * (4 x 300, 800 + 300, 500 + 500, ...); a row that is not full is centred. The page is as wide as its widest row
 * (--qp-units, set by QuickPageComponent), so the title lines up with the content. On a phone everything stacks.
 * The same file styles the live preview in the quick page form.
 */

.qp {
    --qp-ink: #12171e;
    --qp-text: #2f3437;
    --qp-muted: #57575c;
    --qp-accent: #45dae7;
    --qp-line: #e3e6ea;
    --qp-gap: 32px;
    /* the widest row in units of 1200 (800 when not set): its real width including the gaps, plus the side padding */
    --qp-units: 800;
    max-width: calc(var(--qp-units) * (1px + var(--qp-gap) / 1200) - var(--qp-gap) + 2 * 24px);
    margin: 0 auto;
    padding: 56px 24px 72px;
    box-sizing: border-box;
    font-family: 'Figtree', Arial, sans-serif;
    color: var(--qp-text);
    font-size: 18px;
    line-height: 1.65;
}

.qp *, .qp *::before, .qp *::after { box-sizing: border-box; }

.qp-title {
    margin: 0 0 40px;
    font-family: 'Kanit', Arial, sans-serif;
    font-weight: 500;
    font-size: clamp(32px, 4.6vw, 52px);
    line-height: 1.1;
    letter-spacing: -0.5px;
    color: var(--qp-ink);
}

.qp-title::after {
    content: "";
    display: block;
    width: 64px;
    height: 4px;
    margin-top: 20px;
    border-radius: 2px;
    background: var(--qp-accent);
}

/* Rows of at most 1200: a section of N pixels is N/1200 of (1200 + one gap), minus a gap, so 4 x 300 fills a row
   exactly, gaps included. A row that is not full is centred. */
.qp-grid {
    --qp-w: 800;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-start;
    gap: 40px var(--qp-gap);
}

.qp-block {
    flex: 0 0 auto;
    width: min(100%, calc(var(--qp-w) * (1px + var(--qp-gap) / 1200) - var(--qp-gap)));
    min-width: 0;
}

.qp-w300 { --qp-w: 300; }
.qp-w500 { --qp-w: 500; }
.qp-w800 { --qp-w: 800; }
.qp-w1200 { --qp-w: 1200; }

.qp-block h2 {
    margin: 0 0 14px;
    font-family: 'Kanit', Arial, sans-serif;
    font-weight: 500;
    font-size: clamp(24px, 2.6vw, 32px);
    line-height: 1.2;
    color: var(--qp-ink);
}

.qp-w300 h2 { font-size: 22px; }

.qp-block p { margin: 0 0 16px; }
.qp-block p:last-child { margin-bottom: 0; }
.qp-w300 { font-size: 16px; }

.qp-media { margin: 20px 0 0; }
.qp-block > .qp-media:first-child { margin-top: 0; }

.qp-media img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 14px;
}

.qp-media .video-placeholder,
.qp-media iframe { border-radius: 14px; overflow: hidden; }

.qp-video-stand-in {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 16 / 9;
    border-radius: 14px;
    background: var(--qp-ink);
    color: #fff;
    font-weight: 600;
}

/* The columns follow the width of the page itself (a container query), not the screen: the same rules work on
   the website and in the narrow phone view of the preview in the quick page form. */
.qp { container-type: inline-size; }

@media (max-width: 860px) {
    .qp { padding: 36px 18px 56px; font-size: 17px; }
}

/* tablet: 500 and wider take the full width, two 300 blocks still share a row */
@container (max-width: 760px) {
    .qp-title { margin-bottom: 28px; }
    .qp-grid { gap: 32px 24px; }
    .qp-block { width: 100%; }
    .qp-w300 { width: calc(50% - 12px); }
}

/* phone: everything below each other */
@container (max-width: 520px) {
    .qp-w300 { width: 100%; }
    .qp-title { font-size: 32px; }
}

/* ---- Style "Flat": the flat homepage style of home-flat.css (bold condensed capitals, Inter Tight text, grey
   cards). Chosen per page with the Style buttons in the quick page form; the component adds .qp--flat and loads
   the two fonts. Same widths and grid as the standard style. ---- */

.qp--flat {
    --qp-ink: #0b1825;
    --qp-text: #0b1825;
    --qp-muted: #5b6573;
    --qp-soft: #f6f6f6;
    --qp-gap: 8px;
    font-family: 'Inter Tight', system-ui, -apple-system, 'Segoe UI', sans-serif;
    font-size: 17px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

.qp--flat .qp-title,
.qp--flat .qp-block h2 {
    font-family: 'Barlow Condensed', 'Arial Narrow', sans-serif;
    font-weight: 800;
    text-transform: uppercase;
    line-height: 0.92;
    letter-spacing: -0.01em;
    text-wrap: balance;
}

.qp--flat .qp-title { font-size: clamp(44px, 7vw, 84px); margin-bottom: 32px; }
.qp--flat .qp-title::after { width: 56px; height: 6px; margin-top: 18px; border-radius: 0; }

.qp--flat .qp-grid { gap: var(--qp-gap); }

.qp--flat .qp-block {
    background: var(--qp-soft);
    border-radius: 12px;
    padding: 28px 26px;
}

.qp--flat .qp-block h2 { font-size: clamp(30px, 4vw, 48px); margin-bottom: 16px; }
.qp--flat .qp-w300 h2 { font-size: 30px; }
.qp--flat .qp-block p { color: var(--qp-muted); }
.qp--flat .qp-w300 { font-size: 15.5px; }

.qp--flat .qp-media img,
.qp--flat .qp-media .video-placeholder,
.qp--flat .qp-media iframe,
.qp--flat .qp-video-stand-in { border-radius: 8px; }

/* a section with only a photo or a video: the picture fills the card edge to edge */
.qp--flat .qp-block:not(:has(h2, p)) { padding: 0; background: none; }
.qp--flat .qp-block:not(:has(h2, p)) .qp-media img,
.qp--flat .qp-block:not(:has(h2, p)) .qp-video-stand-in { border-radius: 12px; }

@container (max-width: 520px) {
    .qp--flat .qp-title { font-size: 44px; }
    .qp--flat .qp-block { padding: 22px 20px; }
}

/* ---- A section with its photo behind the text (photo_as "dark" or "light" in the quick page form) ----
   The photo fills the section; a veil on top keeps the heading and text readable: dark with white text, or light
   with dark text. Works in both styles; in the flat style it replaces the grey card. */

.qp-bg {
    position: relative;
    isolation: isolate;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    min-height: 320px;
    padding: 40px 36px;
    border-radius: 14px;
    overflow: hidden;
    background: #12171e var(--qp-photo) center / cover no-repeat;
}

.qp-bg::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
}

.qp-bg--dark::before { background: linear-gradient(180deg, rgba(11, 24, 37, 0.35) 0%, rgba(11, 24, 37, 0.78) 100%); }
.qp-bg--light::before { background: linear-gradient(180deg, rgba(255, 255, 255, 0.55) 0%, rgba(255, 255, 255, 0.88) 100%); }

.qp-bg--dark h2,
.qp-bg--dark p { color: #fff; }
.qp-bg--dark p { color: rgba(255, 255, 255, 0.9); }
.qp-bg--light h2 { color: var(--qp-ink); }
.qp-bg--light p { color: var(--qp-text); }

/* extra darkened / extra lightened: a much stronger veil and medium bold text, for a busy photo */
.qp-bg--dark.qp-bg--strong::before { background: linear-gradient(180deg, rgba(11, 24, 37, 0.72) 0%, rgba(11, 24, 37, 0.9) 100%); }
.qp-bg--light.qp-bg--strong::before { background: linear-gradient(180deg, rgba(255, 255, 255, 0.86) 0%, rgba(255, 255, 255, 0.95) 100%); }
.qp-bg--strong p { font-weight: 500; }
.qp-bg--dark.qp-bg--strong p { color: #fff; }
.qp-bg--light.qp-bg--strong p { color: var(--qp-ink); }

.qp-bg .qp-media { position: relative; }

/* a wide section with a photo behind it reads as a band */
.qp-w800.qp-bg, .qp-w1200.qp-bg { min-height: 380px; padding: 56px 48px; }
.qp-w1200.qp-bg { min-height: 440px; }

.qp--flat .qp-bg { background: #0b1825 var(--qp-photo) center / cover no-repeat; border-radius: 12px; padding: 36px 32px; }
.qp--flat .qp-bg--light { background-color: #f6f6f6; }
.qp--flat .qp-bg--dark p { color: rgba(255, 255, 255, 0.86); }

@container (max-width: 520px) {
    .qp-bg, .qp-w800.qp-bg, .qp-w1200.qp-bg, .qp--flat .qp-bg { min-height: 260px; padding: 28px 22px; }
}

/* ---- Button, text link and photo link of a section (QuickPageComponent::button()) ----
   The button: at least 44 px high, a full pill, the page's own font, almost black, one red dot, the arrow turns on
   hover (350 ms), a light follows the cursor (--qp-x / --qp-y), it leans toward the cursor (--qp-mx / --qp-my),
   and it presses in to .97. The light and the lean are set by the small script the component adds; without a
   mouse, or with "reduce motion", the button simply stays still. */

.qp-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px 22px;
    margin-top: 24px;
}

.qp-btn {
    --qp-mx: 0px;
    --qp-my: 0px;
    position: relative;
    isolation: isolate;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 48px;
    padding: 0 22px 0 18px;
    border-radius: 999px;
    background: #111418;
    color: #fff;
    font-family: inherit;
    font-size: 16px;
    font-weight: 600;
    line-height: 1;
    letter-spacing: 0.01em;
    text-decoration: none;
    transform: translate(var(--qp-mx), var(--qp-my));
    transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1), background-color 0.2s ease, box-shadow 0.2s ease;
}

/* the light under the cursor */
.qp-btn::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: radial-gradient(140px circle at var(--qp-x, 50%) var(--qp-y, 50%), rgba(69, 218, 231, 0.38), transparent 62%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.qp-btn:hover { box-shadow: 0 10px 26px rgba(17, 20, 24, 0.22); }
.qp-btn:hover::before { opacity: 1; }

.qp-btn__dot {
    flex: 0 0 auto;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ff3b30;
    box-shadow: 0 0 0 3px rgba(255, 59, 48, 0.22);
}

.qp-btn__arrow {
    flex: 0 0 auto;
    transition: transform 350ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.qp-btn:hover .qp-btn__arrow,
.qp-btn:focus-visible .qp-btn__arrow { transform: rotate(45deg); }

.qp-btn:active { transform: translate(var(--qp-mx), var(--qp-my)) scale(0.97); }

.qp-btn:focus-visible { outline: 3px solid var(--qp-accent); outline-offset: 3px; }

/* on a dark photo the button turns light, so it stays visible */
.qp-bg--dark .qp-btn { background: #fff; color: #111418; }
.qp-bg--dark .qp-btn::before { background: radial-gradient(140px circle at var(--qp-x, 50%) var(--qp-y, 50%), rgba(69, 218, 231, 0.45), transparent 62%); }

/* the text link: underlined in the accent colour, an arrow that moves along */
.qp-link {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    color: var(--qp-ink);
    font-weight: 600;
    text-decoration: underline;
    text-decoration-color: var(--qp-accent);
    text-decoration-thickness: 2px;
    text-underline-offset: 5px;
    transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

.qp-link::after { content: "→"; display: inline-block; margin-left: 8px; text-decoration: none; transition: transform 0.25s ease; }
.qp-link:hover { text-decoration-color: currentColor; }
.qp-link:hover::after { transform: translateX(4px); }
.qp-link:focus-visible { outline: 3px solid var(--qp-accent); outline-offset: 3px; border-radius: 4px; }
.qp-bg--dark .qp-link { color: #fff; }

/* a photo that is a link: a slow, small zoom on hover */
.qp-media__link { display: block; border-radius: 14px; overflow: hidden; }
.qp-media__link img { transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1); }
.qp-media__link:hover img { transform: scale(1.025); }
.qp-media__link:focus-visible { outline: 3px solid var(--qp-accent); outline-offset: 3px; }
.qp--flat .qp-media__link { border-radius: 8px; }

@media (prefers-reduced-motion: reduce) {
    .qp-btn, .qp-btn__arrow, .qp-link::after, .qp-media__link img { transition: none; }
    .qp-btn { transform: none; }
    .qp-btn:active { transform: none; }
    .qp-media__link:hover img { transform: none; }
}

/* ---- Style "Interactive": one large photo across the screen, the title on the left, and a "How it works" button
   that slides a reading window in from the right with the rest of the page (QuickPageComponent::interactive()).
   Kanit and Figtree, like the standard style. */
html:has(.qp--interactive) { overflow-x: clip; }

.qp.qp--interactive {
    max-width: none;
    width: 100vw;
    margin: 0 calc(50% - 50vw);
    padding: 0;
}

/* ---- Tabs: a bar of 2 to 6 tabs and one panel per tab (QuickPageComponent::tabsHtml()) ----
   Two looks, chosen in the quick page form (tab_style):
   .qp-tabs--capsule  (the standard) a dark capsule with the names in white and a white pill behind the chosen tab
                      that slides to the next one (the small script sets --qp-tab-x / -y / -w / -h and .has-slider);
   .qp-tabs--buttons  the buttons of the site (.qp-btn): black, the chosen one white with a glare, arrow down.
   Without JavaScript every panel shows, one under the other, and the bar stays hidden. */
.qp-tabs { margin: 8px 0 0; }
.qp-tabs__bar {
    --qp-tab-x: 0px;
    --qp-tab-y: 0px;
    --qp-tab-w: 0px;
    --qp-tab-h: 0px;
    position: relative;
    isolation: isolate;
    display: none;
    flex-wrap: wrap;
    justify-content: center;
    width: fit-content;
    max-width: 100%;
    margin: 0 auto 32px;
    padding: 6px;
    border-radius: 999px;
}
.qp-tabs.is-ready .qp-tabs__bar { display: flex; }
.qp-tabs__panel[hidden] { display: none; }
.qp-tabs__slider { display: none; }

/* ---- capsule ---- */
.qp-tabs--capsule .qp-tabs__bar { gap: 4px; background: #12171e; box-shadow: 0 10px 26px rgba(18, 23, 30, 0.18); }
.qp-tabs--capsule .qp-tabs__slider {
    position: absolute;
    left: 0;
    top: 0;
    z-index: -1;
    width: var(--qp-tab-w);
    height: var(--qp-tab-h);
    border-radius: 999px;
    background: #fff;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.28), 0 0 0 1px rgba(69, 218, 231, 0.55);
    transform: translate(var(--qp-tab-x), var(--qp-tab-y));
    transition: transform 0.42s cubic-bezier(0.2, 0.8, 0.2, 1), width 0.42s cubic-bezier(0.2, 0.8, 0.2, 1), height 0.42s cubic-bezier(0.2, 0.8, 0.2, 1);
    overflow: hidden;
}
.qp-tabs--capsule .qp-tabs__bar.has-slider .qp-tabs__slider { display: block; }
.qp-tabs--capsule .qp-tabs__slider::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(110deg, transparent 30%, rgba(69, 218, 231, 0.35) 48%, rgba(255, 255, 255, 0.9) 52%, transparent 70%);
    background-size: 260% 100%;
    background-position: 140% 0;
    opacity: 0;
}
.qp-tabs--capsule .qp-tabs__slider.is-moving::after { animation: qp-tab-sheen 0.7s ease; }
@keyframes qp-tab-sheen { 0% { opacity: 1; background-position: 140% 0; } 100% { opacity: 1; background-position: -40% 0; } }
.qp-tabs--capsule .qp-tabs__tab {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 46px;
    padding: 0 24px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: rgba(255, 255, 255, 0.82);
    font-family: 'Kanit', Arial, sans-serif;
    font-weight: 500;
    font-size: 17px;
    line-height: 1.2;
    cursor: pointer;
    transition: color 0.25s ease, transform 0.15s ease;
}
.qp-tabs--capsule .qp-tabs__tab:hover { color: #45dae7; }
.qp-tabs--capsule .qp-tabs__tab.is-on { color: #12171e; }
.qp-tabs--capsule .qp-tabs__tab.is-on::before {
    content: "";
    flex: 0 0 auto;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ff3b30;
    box-shadow: 0 0 0 3px rgba(255, 59, 48, 0.22);
}
.qp-tabs--capsule .qp-tabs__tab:active { transform: scale(0.97); }
.qp-tabs--capsule .qp-tabs__tab:focus-visible { outline: 3px solid #45dae7; outline-offset: 2px; }
/* before the slider is there (and in the editor preview) the chosen tab carries the white pill itself */
.qp-tabs--capsule .qp-tabs__bar:not(.has-slider) .qp-tabs__tab.is-on { background: #fff; box-shadow: 0 4px 14px rgba(0, 0, 0, 0.28); }
.qp--flat .qp-tabs--capsule .qp-tabs__tab { font-family: 'Barlow Condensed', 'Arial Narrow', sans-serif; font-weight: 800; text-transform: uppercase; font-size: 20px; }

/* ---- buttons ---- */
.qp-tabs--buttons .qp-tabs__bar { gap: 6px; background: #e9ecef; }
.qp-tabs--buttons .qp-tabs__tab.qp-btn { border: 0; cursor: pointer; min-height: 48px; padding: 0 20px 0 18px; font-family: 'Figtree', Arial, sans-serif; }
.qp-tabs--buttons .qp-tabs__tab.qp-btn::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(110deg, transparent 32%, rgba(255, 255, 255, 0.16) 44%, rgba(255, 255, 255, 0.5) 50%, rgba(255, 255, 255, 0.16) 56%, transparent 68%);
    background-size: 260% 100%;
    background-position: 130% 0;
    transition: background-position 0.9s cubic-bezier(0.2, 0.8, 0.2, 1);
    pointer-events: none;
}
.qp-tabs--buttons .qp-tabs__tab.qp-btn:hover::after { background-position: -30% 0; }
.qp-tabs--buttons .qp-tabs__tab.qp-btn:hover .qp-btn__arrow,
.qp-tabs--buttons .qp-tabs__tab.qp-btn:focus-visible .qp-btn__arrow { transform: translateY(3px); }
.qp-tabs--buttons .qp-tabs__tab.qp-btn.is-on {
    background: #fff;
    color: #111418;
    transform: translate(var(--qp-mx), calc(var(--qp-my) - 2px));
    box-shadow: 0 8px 20px rgba(17, 20, 24, 0.2), 0 0 0 1px rgba(17, 20, 24, 0.06);
}
.qp-tabs--buttons .qp-tabs__tab.qp-btn.is-on::before { opacity: 0.75; }
.qp-tabs--buttons .qp-tabs__tab.qp-btn.is-on::after {
    background: linear-gradient(110deg, transparent 32%, rgba(69, 218, 231, 0.16) 44%, rgba(69, 218, 231, 0.42) 50%, rgba(69, 218, 231, 0.16) 56%, transparent 68%);
    background-size: 260% 100%;
    background-position: -30% 0;
}
.qp-tabs--buttons .qp-tabs__tab.qp-btn.is-on:hover { box-shadow: 0 12px 26px rgba(17, 20, 24, 0.26), 0 0 0 1px rgba(17, 20, 24, 0.06); }
.qp-tabs--buttons .qp-tabs__tab.qp-btn:active { transform: translate(var(--qp-mx), var(--qp-my)) scale(0.97); }
.qp--flat .qp-tabs--buttons .qp-tabs__tab.qp-btn { font-family: 'Barlow Condensed', 'Arial Narrow', sans-serif; font-weight: 800; text-transform: uppercase; font-size: 19px; }

.qp--interactive .qp-tabs { margin: 0; padding: 56px max(24px, calc((100vw - 1200px) / 2)); background: #fff; }
.qf-preview .qp--interactive .qp-tabs { padding: 40px 24px; }
/* on the Interactive style the bar sits on top of the photo or the video, in the middle; the panels are under the hero */
.qp--interactive .qp-tabs.qp-tabs--onhero,
.qf-preview .qp--interactive .qp-tabs.qp-tabs--onhero {
    position: absolute;
    top: 24px;
    left: 0;
    right: 0;
    z-index: 3;
    display: flex;
    justify-content: center;
    margin: 0;
    padding: 0 16px;
    background: none;
    pointer-events: none;
}
.qp-tabs--onhero .qp-tabs__bar { margin: 0; pointer-events: auto; }
.qp-tabs--onhero.qp-tabs--capsule .qp-tabs__bar { background: rgba(18, 23, 30, 0.72); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.12); }
.qp-tabs--onhero.qp-tabs--buttons .qp-tabs__bar { background: rgba(255, 255, 255, 0.82); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.qp-hero .qp-tabs--onhero { pointer-events: none; }
@media (max-width: 520px) {
    .qp-tabs__bar { border-radius: 28px; }
    .qp-tabs--capsule .qp-tabs__tab { padding: 0 16px; font-size: 15px; min-height: 42px; }
    .qp-tabs--buttons .qp-tabs__tab.qp-btn { padding: 0 14px 0 12px; font-size: 15px; }
}
@media (prefers-reduced-motion: reduce) {
    .qp-tabs--capsule .qp-tabs__slider, .qp-tabs--capsule .qp-tabs__tab, .qp-tabs--buttons .qp-tabs__tab.qp-btn::after { transition: none; }
    .qp-tabs--capsule .qp-tabs__slider.is-moving::after { animation: none; }
}

/* sections with their photo behind the text, on the page under the hero (the others are in the reading window) */
.qp--interactive .qp-bands {
    gap: var(--qp-gap, 32px);
    padding: 56px max(24px, calc((100vw - 1200px) / 2));
    background: #fff;
}

.qp-hero {
    position: relative;
    display: flex;
    align-items: center;
    min-height: min(88vh, 760px);
    padding: 96px max(24px, calc((100vw - 1200px) / 2)) 80px;
    background-color: var(--qp-ink);
    /* dark on the left behind the text, open on the right so the photo shows; a teal glow when there is no photo */
    background-image:
        linear-gradient(90deg, rgba(10, 13, 18, 0.88) 0%, rgba(10, 13, 18, 0.62) 38%, rgba(10, 13, 18, 0.08) 72%),
        var(--qp-photo, radial-gradient(900px circle at 78% 40%, rgba(69, 218, 231, 0.35), transparent 60%));
    background-size: cover;
    background-position: center right;
    color: #fff;
    overflow: hidden;
}

.qp-hero__inner { position: relative; z-index: 2; max-width: 620px; }

/* a looping video behind the large photo: it fills the hero, the same dark veil on the left as over the photo */
.qp-hero__video { position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; object-fit: cover; object-position: center right; pointer-events: none; opacity: 0; transition: opacity 0.6s ease; }
.qp-hero__video.is-on { opacity: 1; }
.qp-hero--video::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(90deg, rgba(10, 13, 18, 0.88) 0%, rgba(10, 13, 18, 0.62) 38%, rgba(10, 13, 18, 0.08) 72%);
    pointer-events: none;
}
@media (max-width: 860px) { .qp-hero--video::before { background: linear-gradient(180deg, rgba(10, 13, 18, 0.35) 0%, rgba(10, 13, 18, 0.8) 100%); } }
/* for visitors who asked their device for less motion: the photo only */
@media (prefers-reduced-motion: reduce) { .qp-hero__video { display: none; } }

.qp-hero__title {
    margin: 0;
    font-family: 'Kanit', Arial, sans-serif;
    font-weight: 600;
    font-size: clamp(42px, 6.4vw, 88px);
    line-height: 1.02;
    letter-spacing: -1px;
    color: #fff;
    text-wrap: balance;
}

.qp-hero__sub {
    margin: 18px 0 0;
    font-family: 'Kanit', Arial, sans-serif;
    font-weight: 400;
    font-size: clamp(20px, 2.2vw, 28px);
    line-height: 1.25;
    color: #fff;
}

.qp-hero__lead {
    margin: 18px 0 0;
    max-width: 52ch;
    font-size: clamp(17px, 1.5vw, 20px);
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.86);
}

.qp-hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }

.qp-hero__cta,
.qp-hero__open {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 52px;
    padding: 0 28px;
    border-radius: 999px;
    font: 600 17px/1 'Figtree', Arial, sans-serif;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}

.qp-hero__cta { background: var(--qp-accent); color: var(--qp-ink); border: 2px solid var(--qp-accent); }
.qp-hero__cta:hover { background: #fff; border-color: #fff; }

.qp-hero__open { background: rgba(255, 255, 255, 0.08); color: #fff; border: 2px solid rgba(255, 255, 255, 0.75); backdrop-filter: blur(6px); }
.qp-hero__open:hover { background: #fff; color: var(--qp-ink); border-color: #fff; }
.qp-hero__open svg { flex: none; }

.qp-hero__cta:active, .qp-hero__open:active { transform: scale(0.97); }
.qp-hero__cta:focus-visible, .qp-hero__open:focus-visible { outline: 3px solid var(--qp-accent); outline-offset: 3px; }

/* the reading window, on the right over the photo */
.qp-read {
    position: fixed;
    inset: 0 0 0 auto;
    width: min(580px, 100vw);
    max-width: 100vw;
    height: 100dvh;
    max-height: 100dvh;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 22px 0 0 22px;
    background: #fff;
    color: var(--qp-text);
    box-shadow: -24px 0 60px rgba(0, 0, 0, 0.28);
    overflow: hidden;
    font-family: 'Figtree', Arial, sans-serif;
    font-size: 17px;
    line-height: 1.65;
}

.qp-read[open] { display: flex; flex-direction: column; animation: qp-read-in 0.45s cubic-bezier(0.2, 0.8, 0.2, 1); }
.qp-read::backdrop { background: rgba(10, 13, 18, 0.45); backdrop-filter: blur(2px); animation: qp-fade-in 0.3s ease; }

@keyframes qp-read-in { from { transform: translateX(100%); } to { transform: translateX(0); } }
@keyframes qp-fade-in { from { opacity: 0; } to { opacity: 1; } }

.qp-read__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 22px 28px 18px 36px;
    border-bottom: 1px solid var(--qp-line);
}

.qp-read__head form { margin: 0; }

.qp-read__title {
    margin: 0;
    font-family: 'Kanit', Arial, sans-serif;
    font-weight: 500;
    font-size: 26px;
    line-height: 1.2;
    color: var(--qp-ink);
}

.qp-read__close {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 50%;
    background: #f1f3f5;
    color: var(--qp-ink);
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.25s ease;
}

.qp-read__close:hover { background: var(--qp-accent); transform: rotate(90deg); }
.qp-read__close:focus-visible { outline: 3px solid var(--qp-accent); outline-offset: 2px; }

.qp-read__body {
    flex: 1;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 28px 36px 48px;
}

/* inside the window every section takes the full width, one under the other */
.qp-read .qp-block { width: 100%; font-size: inherit; }
.qp-read .qp-block + .qp-block { margin-top: 36px; padding-top: 32px; border-top: 1px solid var(--qp-line); }
.qp-read .qp-block:empty { display: none; }
.qp-read .qp-block h2 { font-size: 24px; }

html.qp-reading { overflow: hidden; }

/* a wide screen: the window takes 60% of it */
@media (min-width: 801px) {
    .qp-read { width: 60vw; }
}

/* phone: the text at the bottom of the photo (a container query, so the phone view of the preview shows it too) */
@container (max-width: 640px) {
    .qp-hero { min-height: 82vh; padding: 88px 20px 56px; align-items: flex-end; background-position: 70% center; }
    .qp-hero { background-image:
        linear-gradient(0deg, rgba(10, 13, 18, 0.92) 0%, rgba(10, 13, 18, 0.55) 55%, rgba(10, 13, 18, 0.15) 100%),
        var(--qp-photo, radial-gradient(600px circle at 70% 30%, rgba(69, 218, 231, 0.35), transparent 60%)); }
    .qp-hero__cta, .qp-hero__open { flex: 1 1 auto; justify-content: center; }
    .qf-preview .qp-read { width: 100%; border-radius: 0; }
}

/* phone: the window fills the screen */
@media (max-width: 640px) {
    .qp-read { width: 100vw; border-radius: 0; }
    .qp-read__head { padding: 16px 16px 14px 20px; }
    .qp-read__body { padding: 22px 20px 40px; }
}

@media (prefers-reduced-motion: reduce) {
    .qp-read[open], .qp-read::backdrop { animation: none; }
    .qp-read__close, .qp-hero__cta, .qp-hero__open { transition: none; }
    .qp-read__close:hover { transform: none; }
}
