/*
Theme Name: kpr
Author: Carlos
Description: Custom theme for Kelsey Pfendler
Version: 1.16.3
Text Domain: kpr
Update URI: false
*/


/* Design tokens (colors, fonts, spacing) live in assets/css/tokens.css and
   the pattern/button styles in assets/css/patterns.css. Both load before
   this file, and both are also loaded into the page editor. */

/* ==========================================================================
   2. Base
   ========================================================================== */
body {
    margin: 0;
    background: var(--color-base);
    color: var(--color-ink);
    font-family: var(--font-body);
    font-size: 1.0625rem;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;

    /* Header, main and footer stack in a column at least one screen tall.
       main grows to fill the space, so the footer sits at the bottom even
       on short pages. The admin bar's height is subtracted when logged in. */
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - var(--wp-admin--admin-bar--height, 0px));
}
main { flex: 1 0 auto; }
h1, h2, h3, h4 {
    font-family: var(--font-heading);
    font-weight: var(--font-heading-weight);
    line-height: 1.05;
    letter-spacing: calc(-.035em * var(--font-heading-tracking));
}
a { color: var(--color-accent-strong); text-underline-offset: .2em; }
a:hover { color: var(--color-ink); }
img { max-width: 100%; height: auto; }
:focus-visible { outline: 3px solid var(--color-accent-strong); outline-offset: 2px; }
main { padding: var(--space-m) var(--gutter); }

/* Accessibility helpers */
.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link:focus { clip-path: none; width: auto; height: auto; z-index: 100; top: .5rem; left: .5rem; padding: .5rem 1rem; background: var(--color-ink); color: #fff; border-radius: var(--radius-s); }

/* ==========================================================================
   3. Components
   ========================================================================== */

/* Contact form ([kpr_contact_form], see inc/contact-form.php) */
.contact-form { max-width: var(--width-content); margin-top: var(--space-m); }
.contact-form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 var(--space-s); }
.contact-form__field { margin: 0 0 var(--space-s); }
.contact-form label { display: block; margin-bottom: .35rem; font-weight: 600; }
.contact-form input,
.contact-form select,
.contact-form textarea { box-sizing: border-box; width: 100%; padding: .75rem .9rem; border: 1px solid var(--color-border); border-radius: var(--radius-s); background: #fff; color: var(--color-ink); font: inherit; }
.contact-form textarea { resize: vertical; min-height: 9rem; }
.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus { border-color: var(--color-accent-strong); outline: 3px solid color-mix(in srgb, var(--color-accent-strong) 25%, transparent); outline-offset: 0; }
.contact-form [aria-invalid="true"] { border-color: var(--color-accent-strong); }
.contact-form__error { margin: .35rem 0 0; color: var(--color-accent-strong); font-size: .9rem; font-weight: 600; }
.contact-form__notice { margin-bottom: var(--space-m); padding: var(--space-s) 1.25rem; border-left: 4px solid var(--color-accent-strong); border-radius: var(--radius-s); background: #fff; }
.contact-form__notice--success { border-left-color: var(--color-dusk); }
.contact-form__notice p { margin: 0; }
/* The honeypot field is moved off-screen rather than display:none, which some bots detect */
.contact-form__hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
@media (max-width: 600px) {
    .contact-form__row { grid-template-columns: 1fr; }
}

/* ==========================================================================
   4. Header
   ========================================================================== */
/* env(safe-area-inset-top) is the iPhone status bar/notch height when the page
   draws edge to edge (viewport-fit=cover in header.php); 0 everywhere else. */
.site-header { padding: calc(var(--space-s) + env(safe-area-inset-top, 0px)) var(--gutter) var(--space-s); background: var(--color-base); color: var(--color-ink); border-bottom: 1px solid var(--color-line); }
.site-header a { color: inherit; }
.site-header__inner { max-width: var(--width-wide); margin: 0 auto; display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-s); }
/* The logo link (header and footer). Its font-size is the logo's height: the stacked logo is 1em tall
   (fish on top, the name underneath). inline-flex keeps the logo and the ™ side by side. */
.site-header__brand,
.site-footer__logo { display: inline-flex; align-items: flex-end; line-height: 1; text-decoration: none; }
/* 4rem (64px) tall in the header, 3.5rem (56px) on phones (see section 5), so the bar stays slim. The
   logo is 1.83 times as wide as it's tall, about 117px here: it fits beside the menu at any width. */
.site-header__brand { font-size: 4rem; }
/* The logo itself (assets/images/yrk-logo-stacked.svg, put in the page by yourowkelsey_logo() in
   functions.php). The name is drawn in currentColor, so it follows the link's text color. The eye keeps
   its own white and black.
   The SVG's viewBox is trimmed to the edges of the artwork: 637.24 wide, 348.29 tall. The name is the
   bottom 82.87 of that (23.8%); the fish is the rest. aspect-ratio matches the viewBox, so the logo is
   never stretched; update both together if the logo changes. */
.yrk-logo { display: block; height: 1em; width: auto; aspect-ratio: 637.24 / 348.29; }
/* The fish color, set for light and dark backgrounds separately. Both are the designer's coral
   (#e86f8a) from the final logo, which reads on cream and on the dark teal. To make the fish two-tone
   again, change one of them (the earlier pair was maroon #751030 on light, orchid #cd7db4 on dark).
   A dark spot sets --yrk-fish to the dark version: the footer (below) and the homepage header while
   it's over the video (section 6). */
:root { --yrk-fish-on-light: #e86f8a; --yrk-fish-on-dark: #e86f8a; }
.yrk-logo__body { fill: var(--yrk-fish, var(--yrk-fish-on-light)); transition: fill .25s; }
.site-footer__logo { --yrk-fish: var(--yrk-fish-on-dark); }
/* The ™ after the logo. Kept in CSS (not in the logo SVG) so it stays crisp and is a one-character
   change: once the USPTO registration is granted, swap "™" for "®" (both lines). The "/ ''" part gives it
   empty alt text so screen readers don't announce "trademark" after the name (the first line is a
   fallback for browsers that don't understand that syntax).
   It sits after "Kelsey", top-aligned with the name's capitals. Its size is .1em of the logo's height
   (about 40% of the name's capitals). align-items: flex-end puts its bottom at the bottom of the logo;
   margin-bottom lifts it so its top meets the top of the name: the name is .238em of the logo tall, the
   ™ box .08em (.1em × line-height .8), so .158em of the logo, which is 1.58em in the ™'s own size. */
.site-header__brand::after,
.site-footer__logo::after {
    content: "™";
    content: "™" / "";
    margin: 0 0 1.58em .3em;
    font-family: system-ui, sans-serif;
    font-size: .1em;
    font-weight: 500;
    line-height: .8;
}
.site-nav { margin-left: auto; }
/* align-items: center lines up the text of plain links with the taller Donate pill */
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 1.5rem; }
.site-nav a { text-decoration: none; font-weight: 600; }
.site-nav a:hover, .site-nav .current-menu-item > a { color: var(--color-accent-strong); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: .4em; }
/* A menu item with the CSS class "menu-button" (Appearance → Menus) shows as a pill, e.g. Donate */
.site-nav .menu-button > a { display: inline-block; padding: .45rem 1rem; border-radius: 999px; background: var(--color-accent-strong); color: #fff; text-decoration: none; }
.site-nav .menu-button > a:hover,
.site-nav .menu-button.current-menu-item > a { background: var(--color-ink); color: #fff; text-decoration: none; }
.js .home .site-header:not(.is-solid) .site-nav .menu-button.current-menu-item > a { background: #fff; color: var(--color-ink); }
.header-cart { position: relative; display: inline-flex; padding: .25rem; }
.header-cart__count { position: absolute; top: -.35rem; right: -.6rem; min-width: 1.2rem; padding: 0 .3rem; border-radius: 1rem; background: var(--color-accent-strong); color: #fff; font-size: .75rem; font-weight: 800; line-height: 1.2rem; text-align: center; box-sizing: border-box; }

/* Mobile menu toggle: three bars drawn with one span and its pseudo-elements */
.menu-toggle { display: none; background: none; border: 0; padding: .75rem .5rem; cursor: pointer; color: inherit; }
.menu-toggle__bar, .menu-toggle__bar::before, .menu-toggle__bar::after { display: block; width: 24px; height: 2px; background: currentColor; transition: transform .2s; }
.menu-toggle__bar { position: relative; }
.menu-toggle__bar::before, .menu-toggle__bar::after { content: ""; position: absolute; left: 0; }
.menu-toggle__bar::before { top: -7px; }
.menu-toggle__bar::after { top: 7px; }
.menu-toggle[aria-expanded="true"] .menu-toggle__bar { background: transparent; }
.menu-toggle[aria-expanded="true"] .menu-toggle__bar::before { transform: translateY(7px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-toggle__bar::after { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 768px) {
    .site-header__brand { margin-right: auto; }
    .site-header__brand { font-size: 3.5rem; }
    .site-nav { order: 99; width: 100%; margin-left: 0; }
    .site-nav ul { flex-direction: column; align-items: stretch; gap: 0; }
    .site-nav a { display: block; padding: .75rem 0; border-top: 1px solid var(--color-line); }
    .site-nav .menu-button { padding: .75rem 0; border-top: 1px solid var(--color-line); }
    .site-nav .menu-button > a { display: inline-block; padding: .45rem 1rem; border-top: 0; }
    /* Only collapse the menu when JavaScript is running, so it never gets stuck hidden. */
    .js .menu-toggle { display: block; }
    .js .site-nav:not(.is-open) { display: none; }
}

/* ==========================================================================
   5. Footer
   ========================================================================== */
/* A wave edge (the same shape language as the homepage) leads into the footer */
.footer-wave { display: block; width: 100%; height: 60px; margin-bottom: -1px; }
.footer-wave path { fill: var(--color-ink); }

.site-footer { padding: var(--space-l) var(--gutter) calc(var(--space-m) + env(safe-area-inset-bottom, 0px)); background: var(--color-ink); color: rgba(255, 255, 255, .85); }
.site-footer a { color: #fff; }
.site-footer a:hover { color: var(--color-gold); }
.site-footer__inner { max-width: var(--width-wide); margin: 0 auto; display: grid; grid-template-columns: 2fr 1fr 1fr; gap: var(--space-m); }
/* The stacked logo shows off here: 8.75rem (140px) tall, 7.5rem (120px) on phones. */
.site-footer__logo { font-size: 8.75rem; }
@media (max-width: 760px) { .site-footer__logo { font-size: 7.5rem; } }
.site-footer__tagline { margin: .5rem 0 1rem; }
.site-footer__email { font-weight: 600; text-underline-offset: .25em; }
.site-footer__heading { margin: 0 0 .75rem; color: var(--color-gold); font-size: .8rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.site-footer__nav ul, .site-footer__social ul { list-style: none; margin: 0; padding: 0; }
.site-footer__nav li + li { margin-top: .6rem; }
.site-footer__nav a { font-weight: 600; text-decoration: none; }
.site-footer__nav a:hover { text-decoration: underline; text-underline-offset: .25em; }
.site-footer__social ul { display: flex; flex-wrap: wrap; gap: .5rem; }
.site-footer__social a { display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid rgba(255, 255, 255, .25); border-radius: 50%; transition: background .2s, border-color .2s, color .2s; }
.site-footer__social a:hover { background: var(--color-gold); border-color: var(--color-gold); color: var(--color-ink); }
.site-footer__bottom { max-width: var(--width-wide); margin: var(--space-l) auto 0; padding-top: var(--space-s); border-top: 1px solid rgba(255, 255, 255, .15); font-size: .9rem; color: rgba(255, 255, 255, .7); }
.site-footer__bottom p { margin: 0; }

@media (max-width: 760px) {
    .site-footer__inner { grid-template-columns: 1fr 1fr; }
    .site-footer__brand { grid-column: 1 / -1; }
}

/* ==========================================================================
   6. Front page
   ========================================================================== */

/* Header floats over the hero on the homepage, then turns solid once you
   scroll past it (main.js adds .is-solid). Only with JavaScript running,
   so without it the header stays a normal solid bar. */
/* Colors at the top and bottom edges of the current hero photo (measured from
   an iPhone screenshot). iPhone Safari won't show the page behind its status
   bar and toolbar; it paints those strips with a color it picks from the page.
   These steer it to colors that run on from the photo. Update them if the hero
   photo changes a lot. */
:root { --hero-edge-top: #294f80; --hero-edge-bottom: #152036; }
/* The floating header's background is the top photo color at 1% opacity:
   invisible to people, but Safari still reads the color for its status bar
   (fully transparent makes it fall back to the beige page color). */
.js .home .site-header { position: fixed; top: var(--wp-admin--admin-bar--height, 0px); left: 0; right: 0; z-index: 50; background: color-mix(in srgb, var(--hero-edge-top) 1%, transparent); color: #fff; border-bottom-color: transparent; transition: background .25s, color .25s, border-color .25s; }
.js .home .site-header .site-nav a:hover,
.js .home .site-header .site-nav .current-menu-item > a { color: inherit; }
.js .home .site-header.is-solid,
.js .home .site-header:has(.site-nav.is-open) { background: var(--color-base); color: var(--color-ink); border-bottom-color: var(--color-line); }
/* The logo's fish: orchid while the header is over the video, back to maroon once it turns solid
   (scrolled, or the phone menu is open). See the two-tone note in section 4. */
.js .home .site-header:not(.is-solid):not(:has(.site-nav.is-open)) { --yrk-fish: var(--yrk-fish-on-dark); }
.js .home .site-header.is-solid .site-nav a:hover { color: var(--color-accent-strong); }
/* Keep the Donate pill's text white over the homepage header's own link colors */
.js .home .site-header .site-nav .menu-button > a,
.js .home .site-header.is-solid .site-nav .menu-button > a:hover { color: #fff; }

/* Hero: a tall section with a "sticky" stage that stays pinned while you
   scroll through it. As you scroll through it the video zooms in and the text
   drifts up and fades: with scroll-driven CSS animations where the browser
   supports them (smooth on phones), otherwise main.js sets --hero-progress
   from 0 to 1 and the calc()s below use it. */
/* The background sits behind the photo, so people never see it; iPhone Safari
   reads it to color the strip under its bottom toolbar (see --hero-edge-bottom). */
.hero { --hero-progress: 0; --toolbar: env(safe-area-inset-bottom, 0px); position: relative; height: 200vh; margin: calc(var(--space-m) * -1) calc(var(--gutter) * -1) 0; background: var(--hero-edge-bottom); color: #fff; }
/* When logged in, the admin bar takes the top 32px (46px on phones), so the
   stage pins just below it and is that much shorter; for visitors it's 0. */
.hero__stage { position: sticky; top: var(--wp-admin--admin-bar--height, 0px); height: calc(100vh - var(--wp-admin--admin-bar--height, 0px)); height: calc(100svh - var(--wp-admin--admin-bar--height, 0px)); overflow: hidden; display: flex; align-items: flex-end; background: var(--hero-edge-bottom); }
/* The stage uses 100svh ("small" viewport): the visible area with the phone
   browser's toolbar fully showing, which never changes while scrolling.
   - Taller (100lvh) hid the stage's bottom edge, and the Scroll hint, under
     iPhone Safari's toolbar strip: Safari paints that strip with
     --hero-edge-bottom instead of showing the page.
   - Dynamic (100dvh) resized the stage mid-scroll as the toolbar shrank,
     which made the title jump and the scroll animation stutter.
   When the toolbar shrinks, a strip of the hero's navy background shows under
   the photo, next to Safari's navy band. --toolbar (set on .hero) is the
   home-indicator safe area, 0 on desktop; text and the Scroll hint clear it. */
.hero__media { position: absolute; inset: 0; transform: scale(calc(1 + var(--hero-progress) * .25)); transform-origin: var(--hero-focus, 50%) 60%; will-change: transform; }
/* --hero-focus comes from Customize → Homepage hero → Focus point. It picks
   which part of the video stays in frame when cropped, and where the zoom centers. */
.hero__video, .hero__image { display: block; width: 100%; height: 100%; object-fit: cover; object-position: var(--hero-focus, 50%) 50%; }
/* The phones' portrait video is already cropped around the subject (main.js
   adds this class once it plays), so center it rather than re-applying the focus point */
.hero__video--portrait { object-position: 50% 50%; }
.hero__placeholder { --horizon: 52%; position: absolute; inset: 0; background: linear-gradient(180deg, var(--color-gold) 0%, var(--color-accent) var(--horizon), var(--color-dusk) calc(var(--horizon) + .2%), var(--color-ink) 100%); }
.hero__sun { position: absolute; left: 68%; top: var(--horizon); width: min(22vw, 220px); aspect-ratio: 1; border-radius: 50%; background: var(--wp--preset--color--sun); transform: translate(-50%, -100%); }
/* Two gradients: darker at the top and bottom, and on the left where the text
   sits, so white text stays readable over bright footage. */
.hero__shade { position: absolute; inset: 0; background:
    linear-gradient(90deg, rgba(0, 0, 0, .6) 0%, rgba(0, 0, 0, .35) 40%, rgba(0, 0, 0, 0) 65%),
    linear-gradient(180deg, rgba(0, 0, 0, .3) 0%, rgba(0, 0, 0, 0) 30%, rgba(0, 0, 0, .55) 100%); }
.hero__content { position: relative; width: 100%; max-width: var(--width-wide); margin: 0 auto; padding: 0 var(--gutter) calc(16vh + var(--toolbar)); opacity: calc(1 - var(--hero-progress) * 1.2); transform: translateY(calc(var(--hero-progress) * -120px)); will-change: transform, opacity; }
/* will-change above: the browser draws the text block (with the title's soft
   shadow) once and then only slides and fades that picture while scrolling,
   instead of repainting the shadow every frame, which made phones stutter. */
.hero__title { max-width: 10ch; margin: .5rem 0 1rem; color: #fff; font-size: clamp(3rem, 9vw, 8rem); line-height: .88; letter-spacing: calc(-.045em * var(--font-heading-tracking)); text-shadow: 0 2px 30px rgba(0, 0, 0, .25); }
.hero__text { max-width: 34rem; margin: 0; font-size: 1.2rem; }
.hero__buttons { display: flex; flex-wrap: wrap; gap: var(--space-s); margin-top: var(--space-m); }

/* "Scroll" hint at the bottom center. It fades out as you start scrolling
   (same --hero-progress as the text) and links past the hero for keyboard users. */
.hero__scroll { position: absolute; left: 50%; bottom: calc(1.5rem + var(--toolbar)); display: flex; flex-direction: column; align-items: center; gap: .1rem; color: #fff; font-size: .75rem; font-weight: 800; letter-spacing: .15em; text-transform: uppercase; text-decoration: none; transform: translateX(-50%); opacity: calc(.9 - var(--hero-progress) * 6); text-shadow: 0 1px 8px rgba(0, 0, 0, .4); will-change: opacity; }
.hero__scroll:hover { color: #fff; opacity: 1; }
.hero__scroll svg { animation: yourowkelsey-nudge 1.8s ease-in-out infinite; }
@keyframes yourowkelsey-nudge {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(5px); }
}

/* On the homepage the header is fixed, so keep keyboard focus from hiding under it */
.js:has(body.home) { scroll-padding-top: 6rem; }

/* Jumping to the content (the Scroll link) leaves room for the fixed header */
.home-content { scroll-margin-top: 6rem; }
@media (prefers-reduced-motion: no-preference) {
    html { scroll-behavior: smooth; }
}

/* Text on the right (Customize → Homepage hero → Text position). The text
   block moves right and lines up along its right edge, and the dark gradient
   flips to sit behind it. Phones keep the full-width, left-aligned layout. */
@media (min-width: 761px) {
    .hero--text-right .hero__content { display: flex; flex-direction: column; align-items: flex-end; text-align: right; }
    .hero--text-right .hero__content > * { width: min(100%, 34rem); }
    .hero--text-right .hero__title { max-width: none; }
    /* "Wide" headline (Customize → Homepage): use the full width instead of the 34rem text column */
    .hero--text-right.hero--headline-wide .hero__content > .hero__title { width: 100%; }
    .hero--text-right .hero__buttons { justify-content: flex-end; }
    .hero--text-right .hero__shade { background:
        linear-gradient(270deg, rgba(0, 0, 0, .6) 0%, rgba(0, 0, 0, .35) 40%, rgba(0, 0, 0, 0) 65%),
        linear-gradient(180deg, rgba(0, 0, 0, .3) 0%, rgba(0, 0, 0, 0) 30%, rgba(0, 0, 0, .55) 100%); }
}

/* Hero text styles chosen in Customize → Homepage. "Large", "Heavy",
   "Narrow", "Medium" and "Regular" are the original look. */
.hero--headline-s .hero__title { font-size: clamp(2.25rem, 6vw, 4.5rem); line-height: .95; }
.hero--headline-m .hero__title { font-size: clamp(2.75rem, 7.5vw, 6rem); line-height: .92; }
.hero--headline-xl .hero__title { font-size: clamp(3.25rem, 11vw, 10rem); line-height: .86; }
.hero--headline-regular .hero__title { font-weight: 400; }
.hero--headline-bold .hero__title { font-weight: 700; }
.hero--headline-wide .hero__title { max-width: 16ch; }
.hero__title em { font-style: italic; }
/* **Bold** words in the headline use the font pairing's full heading weight
   (e.g. Gabarito 900), not just one step bolder than the headline. */
.hero__title strong { font-weight: var(--font-heading-weight); }
.hero--intro-s .hero__text { font-size: 1rem; }
.hero--intro-l .hero__text { font-size: 1.5rem; line-height: 1.4; }
.hero--intro-medium .hero__text { font-weight: 500; }
.hero--intro-bold .hero__text { font-weight: 700; }
.hero__text strong { font-weight: 800; }

/* With reduced motion: a normal one-screen hero with no scroll effect */
@media (prefers-reduced-motion: reduce) {
    .hero { height: auto; }
    .hero__scroll svg { animation: none; }
    .hero__media, .hero__content { transform: none; opacity: 1; }
}

/* Scroll-driven version of the hero motion. The browser ties each animation
   to how far the hero has scrolled (its "view timeline") and runs it itself,
   off the main thread, so it keeps up with your finger on phones. "contain"
   is the stretch where the tall hero covers the whole screen: from its top
   at the top of the screen to its bottom at the bottom, the same 0-to-1 range
   main.js measures. The keyframes repeat the calc() formulas above. Browsers
   without support keep the main.js version.
   view-timeline-inset: 0 measures against the whole screen. By default it
   would subtract the homepage's scroll-padding-top (room kept for the fixed
   header), which started the animation about 11% early. */
@media (prefers-reduced-motion: no-preference) {
    @supports (animation-timeline: view()) {
        .hero { view-timeline: --kpr-hero block; view-timeline-inset: 0; }
        .hero__media { animation: kpr-hero-zoom linear both; animation-timeline: --kpr-hero; animation-range: contain; }
        .hero__content { animation: kpr-hero-text linear both; animation-timeline: --kpr-hero; animation-range: contain; }
        .hero__scroll { animation: kpr-hero-hint linear both; animation-timeline: --kpr-hero; animation-range: contain; }
    }
}
@keyframes kpr-hero-zoom {
    from { transform: scale(1); }
    to { transform: scale(1.25); }
}
/* Fades out by 83% of the way (1 - progress * 1.2) while rising 120px in total */
@keyframes kpr-hero-text {
    0% { opacity: 1; transform: translateY(0); }
    83.33% { opacity: 0; transform: translateY(-100px); }
    100% { opacity: 0; transform: translateY(-120px); }
}
/* The Scroll hint is gone after the first 15% (.9 - progress * 6) */
@keyframes kpr-hero-hint {
    0% { opacity: .9; }
    15%, 100% { opacity: 0; }
}

/* Home page content: sections built from the theme's block patterns */
.home-content > * { max-width: var(--width-wide); margin-left: auto; margin-right: auto; }
.home-content > p { max-width: var(--width-wide); font-size: var(--wp--preset--font-size--large); line-height: 1.4; }
.home-content > .kpr-name { font-size: var(--name-size); line-height: .9; }

/* Titles that fade up as they scroll into view. main.js adds .kpr-reveal (so without
   JavaScript nothing is ever hidden) and .is-revealed once the title is on screen. */
.kpr-reveal { opacity: 0; transform: translateY(1.25rem); transition: opacity .9s ease, transform .9s ease; }
.kpr-reveal.is-revealed { opacity: 1; transform: none; }
.home-content > .alignfull { max-width: none; margin-left: calc(var(--gutter) * -1); margin-right: calc(var(--gutter) * -1); }
/* The Records band right after the hero: drawn over the bottom of the video, clear at the top and
   solid ink where the video ends, with its text over the middle of the fade. */
.hero + .home-content > .kpr-records:first-child {
    position: relative;
    z-index: 1;
    margin-top: calc(var(--records-overlap) * -1);
    padding-top: var(--records-text-top);
    background: linear-gradient(to bottom, transparent, color-mix(in srgb, var(--color-ink) 65%, transparent) calc(var(--records-overlap) / 2), var(--color-ink) var(--records-overlap));
}
/* A "Wave band" paragraph runs edge to edge, with its text lined up with the other sections */
.home-content > .is-style-kpr-wave-band { max-width: none; margin: var(--space-l) calc(var(--gutter) * -1); padding-left: max(var(--gutter), calc((100% - var(--width-wide)) / 2 + var(--gutter))); padding-right: max(var(--gutter), calc((100% - var(--width-wide)) / 2 + var(--gutter))); }

.home-products { max-width: var(--width-wide); margin: var(--space-xl) auto var(--space-l); }
/* Section headings: "From the shop", and any heading added straight into the Home page (e.g. "From the website") */
.home-products h2,
.home-content > .wp-block-heading { font-size: var(--wp--preset--font-size--x-large); }
.home-content > .wp-block-heading { margin-top: var(--space-l); margin-bottom: var(--space-m); }

@media (max-width: 760px) {
    .hero__scroll { bottom: calc(1rem + var(--toolbar)); }
    .hero__placeholder { --horizon: 32%; }
    /* On phones the text spans the full width, so darken the lower half evenly */
    .hero__shade { background: linear-gradient(180deg, rgba(0, 0, 0, .3) 0%, rgba(0, 0, 0, 0) 25%, rgba(0, 0, 0, .35) 45%, rgba(0, 0, 0, .65) 100%); }

/* With reduced motion the hero doesn't scroll, so the Records band covers its bottom from the start:
   lift the hero text and Scroll link above it. */
@media (prefers-reduced-motion: reduce) {
    .hero:has(+ .home-content > .kpr-records:first-child) .hero__content { padding-bottom: calc(16vh + var(--records-overlap)); }
    .hero:has(+ .home-content > .kpr-records:first-child) .hero__scroll { bottom: calc(var(--records-overlap) + 1rem); }
}
}



/* ==========================================================================
   7. Content pages, posts and WooCommerce pages
   ========================================================================== */
.content-area { max-width: var(--width-wide); margin: 0 auto; }
.content-area--narrow { max-width: var(--width-content); }
.entry-title, .page-title { margin-top: 0; margin-bottom: var(--space-m); font-size: clamp(2.5rem, 7vw, 4.5rem); line-height: .95; letter-spacing: calc(-.045em * var(--font-heading-tracking)); }

/* Headings inside page and post content */
.entry-content h2 { margin: var(--space-l) 0 var(--space-s); font-size: var(--wp--preset--font-size--x-large); }
.entry-content h3 { margin: var(--space-m) 0 var(--space-xs); font-size: var(--wp--preset--font-size--large); }
.entry-content > :first-child { margin-top: 0; }
/* Keep reading pages to a comfortable line length; shop pages stay wide */
body.page:not(.woocommerce-page) .entry-content { max-width: var(--width-content); }
.entry-content li + li { margin-top: .4rem; }
.entry-content .wp-block-buttons { margin-top: var(--space-m); }
.entry-meta { margin: 0 0 var(--space-s); color: var(--color-muted); font-size: .9rem; }
.entry-image { margin-bottom: 1.5rem; }
.entry-image img { border-radius: var(--radius-l); }
.post-navigation .nav-links { display: flex; justify-content: space-between; gap: var(--space-s); margin-top: var(--space-l); padding-top: 1.5rem; border-top: 1px solid var(--color-line); }
.post-navigation .nav-next { margin-left: auto; text-align: right; }

/* 404 page */
.not-found { padding: var(--space-l) 0 var(--space-xl); }
.not-found__eyebrow { color: var(--color-accent-strong); }
.not-found__title { margin: .5rem 0 var(--space-s); font-size: clamp(3rem, 10vw, 7rem); }
.not-found__text { max-width: 34rem; font-size: 1.25rem; }
.not-found__buttons { display: flex; flex-wrap: wrap; gap: var(--space-s); margin: var(--space-m) 0 var(--space-l); }
.not-found__secondary { border: 1px solid var(--color-border); }
.not-found__search-title { margin-bottom: var(--space-xs); font-size: var(--wp--preset--font-size--large); }

/* Search form (get_search_form) */
.search-form { display: flex; gap: var(--space-xs); max-width: 30rem; }
.search-form label { flex: 1; }
.search-form .search-field { box-sizing: border-box; width: 100%; padding: .75rem .9rem; border: 1px solid var(--color-border); border-radius: var(--radius-s); background: #fff; color: var(--color-ink); font: inherit; }
.search-form .search-submit { padding: .75rem 1.25rem; border: 0; border-radius: var(--radius-s); background: var(--color-ink); color: #fff; font-family: var(--font-heading); font-weight: var(--font-heading-weight); cursor: pointer; }
.search-form .search-submit:hover { background: var(--color-accent-strong); }

/* Post cards (homepage) */
.post-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: var(--space-m); }
.post-card__image img { display: block; width: 100%; height: auto; margin-bottom: var(--space-s); border-radius: var(--radius-l); }
.post-card__title { margin: 0 0 .25rem; }
.post-card__title a { color: inherit; text-decoration: none; }
.post-card__title a:hover { color: var(--color-accent-strong); }
.pagination { margin-top: var(--space-m); }
.pagination .nav-links { display: flex; gap: var(--space-xs); }
