/* DawgHousePicks shared design system.
   Every customer-facing page loads this file first, then its own page layer
   (home.css, kennel.css, tools.css). Rules: docs/design-system.md and
   docs/no-vibecode-checklist.md. */

/* TOKENS. Dark room, the logo's purple as the house color, green for money won. */
:root {
    --font-display: "Clash Display", system-ui, "Segoe UI", Arial, sans-serif;
    --font-body: "Hanken Grotesk", system-ui, -apple-system, sans-serif;
    --font-mono: "IBM Plex Mono", ui-monospace, monospace;

    --container: min(1200px, calc(100% - clamp(32px, 6vw, 72px)));
    --measure: 64ch;
    --header-h: 64px;

    --r-xl: 16px;
    --r-lg: 12px;
    --r-md: 10px;
    --r-sm: 6px;
    --r-btn: 8px;
    --r-tag: 4px;

    --space-section: clamp(72px, 9vw, 128px);
    --space-head: clamp(28px, 4vw, 48px);

    --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --dur: 200ms;
    --dur-slow: 560ms;
}

[data-theme="dark"], :root {
    --bg: #110e19;
    --bg-2: #0b0912;
    --surface: #191426;
    --surface-2: #221a37;
    --display: #efeaf7;
    --text: #d6d1e3;
    --muted: #a49bbd;
    --faint: #857da2;
    --violet: #a500e9;
    --violet-ink: #d39bff;
    --violet-deep: #8a00c4;
    --violet-fill: #a500e9;
    --violet-soft: rgb(165 0 233 / 0.14);
    --win: #35d6a4;
    --win-soft: rgb(53 214 164 / 0.13);
    --loss: #f47f8c;
    --loss-soft: rgb(244 127 140 / 0.13);
    --line: rgb(184 166 232 / 0.10);
    --line-2: rgb(184 166 232 / 0.20);
    /* Depth: neutral black shadows plus a lit top edge. Never a colored glow. */
    --depth-1: inset 0 1px 0 rgb(255 255 255 / 0.05), 0 1px 2px rgb(0 0 0 / 0.45), 0 6px 14px rgb(0 0 0 / 0.30);
    --depth-2: inset 0 1px 0 rgb(255 255 255 / 0.06), 0 2px 4px rgb(0 0 0 / 0.40), 0 14px 32px rgb(0 0 0 / 0.45);
    --depth-3: inset 0 1px 0 rgb(255 255 255 / 0.08), 0 8px 16px rgb(0 0 0 / 0.40), 0 32px 72px rgb(0 0 0 / 0.60);
    --shadow: var(--depth-2);
    --on-fill: #ffffff;
    color-scheme: dark;
}

[data-theme="light"] {
    --bg: #efeadf;
    --bg-2: #e6dfd0;
    --surface: #faf7f0;
    --surface-2: #ffffff;
    --display: #16101f;
    --text: #2c2538;
    --muted: #6a6178;
    --faint: #635d76;
    --violet: #8a00c4;
    --violet-ink: #7000a0;
    --violet-deep: #6a0098;
    --violet-fill: #8a00c4;
    --violet-soft: rgb(138 0 196 / 0.10);
    --win: #067452;
    --win-soft: rgb(6 116 82 / 0.12);
    --loss: #c63a52;
    --loss-soft: rgb(198 58 82 / 0.10);
    --line: rgb(60 40 110 / 0.14);
    --line-2: rgb(60 40 110 / 0.28);
    --depth-1: inset 0 1px 0 rgb(255 255 255 / 0.8), 0 1px 2px rgb(0 0 0 / 0.08), 0 6px 14px rgb(0 0 0 / 0.06);
    --depth-2: inset 0 1px 0 rgb(255 255 255 / 0.9), 0 2px 4px rgb(0 0 0 / 0.08), 0 14px 32px rgb(0 0 0 / 0.10);
    --depth-3: inset 0 1px 0 rgb(255 255 255 / 0.9), 0 8px 16px rgb(0 0 0 / 0.10), 0 32px 72px rgb(0 0 0 / 0.18);
    --shadow: var(--depth-2);
    color-scheme: light;
}

/* Calm colors: neutral accent, no motion. */
[data-a11y-epilepsy="true"] {
    --violet: #7d7596;
    --violet-ink: #9a92ad;
    --violet-deep: #5f5876;
    --violet-fill: #5f5876;
    --violet-soft: rgb(125 117 150 / 0.12);
}
/* Calm colors on the light theme: the muted ink still reads at 4.5:1. */
[data-theme="light"][data-a11y-epilepsy="true"] { --violet-ink: #55506a; }

/* The same colors in OKLCH where the browser understands it. A custom
   property stores oklch() even when unsupported, so the feature query is what
   keeps the hex fallback real. */
@supports (color: oklch(1 0 0)) {
    [data-theme="dark"], :root {
        --bg: oklch(0.173 0.023 296.5);
        --bg-2: oklch(0.147 0.019 294.2);
        --surface: oklch(0.207 0.036 295.9);
        --surface-2: oklch(0.243 0.054 294.7);
        --display: oklch(0.945 0.018 303.4);
        --text: oklch(0.870 0.025 298.6);
        --muted: oklch(0.709 0.050 297.2);
        --faint: oklch(0.610 0.056 294.6);
        --violet: oklch(0.556 0.281 310.2);
        --violet-ink: oklch(0.779 0.149 309.0);
        --violet-deep: oklch(0.488 0.247 310.1);
        --violet-fill: oklch(0.556 0.281 310.2);
        --violet-soft: oklch(0.556 0.281 310.2 / 0.14);
        --win: oklch(0.783 0.148 166.9);
        --win-soft: oklch(0.783 0.148 166.9 / 0.13);
        --loss: oklch(0.738 0.162 14.5);
        --loss-soft: oklch(0.738 0.162 14.5 / 0.13);
        --line: oklch(0.764 0.095 296.6 / 0.10);
        --line-2: oklch(0.764 0.095 296.6 / 0.20);
    }
    [data-theme="light"] {
        --bg: oklch(0.938 0.016 86.4);
        --bg-2: oklch(0.905 0.022 85.9);
        --surface: oklch(0.977 0.010 87.5);
        --surface-2: oklch(1 0 0);
        --display: oklch(0.189 0.031 301.9);
        --text: oklch(0.281 0.036 301.0);
        --muted: oklch(0.509 0.037 302.9);
        --faint: oklch(0.493 0.040 295.9);
        --violet: oklch(0.488 0.247 310.1);
        --violet-ink: oklch(0.420 0.212 310.1);
        --violet-deep: oklch(0.404 0.205 310.0);
        --violet-fill: oklch(0.488 0.247 310.1);
        --violet-soft: oklch(0.488 0.247 310.1 / 0.10);
        --win: oklch(0.496 0.104 164.2);
        --win-soft: oklch(0.496 0.104 164.2 / 0.12);
        --loss: oklch(0.548 0.182 16.0);
        --loss-soft: oklch(0.548 0.182 16.0 / 0.10);
        --line: oklch(0.342 0.116 292.3 / 0.14);
        --line-2: oklch(0.342 0.116 292.3 / 0.28);
    }
    [data-a11y-epilepsy="true"] {
        --violet: oklch(0.582 0.051 295.9);
        --violet-ink: oklch(0.676 0.040 298.9);
        --violet-deep: oklch(0.479 0.048 295.2);
        --violet-fill: oklch(0.479 0.048 295.2);
        --violet-soft: oklch(0.582 0.051 295.9 / 0.12);
    }
    [data-theme="light"][data-a11y-epilepsy="true"] { --violet-ink: oklch(0.446 0.042 293.4); }
}

/* MOTION PREFERENCES. Calm colors and Less motion stop everything. */
[data-a11y-epilepsy="true"] *,
[data-a11y-epilepsy="true"] *::before,
[data-a11y-epilepsy="true"] *::after { animation: none !important; transition: none !important; }
[data-a11y-motion="reduce"] *,
[data-a11y-motion="reduce"] *::before,
[data-a11y-motion="reduce"] *::after {
    animation-duration: 0.001ms !important; animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important; scroll-behavior: auto !important;
}
@media (prefers-reduced-motion: reduce) {
    html:not([data-a11y-motion="off"]) *,
    html:not([data-a11y-motion="off"]) *::before,
    html:not([data-a11y-motion="off"]) *::after {
        animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important;
    }
}
/* Accordions and the button press, which the * rules above do not reach.
   ::details-content gets its own rules: a browser that does not know it drops the whole rule. */
[data-a11y-motion="reduce"] details::details-content { transition: none !important; }
[data-a11y-epilepsy="true"] details::details-content { transition: none !important; }
[data-a11y-motion="reduce"] .btn:active,
[data-a11y-epilepsy="true"] .btn:active { scale: none; }
@media (prefers-reduced-motion: reduce) {
    html:not([data-a11y-motion="off"]) details::details-content { transition: none !important; }
}
@media (prefers-reduced-motion: reduce) {
    html:not([data-a11y-motion="off"]) .btn:active { scale: none; }
}
html[data-theme-switching] *,
html[data-theme-switching] *::before,
html[data-theme-switching] *::after { transition: none !important; }

[data-a11y-dyslexia="true"] {
    --font-body: "Atkinson Hyperlegible", system-ui, sans-serif;
    --font-display: "Atkinson Hyperlegible", system-ui, sans-serif;
}
[data-a11y-dyslexia="true"] body { letter-spacing: 0.02em; line-height: 1.8; }
[data-a11y-dyslexia="true"] h1,
[data-a11y-dyslexia="true"] h2,
[data-a11y-dyslexia="true"] h3 { letter-spacing: 0; line-height: 1.2; }

/* BASE */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; background: var(--bg); }
body {
    margin: 0; font-family: var(--font-body); color: var(--text); background: var(--bg);
    font-size: clamp(16px, 0.35vw + 14.6px, 18px); line-height: 1.55;
    overflow-x: clip; -webkit-font-smoothing: antialiased;
    min-height: 100vh; min-height: 100dvh;
}
body.nav-open { overflow: hidden; }
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; -webkit-tap-highlight-color: transparent; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; padding: 0; }
:focus-visible { outline: 2px solid var(--violet); outline-offset: 3px; border-radius: var(--r-sm); }
::selection { background: var(--violet); color: var(--on-fill); }
section[id], [id].anchor { scroll-margin-top: calc(var(--header-h) + 24px); }
h1, h2, h3, h4 { margin: 0; color: var(--display); font-family: var(--font-display); font-weight: 600; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }

.container { width: var(--container); margin-inline: auto; position: relative; }
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.num { font-variant-numeric: tabular-nums; }
.win { color: var(--win); }
.loss { color: var(--loss); }
.visually-hidden {
    position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Inline text links: underlined, the house color on the line only. */
.text-link, .prose a, .fine a, .note a {
    color: var(--display); text-decoration: underline; text-decoration-color: var(--violet);
    text-decoration-thickness: 1.5px; text-underline-offset: 3px;
    transition: color var(--dur) var(--ease), text-decoration-color var(--dur) var(--ease);
}
.text-link:hover, .prose a:hover, .fine a:hover, .note a:hover { color: var(--violet-ink); }

/* SECTIONS. Left-aligned heads, one supporting line at most, hairlines between chapters. */
.section { position: relative; padding-block: var(--space-section); }
.section + .section { border-top: 1px solid var(--line); }
.section-head { max-width: 760px; margin-bottom: var(--space-head); }
.section-head h2 {
    font-size: clamp(30px, 3.6vw, 48px); line-height: 1.06; letter-spacing: -0.02em;
}
.section-head p { margin-top: 14px; max-width: 58ch; font-size: clamp(16px, 1.1vw, 19px); color: var(--muted); }
.section-head--row { display: flex; align-items: end; justify-content: space-between; gap: 24px; max-width: none; }
.fine { font-size: 14px; line-height: 1.55; color: var(--muted); }
.note { font-size: 15px; color: var(--muted); }

/* BUTTONS. Flat fills or outlines. No lift, no glow, no shimmer. */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 9px;
    min-height: 48px; padding: 0 24px; border-radius: var(--r-btn);
    font-family: var(--font-display); font-weight: 600; font-size: 16px; letter-spacing: 0.01em;
    line-height: 1; border: 1.5px solid transparent; white-space: nowrap; cursor: pointer;
    transition: background-color var(--dur) var(--ease), border-color var(--dur) var(--ease), color var(--dur) var(--ease), scale 120ms ease-out;
}
.btn:active { scale: 0.98; }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn svg, .btn svg * { stroke-width: 2; }
.btn-primary { background: var(--violet-fill); color: var(--on-fill); }
.btn-primary:hover { background: var(--violet-deep); }
.btn-outline { background: transparent; color: var(--violet-ink); border-color: var(--violet); }
.btn-outline:hover { background: var(--violet-fill); color: var(--on-fill); }
.btn-ghost { background: transparent; color: var(--display); border-color: var(--line-2); }
.btn-ghost:hover { border-color: var(--violet); color: var(--violet-ink); }
/* Discord: the house purple, not Discord blurple, with the Discord glyph. */
.btn-discord { background: var(--violet-soft); color: var(--violet-ink); border-color: var(--violet); }
.btn-discord:hover { background: var(--violet-deep); color: var(--on-fill); border-color: var(--violet-deep); }
.btn-discord svg { width: 20px; height: 20px; }
.btn-lg { min-height: 56px; padding: 0 30px; font-size: 17px; }
.btn-block { width: 100%; }

/* TAGS. Small, square-cornered, monospace. */
.tag {
    display: inline-flex; align-items: center; gap: 6px; padding: 3px 7px;
    border-radius: var(--r-tag); background: var(--violet-soft); color: var(--violet-ink);
    font-family: var(--font-mono); font-size: 12px; font-weight: 600; line-height: 1.3; letter-spacing: 0.01em;
}
.tag--win { background: var(--win-soft); color: var(--win); }
.tag--loss { background: var(--loss-soft); color: var(--loss); }
.tag--quiet { background: transparent; color: var(--muted); box-shadow: inset 0 0 0 1px var(--line-2); }

/* CARDS. Surface, hairline and a neutral shadow for depth. */
.card {
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl);
    padding: clamp(20px, 2.2vw, 28px); box-shadow: var(--shadow);
}

/* HEADER. Solid, not frosted. */
.site-header {
    position: sticky; top: 0; z-index: 40; background: var(--bg);
    border-bottom: 1px solid var(--line);
}
.nav-shell { display: flex; align-items: center; justify-content: space-between; gap: 18px; min-height: var(--header-h); }
.brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.brand img { width: 38px; height: 38px; border-radius: var(--r-md); }
.brand-copy { display: flex; flex-direction: column; line-height: 1.05; }
.brand-copy strong, .brand-name {
    font-family: var(--font-display); font-size: 19px; font-weight: 600; color: var(--display); letter-spacing: -0.01em;
}
.nav-links { display: flex; align-items: center; gap: 2px; }
.nav-links > a {
    padding: 8px 11px; font-size: 15px; font-weight: 500; white-space: nowrap; color: var(--muted);
    border-radius: var(--r-sm); transition: color var(--dur) var(--ease), background-color var(--dur) var(--ease);
}
.nav-links > a:hover, .nav-links > a[aria-current="page"] { color: var(--display); background: var(--violet-soft); }
.nav-end { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.nav-cta {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 0 18px;
    border-radius: var(--r-btn); color: var(--violet-ink); border: 1.5px solid var(--violet);
    font-family: var(--font-display); font-weight: 600; font-size: 15px; white-space: nowrap;
    transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
.nav-cta:hover { background: var(--violet-deep); color: var(--on-fill); }
.nav-cta.is-primary { background: var(--violet-fill); color: var(--on-fill); border-color: var(--violet-fill); }
.nav-cta.is-primary:hover { background: var(--violet-deep); border-color: var(--violet-deep); }
.nav-mobile-ctas { display: none; }
.a11y-btn {
    display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: var(--r-btn);
    color: var(--display); border: 1px solid var(--line-2);
    transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.a11y-btn:hover { background: var(--violet-soft); border-color: var(--violet); }
.a11y-btn svg { width: 18px; height: 18px; }
.nav-toggle {
    display: none; width: 44px; height: 44px; border-radius: var(--r-btn);
    border: 1px solid var(--line-2); position: relative;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
    content: ""; position: absolute; left: 50%; top: 50%; width: 18px; height: 2px;
    background: var(--display); border-radius: 2px; transform: translate(-50%, -50%);
    transition: transform var(--dur) var(--ease), background-color var(--dur) var(--ease);
}
.nav-toggle span::before { transform: translate(-50%, calc(-50% - 6px)); }
.nav-toggle span::after { transform: translate(-50%, calc(-50% + 6px)); }
.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { transform: translate(-50%, -50%) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after { transform: translate(-50%, -50%) rotate(-45deg); }

/* The nav collapses to a drawer below 1200px. */
@media (max-width: 1200px) {
    .nav-toggle { display: inline-block; }
    .nav-links {
        position: fixed; top: var(--nav-top, var(--header-h)); left: 0; right: 0; bottom: 0; z-index: 39;
        flex-direction: column; align-items: stretch; gap: 0; padding: 12px clamp(16px, 5vw, 40px) 32px;
        background: var(--bg); border-top: 1px solid var(--line); overflow-y: auto;
        visibility: hidden; opacity: 0; transition: opacity var(--dur) var(--ease), visibility 0s linear var(--dur);
    }
    .nav-links[data-open="true"] { visibility: visible; opacity: 1; transition: opacity var(--dur) var(--ease); }
    .nav-links > a {
        padding: 16px 4px; font-size: 18px; color: var(--display); border-radius: 0;
        border-bottom: 1px solid var(--line);
    }
    .nav-links > a:hover { background: transparent; color: var(--violet-ink); }
    .nav-mobile-ctas { display: grid; gap: 10px; margin-top: 22px; }
}
@media (max-width: 760px) { .nav-end .nav-cta, .nav-discord-btn { display: none; } }
@media (max-width: 380px) { .nav-end { gap: 6px; } }

/* ACCESSIBILITY PANEL */
.a11y-panel {
    position: fixed; top: calc(var(--header-h) + 12px); right: 16px; z-index: 60; width: min(320px, calc(100vw - 32px));
    background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-lg); box-shadow: var(--depth-3);
    padding: 16px; visibility: hidden; opacity: 0; translate: 0 -6px; pointer-events: none;
    transition: opacity var(--dur) var(--ease), translate var(--dur) var(--ease), visibility 0s linear var(--dur);
}
.a11y-panel.is-open {
    visibility: visible; opacity: 1; translate: 0 0; pointer-events: auto;
    transition: opacity var(--dur) var(--ease), translate var(--dur) var(--ease);
}
.a11y-panel h3 { margin: 0 0 10px; font-size: 17px; }
.a11y-row {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 10px 12px; border-radius: var(--r-md); background: var(--violet-soft); margin-bottom: 6px;
}
.a11y-row:last-child { margin-bottom: 0; }
.a11y-row-text { display: flex; flex-direction: column; gap: 1px; }
.a11y-row-text strong { font-size: 14px; color: var(--display); font-weight: 600; font-family: var(--font-body); }
.a11y-switch {
    position: relative; width: 42px; height: 24px; flex-shrink: 0; border-radius: 999px;
    background: var(--line-2); transition: background-color var(--dur) var(--ease);
}
.a11y-switch::after {
    content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%;
    background: #fff; transition: transform var(--dur) var(--ease);
}
.a11y-switch[aria-checked="true"] { background: var(--violet); }
.a11y-switch[aria-checked="true"]::after { transform: translateX(18px); }
.a11y-theme { display: flex; padding: 3px; border-radius: var(--r-btn); background: var(--line); }
/* Inner radius is the outer radius minus the 3px padding, so the corners stay concentric. */
.a11y-theme button {
    padding: 5px 12px; font-size: 12px; font-weight: 600; font-family: var(--font-mono);
    border-radius: calc(var(--r-btn) - 3px); color: var(--muted);
    transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
.a11y-theme button[aria-pressed="true"] { background: var(--violet-fill); color: var(--on-fill); }

/* FOOTER */
.site-footer { border-top: 1px solid var(--line); padding: clamp(48px, 6vw, 72px) 0 calc(28px + env(safe-area-inset-bottom)); }
.hf-inner { width: var(--container); margin-inline: auto; }
.hf-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px 40px; }
.hf-brand-top { display: flex; align-items: center; gap: 10px; }
.hf-brand-top img { width: 36px; height: 36px; border-radius: var(--r-md); }
.hf-brand-name { font-family: var(--font-display); font-size: 19px; font-weight: 600; color: var(--display); }
.hf-col h3 { font-family: var(--font-body); font-size: 14px; font-weight: 600; color: var(--display); margin-bottom: 12px; }
.hf-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.hf-col a { display: inline-block; padding-block: 11px; font-size: 15px; line-height: 1.45; color: var(--muted); transition: color var(--dur) var(--ease); }
.hf-col a:hover { color: var(--display); }
.hf-contact li { display: flex; align-items: center; gap: 9px; font-size: 15px; color: var(--muted); }
.hf-contact svg { width: 16px; height: 16px; flex: none; color: var(--violet-ink); }
.hf-contact svg, .hf-contact svg * { stroke-width: 1.5; }
.hf-divider { border: 0; border-top: 1px solid var(--line); margin: 36px 0 22px; }
.hf-bottom { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; }
.hf-social { display: flex; gap: 6px; }
.hf-social a {
    display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: var(--r-btn);
    color: var(--muted); border: 1px solid var(--line); transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.hf-social a:hover { color: var(--display); border-color: var(--violet); }
.hf-social svg { width: 18px; height: 18px; }
.hf-legal { display: grid; gap: 4px; text-align: right; font-size: 13px; color: var(--faint); }
.hf-legal p { margin: 0; }
.hf-legal a { color: var(--muted); text-decoration: underline; text-underline-offset: 2px; text-decoration-color: var(--line-2); }
@media (max-width: 1024px) { .hf-grid { grid-template-columns: 1fr 1fr; } .hf-brand { grid-column: 1 / -1; } }
@media (max-width: 600px) {
    .hf-grid { grid-template-columns: 1fr 1fr; gap: 28px 20px; }
    .hf-col:last-child { grid-column: 1 / -1; }
    .hf-bottom { flex-direction: column; }
    .hf-legal { text-align: left; }
}

/* PHONE STICKY BAR. A solid backing so page text never shows through.
   Hidden states pair opacity with visibility so hidden buttons leave the tab order. */
.mobile-cta {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 35; display: none;
    grid-template-columns: 1.6fr 1fr; gap: 8px;
    padding: 10px clamp(12px, 4vw, 20px) calc(10px + env(safe-area-inset-bottom));
    background: var(--bg); border-top: 1px solid var(--line-2);
    visibility: hidden; opacity: 0; translate: 0 100%;
    transition: opacity var(--dur) var(--ease), translate var(--dur) var(--ease), visibility 0s linear var(--dur);
}
.mobile-cta .btn { min-height: 50px; }
.mobile-cta.is-visible {
    visibility: visible; opacity: 1; translate: 0 0;
    transition: opacity var(--dur) var(--ease), translate var(--dur) var(--ease);
}
.mobile-cta.is-near-offer { visibility: hidden; opacity: 0; translate: 0 100%; }
body.nav-open .mobile-cta { visibility: hidden; opacity: 0; }
@media (max-width: 760px) {
    .mobile-cta { display: grid; }
    body:has(.mobile-cta) { padding-bottom: 76px; }
}

/* 320 to 360px phones: logo, name, the display button and the menu button share one row. */
@media (max-width: 360px) {
    .brand img { width: 36px; height: 36px; }
    .brand-copy strong { font-size: 17px; }
    .nav-shell { gap: 10px; }
}
