/* ═══════════════════════════════════════════════════════════════════
   FIT & FAB — PUBLIC SITE STYLES
   No framework. Cascade layers keep global styles predictable and
   always overridable by Blazor scoped CSS (which is unlayered).

   Design tokens live in css/theme.css, which is loaded first (see
   App.razor) and declares the layer order below. Admin-panel styles
   live in css/admin.css, loaded only by AdminLayout — public visitors
   never download them.

   Layer order (later = higher priority):
     reset → tokens → base → layout → components → utilities
   ═══════════════════════════════════════════════════════════════════ */

@layer reset, tokens, base, layout, components, utilities;

/* ───────────────────────────────────────────────────────────────────
   RESET
   ─────────────────────────────────────────────────────────────────── */
@layer reset {
    *, *::before, *::after {
        box-sizing: border-box;
    }

    html {
        -webkit-text-size-adjust: 100%;
        text-size-adjust: 100%;
    }

    body {
        margin: 0;
    }

    h1, h2, h3, h4, h5, h6, p, figure, blockquote, dl, dd {
        margin: 0;
    }

    ul[class], ol[class] {
        margin: 0;
        padding: 0;
        list-style: none;
    }

    img, picture, svg, video {
        display: block;
        max-width: 100%;
        height: auto;
    }

    input, button, textarea, select {
        font: inherit;
        color: inherit;
    }

    button {
        background: none;
        border: 0;
        cursor: pointer;
    }

    a {
        color: inherit;
    }

    /* Modern focus ring: only for keyboard users, never on mouse click */
    :focus-visible {
        outline: 2px solid var(--primary);
        outline-offset: 3px;
        border-radius: 2px;
    }

    :focus:not(:focus-visible) {
        outline: none;
    }

    @media (prefers-reduced-motion: reduce) {
        *, *::before, *::after {
            animation-duration: 0.01ms !important;
            animation-iteration-count: 1 !important;
            transition-duration: 0.01ms !important;
            scroll-behavior: auto !important;
        }
    }
}


/* ───────────────────────────────────────────────────────────────────
   BASE
   ─────────────────────────────────────────────────────────────────── */
@layer base {
    html {
        scroll-behavior: smooth;
        /* Anchor links clear the sticky header */
        scroll-padding-top: calc(var(--header-h) + 1rem);
    }

    body {
        font-family: var(--font-body);
        font-size: var(--step-0);
        line-height: var(--leading-body);
        color: var(--text);
        background: var(--grad-page);
        background-attachment: fixed;
        min-height: 100vh;
        min-height: 100dvh;
        -webkit-font-smoothing: antialiased;
        text-rendering: optimizeLegibility;
    }

    h1, h2, h3, h4 {
        font-family: var(--font-display);
        line-height: var(--leading-tight);
        color: var(--ink-800);
        text-wrap: balance;
    }

    h1 { font-size: var(--step-5); font-weight: 800; }
    h2 { font-size: var(--step-4); font-weight: 800; }
    h3 { font-size: var(--step-2); font-weight: 700; }
    h4 { font-size: var(--step-1); font-weight: 700; }

    p {
        text-wrap: pretty;
    }

    a {
        color: var(--primary);
        text-decoration-thickness: 1px;
        text-underline-offset: 0.2em;
        transition: color var(--dur-fast) var(--ease-out);
    }

    a:hover {
        color: var(--primary-dark);
    }

    strong { font-weight: 700; }

    ::selection {
        background: var(--pink-200);
        color: var(--ink-800);
    }

    /* Blazor form validation */
    .valid.modified:not([type=checkbox]) { outline: 1px solid var(--success); }
    .invalid { outline: 1px solid var(--danger); }
    .validation-message { color: var(--danger); font-size: var(--step--1); }

    h1:focus { outline: none; }
}

/* ───────────────────────────────────────────────────────────────────
   LAYOUT PRIMITIVES
   ─────────────────────────────────────────────────────────────────── */
@layer layout {
    /* Center + gutter. The workhorse wrapper. */
    .container {
        width: 100%;
        max-width: var(--container);
        margin-inline: auto;
        padding-inline: var(--gutter);
    }

    .container-narrow {
        width: 100%;
        max-width: var(--container-narrow);
        margin-inline: auto;
        padding-inline: var(--gutter);
    }

    /* Vertical rhythm between page sections */
    .section {
        padding-block: var(--space-3xl);
    }

    .section-sm {
        padding-block: var(--space-2xl);
    }

    /* Auto-fitting grid — no column classes needed, no media queries.
       Override the minimum per instance with --min. */
    .auto-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(min(var(--min, 280px), 100%), 1fr));
        gap: var(--gap, var(--space-lg));
    }

    /* Flex row that wraps gracefully */
    .cluster {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: var(--gap, var(--space-sm));
    }

    /* Vertical stack with consistent gaps */
    .stack {
        display: flex;
        flex-direction: column;
        gap: var(--gap, var(--space-md));
    }

    /* Full-bleed band that escapes its container */
    .bleed {
        width: 100vw;
        margin-inline: calc(50% - 50vw);
    }
}

/* ───────────────────────────────────────────────────────────────────
   COMPONENTS
   ─────────────────────────────────────────────────────────────────── */
@layer components {

    /* ── Buttons ─────────────────────────────────────────────────── */
    .btn {
        --btn-bg: var(--primary);
        --btn-fg: var(--text-invert);
        --btn-border: transparent;

        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 0.5em;
        padding: 0.7rem 1.6rem;
        font-size: var(--step--1);
        font-weight: 700;
        letter-spacing: var(--tracking-wide);
        text-transform: uppercase;
        text-decoration: none;
        text-align: center;
        white-space: nowrap;
        cursor: pointer;
        border: 1.5px solid var(--btn-border);
        border-radius: var(--radius-pill);
        background: var(--btn-bg);
        color: var(--btn-fg);
        transition: transform var(--dur) var(--ease-out),
                    box-shadow var(--dur) var(--ease-out),
                    background-color var(--dur) var(--ease-out),
                    color var(--dur) var(--ease-out);
    }

    .btn:hover {
        color: var(--btn-fg);
        transform: translateY(-2px);
    }

    .btn:active {
        transform: translateY(0);
    }

    .btn-primary {
        --btn-bg: var(--primary);
        --btn-fg: var(--text-invert);
        background: var(--grad-pink);
        box-shadow: var(--shadow-sm);
    }

    .btn-primary:hover {
        box-shadow: var(--shadow-md);
    }

    .btn-outline {
        --btn-bg: transparent;
        --btn-fg: var(--primary);
        --btn-border: var(--primary);
    }

    .btn-outline:hover {
        --btn-bg: var(--primary);
        --btn-fg: var(--text-invert);
    }

    .btn-ghost {
        --btn-bg: transparent;
        --btn-fg: var(--ink-800);
        --btn-border: transparent;
        text-transform: none;
        letter-spacing: normal;
    }

    .btn-ghost:hover {
        --btn-bg: var(--pink-50);
        --btn-fg: var(--primary);
    }

    /* On dark / photographic backgrounds */
    .btn-on-dark {
        --btn-bg: var(--surface);
        --btn-fg: var(--primary);
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.22);
    }

    .btn-on-dark:hover {
        --btn-bg: var(--primary);
        --btn-fg: var(--text-invert);
    }

    .btn-lg {
        padding: 0.9rem 2.2rem;
        font-size: var(--step-0);
    }

    .btn-sm {
        padding: 0.5rem 1.1rem;
        font-size: 0.74rem;
    }

    .btn-block {
        width: 100%;
    }

    /* ── Cards ───────────────────────────────────────────────────── */
    .card {
        background: var(--surface);
        border: 1.5px solid var(--border-subtle);
        border-radius: var(--radius-lg);
        box-shadow: var(--shadow-sm);
        overflow: hidden;
    }

    .card-pad {
        padding: var(--space-lg);
    }

    .card-lift {
        transition: transform var(--dur) var(--ease-out),
                    box-shadow var(--dur) var(--ease-out);
    }

    .card-lift:hover {
        transform: translateY(-5px);
        box-shadow: var(--shadow-lg);
    }

    /* ── Section headings ────────────────────────────────────────── */
    .eyebrow {
        display: block;
        font-size: 0.76rem;
        font-weight: 700;
        letter-spacing: var(--tracking-wider);
        text-transform: uppercase;
        color: var(--secondary);
        margin-bottom: var(--space-xs);
    }

    .section-title {
        font-size: var(--step-4);
        font-weight: 800;
        color: var(--primary);
        margin-bottom: var(--space-xs);
    }

    .section-sub {
        color: var(--text-light);
        font-size: var(--step-1);
        max-width: 60ch;
    }

    .section-head {
        text-align: center;
        margin-bottom: var(--space-xl);
    }

    .section-head .section-sub {
        margin-inline: auto;
    }

    /* Trailing call-to-action under a section's content */
    .section-cta {
        margin-top: var(--space-xl);
    }

    /* Decorative rule under a heading */
    .rule {
        width: 68px;
        height: 3px;
        border: 0;
        margin: var(--space-sm) auto var(--space-lg);
        border-radius: var(--radius-pill);
        background: var(--grad-brand);
    }

    /* ── Badges / pills ─────────────────────────────────────────── */
    .badge {
        display: inline-block;
        padding: 0.25rem 0.75rem;
        font-size: 0.66rem;
        font-weight: 700;
        letter-spacing: var(--tracking-wider);
        text-transform: uppercase;
        border-radius: var(--radius-pill);
        background: var(--pink-100);
        color: var(--pink-700);
    }

    .badge-solid {
        background: var(--primary);
        color: var(--text-invert);
    }

    /* ── Forms ──────────────────────────────────────────────────── */
    .field {
        display: flex;
        flex-direction: column;
        gap: 0.3rem;
    }

    .label {
        font-size: var(--step--1);
        font-weight: 600;
        color: var(--ink-700);
    }

    .input,
    .textarea,
    .select {
        width: 100%;
        padding: 0.7rem 0.9rem;
        font-size: var(--step-0);
        color: var(--text);
        background: var(--bg-field);
        border: 1.5px solid var(--border);
        border-radius: var(--radius-sm);
        transition: border-color var(--dur-fast) var(--ease-out),
                    box-shadow var(--dur-fast) var(--ease-out);
    }

    .input:focus,
    .textarea:focus,
    .select:focus {
        outline: none;
        border-color: var(--primary);
        box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 18%, transparent);
    }

    .textarea {
        min-height: 8rem;
        resize: vertical;
    }

    .hint {
        font-size: var(--step--1);
        color: var(--text-subtle);
    }

    /* ── Tables ─────────────────────────────────────────────────── */
    .table-wrap {
        overflow-x: auto;
        border-radius: var(--radius-md);
        box-shadow: var(--shadow-sm);
        background: var(--surface);
    }

    .table {
        width: 100%;
        border-collapse: collapse;
    }

    .table th {
        padding: 0.85rem 1rem;
        text-align: left;
        font-size: var(--step--1);
        letter-spacing: 0.04em;
        text-transform: uppercase;
        background: var(--primary);
        color: var(--text-invert);
        white-space: nowrap;
    }

    .table td {
        padding: 0.8rem 1rem;
        border-top: 1px solid var(--pink-100);
        font-size: var(--step--1);
        color: var(--text-light);
    }

    .table tbody tr:nth-child(even) td {
        background: var(--surface-tint);
    }

    /* ── Prose ──────────────────────────────────────────────────── */
    .prose {
        max-width: 70ch;
        color: #555;
        line-height: var(--leading-body);
    }

    .prose > * + * {
        margin-top: var(--space-md);
    }

    .prose h3 {
        color: var(--primary);
        margin-top: var(--space-lg);
    }

    .prose ul {
        margin-left: 1.2rem;
        list-style: disc;
    }

    .prose li + li {
        margin-top: 0.4rem;
    }

    /* ── Error UI (Blazor built-ins) ────────────────────────────── */
    #blazor-error-ui {
        display: none;
        position: fixed;
        inset-inline: 0;
        bottom: 0;
        z-index: 1000;
        padding: 0.8rem 1.2rem;
        background: var(--ink-800);
        color: var(--text-invert);
        text-align: center;
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.25);
    }

    #blazor-error-ui .dismiss {
        cursor: pointer;
        float: right;
    }

    .blazor-error-boundary {
        padding: 1rem 1.25rem;
        background: #b32121;
        color: #fff;
        border-radius: var(--radius-sm);
    }

    .blazor-error-boundary::after {
        content: "An error has occurred.";
    }

    /* ── Scroll reveals ──────────────────────────────────────────
       Driven by IntersectionObserver in effects.js. The previous version
       used animation-timeline: view(), which is Chromium-only.

       Everything is gated on html.js-reveals, a class effects.js adds
       only once the observer is live — and removes again if the observer
       never fires. Without JS nothing here applies, so content is never
       left hidden. Deliberately NOT wrapped in @supports: that was the
       bug, since it confined these rules to Chromium too. */
    html.js-reveals .reveal-stagger > *,
    html.js-reveals .section-head > *,
    html.js-reveals .teaser-copy > *,
    html.js-reveals .split-intro > *,
    html.js-reveals .prose > *,
    html.js-reveals .ffp-prose > *,
    html.js-reveals .about-row-body > *,
    html.js-reveals .story-prose > *,
    html.js-reveals .reveal,
    html.js-reveals .explore-reveal,
    html.js-reveals .reveal-flip,
    html.js-reveals .gg-cell {
        opacity: 0;
        transform: translateY(22px);
        transition: opacity 0.6s var(--ease-out) var(--reveal-delay, 0ms),
                    transform 0.6s var(--ease-out) var(--reveal-delay, 0ms);
    }

    html.js-reveals .reveal-stagger > *.is-revealed,
    html.js-reveals .section-head > *.is-revealed,
    html.js-reveals .teaser-copy > *.is-revealed,
    html.js-reveals .split-intro > *.is-revealed,
    html.js-reveals .prose > *.is-revealed,
    html.js-reveals .ffp-prose > *.is-revealed,
    html.js-reveals .about-row-body > *.is-revealed,
    html.js-reveals .story-prose > *.is-revealed,
    html.js-reveals .reveal.is-revealed,
    html.js-reveals .explore-reveal.is-revealed,
    html.js-reveals .reveal-flip.is-revealed,
    html.js-reveals .gg-cell.is-revealed {
        opacity: 1;
        transform: none;
    }

    /* Explore rows enter from the side their media sits on. */
    html.js-reveals .explore-reveal { transform: translateX(-40px); }
    html.js-reveals .explore-reveal:nth-child(even) { transform: translateX(40px); }

    /* Flip variant for photos where a rotate reads better than a slide.
       Needs perspective on an ancestor to look three-dimensional. */
    html.js-reveals .reveal-flip { transform: rotateY(-90deg); }

    @media (prefers-reduced-motion: reduce) {
        html.js-reveals .reveal-flip { transform: none; }
    }
}

/* ───────────────────────────────────────────────────────────────────
   UTILITIES
   ─────────────────────────────────────────────────────────────────── */
@layer utilities {
    .text-center { text-align: center; }
    .text-left   { text-align: left; }

    .text-primary { color: var(--primary); }
    .text-muted   { color: var(--text-light); }
    .text-invert  { color: var(--text-invert); }
    .text-danger  { color: var(--danger); }

    .uppercase { text-transform: uppercase; letter-spacing: var(--tracking-wide); }

    .mt-0 { margin-top: 0; }
    .mb-0 { margin-bottom: 0; }
    .mt-auto { margin-top: auto; }

    .full { width: 100%; }

    /* Accessible hiding — visible to screen readers only */
    .sr-only {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip-path: inset(50%);
        white-space: nowrap;
        border: 0;
    }

    .no-scroll { overflow: hidden; }

    /* Universal clickable-affordance baseline — every button, link, and
       anything marked role="button" (our clickable images included, since
       cursor is inherited by their child <img>) shows a pointer on hover.
       Component-scoped CSS is unlayered, so it still wins over this and
       can restore the disabled/not-allowed cursor where needed (see
       .provider-btn.is-disabled in Login.razor.css). */
    button,
    .btn,
    a,
    [role="button"],
    input[type="button"],
    input[type="submit"],
    input[type="reset"],
    select,
    summary {
        cursor: pointer;
    }

    button:disabled,
    input:disabled,
    select:disabled,
    [aria-disabled="true"] {
        cursor: not-allowed;
    }
}

/* ═══════════════════════════════════════════════════════════════════
   LEGACY SHARED PAGE STYLES  (.ffp-*)
   Still consumed by About.razor. Kept unlayered-in-components so the
   existing pages render exactly as before. Prefer the component
   classes above for anything new.
   ═══════════════════════════════════════════════════════════════════ */
@layer components {
    .ffp {
        max-width: var(--container);
        margin: 0 auto;
        padding: 0 1.5rem;
    }

    .ffp-hero {
        text-align: center;
        padding: 3rem 1.5rem 2.5rem;
        background: var(--grad-brand);
        color: #fff;
        margin-bottom: 2.5rem;
    }
    .ffp-hero h1 {
        font-size: var(--step-4);
        font-weight: 800;
        margin: 0 0 0.6rem;
        color: #fff;
        text-shadow: 0 2px 12px rgba(0,0,0,0.18);
    }
    .ffp-hero p {
        font-size: 1.02rem;
        max-width: 640px;
        margin: 0 auto;
        color: rgba(255,255,255,0.9);
        line-height: 1.6;
    }

    .ffp-section { padding: 0 0 3rem; }
    .ffp-h2 {
        font-size: 1.7rem;
        font-weight: 800;
        color: var(--primary);
        text-align: center;
        margin-bottom: 0.4rem;
    }
    .ffp-sub {
        text-align: center;
        color: var(--secondary);
        font-size: 0.95rem;
        margin-bottom: 2rem;
    }
    .ffp-kicker {
        display: block;
        text-align: center;
        color: var(--secondary);
        font-weight: 700;
        font-size: 0.78rem;
        letter-spacing: var(--tracking-wider);
        text-transform: uppercase;
        margin-bottom: 0.6rem;
    }

    .ffp-prose {
        max-width: 780px;
        margin: 0 auto 2.5rem;
        color: #555;
        font-size: 1rem;
        line-height: 1.8;
    }
    .ffp-prose h3 {
        color: var(--primary);
        font-size: 1.25rem;
        font-weight: 700;
        margin: 1.75rem 0 0.6rem;
    }
    .ffp-prose p { margin-bottom: 1rem; }
    .ffp-prose ul { margin: 0 0 1rem 1.2rem; list-style: disc; }
    .ffp-prose li { margin-bottom: 0.4rem; }

    .ffp-panel {
        background: #fff;
        border-radius: 16px;
        padding: 1.9rem;
        box-shadow: var(--shadow-sm);
        border: 1.5px solid var(--border-subtle);
        margin-bottom: 1.5rem;
    }
    .ffp-panel h3 { color: var(--primary); font-size: 1.2rem; font-weight: 700; margin: 0 0 0.5rem; }
    .ffp-panel p { color: #555; line-height: 1.7; margin: 0 0 0.6rem; }

    .ffp-grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%),1fr)); gap: 1.5rem; }
    .ffp-grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%),1fr)); gap: 1.5rem; }

    .ffp-btn {
        display: inline-block;
        background: var(--grad-pink);
        color: #fff;
        text-decoration: none;
        border: none;
        padding: 0.65rem 1.8rem;
        border-radius: var(--radius-pill);
        font-weight: 700;
        font-size: 0.82rem;
        letter-spacing: var(--tracking-wide);
        cursor: pointer;
        transition: transform var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out);
        box-shadow: var(--shadow-sm);
    }
    .ffp-btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); color:#fff; }
    .ffp-btn-outline {
        display: inline-block;
        background: transparent;
        color: var(--primary);
        text-decoration: none;
        border: 1.5px solid var(--primary);
        padding: 0.6rem 1.7rem;
        border-radius: var(--radius-pill);
        font-weight: 700;
        font-size: 0.8rem;
        letter-spacing: var(--tracking-wide);
        cursor: pointer;
        transition: all var(--dur) var(--ease-out);
    }
    .ffp-btn-outline:hover { background: var(--primary); color: #fff; }
    .ffp-center { text-align: center; }

    .ffp-instructor {
        background: #fff;
        border-radius: 16px;
        overflow: hidden;
        box-shadow: var(--shadow-sm);
        border: 1.5px solid var(--border-subtle);
        transition: transform var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out);
    }
    .ffp-instructor:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
    .ffp-instructor-photo {
        height: 130px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 3.2rem;
        background: linear-gradient(135deg, var(--plum-500) 0%, var(--pink-500) 100%);
        color: #fff;
    }
    .ffp-instructor-body { padding: 1.25rem; }
    .ffp-instructor-body h3 { color: var(--ink-800); font-size: 1.1rem; font-weight: 700; margin: 0 0 0.15rem; }
    .ffp-instructor-role { color: var(--secondary); font-size: 0.8rem; font-weight: 600; margin-bottom: 0.6rem; }
    .ffp-instructor-body p { color: #666; font-size: 0.87rem; line-height: 1.6; margin: 0; }

    .ffp-class {
        background: #fff;
        border-radius: 14px;
        padding: 1.4rem 1.5rem;
        box-shadow: var(--shadow-xs);
        border-left: 4px solid var(--primary);
        margin-bottom: 1.1rem;
    }
    .ffp-class h3 { color: var(--primary); font-size: 1.1rem; font-weight: 700; margin: 0 0 0.4rem; }
    .ffp-class p { color: #555; font-size: 0.92rem; line-height: 1.65; margin: 0; }

    .ffp-table-wrap { overflow-x: auto; margin-bottom: 2rem; }
    .ffp-table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 12px; overflow: hidden; box-shadow: var(--shadow-xs); }
    .ffp-table th { background: var(--primary); color: #fff; padding: 0.8rem 1rem; text-align: left; font-size: 0.85rem; letter-spacing: 0.03em; }
    .ffp-table td { padding: 0.75rem 1rem; border-top: 1px solid #f3e0ee; font-size: 0.88rem; color: #555; }
    .ffp-table tr:nth-child(even) td { background: var(--bg-field); }

    .ffp-price-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(230px, 100%),1fr)); gap: 1.5rem; max-width: 1000px; margin: 0 auto; }
    .ffp-price-card {
        background: #fff;
        border-radius: 18px;
        padding: 2rem 1.5rem;
        text-align: center;
        box-shadow: var(--shadow-sm);
        border: 2px solid var(--border-subtle);
        display: flex;
        flex-direction: column;
        transition: transform var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out);
    }
    .ffp-price-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
    .ffp-price-card.featured { border-color: var(--primary); background: linear-gradient(165deg, #fff 55%, #fff0f7 100%); }
    .ffp-price-badge {
        align-self: center;
        background: var(--primary); color: #fff;
        font-size: 0.62rem; font-weight: 700; letter-spacing: 0.1em;
        padding: 0.25rem 0.8rem; border-radius: 20px; margin-bottom: 0.8rem;
    }
    .ffp-price-name { font-size: 1.05rem; font-weight: 800; color: var(--ink-800); margin-bottom: 0.25rem; text-transform: uppercase; letter-spacing: 0.03em; }
    .ffp-price-valid { font-size: 0.82rem; color: #999; margin-bottom: 0.9rem; }
    .ffp-price-amount { font-size: 1.9rem; font-weight: 800; color: var(--primary); margin-bottom: 1.1rem; }
    .ffp-price-amount small { font-size: 0.8rem; color: var(--secondary); font-weight: 600; }
    .ffp-price-card .ffp-btn { margin-top: auto; }

    .ffp-contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%),1fr)); gap: 1.25rem; margin-bottom: 2.5rem; }
    .ffp-contact-item {
        background: #fff; border-radius: 14px; padding: 1.5rem; text-align: center;
        box-shadow: var(--shadow-xs); border: 1.5px solid var(--border-subtle);
    }
    .ffp-contact-icon { font-size: 2rem; margin-bottom: 0.6rem; }
    .ffp-contact-item h3 { color: var(--primary); font-size: 1rem; margin: 0 0 0.35rem; }
    .ffp-contact-item p { color: #555; font-size: 0.9rem; margin: 0; line-height: 1.5; }
    .ffp-contact-item a { color: var(--secondary); text-decoration: none; }
    .ffp-contact-item a:hover { text-decoration: underline; }

    .ffp-faq { max-width: 780px; margin: 0 auto; }
    .ffp-faq-item { background: #fff; border-radius: 12px; padding: 1.1rem 1.4rem; margin-bottom: 0.9rem; box-shadow: var(--shadow-xs); }
    .ffp-faq-item h4 { color: var(--primary); font-size: 0.98rem; margin: 0 0 0.35rem; }
    .ffp-faq-item p { color: #555; font-size: 0.9rem; line-height: 1.6; margin: 0; }

    .ffp-socials { display: flex; gap: 1rem; justify-content: center; margin-top: 0.5rem; }
    .ffp-social {
        width: 44px; height: 44px; border-radius: 50%;
        display: inline-flex; align-items: center; justify-content: center;
        background: var(--primary); color: #fff; font-size: 1.2rem; text-decoration: none;
        transition: transform var(--dur) var(--ease-out), background var(--dur) var(--ease-out);
    }
    .ffp-social:hover { transform: translateY(-3px); background: var(--primary-dark); color:#fff; }

    .ffp-login-card {
        max-width: 400px; margin: 0 auto; background: #fff; border-radius: 18px;
        padding: 2.25rem 2rem; box-shadow: var(--shadow-md);
        border: 1.5px solid var(--border-subtle);
    }
    .ffp-login-card h2 { color: var(--primary); text-align: center; margin: 0 0 1.5rem; font-size: 1.5rem; }
    .ffp-field { margin-bottom: 1rem; }
    .ffp-field label { display: block; font-size: 0.8rem; font-weight: 600; color: var(--ink-700); margin-bottom: 0.3rem; }
    .ffp-field input {
        width: 100%; box-sizing: border-box; padding: 0.7rem 0.9rem;
        border: 1.5px solid var(--border); border-radius: 8px; font-size: 0.92rem; background: var(--bg-field);
    }
    .ffp-field input:focus { outline: none; border-color: var(--primary); }
    .ffp-login-card .ffp-btn { width: 100%; margin-top: 0.5rem; }
    .ffp-login-note { text-align: center; font-size: 0.82rem; color: #999; margin-top: 1rem; }
}

/* Legacy: content offset used by MainLayout */
@layer base {
    .content {
        padding-top: 1.1rem;
    }
}

/* ═══════════════════════════════════════════════════════════════════
   MODERN EFFECTS LAYER
   Site-wide polish. Unlayered so it sits above the cascade layers.
   All motion is gated behind prefers-reduced-motion / hover where it
   matters, and no rule hides content if the JS never runs.
   ═══════════════════════════════════════════════════════════════════ */

/* Smooth in-page scrolling (anchor jumps, "Watch Our Story", etc.) */
@media (prefers-reduced-motion: no-preference) {
    html { scroll-behavior: smooth; }
}

/* Brand text selection */
::selection {
    background: color-mix(in srgb, var(--primary) 28%, transparent);
    color: var(--ink-800);
}

/* Brand scrollbar (pointer screens only) */
@media (min-width: 641px) {
    * {
        scrollbar-width: thin;
        scrollbar-color: color-mix(in srgb, var(--primary) 55%, transparent) transparent;
    }
    *::-webkit-scrollbar { width: 10px; height: 10px; }
    *::-webkit-scrollbar-thumb {
        background: color-mix(in srgb, var(--primary) 45%, transparent);
        border-radius: 8px;
        border: 2px solid transparent;
        background-clip: padding-box;
    }
    *::-webkit-scrollbar-thumb:hover { background: var(--primary); }
}

/* Scroll progress bar (element created by effects.js) */
.scroll-progress {
    position: fixed;
    inset: 0 0 auto 0;
    height: 3px;
    z-index: 300;
    transform: scaleX(0);
    transform-origin: 0 50%;
    background: var(--grad-pink);
    pointer-events: none;
    will-change: transform;
}

/* Back-to-top button (element created by effects.js) — a ring around the
   button fills in as the page scrolls, echoing the top progress bar. */
.scroll-top-btn {
    position: fixed;
    right: var(--space-lg);
    bottom: var(--space-lg);
    z-index: 300;
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: var(--grad-brand);
    color: #fff;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    opacity: 0;
    visibility: hidden;
    transform: scale(0.6);
    transition: opacity var(--dur-slow) var(--ease-out),
                transform var(--dur-slow) cubic-bezier(0.34, 1.56, 0.64, 1),
                box-shadow var(--dur) var(--ease-out),
                filter var(--dur) var(--ease-out);
}

.scroll-top-btn.is-visible {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
}

.scroll-top-btn:hover,
.scroll-top-btn:focus-visible {
    box-shadow: var(--shadow-lg);
    filter: brightness(1.08);
}

.scroll-top-btn:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 3px;
}

.scroll-top-btn:active {
    filter: brightness(0.95);
}

.scroll-top-btn i {
    position: relative;
    z-index: 1;
    font-size: 0.9rem;
    transition: transform var(--dur) var(--ease-out);
}

.scroll-top-btn:hover i {
    transform: translateY(-2px);
}

/* Progress ring: -90deg so the fill starts at 12 o'clock, not 3 o'clock */
.scroll-top-ring {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.scroll-top-ring-bg,
.scroll-top-ring-fg {
    fill: none;
    stroke-width: 2.5;
}

.scroll-top-ring-bg {
    stroke: rgba(255, 255, 255, 0.28);
}

.scroll-top-ring-fg {
    stroke: #fff;
    stroke-linecap: round;
    transition: stroke-dashoffset var(--dur) var(--ease-out);
}

@media (prefers-reduced-motion: reduce) {
    .scroll-top-btn {
        transition: opacity var(--dur) var(--ease-out);
    }

    .scroll-top-btn i {
        transition: none;
    }

    .scroll-top-btn:hover i {
        transform: none;
    }

    .scroll-top-ring-fg {
        transition: none;
    }
}

@media (max-width: 640px) {
    .scroll-top-btn {
        right: var(--space-md);
        bottom: var(--space-md);
        width: 42px;
        height: 42px;
    }
}

/* Header elevates + subtly condenses once the page is scrolled */
.site-header {
    transition: box-shadow 0.3s var(--ease-out), background-color 0.3s var(--ease-out);
}
.site-header.is-scrolled {
    box-shadow: 0 6px 24px rgba(28, 0, 32, 0.12);
}
.site-header.is-scrolled .header-inner {
    min-height: calc(var(--header-h) - 10px);
    transition: min-height 0.3s var(--ease-out);
}

/* Tactile button press + brand focus ring */
.btn:active { transform: scale(0.97); }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

/* Blazor's FocusOnNavigate focuses the page <h1> (tabindex="-1") after each
   navigation, which would otherwise draw a focus ring around the hero title.
   Suppress the ring on these programmatic, non-interactive focus targets. */
[tabindex="-1"]:focus,
[tabindex="-1"]:focus-visible {
    outline: none;
}

/* Animated gradient on the hero accent word */
@media (prefers-reduced-motion: no-preference) {
    .jumbo-title em {
        background-size: 220% 220%;
        animation: grad-pan 7s ease infinite;
    }
}
@keyframes grad-pan {
    0%, 100% { background-position: 0% 50%; }
    50%      { background-position: 100% 50%; }
}

/* 3D tilt (opt-in via data-tilt; set by effects.js). Defaults to flat so
   it's inert without JS or with reduced motion. */
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
    [data-tilt] {
        transform: perspective(760px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
        transition: transform 0.25s var(--ease-out);
        transform-style: preserve-3d;
    }
}

/* ───────────────────────────────────────────────────────────────────
   REUSABLE SPLIT LAYOUT
   Full-width "intro on the left, image+text rows on the right" pattern.
   Global (not component-scoped) so any page can reuse the .split-* classes.
   ─────────────────────────────────────────────────────────────────── */
.split-grid {
    display: grid;
    grid-template-columns: minmax(260px, 360px) 1fr;
    gap: clamp(2rem, 5vw, 4.5rem);
    align-items: start;
}

/* Intro sticks alongside the scrolling list on wide screens */
.split-intro {
    position: sticky;
    top: calc(var(--header-h, 76px) + 1.5rem);
}

.split-heading {
    margin: var(--space-xs) 0 var(--space-md);
    font-size: var(--step-4);
    color: var(--primary);
}

.split-lead {
    margin-bottom: var(--space-lg);
    font-size: var(--step-1);
    line-height: 1.7;
    color: var(--text-light);
}

.split-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.split-item {
    display: grid;
    grid-template-columns: clamp(210px, 34%, 320px) 1fr;
    gap: clamp(1rem, 3vw, 2rem);
    align-items: center;
    padding-bottom: var(--space-lg);
    border-bottom: 1px solid var(--border-subtle);
}

.split-item:last-child {
    padding-bottom: 0;
    border-bottom: none;
}

.split-thumb {
    position: relative;
    /* No forced aspect-ratio/crop — the image renders at its own natural
       proportions, just scaled to the column width. */
    font-size: clamp(2rem, 4vw, 3rem);
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: box-shadow var(--dur) var(--ease-out);
}

.split-thumb:hover,
.split-thumb:focus-visible {
    box-shadow: var(--shadow-md);
}

.split-thumb:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Natural size — scales to the column's width, height follows the image's
   own aspect ratio (no crop, no letterboxing). */
.split-thumb img {
    display: block;
    width: 100%;
    height: auto;
    transition: transform 0.45s var(--ease-out);
}

.split-thumb:hover img,
.split-thumb:focus-visible img {
    transform: scale(1.08);
}

/* Small zoom hint, only visible on hover/focus */
.split-thumb-zoom {
    position: absolute;
    z-index: 2;
    right: 8px;
    bottom: 8px;
    width: 24px;
    height: 24px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.45);
    color: #fff;
    font-size: 0.7rem;
    opacity: 0;
    transition: opacity var(--dur) var(--ease-out);
}

.split-thumb:hover .split-thumb-zoom,
.split-thumb:focus-visible .split-thumb-zoom {
    opacity: 1;
}

/* Touch devices have no hover, so the hint would otherwise never show */
@media (hover: none) {
    .split-thumb-zoom {
        opacity: 1;
    }
}

@media (prefers-reduced-motion: reduce) {
    .split-thumb img,
    .split-thumb-zoom {
        transition: none;
    }

    .split-thumb:hover img,
    .split-thumb:focus-visible img {
        transform: none;
    }
}

/* ── Full-page loading splash: flipping logo (see App.razor #app-loader) ──
   Shown immediately since it's the first thing in <body>; effects.js hides
   it once the page's assets finish loading (or after a max wait, so one
   slow request can't strand it on screen). */
#app-loader {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: grid;
    place-items: center;
    background: var(--ink-800);
    transition: opacity 0.4s ease;
    /* CSS-only failsafe: if effects.js ever fails to run, this alone
       still clears the splash after a few seconds so the site can never
       get stranded behind it. */
    animation: app-loader-failsafe 0s linear 6s forwards;
}

#app-loader.is-hidden {
    opacity: 0;
    pointer-events: none;
}

@keyframes app-loader-failsafe {
    to {
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
    }
}

.app-loader-logo {
    width: 96px;
    height: 96px;
    object-fit: contain;
    animation: logo-flip 1.4s ease-in-out infinite;
}

@keyframes logo-flip {
    0% {
        transform: rotateY(0deg);
    }

    50% {
        transform: rotateY(180deg);
    }

    100% {
        transform: rotateY(360deg);
    }
}

@media (prefers-reduced-motion: reduce) {
    .app-loader-logo {
        animation: none;
    }
}

/* ── Lazy-image fade-in: site-wide, opt-in via the "lazy-fade" class ──
   effects.js adds this class to every <img loading="lazy"> and removes
   the opacity once it actually finishes loading, so slow images fade in
   instead of popping in abruptly — or, worse, sitting there as a blank/
   white box while the file downloads. Purely additive: if the JS never
   runs, the class is never added and images display normally. */
.lazy-fade {
    opacity: 0;
    transition: opacity 0.35s ease;
}

.lazy-fade.is-loaded {
    opacity: 1;
}

/* ── Thumbnail lightbox: click any class photo to see it full-size ── */
.thumb-lightbox {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: var(--space-xl);
    background: rgba(10, 0, 14, 0.86);
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--dur) var(--ease-out);
}

.thumb-lightbox.is-open {
    opacity: 1;
    visibility: visible;
}

.thumb-lightbox-img {
    max-width: min(90vw, 640px);
    max-height: 74vh;
    width: auto;
    height: auto;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    object-fit: contain;
}

.thumb-lightbox-caption {
    color: #fff;
    font-weight: 700;
    font-size: var(--step-0);
}

.thumb-lightbox-close {
    position: absolute;
    top: var(--space-lg);
    right: var(--space-lg);
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    display: grid;
    place-items: center;
    transition: background-color var(--dur) var(--ease-out);
}

.thumb-lightbox-close:hover {
    background: rgba(255, 255, 255, 0.24);
}

.split-item-head {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    flex-wrap: wrap;
    margin-bottom: 0.35rem;
}

.split-item-head h3 {
    font-size: var(--step-2);
    color: var(--ink-800);
}

.split-body p {
    margin-bottom: 0.5rem;
    font-size: var(--step-0);
    line-height: 1.7;
    color: var(--text-light);
}

.split-meta {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: var(--step--1);
    font-weight: 600;
    color: var(--primary);
}

/* ── Tablet: stack intro above the list ── */
@media (max-width: 860px) {
    .split-grid {
        grid-template-columns: 1fr;
        gap: var(--space-xl);
    }

    .split-intro {
        position: static;
    }
}

/* ── Mobile: stack each row (thumb above text) ── */
@media (max-width: 520px) {
    .split-item {
        grid-template-columns: 1fr;
    }

    .split-thumb {
        max-width: 220px;
        margin-inline: auto;
    }
}

/* ───────────────────────────────────────────────────────────────────
   BOOKING STATUS BADGE
   Shared by the public pages and the admin panel — app.css loads on
   every page. Colours come from the status tokens in theme.css.
   ─────────────────────────────────────────────────────────────────── */
@layer components {
    .status-badge {
        display: inline-block;
        padding: 0.2rem 0.6rem;
        border-radius: var(--radius-pill, 999px);
        font-size: 0.78rem;
        font-weight: 600;
        white-space: nowrap;
    }

    .status-badge.is-pending { background: var(--status-pending-bg); color: var(--status-pending-fg); }
    .status-badge.is-review  { background: var(--status-review-bg);  color: var(--status-review-fg); }
    .status-badge.is-paid    { background: var(--status-paid-bg);    color: var(--status-paid-fg); }
    .status-badge.is-failed  { background: var(--status-failed-bg);  color: var(--status-failed-fg); }
}

/* ───────────────────────────────────────────────────────────────────
   LEGAL PAGES
   Long-form reading column shared by /privacy and /terms. Narrower
   than the standard container: prose is easier to read at ~70ch.
   ─────────────────────────────────────────────────────────────────── */
@layer components {
    .legal {
        max-width: 72ch;
        margin-inline: auto;
    }

    .legal-updated {
        font-size: 0.85rem;
        color: var(--text-light);
        margin-bottom: 2.5rem;
    }

    .legal h2 {
        font-family: var(--font-display);
        font-size: 1.35rem;
        margin: 2.5rem 0 0.75rem;
        scroll-margin-top: 6rem;   /* clear the sticky header when linked to by anchor */
    }

    .legal h3 {
        font-size: 1.05rem;
        margin: 1.5rem 0 0.5rem;
    }

    .legal p,
    .legal li {
        line-height: 1.75;
        color: var(--text);
    }

    .legal p { margin-bottom: 1rem; }

    .legal ul {
        margin: 0 0 1rem 1.25rem;
        list-style: disc;
    }

    .legal li { margin-bottom: 0.4rem; }

    .legal a {
        color: var(--primary);
        text-decoration: underline;
        text-underline-offset: 2px;
    }

    /* Pulls the reader's eye to the clauses people most need to act on. */
    .legal-callout {
        border-left: 3px solid var(--primary);
        background: var(--surface-2, #faf6fb);
        padding: 1rem 1.25rem;
        margin: 1.5rem 0;
    }

    .legal-callout p:last-child { margin-bottom: 0; }
}
