/* Base: tokens, reset, type, buttons, prose, page head, dropdown, tooltips. */
@layer base, chrome, pages;
@layer base {
    :root {
        --graphite: #212121;
        --deep: #171717;
        --g2: #2a2a2a;
        --g3: #3b3b3b;
        --concrete: #e6ebeb;
        --paper: #f1f4f4;
        --stone: #d3dada;
        --orange: #e36434;
        --orange-d: #cf5628;
        --mint: #cce7d3;
        --ink: #212121;
        --soft: #5d6464;
        --soft-d: #a4a8a8;
        --line: rgba(33, 33, 33, 0.14);
        --line-d: rgba(255, 255, 255, 0.14);
        --max: 1360px;
        --pad: 40px;
        --ease: cubic-bezier(0.25, 0.75, 0.3, 1);
        --t1: 0.3s;
        --t2: 0.5s;
        --t3: 0.9s;
        --orange-h: #f07443;
        --error: #b3261e;
        --field: #b9c1c1;
        --kz-adminbar: 0px;
    }
    body.admin-bar {
        --kz-adminbar: 32px;
    }
    /* Hidden until motion.js fades the page in; shown anyway after 2.5 s. */
    html.kz-mo #main {
        opacity: 0;
        animation: kz-failsafe 0s 2.5s forwards;
    }
    @keyframes kz-failsafe {
        to {
            opacity: 1;
        }
    }
    @media (max-width: 782px) {
        body.admin-bar {
            --kz-adminbar: 46px;
        }
    }
    /* Below 600px the admin bar scrolls away, so nothing needs to clear it. */
    @media (max-width: 600px) {
        body.admin-bar header.site {
            top: 0;
        }
    }
    * {
        box-sizing: border-box;
        margin: 0;
        padding: 0;
    }
    html {
        scroll-behavior: smooth;
    }
    body {
        font-family: 'Commissioner', system-ui, sans-serif;
        color: var(--ink);
        background: var(--paper);
        font-size: 1rem;
        line-height: 1.6;
        font-weight: 400;
        -webkit-font-smoothing: antialiased;
        overflow-x: hidden;
        font-feature-settings: 'tnum' 1;
    }
    img,
    svg,
    canvas {
        display: block;
    }
    /* JPEG product shots on white blend into the grey stage. Renders opt out with mix-blend-mode: normal. */
    img[src*='.jpg' i],
    img[src*='.jpeg' i] {
        mix-blend-mode: multiply;
    }
    a {
        color: inherit;
        text-decoration: none;
    }
    button {
        font: inherit;
        cursor: pointer;
        border: 0;
        background: none;
        color: inherit;
    }
    input,
    select,
    textarea {
        font: inherit;
        color: inherit;
    }
    .wrap {
        max-width: var(--max);
        margin: 0 auto;
        padding: 0 var(--pad);
    }
    @media (max-width: 700px) {
        :root {
            --pad: 20px;
        }
    }
    :focus-visible {
        outline: 2px solid var(--orange);
        outline-offset: 3px;
    }
    .sr {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
    }
    /* ---------- type ---------- */
    .loud {
        font-weight: 850;
        font-style: oblique 12deg;
        text-transform: uppercase;
        line-height: 0.86;
        letter-spacing: -0.025em;
        font-size: clamp(3.5rem, 9.6vw, 9.75rem);
    }
    .t1 {
        font-size: clamp(2.375rem, 5vw, 4.5rem);
        font-weight: 600;
        line-height: 1.02;
        letter-spacing: -0.035em;
    }
    .t2 {
        font-size: clamp(1.6875rem, 3vw, 2.625rem);
        font-weight: 600;
        line-height: 1.1;
        letter-spacing: -0.028em;
    }
    .t3 {
        font-size: 1.3125rem;
        font-weight: 600;
        line-height: 1.25;
        letter-spacing: -0.015em;
    }
    .note {
        font-size: 0.84375rem;
        color: var(--soft);
        font-weight: 450;
        line-height: 1.45;
    }
    .lead {
        font-size: clamp(1.125rem, 1.45vw, 1.3125rem);
        line-height: 1.5;
        color: var(--soft);
        max-width: 44ch;
    }
    .dark .lead,
    .dark .note {
        color: var(--soft-d);
    }
    /* ---------- surfaces ---------- */
    .dark {
        background: var(--graphite);
        color: #fff;
        position: relative;
        .rule {
            border-color: var(--line-d);
        }
    }
    .deep {
        background: var(--deep);
    }
    .grain {
        position: relative;
        isolation: isolate;
        &::after {
            content: '';
            position: absolute;
            inset: 0;
            z-index: -1;
            pointer-events: none;
            opacity: 0.5;
            mix-blend-mode: overlay;
            background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 .22 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
        }
    }
    .sec {
        padding: clamp(80px, 10vw, 150px) 0;
    }
    .sec-s {
        padding: clamp(56px, 6vw, 96px) 0;
    }
    .rule {
        border-top: 1px solid var(--line);
    }
    /* ---------- buttons ---------- */
    /* "Open in Google Maps" button. */
    .dgmap {
        gap: 8px;
        & svg {
            width: 14px;
            height: 14px;
            fill: none;
            stroke: currentColor;
            stroke-width: 1.5;
        }
    }
    /* A row of buttons (home hero, About, Confirmation). */
    .ctas {
        display: flex;
        gap: 10px;
        flex-wrap: wrap;
    }
    .btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        height: 54px;
        padding: 0 28px;
        font-weight: 600;
        font-size: 0.9375rem;
        letter-spacing: -0.005em;
        border-radius: 2px;
        transition:
            background var(--t1) var(--ease),
            color var(--t1) var(--ease),
            border-color var(--t1) var(--ease);
        white-space: nowrap;
    }
    .btn-p {
        background: var(--orange);
        color: var(--graphite);
        &:hover {
            background: var(--orange-h);
        }
    }
    .btn-k {
        background: var(--graphite);
        color: #fff;
        &:hover {
            background: #000;
        }
    }
    .btn-l {
        border: 1px solid currentColor;
        &:hover {
            background: var(--graphite);
            color: #fff;
            border-color: var(--graphite);
        }
    }
    .dark .btn-l {
        border-color: rgba(255, 255, 255, 0.4);
    }
    /* On dark surfaces outline buttons turn white on hover. */
    :is(.dark, .hero, .confirm, .sum, .cookie) .btn-l:hover {
        background: #fff;
        color: var(--graphite);
        border-color: #fff;
    }
    .btn-w {
        background: #fff;
        color: var(--graphite);
        &:hover {
            background: var(--orange);
        }
    }
    .btn-sm {
        height: 42px;
        padding: 0 18px;
        font-size: 0.875rem;
    }
    .tlink {
        font-weight: 600;
        font-size: 0.9375rem;
        border-bottom: 1px solid currentColor;
        padding-bottom: 3px;
        transition: color var(--t1) var(--ease);
        &:hover {
            color: var(--orange);
        }
    }
    /* ---------- prose ---------- */
    .prose {
        max-width: 680px;
        & h3 {
            font-size: 1.1875rem;
            font-weight: 600;
            margin: 36px 0 10px;
        }
        & p,
        & li {
            margin-bottom: 12px;
            color: #3f4646;
        }
        & ul {
            padding-left: 20px;
        }
    }
    /* ---------- shell helpers ---------- */
    .kz-page-body {
        padding-top: 32px;
        padding-bottom: 140px;
    }
    /* ---------- page head ---------- */
    .phead {
        background: var(--graphite);
        color: #fff;
        padding: clamp(56px, 7vw, 100px) 0 clamp(40px, 4vw, 56px);
        .lead {
            margin-top: 20px;
        }
    }
    .crumbs {
        font-size: 0.84375rem;
        color: var(--soft-d);
        margin-bottom: 28px;
        & a:hover {
            color: #fff;
        }
        &.lt {
            color: var(--soft);
        }
        &.lt a:hover {
            color: var(--ink);
        }
    }
    /* ---------- set grid (catalogue, collection, pairs) ---------- */
    .grid {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 48px 20px;
    }
    @media (max-width: 1000px) {
        .grid {
            grid-template-columns: repeat(2, 1fr);
        }
    }
    @media (max-width: 560px) {
        .grid {
            grid-template-columns: 1fr;
        }
    }
    .phead-g {
        display: grid;
        grid-template-columns: 1.3fr 1fr;
        gap: 40px;
        align-items: end;
    }
    @media (max-width: 800px) {
        .phead-g {
            grid-template-columns: 1fr;
        }
    }
    /* Anchor links land below the sticky header. */
    [id] {
        scroll-margin-top: calc(68px + var(--kz-adminbar) + 24px);
    }
    /* ---------- dropdown (chrome/select.js) ----------
   The native select stays underneath and holds the value; .kzs-btn is styled where each page styles its select. */
    .kzs {
        position: relative;
        display: inline-flex;
        vertical-align: middle;
    }
    .kzs-native {
        position: absolute;
        inset: 0 auto auto 0;
        visibility: hidden;
        pointer-events: none;
    }
    .kzs-btn {
        display: inline-flex;
        align-items: center;
        gap: 10px;
        cursor: pointer;
        text-align: left;
        white-space: nowrap;
        user-select: none;
        &[aria-disabled] {
            cursor: default;
            opacity: 0.5;
        }
        &[aria-expanded='true'] .kzs-chev {
            transform: rotate(180deg);
        }
    }
    .kzs-val {
        flex: 1;
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .kzs-chev {
        flex: none;
        width: 11px;
        height: 7px;
        fill: none;
        stroke: currentColor;
        stroke-width: 1.5;
        stroke-linecap: round;
        stroke-linejoin: round;
        transition: transform var(--t1) var(--ease);
    }
    .kzs-dot {
        flex: none;
        width: 12px;
        height: 12px;
        border-radius: 50%;
        box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.15);
    }
    .kzs-list {
        position: fixed;
        z-index: 200;
        max-width: calc(100vw - 24px);
        overflow: auto;
        overscroll-behavior: contain;
        list-style: none;
        padding: 6px;
        background: #fff;
        color: var(--ink);
        border: 1px solid var(--line);
        border-radius: 6px;
        box-shadow: 0 18px 40px -14px rgba(0, 0, 0, 0.35);
        font-size: 0.90625rem;
        line-height: 1.3;
        animation: kzs-in var(--t1) var(--ease) both;
        &.up {
            animation-name: kzs-up;
        }
    }
    @keyframes kzs-in {
        from {
            opacity: 0;
            transform: translateY(-4px);
        }
    }
    @keyframes kzs-up {
        from {
            opacity: 0;
            transform: translateY(4px);
        }
    }
    .kzs-list {
        & li {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 9px 12px;
            border-radius: 4px;
            cursor: pointer;
            white-space: nowrap;
        }
        & li span {
            flex: 1;
        }
        & li.on {
            background: var(--concrete);
        }
        & li[aria-selected='true'] {
            font-weight: 600;
        }
        & li[aria-disabled] {
            opacity: 0.4;
            cursor: default;
        }
    }
    .kzs-tick {
        flex: none;
        width: 14px;
        height: 14px;
        fill: none;
        stroke: var(--orange);
        stroke-width: 2;
        stroke-linecap: round;
        stroke-linejoin: round;
        visibility: hidden;
    }
    .kzs-list li[aria-selected='true'] .kzs-tick {
        visibility: visible;
    }
    /* ---------- tooltips: data-tip instead of the browser's title box ---------- */
    [data-tip] {
        position: relative;
    }
    @media (hover: hover) {
        [data-tip]:hover::before,
        [data-tip]:focus-visible::before {
            content: attr(data-tip);
            position: absolute;
            left: 50%;
            bottom: calc(100% + 8px);
            z-index: 20;
            transform: translateX(-50%);
            padding: 5px 9px;
            border-radius: 3px;
            background: var(--graphite);
            color: #fff;
            font-size: 0.78125rem;
            font-weight: 500;
            font-style: normal;
            line-height: 1.3;
            white-space: nowrap;
            pointer-events: none;
            box-shadow: 0 10px 20px -8px rgba(0, 0, 0, 0.35);
        }
    }
    /* ---------- browser chrome on form fields and scroll areas ---------- */
    /* No browser-drawn clear button or decoration in search fields. */
    input[type='search'] {
        -webkit-appearance: none;
        appearance: none;
        &::-webkit-search-cancel-button,
        &::-webkit-search-decoration {
            -webkit-appearance: none;
            display: none;
        }
    }
    /* No yellow or blue autofill background. */
    input:-webkit-autofill,
    textarea:-webkit-autofill {
        -webkit-text-fill-color: var(--ink);
        caret-color: var(--ink);
        transition:
            background-color 0s 600000s,
            color 0s 600000s;
    }
    input:autofill,
    textarea:autofill {
        filter: none;
    }
    /* Thin scrollbars inside the page; the page's own stays native. */
    body * {
        scrollbar-width: thin;
        scrollbar-color: rgba(33, 33, 33, 0.25) transparent;
    }
    /* No grey flash on tap. */
    html {
        -webkit-tap-highlight-color: transparent;
    }
    /* ---------- reduced motion ---------- */
    @media (prefers-reduced-motion: reduce) {
        html {
            scroll-behavior: auto;
        }
        *,
        *::before,
        *::after {
            animation-duration: 0.01ms !important;
            animation-iteration-count: 1 !important;
            transition-duration: 0.01ms !important;
            scroll-behavior: auto !important;
        }
    }
}
