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

   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;
        }
    }
}

/* ───────────────────────────────────────────────────────────────────
   TOKENS
   Single source of truth. Legacy names (--primary, --radius, …) are
   retained because BookingDetail / About / PaymentSuccess depend on
   them — do not rename without updating those scoped stylesheets.
   ─────────────────────────────────────────────────────────────────── */
@layer tokens {
    :root {
        /* ── Brand ramp ── */
        --pink-50:  #fff5fa;
        --pink-100: #ffe4f1;
        --pink-200: #ffc9e3;
        --pink-300: #ff9ecd;
        --pink-400: #ff5cae;
        --pink-500: #fa1689;  /* core brand */
        --pink-600: #d4116f;
        --pink-700: #a80d58;

        --plum-400: #c07ce8;
        --plum-500: #a04fd2;
        --plum-600: #7b34a8;

        --ink-900: #1c0020;
        --ink-800: #2a002e;
        --ink-700: #45204a;

        /* ── Semantic ── */
        --primary:      var(--pink-500);
        --primary-dark: var(--pink-600);
        --secondary:    var(--plum-500);
        --accent:       #ff6ec7;

        --text:        #333;
        --text-light:  #666;
        --text-subtle: #8b8b8b;
        --text-invert: #fff;

        --surface:        #fff;
        --surface-cream:  #fff9fc;
        --surface-tint:   var(--pink-50);
        --surface-dark:   var(--ink-800);
        --bg-field:       #fdf4f9;

        --border:        #e0d0ea;
        --border-subtle: color-mix(in srgb, var(--primary) 12%, transparent);

        --success: #26b050;
        --danger:  #e50000;
        --warning: #d98500;

        /* ── Admin panel ──
           Separate token set from the public site's tokens above — the
           admin area (Admin/*.razor.css, AdminLayout.razor.css) reads
           these instead of --surface/--text/--border directly, so a dark
           palette can be swapped in below without touching the public
           site (which stays light-only; it was never asked for dark
           mode, only the admin panel was). */
        --admin-bg:         #EEEDFC;
        --admin-surface:    #ffffff;
        --admin-surface-2:  #fafafa;
        --admin-hover:      #f4f4f7;
        --admin-border:     #eadff0;
        --admin-text:       #222222;
        --admin-text-light: #888888;
        --admin-shadow:     0 3px 12px rgba(250, 22, 137, 0.10);
        --admin-shadow-xs:  0 1px 3px rgba(0, 0, 0, 0.06);
        --admin-shadow-md:  0 6px 22px rgba(250, 22, 137, 0.14);

        /* ── Fluid type scale (clamp = no breakpoint juggling) ── */
        --step--1: clamp(0.79rem, 0.77rem + 0.10vw, 0.85rem);
        --step-0:  clamp(0.94rem, 0.91rem + 0.14vw, 1.02rem);
        --step-1:  clamp(1.13rem, 1.07rem + 0.28vw, 1.30rem);
        --step-2:  clamp(1.35rem, 1.25rem + 0.50vw, 1.65rem);
        --step-3:  clamp(1.62rem, 1.45rem + 0.85vw, 2.10rem);
        --step-4:  clamp(1.94rem, 1.67rem + 1.36vw, 2.70rem);
        --step-5:  clamp(2.33rem, 1.90rem + 2.10vw, 3.45rem);

        /* ── Spacing (fluid) ── */
        --space-2xs: clamp(0.25rem, 0.24rem + 0.06vw, 0.31rem);
        --space-xs:  clamp(0.50rem, 0.48rem + 0.11vw, 0.63rem);
        --space-sm:  clamp(0.75rem, 0.71rem + 0.17vw, 0.94rem);
        --space-md:  clamp(1.00rem, 0.95rem + 0.23vw, 1.25rem);
        --space-lg:  clamp(1.50rem, 1.43rem + 0.34vw, 1.88rem);
        --space-xl:  clamp(2.00rem, 1.90rem + 0.45vw, 2.50rem);
        --space-2xl: clamp(3.00rem, 2.86rem + 0.68vw, 3.75rem);
        --space-3xl: clamp(4.00rem, 3.81rem + 0.91vw, 5.00rem);

        /* ── Typography ── */
        /* Body: Inter (clean, readable). Headings: Poppins (friendly, modern). */
        --font-body: 'Inter', 'Helvetica Neue', Helvetica, Arial, sans-serif;
        --font-display: 'Poppins', 'Helvetica Neue', Helvetica, Arial, sans-serif;
        --tracking-wide: 0.07em;
        --tracking-wider: 0.14em;
        --leading-tight: 1.15;
        --leading-body: 1.7;

        /* ── Radii ── */
        --radius: 4px;          /* legacy — used by booking forms */
        --radius-sm: 8px;
        --radius-md: 12px;
        --radius-lg: 18px;
        --radius-xl: 26px;
        --radius-pill: 999px;

        /* ── Elevation (pink-tinted, matches brand) ── */
        --shadow-xs: 0 1px 3px rgba(250, 22, 137, 0.08);
        --shadow-sm: 0 3px 12px rgba(250, 22, 137, 0.10);
        --shadow-md: 0 6px 22px rgba(250, 22, 137, 0.14);
        --shadow-lg: 0 14px 38px rgba(250, 22, 137, 0.20);
        --shadow-xl: 0 24px 60px rgba(250, 22, 137, 0.26);

        /* ── Motion ── */
        --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
        --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
        --dur-fast: 150ms;
        --dur: 250ms;
        --dur-slow: 450ms;

        /* ── Layout ── */
        --container: 1440px;
        --container-narrow: 820px;
        --gutter: clamp(1rem, 4vw, 2.5rem);
        --header-h: 76px;

        /* ── Gradients ── */
        --grad-brand: linear-gradient(135deg, var(--pink-500) 0%, var(--plum-500) 100%);
        --grad-pink: linear-gradient(135deg, var(--pink-500) 0%, var(--pink-600) 100%);
        --grad-page: linear-gradient(160deg, #ffbada 0%, #fce4ec 55%, #f8bbd9 100%);
    }

    /* Admin panel only — the public site (marketing pages) stays
       light-only; it was never asked for dark mode.

       App.razor stamps data-theme="dark"/"light" on <html> as the very
       first thing in <head> (before anything paints), from either the
       staff member's own switch (persisted in localStorage) or, the
       first time they ever open the admin panel, their OS/browser
       preference. So in practice data-theme is always present and this
       attribute selector is what actually drives dark mode.

       The prefers-color-scheme block underneath is just a safety net for
       the rare case JS hasn't run yet — same values, so there's no
       flash-of-different-dark-mode between the two. */
    :root[data-theme="dark"] {
        --admin-bg:         #16141d;
        --admin-surface:    #211e29;
        --admin-surface-2:  #2a2632;
        --admin-hover:      #322d3b;
        --admin-border:     #3b3546;
        --admin-text:       #f1eef7;
        --admin-text-light: #a89fb5;
        --admin-shadow:     0 3px 14px rgba(0, 0, 0, 0.45);
        --admin-shadow-xs:  0 1px 3px rgba(0, 0, 0, 0.35);
        --admin-shadow-md:  0 6px 22px rgba(0, 0, 0, 0.5);
    }

    @media (prefers-color-scheme: dark) {
        :root:not([data-theme="light"]) {
            --admin-bg:         #16141d;
            --admin-surface:    #211e29;
            --admin-surface-2:  #2a2632;
            --admin-hover:      #322d3b;
            --admin-border:     #3b3546;
            --admin-text:       #f1eef7;
            --admin-text-light: #a89fb5;
            --admin-shadow:     0 3px 14px rgba(0, 0, 0, 0.45);
            --admin-shadow-xs:  0 1px 3px rgba(0, 0, 0, 0.35);
            --admin-shadow-md:  0 6px 22px rgba(0, 0, 0, 0.5);
        }
    }
}

/* ───────────────────────────────────────────────────────────────────
   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-reveal (progressive enhancement) ─────────────────
       Uses scroll-driven animations where supported. Content is
       always visible if unsupported or if reduced-motion is on. */
    @supports (animation-timeline: view()) {
        @media (prefers-reduced-motion: no-preference) {
            .reveal {
                animation: reveal-in linear both;
                animation-timeline: view();
                animation-range: entry 5% cover 26%;
            }
        }
    }

    /* Blur-to-sharp fade adds a modern "focus in" feel to every reveal. */
    @keyframes reveal-in {
        from { opacity: 0; transform: translateY(28px); filter: blur(10px); }
        to   { opacity: 1; transform: translateY(0);    filter: blur(0); }
    }

    /* 3D flip variant — same scroll-triggered mechanism as .reveal, for
       photos where a flip reads better than a plain fade/slide. Needs
       `perspective` set on an ancestor to actually look three-dimensional. */
    @supports (animation-timeline: view()) {
        @media (prefers-reduced-motion: no-preference) {
            .reveal-flip {
                animation: reveal-flip-in linear both;
                animation-timeline: view();
                animation-range: entry 5% cover 30%;
            }
        }
    }

    @keyframes reveal-flip-in {
        from { opacity: 0; transform: rotateY(-90deg); }
        to   { opacity: 1; transform: rotateY(0deg); }
    }
}

/* ───────────────────────────────────────────────────────────────────
   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;
    }
}
