/* ==========================================================================
   Tarot Lexicon — a quiet study
   Motion vocabulary: slow, soft, settling. Only transform / opacity /
   clip-path / SVG stroke are animated. Anything hidden for a reveal is
   hidden only under html.js, and a CSS failsafe shows it if main.js never runs.
   ========================================================================== */

:root {
    /* Brand Colors */
    --color-primary: #758262;       /* Olive Green */
    --color-secondary: #9ea459;     /* Light Olive */
    --color-sage: #89ac94;
    --color-muted-green: #849a67;

    /* Deeper olive for small text and hover fills (keeps brand hue, reads at AA) */
    --color-primary-ink: #5d6a4c;
    --color-primary-deep: #64704f;

    /* Muted tones for the library feel */
    --color-bg: #f9f8f6;            /* Natural linen / paper */
    --color-bg-alt: #f1efeb;        /* Slightly darker for sections */
    --color-paper: #fdfcfa;         /* Card stock */
    --color-text-dark: #2c2a28;     /* Soft black/brown for text */
    --color-text-light: #5a5753;
    --hairline: rgba(117, 130, 98, 0.22);
    --hairline-strong: rgba(117, 130, 98, 0.45);

    /* Typography */
    --font-heading: 'Playfair Display', 'Iowan Old Style', 'Palatino Linotype', Palatino, Georgia, serif;
    --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;

    /* Motion */
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);       /* settles, like ink */
    --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);   /* a page being turned */

    /* Layout */
    --header-h: 5.5rem;
    --gutter: 2rem;

    /* Fine paper grain (inline SVG noise, permitted by CSP img-src data:) */
    --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .2 0 0 0 0 .18 0 0 0 0 .14 1.6 0 0 0 -.55'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    /* Book-cloth / linen weave for image placeholders */
    --linen: repeating-linear-gradient(0deg, rgba(117, 130, 98, 0.035) 0 1px, transparent 1px 3px),
             repeating-linear-gradient(90deg, rgba(117, 130, 98, 0.03) 0 1px, transparent 1px 4px);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    background-color: var(--color-bg);
    -webkit-text-size-adjust: 100%;
}

body {
    background-color: var(--color-bg);
    color: var(--color-text-dark);
    font-family: var(--font-body);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    padding-top: var(--header-h); /* header is fixed; the home hero sits beneath it */
}

body.home {
    padding-top: 0;
}

/* Paper grain over everything: fixed, composited once, never intercepts input */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 300;
    pointer-events: none;
    background-image: var(--grain);
    background-size: 240px 240px;
    opacity: 0.05;
}

::selection {
    background-color: rgba(137, 172, 148, 0.35);
    color: var(--color-text-dark);
}

:focus-visible {
    outline: 1px solid var(--color-primary);
    outline-offset: 4px;
}

:focus:not(:focus-visible) {
    outline: none;
}

/* Typography */
h1, h2, h3, h4 {
    font-family: var(--font-heading);
    font-weight: 400;
    color: var(--color-text-dark);
    margin-bottom: 1rem;
    text-wrap: balance;
    font-kerning: normal;
}

h1 {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    letter-spacing: -0.02em;
    line-height: 1.08;
}

h2 {
    font-size: clamp(2rem, 3.6vw, 3rem);
    letter-spacing: -0.01em;
    line-height: 1.15;
}

h3 {
    line-height: 1.25;
}

em {
    font-style: italic;
}

p {
    margin-bottom: 1.5rem;
    color: var(--color-text-light);
    font-size: 1.05rem;
    line-height: 1.75;
    text-wrap: pretty;
}

a {
    color: var(--color-primary-ink);
    text-decoration: none;
    transition: color 0.4s ease;
}

a:hover {
    color: var(--color-primary);
}

/* Eyebrow label with hairline rules (".hero-subtitle" is used site-wide) */
.hero-subtitle,
.eyebrow {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-family: var(--font-body);
    text-transform: uppercase;
    letter-spacing: 0.22em;
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--color-primary-ink);
    margin-bottom: 1.75rem;
}

.hero-subtitle::before,
.hero-subtitle::after,
.eyebrow::before {
    content: '';
    flex: 0 0 2.5rem;
    height: 1px;
    background-color: var(--hairline-strong);
    transform-origin: left center;
}

.hero-subtitle::after {
    transform-origin: right center;
}

/* Left-aligned contexts: a single leading rule */
.eyebrow::after,
.hero .hero-subtitle::after,
.about-text .hero-subtitle::after {
    display: none;
}

/* Centered page headers */
.page-header .hero-subtitle {
    justify-content: center;
}

/* Rules ink in when their header is revealed */
.js .fade-up .hero-subtitle::before,
.js .fade-up .hero-subtitle::after,
.js .fade-up .eyebrow::before {
    transition: transform 1.2s var(--ease-in-out) calc(var(--reveal-delay, 0ms) + 0.3s);
}

.js .fade-up:not(.is-visible) .hero-subtitle::before,
.js .fade-up:not(.is-visible) .hero-subtitle::after,
.js .fade-up:not(.is-visible) .eyebrow::before {
    transform: scaleX(0);
}

/* Text link with sliding arrow */
.text-link,
.read-more,
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.6em;
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--color-primary-ink);
    position: relative;
    padding-bottom: 0.35rem;
}

.text-link::after,
.read-more::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 1px;
    background-color: currentColor;
    opacity: 0.35;
    transform: scaleX(0.35);
    transform-origin: left center;
    transition: transform 0.7s var(--ease-out), opacity 0.7s ease;
}

.text-link:hover::after,
.text-link:focus-visible::after,
.read-more:hover::after,
.read-more:focus-visible::after {
    transform: scaleX(1);
    opacity: 0.8;
}

.arrow {
    display: inline-block;
    transition: transform 0.6s var(--ease-out);
}

.text-link:hover .arrow,
.text-link:focus-visible .arrow,
.read-more:hover .arrow,
.read-more:focus-visible .arrow,
.feature-card:hover .arrow {
    transform: translateX(0.4em);
}

.back-link {
    color: var(--color-text-light);
    margin-bottom: 2rem;
}

.back-link:hover .arrow,
.back-link:focus-visible .arrow {
    transform: translateX(-0.4em);
}

.visually-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

/* Layout Utilities */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--gutter);
}

.section {
    padding: 8rem 0;
    position: relative;
}

.page-header {
    text-align: center;
    padding: 6rem 0 4.5rem;
    position: relative;
}

.page-header h1 {
    margin-bottom: 1.5rem;
}

.page-header p {
    max-width: 36rem;
    margin: 0 auto;
}

/* ==========================================================================
   Header — transparent at rest, settles into a translucent bar on scroll
   ========================================================================== */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-h);
    z-index: 100;
    view-transition-name: site-header;
}

/* Background lives on a pseudo-element so backdrop-filter never becomes the
   containing block of the fixed mobile menu */
.site-header::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background-color: rgba(249, 248, 246, 0.82);
    -webkit-backdrop-filter: blur(14px) saturate(1.05);
    backdrop-filter: blur(14px) saturate(1.05);
    border-bottom: 1px solid var(--hairline);
    opacity: 0;
    transition: opacity 0.7s ease;
}

.site-header.is-scrolled::before {
    opacity: 1;
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--color-text-dark);
    letter-spacing: 0.04em;
    position: relative;
    z-index: 101;
}

.logo:hover {
    color: var(--color-text-dark);
}

.nav-links {
    display: flex;
    gap: 2.75rem;
    list-style: none;
}

.nav-links a {
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--color-text-dark);
    position: relative;
    padding: 0.5rem 0;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0.15rem;
    left: 0;
    right: 0.18em; /* compensate trailing letter-spacing */
    height: 1px;
    background-color: var(--color-primary);
    transform: scaleX(0);
    transform-origin: right center;
    transition: transform 0.6s var(--ease-out);
}

.nav-links a:hover::after,
.nav-links a:focus-visible::after {
    transform: scaleX(1);
    transform-origin: left center;
}

.nav-links a[aria-current="page"] {
    color: var(--color-primary-ink);
}

.nav-links a[aria-current="page"]::after {
    transform: scaleX(1);
    background-color: var(--color-sage);
}

.mobile-menu-btn {
    display: none;
    position: relative;
    width: 44px;
    height: 44px;
    margin-right: -10px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--color-text-dark);
    z-index: 101;
}

.menu-icon,
.menu-icon::before,
.menu-icon::after {
    position: absolute;
    left: 11px;
    width: 22px;
    height: 1px;
    background-color: currentColor;
}

.menu-icon {
    top: 50%;
    background-color: transparent;
}

.menu-icon::before,
.menu-icon::after {
    content: '';
    left: 0;
    transition: transform 0.6s var(--ease-out);
}

.menu-icon::before { transform: translateY(-4px); }
.menu-icon::after { transform: translateY(4px); }

.mobile-menu-btn[aria-expanded="true"] .menu-icon::before { transform: rotate(45deg); }
.mobile-menu-btn[aria-expanded="true"] .menu-icon::after { transform: rotate(-45deg); }

html.menu-open {
    overflow: hidden;
}

/* ==========================================================================
   Bookmark ribbon (back to top) — hangs from the header once you have read on
   ========================================================================== */
.bookmark {
    position: fixed;
    top: var(--header-h);
    right: max(var(--gutter), calc((100vw - 1200px) / 2 + var(--gutter)));
    width: 34px;
    height: 78px;
    z-index: 90;
    padding: 0;
    border: none;
    background: none;
    color: #fff;
    cursor: pointer;
    font-family: inherit;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-100%);
    transition: transform 0.9s var(--ease-in-out), opacity 0.5s ease 0.2s, visibility 0s linear 0.9s;
}

.bookmark::before {
    content: '';
    position: absolute;
    inset: 0;
    background-color: var(--color-primary);
    background-image: var(--linen);
    clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 84%, 0 100%);
    box-shadow: inset 0 1px 0 rgba(0, 0, 0, 0.06);
}

/* stitched edge */
.bookmark::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 22px;
    left: 4px;
    right: 4px;
    border-left: 1px dashed rgba(255, 255, 255, 0.22);
    border-right: 1px dashed rgba(255, 255, 255, 0.22);
}

.bookmark.is-shown {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: transform 0.9s var(--ease-out), opacity 0.5s ease, visibility 0s;
}

.bookmark.is-shown:hover,
.bookmark.is-shown:focus-visible {
    transform: translateY(8px);
}

.bookmark__icon {
    position: absolute;
    left: 50%;
    top: 34px;
    width: 7px;
    height: 7px;
    border-top: 1px solid currentColor;
    border-left: 1px solid currentColor;
    transform: translateX(-50%) rotate(45deg);
    z-index: 1;
}

.bookmark__hint {
    position: absolute;
    right: calc(100% + 0.75rem);
    top: 30px;
    white-space: nowrap;
    font-size: 0.68rem;
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--color-primary-ink);
    opacity: 0;
    transform: translateX(6px);
    transition: opacity 0.5s ease, transform 0.6s var(--ease-out);
    pointer-events: none;
}

.bookmark:hover .bookmark__hint,
.bookmark:focus-visible .bookmark__hint {
    opacity: 1;
    transform: none;
}

/* ==========================================================================
   Buttons — a slow fill sweeps across like a turning page
   ========================================================================== */
.btn {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1.05rem 2.6rem;
    background-color: var(--color-primary-deep); /* white text at 5.3:1 (AA) */
    color: #fff;
    font-family: var(--font-body);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 0.72rem;
    line-height: 1.4;
    border: 1px solid var(--color-primary-deep);
    cursor: pointer;
    transition: color 0.6s var(--ease-out), border-color 0.6s ease;
}

.btn::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background-color: var(--btn-sweep, var(--color-primary-ink));
    transform: scaleX(0);
    transform-origin: right center;
    transition: transform 0.75s var(--ease-out);
}

.btn:hover,
.btn:focus-visible {
    color: #fff;
    border-color: var(--color-primary-ink);
}

.btn:hover::before,
.btn:focus-visible::before {
    transform: scaleX(1);
    transform-origin: left center;
}

.btn-outline {
    background-color: transparent;
    color: var(--color-primary-ink);
    border-color: var(--hairline-strong);
    --btn-sweep: var(--color-primary-deep);
}

.btn-outline:hover,
.btn-outline:focus-visible {
    border-color: var(--color-primary-deep);
}

/* ==========================================================================
   Hero — the threshold
   ========================================================================== */
.hero {
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    align-items: center;
    position: relative;
    padding: calc(var(--header-h) + 2rem) 0 4rem;
    overflow: hidden;
}

.hero > .container {
    width: 100%;
}

/* The arch (drawn in SVG so its hairlines can ink in) */
.hero-arch-bg {
    position: absolute;
    right: 8%;
    bottom: 3vh;
    height: 84vh;
    aspect-ratio: 360 / 560;
    z-index: 1;
    pointer-events: none;
}

.hero-arch {
    display: block;
    width: 100%;
    height: 100%;
    overflow: visible;
}

.arch-line {
    fill: none;
    stroke-width: 0.9;
    stroke-dasharray: 1;
    stroke-linecap: round;
}

.arch-line--outer { stroke: rgba(137, 172, 148, 0.7); }
.arch-line--inner { stroke: rgba(117, 130, 98, 0.28); }
.arch-floor { stroke: rgba(117, 130, 98, 0.35); }
.arch-light { opacity: 0.75; }
.hero-arch.has-photo .arch-light { display: none; }

/* A second, offset frame behind the arch: layered thresholds */
.hero-frame-bg {
    position: absolute;
    right: calc(8% + 38vh);
    bottom: 12vh; /* stands on the arch's floor line (3vh + 84vh * 60/560) */
    width: 26vh;
    height: 52vh;
    border: 1px solid var(--hairline);
    z-index: 0;
    pointer-events: none;
}

.hero-content {
    max-width: 36rem;
    position: relative;
    z-index: 10;
}

.hero-title {
    margin-bottom: 0;
}

.hero-title .line {
    display: block;
    overflow: hidden;
    padding: 0 0.12em 0.1em 0;
    margin-bottom: -0.1em;
}

.hero-title .line > span {
    display: inline-block;
}

.hero-title em {
    color: var(--color-primary-ink);
}

.hero p {
    font-size: 1.15rem;
    margin: 2rem 0 2.75rem;
    max-width: 31rem;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Choreographed intro: starts immediately via CSS, content settled by ~1.25s */
@media (prefers-reduced-motion: no-preference) {
    .js .hero .hero-subtitle { animation: tl-fade-up 0.8s var(--ease-out) 0.05s both; }
    .js .hero .hero-subtitle::before,
    .js .hero .hero-subtitle::after { animation: tl-scale-x 1.1s var(--ease-in-out) 0.1s both; }
    .js .hero-title .line > span { animation: tl-rise 1s var(--ease-out) 0.12s both; }
    .js .hero-title .line + .line > span { animation-delay: 0.24s; }
    .js .hero-content > p { animation: tl-fade-up 0.8s var(--ease-out) 0.42s both; }
    .js .hero-buttons { animation: tl-fade-up 0.8s var(--ease-out) 0.52s both; }

    .js .arch-line--outer { animation: tl-draw 1.7s var(--ease-in-out) 0.1s both; }
    .js .arch-line--inner { animation: tl-draw 1.7s var(--ease-in-out) 0.45s both; }
    .js .arch-floor {
        transform-box: fill-box;
        transform-origin: center;
        animation: tl-scale-x 1.5s var(--ease-in-out) 0.3s both;
    }
    .js .arch-fill { animation: tl-fade 1.6s ease-out 0.3s both; }
    .js .arch-light { animation: tl-fade 2.2s ease-out 0.8s both; }
    .js .hero-frame-bg { animation: tl-wipe-up 1.6s var(--ease-in-out) 0.6s both; }
}

@keyframes tl-rise { from { transform: translateY(110%); } }
@keyframes tl-fade-up { from { opacity: 0; transform: translateY(14px); } }
@keyframes tl-fade { from { opacity: 0; } }
@keyframes tl-scale-x { from { transform: scaleX(0); } }
@keyframes tl-draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes tl-wipe-up { from { clip-path: inset(100% 0 0 0); } to { clip-path: inset(0); } }

/* ==========================================================================
   Scroll reveals (main.js adds .is-visible; see window.TL.reveal)
   ========================================================================== */
.js .fade-up {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 1.1s ease-out var(--reveal-delay, 0ms), transform 1.3s var(--ease-out) var(--reveal-delay, 0ms);
}

.js .fade-up.is-visible {
    opacity: 1;
    transform: none;
}

/* Images & placeholders open like a page being uncovered */
.js .fade-up :is(.product-image, .product-image-large, .course-video-placeholder) {
    clip-path: inset(0 0 100% 0);
    transition: clip-path 1.4s var(--ease-in-out) calc(var(--reveal-delay, 0ms) + 0.1s), transform 0.9s var(--ease-out), outline-color 0.5s ease;
}

/* The portrait is a doorway: it opens from the centre */
.js .fade-up .about-image-placeholder {
    clip-path: inset(0 50% 0 50%);
    transition: clip-path 1.6s var(--ease-in-out) calc(var(--reveal-delay, 0ms) + 0.15s);
}

.js .fade-up.is-visible :is(.product-image, .product-image-large, .course-video-placeholder, .about-image-placeholder) {
    clip-path: inset(0);
}

/* Failsafe: if main.js never runs, reveal everything after a short pause */
html.js:not(.tl-ready) .fade-up,
html.js:not(.tl-ready) .fade-up :is(.product-image, .product-image-large, .course-video-placeholder, .about-image-placeholder) {
    animation: tl-failsafe 0.8s ease-out 3.5s forwards;
}

html.js:not(.tl-ready) .fade-up::before,
html.js:not(.tl-ready) .fade-up::after,
html.js:not(.tl-ready) .fade-up .hero-subtitle::before,
html.js:not(.tl-ready) .fade-up .hero-subtitle::after {
    animation: tl-failsafe 0.8s ease-out 3.5s forwards;
}

@keyframes tl-failsafe { to { opacity: 1; transform: none; clip-path: inset(0); } }

/* ==========================================================================
   Home — Latest from the Library
   ========================================================================== */
.features-section {
    background-color: var(--color-bg);
    position: relative;
}

.section-intro {
    max-width: 36rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
    margin-top: 5rem;
    position: relative;
    z-index: 10;
}

.feature-card {
    padding: 3rem 2.75rem;
    background-color: var(--color-paper);
    position: relative;
    display: flex;
    flex-direction: column;
    transition: transform 0.8s var(--ease-out);
}

/* Hairline inner frame, drawn as two pairs of rules so it can ink in */
.feature-card::before,
.feature-card::after {
    content: '';
    position: absolute;
    inset: 14px;
    pointer-events: none;
    border: 0 solid var(--hairline);
    transition: transform 1.2s var(--ease-in-out) calc(var(--reveal-delay, 0ms) + 0.3s), border-color 0.6s ease;
}

.feature-card::before { border-top-width: 1px; border-bottom-width: 1px; }
.feature-card::after { border-left-width: 1px; border-right-width: 1px; }

.js .feature-card.fade-up:not(.is-visible)::before { transform: scaleX(0); }
.js .feature-card.fade-up:not(.is-visible)::after { transform: scaleY(0); }

.feature-card:hover::before,
.feature-card:hover::after,
.feature-card:focus-within::before,
.feature-card:focus-within::after {
    border-color: var(--hairline-strong);
}

.feature-card:hover,
.js .feature-card.fade-up.is-visible:hover {
    transform: translateY(-6px);
}

.card-index {
    font-family: var(--font-heading);
    font-style: italic;
    font-size: 1rem;
    color: var(--color-primary-ink);
    display: flex;
    align-items: center;
    gap: 0.85rem;
    margin-bottom: 1.75rem;
}

.card-index::after {
    content: '';
    width: 1.75rem;
    height: 1px;
    background-color: var(--hairline-strong);
}

.feature-card h3 {
    font-size: 1.65rem;
    margin-bottom: 1.25rem;
}

.feature-card p {
    font-size: 1rem;
    flex-grow: 1;
}

.feature-card .text-link {
    align-self: flex-start;
}

@media (min-width: 1000px) {
    .features-grid > :nth-child(2) { top: 2.5rem; }
    .features-grid > :nth-child(3) { top: 5rem; }
}

/* ==========================================================================
   Store — product cards (shared component; also used for API-rendered cards)
   ========================================================================== */
.store-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 4rem 3rem;
    padding-bottom: 8rem;
}

.product-card {
    display: flex;
    flex-direction: column;
    text-align: center;
    background: transparent;
    color: inherit;
}

.product-image {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 5;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 0.75rem;
    background-color: var(--color-paper);
    background-image: var(--linen);
    border: 1px solid rgba(44, 42, 40, 0.06);
    outline: 1px solid var(--hairline);
    outline-offset: -14px;
    margin-bottom: 1.75rem;
    overflow: hidden;
    transition: transform 0.9s var(--ease-out), outline-color 0.5s ease;
}

.product-image img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-numeral {
    font-family: var(--font-heading);
    font-style: italic;
    font-size: clamp(3rem, 6vw, 4.5rem);
    line-height: 1;
    color: var(--color-primary);
    opacity: 0.55;
}

.product-image__note {
    font-size: 0.68rem;
    font-weight: 500;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--color-text-light);
}

a.product-card:hover .product-image,
a.product-card:focus-visible .product-image {
    transform: translateY(-4px);
    outline-color: var(--hairline-strong);
}

.product-title {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 400;
    color: var(--color-text-dark);
    margin-bottom: 0.4rem;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 0.3em;
    text-decoration-color: transparent;
    transition: text-decoration-color 0.5s ease;
}

a.product-card:hover .product-title,
a.product-card:focus-visible .product-title {
    text-decoration-color: var(--hairline-strong);
}

.product-price {
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.14em;
    color: var(--color-primary-ink);
    font-variant-numeric: lining-nums tabular-nums;
}

.product-card--soon {
    cursor: default;
}

.product-card--soon .product-image {
    background-color: var(--color-bg-alt);
}

.product-card--soon .product-numeral {
    opacity: 0.3;
}

.product-card--soon .product-title,
.product-card--soon .product-price {
    color: var(--color-text-light);
}

/* Stock: "Only 3 left" and sold out (js/content.js) */
.product-stock,
.stock-note {
    display: block;
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--color-primary-ink);
}

.product-stock {
    margin-top: 0.5rem;
}

.stock-note {
    margin: 0 0 1.5rem;
}

.product-card--sold-out .product-image img {
    filter: grayscale(0.4);
    opacity: 0.8;
}

.product-card--sold-out .product-image__note {
    position: relative;
    z-index: 1;
    padding: 0.6rem 1.1rem;
    background-color: rgba(249, 248, 246, 0.92);
    color: var(--color-primary-ink);
}

.product-card--sold-out .product-price {
    color: var(--color-text-light);
}

/* ==========================================================================
   Courses — course cards (shared component)
   ========================================================================== */
.course-list {
    display: flex;
    flex-direction: column;
    gap: 3.5rem;
    max-width: 960px;
    margin: 0 auto;
    padding-bottom: 8rem;
}

.course-item {
    display: grid;
    grid-template-columns: 1fr 1.25fr;
    gap: 3rem;
    align-items: center;
    background-color: var(--color-paper);
    padding: 2rem;
    border: 1px solid rgba(44, 42, 40, 0.05);
    outline: 1px solid var(--hairline);
    outline-offset: -10px;
}

.course-video-placeholder {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background-color: #69745a;
    background-image: var(--grain), linear-gradient(160deg, #7d8a69 0%, #5f6a50 100%);
    background-size: 240px 240px, auto;
    display: flex;
    align-items: flex-end;
    justify-content: flex-start;
    padding: 1rem 1.25rem;
    color: rgba(255, 255, 255, 0.85);
    font-family: var(--font-body);
    font-size: 0.68rem;
    font-weight: 500;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    overflow: hidden;
}

/* A quiet play mark: a hairline circle and triangle */
.course-video-placeholder::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 64px;
    height: 64px;
    margin: -32px 0 0 -32px;
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    transition: transform 0.8s var(--ease-out), border-color 0.5s ease;
}

.course-video-placeholder::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    margin: -8px 0 0 -4px;
    border-style: solid;
    border-width: 8px 0 8px 13px;
    border-color: transparent transparent transparent rgba(255, 255, 255, 0.85);
}

.course-item:hover .course-video-placeholder::before {
    transform: scale(1.08);
    border-color: rgba(255, 255, 255, 0.9);
}

.course-body {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.course-body h3 {
    font-size: 1.75rem;
}

.course-body p {
    font-size: 1rem;
}

.course-meta {
    margin-top: 0.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--hairline);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.course-price {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    color: var(--color-primary-ink);
}

/* ==========================================================================
   Journal — entries set like a ledger / table of contents
   ========================================================================== */
.blog-list {
    max-width: 860px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    padding-bottom: 8rem;
}

.blog-post-card {
    position: relative;
    display: grid;
    grid-template-columns: 10rem 1fr;
    column-gap: 2.5rem;
    padding: 3.25rem 0;
}

.blog-post-card > * {
    grid-column: 2;
}

/* Hairline rule above each entry, inked in from the left */
.blog-post-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background-color: var(--hairline);
    transform-origin: left center;
    transition: transform 1.4s var(--ease-in-out) calc(var(--reveal-delay, 0ms) + 0.1s);
}

.js .blog-post-card.fade-up:not(.is-visible)::before {
    transform: scaleX(0);
}

.blog-date {
    grid-column: 1;
    grid-row: 1 / span 3;
    font-family: var(--font-body);
    font-size: 0.7rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    line-height: 1.8;
    color: var(--color-primary-ink);
    padding-top: 0.65rem;
    display: block;
}

.blog-post-card h2 {
    font-size: clamp(1.75rem, 3vw, 2.25rem);
    margin-bottom: 1.25rem;
    color: var(--color-text-dark);
    transition: color 0.5s ease;
}

.blog-post-card a:hover h2,
.blog-post-card a:focus-visible h2 {
    color: var(--color-primary-ink);
}

.blog-post-card p {
    margin-bottom: 1.25rem;
}

.read-more {
    justify-self: start;
    color: var(--color-text-dark);
}

/* ==========================================================================
   About
   ========================================================================== */
.about-layout {
    display: grid;
    grid-template-columns: 5fr 6fr;
    gap: 6rem;
    align-items: center;
    min-height: 80vh;
    padding-top: 5rem;
    padding-bottom: 4rem;
}

.about-image-wrapper {
    position: relative;
    padding: 2rem;
}

/* Offset sage panel behind the portrait */
.about-image-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 4rem;
    bottom: 4rem;
    background-color: var(--color-sage);
    background-image: var(--linen);
    z-index: 1;
    opacity: 0.18;
    border-radius: 999px 999px 0 0;
}

.about-image-placeholder {
    width: 100%;
    aspect-ratio: 3 / 4;
    background-color: var(--color-bg-alt);
    background-image: var(--linen);
    border: 1px solid var(--hairline);
    border-radius: 999px 999px 0 0;
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    color: var(--color-text-light);
    font-style: italic;
    overflow: hidden;
}

/* Images chosen in the Studio, shown inside the arches (js/site.js) */
.about-image-placeholder img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.about-image-placeholder img,
.arch-image {
    opacity: 0;
    transition: opacity 1.4s var(--ease-out);
}

.about-image-placeholder img.is-loaded,
.arch-image.is-loaded {
    opacity: 1;
}

.about-text h1 {
    font-size: clamp(2.5rem, 4.5vw, 3.75rem);
    margin-bottom: 2rem;
}

/* A drop cap, as in a well-set book */
.about-text .about-body > p:first-of-type::first-letter {
    font-family: var(--font-heading);
    float: left;
    font-size: 3.9em;
    line-height: 0.82;
    padding: 0.06em 0.1em 0 0;
    color: var(--color-primary);
}

.about-actions {
    margin: 2.5rem 0;
}

.video-card {
    margin-top: 3rem;
    padding: 0.875rem;
    background-color: var(--color-paper);
    border: 1px solid var(--hairline);
}

/* Video facade (About page) */
.video-facade {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    background-color: var(--color-bg-alt);
    background-image: var(--linen);
    overflow: hidden;
}

.video-facade img,
.video-embed {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border: 0;
}

.video-facade img {
    transition: transform 1.2s var(--ease-out);
}

.video-facade:hover img {
    transform: scale(1.02);
}

.video-embed {
    aspect-ratio: 16 / 9;
    height: auto;
}

.video-facade__play {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 68px;
    height: 68px;
    margin: -34px 0 0 -34px;
    border-radius: 50%;
    background-color: rgba(249, 248, 246, 0.92);
    border: 1px solid var(--hairline-strong);
    transition: transform 0.7s var(--ease-out), background-color 0.4s ease;
}

.video-facade__play::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    margin: -9px 0 0 -5px;
    border-style: solid;
    border-width: 9px 0 9px 15px;
    border-color: transparent transparent transparent var(--color-primary);
}

.video-facade:hover .video-facade__play,
.video-facade:focus-visible .video-facade__play {
    transform: scale(1.08);
    background-color: #fff;
}

/* ==========================================================================
   Product detail
   ========================================================================== */
.product-image-large {
    width: 100%;
    aspect-ratio: 1 / 1;
    background-color: var(--color-paper);
    background-image: var(--linen);
    border: 1px solid rgba(44, 42, 40, 0.06);
    outline: 1px solid var(--hairline);
    outline-offset: -18px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-image-large .product-numeral {
    font-size: clamp(4.5rem, 10vw, 7rem);
}

/* With a photo, the frame takes the photo's shape (the Studio crops product photos to 4:5) */
.product-image-large:has(img) {
    position: relative;
    aspect-ratio: 4 / 5;
    overflow: hidden;
}

.product-image-large img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* More photos: thumbnails beneath the main one; choosing one shows it above */
.product-thumbs {
    list-style: none;
    margin: 1rem 0 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(4.5rem, 1fr));
    gap: 0.75rem;
}

.product-thumbs[hidden] {
    display: none;
}

.product-thumb {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 5;
    padding: 0;
    border: 1px solid var(--hairline);
    background: var(--color-paper);
    cursor: pointer;
    overflow: hidden;
    opacity: 0.7;
    transition: opacity 0.3s ease, border-color 0.3s ease;
}

.product-thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-thumb:hover,
.product-thumb:focus-visible,
.product-thumb[aria-current="true"] {
    opacity: 1;
}

.product-thumb[aria-current="true"] {
    border-color: var(--color-primary-ink);
}

/* A page built in the Studio, with an optional image beside its text */
.post-layout.has-page-image {
    max-width: 72rem;
}

.has-page-image .post-header {
    max-width: 46rem;
    margin-left: auto;
    margin-right: auto;
}

.page-with-image {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
    gap: 4rem;
    align-items: start;
}

.page-image {
    margin: 0;
}

.page-image img {
    display: block;
    width: 100%;
    height: auto;
    border: 1px solid rgba(44, 42, 40, 0.06);
}

@media (min-width: 901px) {
    .page-image {
        position: sticky;
        top: calc(var(--header-h) + 2rem);
    }
}

@media (max-width: 900px) {
    .page-with-image {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
    padding: 6rem 0 4rem;
    background-color: var(--color-bg-alt);
    position: relative;
    border-top: 1px solid var(--hairline);
}

.newsletter-wrapper {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.footer-ornament {
    display: block;
    width: 1px;
    height: 3rem;
    margin: 0 auto 2rem;
    background-color: var(--hairline-strong);
}

.footer-title {
    font-size: clamp(1.75rem, 3vw, 2.25rem);
    margin-bottom: 1rem;
}

.newsletter-form {
    display: flex;
    justify-content: center;
    gap: 0;
    margin-top: 2.5rem;
}

.newsletter-form input {
    padding: 1.1rem 1.25rem;
    border: 1px solid var(--hairline-strong);
    border-right: none;
    flex-grow: 1;
    min-width: 0;
    font-family: var(--font-body);
    color: var(--color-text-dark);
    background-color: var(--color-bg);
    outline: none;
    font-size: 0.95rem;
    border-radius: 0;
    transition: border-color 0.4s ease, background-color 0.4s ease;
}

.newsletter-form input::placeholder {
    color: #8a8680;
}

.newsletter-form input:focus {
    border-color: var(--color-primary);
    background-color: #fff;
}

.newsletter-form input:focus-visible {
    outline: 1px solid var(--color-primary);
    outline-offset: 3px;
}

.footer-legal {
    font-size: 0.7rem;
    color: var(--color-text-light);
    text-transform: uppercase;
    letter-spacing: 0.18em;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.footer-legal p {
    font-size: inherit;
    margin: 0;
}

.footer-legal--spaced {
    margin-top: 5rem;
    padding-top: 2.5rem;
    border-top: 1px solid var(--hairline);
}

.footer-legal__links {
    display: flex;
    gap: 2rem;
}

.footer-legal__links a {
    color: var(--color-text-light);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.4s ease, color 0.4s ease;
}

.footer-legal__links a:hover,
.footer-legal__links a:focus-visible {
    color: var(--color-text-dark);
    border-bottom-color: var(--hairline-strong);
}

/* ==========================================================================
   Cross-document page transitions (progressive enhancement)
   ========================================================================== */
@media (prefers-reduced-motion: no-preference) {
    @view-transition {
        navigation: auto;
    }
}

::view-transition-old(root) {
    animation: tl-vt-out 0.35s cubic-bezier(0.4, 0, 1, 1) both;
}

::view-transition-new(root) {
    animation: tl-vt-in 0.7s var(--ease-out) 0.12s both;
}

::view-transition-group(site-header) {
    animation-duration: 0.5s;
}

@keyframes tl-vt-out { to { opacity: 0; } }
@keyframes tl-vt-in { from { opacity: 0; transform: translateY(10px); } }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1100px) {
    .hero-frame-bg {
        display: none;
    }
}

@media (max-width: 900px) {
    .about-layout {
        grid-template-columns: 1fr;
        gap: 3.5rem;
        padding-top: 3rem;
    }

    .about-image-wrapper {
        max-width: 26rem;
        width: 100%;
        margin: 0 auto;
    }

    .course-item {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    :root {
        --header-h: 4.5rem;
        --gutter: 1.5rem;
    }

    .logo {
        font-size: 1.25rem;
    }

    .mobile-menu-btn {
        display: block;
    }

    .nav-wrapper > nav {
        position: absolute; /* the fixed menu lives here; keep it out of the flex row */
    }

    /* Full-screen menu: a curtain lowers, then the links settle in */
    .nav-links {
        position: fixed;
        inset: 0;
        height: 100vh;
        height: 100dvh;
        background-color: var(--color-bg);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 1.75rem;
        z-index: 100;
        clip-path: inset(0 0 100% 0);
        visibility: hidden;
        transition: clip-path 0.8s var(--ease-in-out), visibility 0s linear 0.8s;
    }

    .nav-links.active {
        clip-path: inset(0);
        visibility: visible;
        transition: clip-path 0.8s var(--ease-in-out), visibility 0s;
    }

    .nav-links li {
        opacity: 0;
        transform: translateY(14px);
        transition: opacity 0.3s ease, transform 0.3s ease;
    }

    .nav-links.active li {
        opacity: 1;
        transform: none;
        transition: opacity 0.7s ease calc(0.3s + var(--i, 0) * 70ms), transform 0.9s var(--ease-out) calc(0.3s + var(--i, 0) * 70ms);
    }

    .nav-links li:nth-child(2) { --i: 1; }
    .nav-links li:nth-child(3) { --i: 2; }
    .nav-links li:nth-child(4) { --i: 3; }
    .nav-links li:nth-child(5) { --i: 4; }

    .nav-links a {
        font-family: var(--font-heading);
        font-size: 2rem;
        font-weight: 400;
        letter-spacing: 0;
        text-transform: none;
    }

    .nav-links a::after {
        right: 0;
    }

    .nav-links a[aria-current="page"] {
        font-style: italic;
    }

    .section {
        padding: 5rem 0;
    }

    .page-header {
        padding: 4rem 0 3rem;
    }

    .hero {
        min-height: 92vh;
        min-height: 92svh;
        text-align: center;
        align-items: flex-start;
        padding-top: calc(var(--header-h) + 3.5rem);
    }

    /* Wider than the screen: only the curve shows, framing the heading as if
       standing inside the doorway; the jambs never cross the text */
    .hero-arch-bg {
        left: 50%;
        right: auto;
        bottom: auto;
        top: calc(var(--header-h) + 0.5rem);
        width: 118vw;
        height: auto;
        margin-left: -59vw;
    }

    .hero-content {
        margin: 0 auto;
    }

    .hero .hero-subtitle {
        justify-content: center;
    }

    .hero .hero-subtitle::after {
        display: block;
    }

    .hero p {
        font-size: 1.05rem;
        margin: 1.75rem auto 2.25rem;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: stretch;
        max-width: 20rem;
        margin: 0 auto;
    }

    .features-grid {
        grid-template-columns: 1fr;
        margin-top: 3.5rem;
        gap: 2rem;
    }

    .feature-card {
        padding: 2.5rem 2.25rem;
    }

    .store-grid {
        grid-template-columns: minmax(0, 20rem);
        justify-content: center;
        gap: 3.5rem;
        padding-bottom: 5rem;
    }

    .course-list,
    .blog-list {
        padding-bottom: 5rem;
    }

    .course-item {
        padding: 1.25rem;
    }

    .blog-post-card {
        grid-template-columns: 1fr;
        padding: 2.5rem 0;
    }

    .blog-post-card > *,
    .blog-date {
        grid-column: 1;
        grid-row: auto;
    }

    .blog-date {
        padding-top: 0;
        margin-bottom: 0.75rem;
    }

    .about-image-wrapper {
        padding: 1.25rem;
    }

    .about-image-wrapper::before {
        right: 2.5rem;
        bottom: 2.5rem;
    }

    .newsletter-form {
        flex-direction: column;
        gap: 0.75rem;
    }

    .newsletter-form input {
        border-right: 1px solid var(--hairline-strong);
    }

    .footer-legal__links {
        gap: 1.5rem;
    }
}

/* ==========================================================================
   Reduced motion: everything visible, nothing moves
   ========================================================================== */
/* Field Note recordings */
.audio-player {
    display: grid;
    grid-template-columns: auto 1fr auto auto;
    align-items: center;
    gap: 1.1rem;
    margin: 0 0 3rem;
    padding: 1.1rem 1.4rem;
    background: var(--color-paper);
    border: 1px solid var(--hairline);
    outline: 1px solid var(--hairline);
    outline-offset: -7px;
}

.audio-player audio {
    display: none;
}

.audio-play {
    position: relative;
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    border: 1px solid var(--color-primary-deep);
    background: var(--color-primary-deep);
    cursor: pointer;
    transition: transform 0.4s var(--ease-out), background-color 0.3s ease;
}

.audio-play:hover,
.audio-play:focus-visible {
    transform: scale(1.05);
    background: var(--color-primary-ink);
}

.audio-play__icon {
    position: absolute;
    inset: 0;
    margin: auto;
    width: 0;
    height: 0;
    transform: translateX(2px);
    border-style: solid;
    border-width: 0.45rem 0 0.45rem 0.75rem;
    border-color: transparent transparent transparent #fdfcfa;
}

.is-playing .audio-play__icon {
    transform: none;
    width: 0.7rem;
    height: 0.85rem;
    border: none;
    border-left: 0.22rem solid #fdfcfa;
    border-right: 0.22rem solid #fdfcfa;
}

.audio-track {
    display: grid;
    gap: 0.35rem;
    min-width: 0;
}

.audio-label {
    font-size: 0.7rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--color-primary-ink);
}

.audio-seek {
    --progress: 0%;
    width: 100%;
    height: 1.25rem;
    margin: 0;
    background: transparent;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
}

.audio-seek::-webkit-slider-runnable-track {
    height: 2px;
    background: linear-gradient(to right, var(--color-primary-deep) var(--progress), var(--hairline-strong) var(--progress));
}

.audio-seek::-moz-range-track {
    height: 2px;
    background: var(--hairline-strong);
}

.audio-seek::-moz-range-progress {
    height: 2px;
    background: var(--color-primary-deep);
}

.audio-seek::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 0.8rem;
    height: 0.8rem;
    margin-top: calc(-0.4rem + 1px);
    border-radius: 50%;
    background: var(--color-primary-deep);
}

.audio-seek::-moz-range-thumb {
    width: 0.8rem;
    height: 0.8rem;
    border: none;
    border-radius: 50%;
    background: var(--color-primary-deep);
}

.audio-time {
    font-variant-numeric: tabular-nums;
    font-size: 0.85rem;
    color: var(--color-text-light);
    white-space: nowrap;
}

.audio-speed {
    min-width: 3rem;
    padding: 0.35rem 0.6rem;
    border: 1px solid var(--hairline-strong);
    background: transparent;
    color: var(--color-primary-ink);
    font: 500 0.8rem var(--font-body);
    cursor: pointer;
}

.audio-speed:hover,
.audio-speed:focus-visible {
    border-color: var(--color-primary-deep);
}

.is-unavailable .audio-play,
.is-unavailable .audio-seek,
.is-unavailable .audio-speed {
    opacity: 0.4;
    pointer-events: none;
}

.has-audio {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    margin-bottom: 0.75rem;
    font-size: 0.72rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--color-primary-ink);
}

.has-audio__icon {
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0.3rem 0 0.3rem 0.5rem;
    border-color: transparent transparent transparent currentColor;
}

@media (max-width: 600px) {
    .audio-player {
        grid-template-columns: auto 1fr auto;
        gap: 0.9rem;
        padding: 1rem;
    }

    .audio-speed {
        grid-column: 2 / -1;
        justify-self: end;
    }
}

/* Studio preview links */
.preview-bar {
    position: fixed;
    left: 50%;
    bottom: 1.25rem;
    transform: translateX(-50%);
    z-index: 200;
    width: min(46rem, calc(100% - 2rem));
    padding: 0.85rem 1.25rem;
    background: var(--color-text-dark);
    color: #f9f8f6;
    font-size: 0.9rem;
    line-height: 1.5;
    box-shadow: 0 10px 30px rgba(44, 42, 40, 0.25);
}

.preview-bar strong {
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-size: 0.75rem;
    color: #c9d4b5;
}

.is-preview .site-footer {
    padding-bottom: 7rem;
}

/* Courses can be switched off in the Studio (Site); js/site.js adds .courses-on when they're shown */
[data-requires="courses"] {
    display: none !important;
}

.courses-on [data-requires="courses"] {
    display: revert !important;
}

/* ==========================================================================
   Live content (rendered by js/content.js from the Studio)
   ========================================================================== */
.product-image-large {
    position: relative;
    overflow: hidden;
}

.product-image-large img,
.course-video-placeholder img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.course-video-placeholder:has(img)::before,
.course-video-placeholder:has(img)::after {
    content: none;
}

.course-lessons {
    font-size: 0.75rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--color-primary-ink);
    margin-bottom: 0.75rem;
}

.content-empty,
.content-missing {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem 1rem;
    font-family: var(--font-heading);
    font-style: italic;
    color: var(--color-text-light);
}

.content-missing h1 {
    font-style: normal;
    font-size: clamp(2rem, 4vw, 2.75rem);
}

.content-missing .btn {
    margin-top: 1rem;
    font-style: normal;
}

/* Journal entry */
.post-layout {
    max-width: 46rem;
    padding-top: 5rem;
    padding-bottom: 6rem;
}

.post-header {
    text-align: center;
    margin-bottom: 3.5rem;
}

.post-header .back-link {
    display: inline-flex;
    margin-bottom: 2.5rem;
}

.post-header .blog-date {
    display: block;
    margin-bottom: 1.25rem;
}

.post-header h1 {
    font-size: clamp(2.4rem, 5vw, 3.75rem);
    line-height: 1.12;
}

.post-lede {
    font-family: var(--font-heading);
    font-style: italic;
    font-size: 1.25rem;
    max-width: 36rem;
    margin: 1.5rem auto 0;
}

.post-header::after {
    content: '';
    display: block;
    width: 3rem;
    height: 1px;
    margin: 3rem auto 0;
    background: var(--hairline-strong);
}

.post-cover {
    margin: 0 0 3.5rem;
    outline: 1px solid var(--hairline);
    outline-offset: -14px;
}

.post-cover img {
    display: block;
    width: 100%;
    height: auto;
}

.prose {
    font-size: 1.125rem;
    line-height: 1.85;
}

.prose > * + * {
    margin-top: 1.4em;
}

.prose p {
    margin-bottom: 0;
    font-size: inherit;
}

.prose > p:first-child::first-letter {
    float: left;
    font-family: var(--font-heading);
    font-size: 4.1em;
    line-height: 0.85;
    padding: 0.08em 0.12em 0 0;
    color: var(--color-primary-ink);
}

.prose h2,
.prose h3 {
    margin-top: 2.2em;
}

.prose h2 {
    font-size: 1.85rem;
}

.prose h3 {
    font-size: 1.4rem;
}

.prose blockquote {
    margin-left: 0;
    padding: 0.25em 0 0.25em 1.5em;
    border-left: 1px solid var(--hairline-strong);
    font-family: var(--font-heading);
    font-style: italic;
    font-size: 1.3rem;
    line-height: 1.6;
    color: var(--color-text-dark);
}

.prose blockquote p {
    color: inherit;
}

.prose ul,
.prose ol {
    padding-left: 1.25em;
    color: var(--color-text-light);
}

.prose a {
    color: var(--color-primary-ink);
    text-decoration: underline;
    text-decoration-color: var(--hairline-strong);
    text-underline-offset: 0.2em;
}

.prose img {
    max-width: 100%;
    height: auto;
}

.prose hr {
    border: none;
    text-align: center;
    margin: 3em 0;
}

.prose hr::after {
    content: '· · ·';
    letter-spacing: 0.6em;
    color: var(--color-primary);
}

/* ==========================================================================
   Forms feedback, notices, private course page
   ========================================================================== */
.hp-field {
    position: absolute !important;
    left: -10000px;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.form-status {
    min-height: 1.6em;
    margin: 1rem 0 0;
    font-size: 0.95rem;
    color: var(--color-text-light);
}

.form-status:empty {
    min-height: 0;
    margin: 0;
}

.form-status[data-kind="ok"] {
    color: var(--color-primary-ink);
    font-family: var(--font-heading);
    font-style: italic;
    font-size: 1.1rem;
}

.form-status[data-kind="error"] {
    color: #8a3f33;
}

.checkout-actions .form-status,
.course-meta .form-status {
    flex-basis: 100%;
    text-align: right;
}

.notice-page {
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notice {
    text-align: center;
}

.notice h1 {
    font-size: clamp(2.6rem, 6vw, 4rem);
}

.notice .btn {
    margin-top: 2.5rem;
}

.notice-small {
    margin-top: 2rem;
    font-size: 0.9rem;
    color: var(--color-text-light);
    text-align: center;
}

.course-access {
    max-width: 58rem;
}

/* Downloads: files on Studio pages (/p/...) and the buyer's private downloads page */
.page-files {
    margin-top: 4rem;
}

.page-files > h2 {
    font-size: clamp(1.35rem, 2.6vw, 1.75rem);
    margin-bottom: 1.25rem;
}

.download-list {
    list-style: none;
    padding: 0;
    margin: 0;
    border-top: 1px solid var(--hairline);
}

.download {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 1.4rem 0;
    border-bottom: 1px solid var(--hairline);
}

.download h2,
.download h3 {
    margin: 0 0 0.3rem;
    font-size: clamp(1.15rem, 2.2vw, 1.4rem);
}

.download-meta {
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--color-text-light);
}

.download-locked {
    display: grid;
    gap: 0.25rem;
    text-align: right;
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--color-primary-ink);
}

.download-locked small {
    font-size: 0.85rem;
    font-weight: 400;
    letter-spacing: 0;
    text-transform: none;
    color: var(--color-text-light);
}

@media (max-width: 600px) {
    .download {
        flex-direction: column;
        align-items: flex-start;
    }

    .download-locked {
        text-align: left;
    }
}

.lesson-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 3.5rem;
}

.lesson-head {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: baseline;
    gap: 1.25rem;
    padding-bottom: 1rem;
    margin-bottom: 1.25rem;
    border-bottom: 1px solid var(--hairline);
}

.lesson-head h2 {
    margin: 0;
    font-size: clamp(1.35rem, 2.6vw, 1.75rem);
}

.lesson-number {
    font-family: var(--font-heading);
    font-style: italic;
    font-size: 1.4rem;
    color: var(--color-primary);
}

.lesson-duration {
    font-size: 0.75rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--color-text-light);
}

.lesson-stage {
    position: relative;
    aspect-ratio: 16 / 9;
    background: linear-gradient(160deg, #7a8263, #5f6a4e);
    outline: 1px solid var(--hairline);
    outline-offset: -14px;
    display: grid;
    place-items: center;
    overflow: hidden;
}

.lesson-stage iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.lesson-play {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    background: none;
    border: 0;
    color: #fdfcfa;
    font: 500 0.72rem var(--font-body);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    cursor: pointer;
}

.lesson-play__icon {
    width: 4.5rem;
    height: 4.5rem;
    border-radius: 50%;
    border: 1px solid rgba(253, 252, 250, 0.7);
    position: relative;
    transition: transform 0.6s var(--ease-out), background-color 0.4s ease;
}

.lesson-play__icon::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 54%;
    transform: translate(-50%, -50%);
    border-style: solid;
    border-width: 0.6rem 0 0.6rem 1rem;
    border-color: transparent transparent transparent #fdfcfa;
}

.lesson-play:hover .lesson-play__icon,
.lesson-play:focus-visible .lesson-play__icon {
    transform: scale(1.06);
    background-color: rgba(253, 252, 250, 0.12);
}

.lesson-unavailable {
    color: #fdfcfa;
    font-family: var(--font-heading);
    font-style: italic;
}

@media (max-width: 600px) {
    .lesson-head {
        grid-template-columns: auto 1fr;
    }

    .lesson-duration {
        grid-column: 2;
    }

    .checkout-actions .form-status,
    .course-meta .form-status {
        text-align: left;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-delay: 0s !important;
        transition-duration: 0.01ms !important;
        transition-delay: 0s !important;
    }

    .js .fade-up,
    .js .fade-up.is-visible {
        opacity: 1;
        transform: none;
    }

    .js .fade-up :is(.product-image, .product-image-large, .course-video-placeholder, .about-image-placeholder) {
        clip-path: none;
    }

    .js .fade-up:not(.is-visible)::before,
    .js .fade-up:not(.is-visible)::after,
    .js .fade-up:not(.is-visible) .hero-subtitle::before,
    .js .fade-up:not(.is-visible) .hero-subtitle::after,
    .js .fade-up:not(.is-visible) .eyebrow::before {
        transform: none;
    }

    .feature-card:hover,
    .js .feature-card.fade-up.is-visible:hover,
    a.product-card:hover .product-image,
    .bookmark.is-shown:hover,
    .bookmark.is-shown:focus-visible {
        transform: none;
    }

    .arch-line {
        stroke-dashoffset: 0;
    }
}
