/*
 * Theme "onyx" (spec file 13) — bold prestige-sport / cinematic executive.
 * Written from scratch: it shares no structure with the other themes.
 *
 * The tell: an OVERSIZED condensed grotesque set huge and uppercase, a single
 * reused diagonal angle that shears seams and frames, sparse metallic trim,
 * and the driver's colour used as hot punctuation against near-black (or, in
 * the light variant, against a hard steel-grey). Dark is home; light is a
 * fully designed high-contrast inversion. No JS beyond the shared islands.
 */

/* ================================================================== */
/* Tokens                                                             */
/* ================================================================== */

:root
{
    /* The single diagonal angle reused for every seam, frame clip and slash */
    --shear: 3deg;
    --shear-tan: 0.0524; /* tan(3deg) — used to pad sheared bands */

    --bound: 84rem;
    --gutter: clamp(1.25rem, 5vw, 4.5rem);
    --band-space: clamp(4.5rem, 10vw, 11rem);

    --font-display: "Oswald Variable", "Oswald", "Arial Narrow", system-ui, sans-serif;
    --font-body: "Sora Variable", "Sora", ui-sans-serif, system-ui, sans-serif;

    --drive: cubic-bezier(0.16, 0.84, 0.28, 1);
}

body
{
    /* Driver-picked, injected inline as --primary-color (any hue) */
    --primary: var(--primary-color, #e11d2a);

    /* A full scale derived from the raw primary */
    --primary-soft: color-mix(in oklab, var(--primary), white 20%);
    --primary-deep: color-mix(in oklab, var(--primary), black 30%);
    --primary-shadow: color-mix(in oklab, var(--primary), black 58%);

    /* Hot accent tuned per mode for text-sized contrast; ignites, never floods */
    --hot: var(--primary);

    /* Readable ink ON the primary fill (auto black/white by lightness) */
    --on-primary: oklch(from var(--primary) clamp(0, (0.62 - l) * 1000, 1) 0.03 h);

    /* ---- DARK: the theme's home ---- */
    --void: #08080a;          /* deepest — footer, overlay */
    --base: #0c0c0f;          /* page */
    --panel: #131318;         /* raised card */
    --panel-2: #1a1a20;       /* hover / inset */
    --ink: #f6f6f8;
    --muted: #9b9ba4;
    --hair: rgb(255 255 255 / 0.12);
    --hair-strong: rgb(255 255 255 / 0.22);

    /* Metallic = a brushed silver→graphite sweep with a 1px top highlight */
    --metal: linear-gradient(176deg, #d7d9e0 0%, #9a9ca6 28%, #54565e 72%, #2b2c31 100%);
    --metal-line: linear-gradient(90deg, rgb(255 255 255 / 0.05), rgb(255 255 255 / 0.5) 50%, rgb(255 255 255 / 0.05));

    --shadow-cinema: 0 40px 80px -30px rgb(0 0 0 / 0.85), 0 8px 24px -12px rgb(0 0 0 / 0.7);
}

body[data-dark-mode="false"]
{
    /* ---- LIGHT: a high-contrast bold inversion (not soft) ---- */
    --hot: var(--primary-deep);

    --void: #e9e9ec;
    --base: #f2f2f4;
    --panel: #ffffff;
    --panel-2: #ececed;
    --ink: #0a0a0c;
    --muted: #5a5a64;
    --hair: rgb(0 0 0 / 0.14);
    --hair-strong: rgb(0 0 0 / 0.28);

    --metal: linear-gradient(176deg, #ffffff 0%, #c7c9d0 30%, #82848e 75%, #5a5c64 100%);
    --metal-line: linear-gradient(90deg, rgb(0 0 0 / 0.04), rgb(0 0 0 / 0.34) 50%, rgb(0 0 0 / 0.04));

    --shadow-cinema: 0 30px 60px -28px rgb(10 10 14 / 0.4), 0 6px 18px -10px rgb(10 10 14 / 0.25);
}

/* Metallic trim is a driver toggle — off = a plain hot/hairline rule instead */
body[data-metallic="false"]
{
    --metal: var(--hot);
    --metal-line: var(--hair-strong);
}

/* ================================================================== */
/* Base                                                               */
/* ================================================================== */

*, *::before, *::after { box-sizing: border-box; }

/* Chromium ignores var() inside ::-webkit-scrollbar pseudo-elements (falls back
   to a default grey bar), so thumb colors are LITERAL below. Onyx is dark by
   default — the light palette is the data-dark-mode="false" override. */
:root { color-scheme: dark; }
:root:has(body[data-dark-mode="false"]) { color-scheme: light; }

html
{
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: rgb(255 255 255 / 0.22) transparent;
}
html:has(body[data-dark-mode="false"]) { scrollbar-color: rgb(0 0 0 / 0.3) transparent; }

body
{
    margin: 0;
    background-color: var(--base);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.62;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
}

h1, h2, h3
{
    font-family: var(--font-display);
    font-weight: 600;
    line-height: 0.94;
    letter-spacing: 0.005em;
    text-transform: uppercase;
    text-wrap: balance;
    margin: 0;
    overflow-wrap: break-word;
}

h1 { font-size: clamp(3rem, 9vw, 7.5rem); font-weight: 700; }
h2 { font-size: clamp(2.2rem, 5.5vw, 4.4rem); }
h3 { font-size: clamp(1.25rem, 2.2vw, 1.75rem); }

p { margin: 0; max-width: 66ch; }

a { color: inherit; text-decoration: none; }

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

img { display: block; max-width: 100%; }

strong { font-weight: 600; }

::selection { background-color: var(--hot); color: var(--on-primary); }

:focus-visible
{
    outline: 2px solid var(--hot);
    outline-offset: 3px;
}

::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
    background-color: rgb(255 255 255 / 0.22);
    border: 3px solid transparent;
    background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover { background-color: rgb(255 255 255 / 0.4); }

:root:has(body[data-dark-mode="false"])::-webkit-scrollbar-thumb,
:root:has(body[data-dark-mode="false"]) ::-webkit-scrollbar-thumb {
    background-color: rgb(0 0 0 / 0.3);
}
:root:has(body[data-dark-mode="false"])::-webkit-scrollbar-thumb:hover,
:root:has(body[data-dark-mode="false"]) ::-webkit-scrollbar-thumb:hover {
    background-color: rgb(0 0 0 / 0.5);
}

/* ================================================================== */
/* Layout primitives                                                  */
/* ================================================================== */

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

/* A content section. A skewed metallic seam rides its top edge — the
   signature diagonal. Toggled flat when the driver disables diagonals. */
.band
{
    position: relative;
    padding-block: var(--band-space);
}

.band + .band { padding-top: 0; }

.band::before
{
    content: "";
    position: absolute;
    inset-inline: 0;
    top: 0;
    height: 2px;
    background-image: var(--metal-line);
    transform: skewY(calc(-1 * var(--shear)));
    transform-origin: left center;
}

.band:first-of-type::before { display: none; }

body[data-diagonals="false"] .band::before { transform: none; }

/* Shared band heading: oversized bleeding index figure beside the title */
.band-head
{
    display: flex;
    gap: clamp(1rem, 3vw, 2.5rem);
    align-items: flex-start;
    margin-bottom: clamp(2rem, 5vw, 3.5rem);
}

.band-head > div { min-width: 0; }
.band-head .kicker { margin-bottom: 1.1rem; }
.band-title { margin: 0; }
.band-intro { color: var(--muted); margin-top: 1.2rem; max-width: 46ch; }
.band-more { margin-top: clamp(1.8rem, 4vw, 2.6rem); }

@media (max-width: 640px)
{
    .band-head > .index-figure { display: none; }
}

/* ================================================================== */
/* Type pieces                                                        */
/* ================================================================== */

/* Hard-edged tracked label, in primary, preceded by a short metallic dash */
.kicker
{
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.78rem;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: var(--hot);
    margin: 0;
}

.kicker::before
{
    content: "";
    width: 2.2rem;
    height: 2px;
    background-image: var(--metal);
    flex: none;
}

/* Oversized index numeral that bleeds (01, 02 …) */
.index-figure
{
    display: block;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(3.5rem, 9vw, 8rem);
    line-height: 0.8;
    letter-spacing: -0.02em;
    color: transparent;
    -webkit-text-stroke: 1px var(--hair-strong);
    font-variant-numeric: tabular-nums;
}

.eyebrow
{
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.72rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--muted);
}

/* Link with a primary underline that sweeps in */
.sweep
{
    background-image: linear-gradient(var(--hot), var(--hot));
    background-size: 0% 2px;
    background-position: 0 100%;
    background-repeat: no-repeat;
    transition: background-size 0.4s var(--drive);
    padding-bottom: 2px;
}

.sweep:hover,
.sweep[aria-current] { background-size: 100% 2px; }

/* ================================================================== */
/* Buttons                                                            */
/* ================================================================== */

/* Hard primary CTA with a metallic sheen that sweeps across on hover */
.ignite
{
    --sheen: linear-gradient(100deg, transparent 35%, rgb(255 255 255 / 0.55) 50%, transparent 65%);
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.95rem 1.9rem;
    background-color: var(--hot);
    background-image: var(--sheen);
    background-size: 250% 100%;
    background-position: 180% 0;
    background-repeat: no-repeat;
    color: var(--on-primary);
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 0.92rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    border: 0;
    cursor: pointer;
    clip-path: polygon(0 0, 100% 0, calc(100% - 0.7rem) 100%, 0 100%);
    transition: background-position 0.6s var(--drive), transform 0.2s var(--drive), filter 0.2s var(--drive);
}

.ignite:hover
{
    background-position: -40% 0;
    filter: brightness(1.06);
}

.ignite:active { transform: translateY(1px); }

/* Ghost / outline CTA */
.ghost
{
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.9rem 1.7rem;
    background: transparent;
    color: var(--ink);
    font-family: var(--font-display);
    font-weight: 500;
    font-size: 0.92rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    border: 1px solid var(--hair-strong);
    cursor: pointer;
    transition: border-color 0.2s var(--drive), color 0.2s var(--drive), background-color 0.2s var(--drive);
}

.ghost:hover { border-color: var(--hot); color: var(--hot); }

/* ================================================================== */
/* Media: cinematic frame, duotone, vignette                          */
/* ================================================================== */

.media
{
    position: relative;
    overflow: hidden;
    background-color: var(--panel);
    isolation: isolate;
}

.media img
{
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Metallic frame line around photos */
.media--framed { border: 1px solid var(--hair-strong); }

/* Site-wide duotone: grayscale the photo and tint its shadows toward the
   driver colour, unifying mediocre photography. Colour returns on hover. */
body[data-duotone="true"] .media--duo
{
    background-color: var(--primary-shadow);
}

body[data-duotone="true"] .media--duo img
{
    filter: grayscale(1) contrast(1.08) brightness(0.92);
    mix-blend-mode: luminosity;
    transition: filter 0.5s var(--drive), mix-blend-mode 0s;
}

body[data-duotone="true"] .media--duo:hover img,
body[data-duotone="true"] a:hover .media--duo img
{
    filter: none;
    mix-blend-mode: normal;
}

/* Dark scrim + faint vignette for on-image text */
.scrim::after
{
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background:
        radial-gradient(120% 90% at 50% 0%, transparent 50%, rgb(0 0 0 / 0.45) 100%),
        linear-gradient(to top, rgb(0 0 0 / 0.82), rgb(0 0 0 / 0.1) 55%, rgb(0 0 0 / 0.35));
}

/* Typographic fallback when a photo is missing: a metallic monogram tile */
.monogram
{
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    background-color: var(--panel);
    background-image: repeating-linear-gradient(
        var(--shear-angle, 122deg),
        transparent 0 14px,
        rgb(255 255 255 / 0.025) 14px 15px);
    color: transparent;
    -webkit-text-stroke: 1.5px var(--hair-strong);
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(3rem, 8vw, 6rem);
    line-height: 1;
    text-transform: uppercase;
}

/* ================================================================== */
/* Reveal motion (transform/opacity only, longer punchy easing)       */
/* ================================================================== */

@media (prefers-reduced-motion: no-preference)
{
    html.js .reveal
    {
        opacity: 0;
        transform: translateY(22px);
    }

    html.js .reveal.is-visible
    {
        opacity: 1;
        transform: none;
        transition: opacity 0.7s var(--drive), transform 0.7s var(--drive);
        transition-delay: calc(var(--reveal-index, 0) * 80ms);
    }
}

@media (prefers-reduced-motion: reduce)
{
    html { scroll-behavior: auto; }
}

/* ================================================================== */
/* Shared island skins (square / metallic / hot — never glass)        */
/* ================================================================== */

/* ---- Contact form ---- */
.contact-form p { margin-bottom: 1.15rem; }

.contact-form label
{
    display: block;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.72rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--muted);
}

.contact-form input,
.contact-form textarea
{
    display: block;
    width: 100%;
    margin-top: 0.5rem;
    padding: 0.85rem 0.95rem;
    font: inherit;
    color: var(--ink);
    background-color: var(--panel);
    border: 1px solid var(--hair-strong);
    border-radius: 0;
    transition: border-color 0.2s var(--drive), box-shadow 0.2s var(--drive);
}

.contact-form textarea { min-height: 9rem; resize: vertical; }

.contact-form input:focus,
.contact-form textarea:focus
{
    outline: none;
    border-color: var(--hot);
    box-shadow: inset 0 -2px 0 var(--hot);
}

.contact-form button[type="submit"]
{
    padding: 0.95rem 2rem;
    background-color: var(--hot);
    color: var(--on-primary);
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 0.92rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    border: 0;
    border-radius: 0;
    cursor: pointer;
    clip-path: polygon(0 0, 100% 0, calc(100% - 0.7rem) 100%, 0 100%);
    transition: filter 0.2s var(--drive);
}

.contact-form button[type="submit"]:hover { filter: brightness(1.08); }
.contact-form button[type="submit"]:disabled { opacity: 0.5; cursor: default; }

.contact-form-status:not(:empty)
{
    padding: 0.8rem 0.95rem;
    background-color: var(--panel);
    border-left: 3px solid var(--hot);
    font-size: 0.92rem;
}

/* ---- Map island ---- */
.map-island { border: 1px solid var(--hair-strong); border-radius: 0; overflow: hidden; }
.map-island-placeholder { background-color: var(--panel); }
.map-island-container { height: 460px; filter: saturate(0.85); }

/* ---- Gallery + lightbox ---- */
.gallery-grid
{
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(15rem, 100%), 1fr));
    gap: clamp(0.4rem, 1vw, 0.9rem);
}

.gallery-item
{
    position: relative;
    padding: 0;
    border: 1px solid var(--hair-strong);
    background-color: var(--panel);
    cursor: zoom-in;
    overflow: hidden;
    isolation: isolate;
}

.gallery-item img
{
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    transition: transform 0.6s var(--drive), filter 0.5s var(--drive);
}

body[data-duotone="true"] .gallery-item { background-color: var(--primary-shadow); }
body[data-duotone="true"] .gallery-item img { filter: grayscale(1) contrast(1.08) brightness(0.92); mix-blend-mode: luminosity; }
body[data-duotone="true"] .gallery-item:hover img { filter: none; mix-blend-mode: normal; }

.gallery-item:hover img { transform: scale(1.06); }

.gallery-lightbox
{
    width: 100vw;
    max-width: 100vw;
    height: 100dvh;
    max-height: 100dvh;
    margin: 0;
    border: 0;
    padding: 0;
    background: transparent;
}

.gallery-lightbox[open] { display: flex; align-items: center; justify-content: center; }
.gallery-lightbox::backdrop { background: rgb(4 4 6 / 0.96); }
.gallery-lightbox img { max-width: 92vw; max-height: 86vh; object-fit: contain; }

.gallery-lightbox button
{
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    width: 3rem;
    height: 3rem;
    border: 1px solid rgb(255 255 255 / 0.4);
    border-radius: 0;
    background: transparent;
    color: #fff;
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
    transition: border-color 0.2s var(--drive), color 0.2s var(--drive);
}

.gallery-lightbox button:hover { border-color: var(--hot); color: var(--hot); }
.gallery-lightbox .gallery-lightbox-previous { left: 1.2rem; }
.gallery-lightbox .gallery-lightbox-next { right: 1.2rem; }
.gallery-lightbox .gallery-lightbox-close { top: 1.5rem; right: 1.2rem; transform: none; }

/* ---- Booking iframe ---- */
/* Transparent in both modes: the embedded booking module renders transparent and
   carries its own component backgrounds, so an opaque panel fill clashes (esp. dark). */
.booking-iframe
{
    border: 1px solid var(--hair-strong);
    border-radius: 0;
    background-color: transparent;
}

/* ---- Consent banner ---- */
.consent-banner
{
    position: fixed;
    inset-inline: 1rem;
    bottom: 1rem;
    z-index: 80;
    max-width: 32rem;
    margin-inline: auto;
    padding: 1.2rem 1.4rem;
    background-color: var(--void);
    color: var(--ink);
    border: 1px solid var(--hair-strong);
    border-top: 2px solid var(--hot);
    border-radius: 0;
    font-size: 0.92rem;
    box-shadow: var(--shadow-cinema);
}

.consent-banner p { margin: 0 0 0.95rem; }
.consent-banner a { color: var(--hot); text-decoration: underline; }
.consent-banner-actions { display: flex; gap: 0.7rem; }

.consent-banner-actions button
{
    flex: 1;
    padding: 0.65rem 1rem;
    font: inherit;
    font-weight: 600;
    border: 1px solid var(--hair-strong);
    border-radius: 0;
    background-color: var(--panel);
    color: var(--ink);
    cursor: pointer;
    transition: border-color 0.2s var(--drive), color 0.2s var(--drive);
}

.consent-banner-actions button:hover { border-color: var(--hot); color: var(--hot); }

/* ================================================================== */
/* Generic page scaffolding (sub-pages)                               */
/* ================================================================== */

.page { padding-block: clamp(3rem, 7vw, 6rem) var(--band-space); }

.page-head { margin-bottom: clamp(2.2rem, 5vw, 4rem); }
.page-head .kicker { margin-bottom: 1.4rem; }
.page-head h1 { font-size: clamp(2.6rem, 7vw, 6rem); }
.page-lead { color: var(--muted); font-size: clamp(1.05rem, 1.6vw, 1.3rem); margin-top: 1.4rem; max-width: 52ch; }

/* Hard tag chip (durations, prices, options) */
.chip
{
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.85rem;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.78rem;
    letter-spacing: 0.06em;
    border: 1px solid var(--hair-strong);
    color: var(--ink);
}

.tag-price
{
    display: inline-block;
    padding: 0.4rem 0.9rem;
    background-color: var(--hot);
    color: var(--on-primary);
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    clip-path: polygon(0 0, 100% 0, calc(100% - 0.5rem) 100%, 0 100%);
}
