/* BarKeeper web recipe browser — shared site stylesheet
 * Palette/style matches the landing page and iOS dark theme
 * (ios_app/ColorSets/colorSet1.json).
 */

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

:root {
    --bg: #0B1C2D;
    --surface: #13293D;
    --surface-elevated: #1B3A4B;
    --surface-hover: #1A3550;
    --text-primary: #F5F1EC;
    --text-secondary: #D8CFC4;
    --text-tertiary: #AFA59A;
    --text-on-accent: #0B1C2D;
    --accent: #E76F3C;
    --accent-pressed: #D65F2E;
    --accent-glow: rgba(231, 111, 60, 0.25);
    /* Filled-accent CTAs: ambient + hotspot (always on; hover layers scale up in rules). */
    --cta-solid-ambient:
        inset 0 1px 0 rgba(255, 255, 255, 0.2),
        inset 0 -1px 1px rgba(30, 18, 10, 0.2),
        0 2px 12px rgba(231, 111, 60, 0.32),
        0 6px 26px rgba(231, 111, 60, 0.24),
        0 0 48px rgba(231, 111, 60, 0.18);
    --cta-solid-hover:
        inset 0 1px 0 rgba(255, 255, 255, 0.28),
        inset 0 -1px 1px rgba(40, 24, 12, 0.12),
        0 6px 22px rgba(231, 111, 60, 0.45),
        0 14px 40px rgba(231, 111, 60, 0.32),
        0 0 72px rgba(255, 150, 100, 0.38),
        0 0 1px rgba(255, 200, 160, 0.35);
    --border: #2C4A5E;
    --page-max-width: 1000px;
    --page-gutter: 32px;
    --site-nav-bar-height: 80px;
    --site-nav-search-max-width: 264px;
    /* Must match `.site-nav-drawer` width below (panel + layout offset). */
    --site-nav-drawer-panel-width: min(292px, 88vw);
}

/* Drawer `top:` + backdrop; JS syncs `--site-nav-bar-height` to measured `.site-nav` height when the bar wraps. */
@media (max-width: 620px) {
    /* Fallback — JS overrides with measured `.site-nav` height when the bar wraps. */
    :root {
        --site-nav-bar-height: 96px;
    }
}

html { scroll-behavior: smooth; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: var(--bg);
    color: var(--text-primary);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    line-height: 1.5;
}

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

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ---------------- NAV (top bar + slide-out menu) ---------------- */
.site-nav-shell { position: relative; }

/* Main stack below the bar: inset when sidebar is open on desktop so content stays centered in the usable width.
   Top padding matches fixed nav height (JS syncs --site-nav-bar-height when the bar wraps). */
.site-main-column {
    transition: padding-left 0.22s ease;
    padding-top: var(--site-nav-bar-height);
}

@media (min-width: 900px) {
    body:not(.site-nav-drawer-collapsed) .site-main-column {
        padding-left: var(--site-nav-drawer-panel-width);
    }
}

.site-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 100;
    background: rgba(11, 28, 45, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(44, 74, 94, 0.3);
}
/* Left: menu + logo. Right (cluster): search + App Store download. */
.site-nav-inner {
    width: 100%;
    max-width: none;
    margin: 0;
    padding-top: 14px;
    padding-bottom: 14px;
    padding-right: var(--page-gutter);
    padding-left: var(--page-gutter);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 16px;
}
/* `margin-right: auto` absorbs all free space on the row, pushing the search and
   CTA siblings hard against the right edge while the start cluster stays on the left. */
.site-nav-start {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-shrink: 0;
    min-width: 0;
    margin-right: auto;
}

/* Search form is a direct child of .site-nav-inner so it can wrap independently of the CTA. */
.site-nav-search {
    flex: 0 1 var(--site-nav-search-max-width);
    min-width: 0;
    max-width: var(--site-nav-search-max-width);
    display: flex;
    align-items: stretch;
    gap: 0;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--surface);
    overflow: hidden;
}
.site-nav-toggle {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    margin: -2px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text-secondary);
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.site-nav-toggle:hover {
    background: var(--surface-hover);
    color: var(--text-primary);
    border-color: rgba(231, 111, 60, 0.35);
}
.site-nav-brand {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    line-height: 0;
}
.site-nav-logo {
    height: clamp(38px, 3.2vw + 24px, 52px);
    width: auto;
}
.site-nav-search-input {
    flex: 1;
    min-width: 0;
    border: none;
    outline: none;
    background: transparent;
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
    padding: 8px 4px 8px 12px;
}
.site-nav-search-input::placeholder {
    color: var(--text-tertiary);
}
.site-nav-search-submit {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}
.site-nav-search-submit:hover {
    background: var(--surface-hover);
    color: var(--text-primary);
}
.site-nav-cta {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 28px;
    border-radius: 100px;
    background: var(--accent);
    color: var(--bg);
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
    box-shadow: var(--cta-solid-ambient);
    transition:
        background 0.3s cubic-bezier(0.4, 0, 0.2, 1),
        box-shadow 0.4s cubic-bezier(0.4, 0, 0.2, 1),
        transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}
.site-nav-cta:hover {
    background: #F48550;
    color: var(--bg);
    box-shadow: var(--cta-solid-hover);
    transform: translateY(-2px);
}
.site-nav-cta:active {
    background: var(--accent-pressed);
    transform: translateY(0);
    box-shadow:
        inset 0 1px 1px rgba(0, 0, 0, 0.15),
        0 1px 8px rgba(231, 111, 60, 0.28),
        0 4px 16px rgba(231, 111, 60, 0.2),
        0 0 32px rgba(231, 111, 60, 0.18);
}
.site-nav-cta:focus-visible {
    outline: 2px solid rgba(255, 200, 170, 0.85);
    outline-offset: 3px;
}

/* Narrow nav: collapse search to a standalone icon button until the user taps it.
   The icon stays on row 1 of the navbar; the CTA may wrap to row 2 (full width below). */
@media (max-width: 720px) {
    .site-nav-search:not(.is-expanded) {
        flex: 0 0 auto;
        width: auto;
        max-width: none;
        border: none;
        background: transparent;
        overflow: visible;
    }
    .site-nav-search:not(.is-expanded) .site-nav-search-input {
        display: none;
    }
    .site-nav-search:not(.is-expanded) .site-nav-search-submit {
        width: auto;
        padding: 8px;
        border-radius: 10px;
        border: 1px solid var(--border);
        background: var(--surface);
        color: var(--text-secondary);
        transition: background 0.15s, color 0.15s, border-color 0.15s;
    }
    .site-nav-search:not(.is-expanded) .site-nav-search-submit:hover {
        background: var(--surface-hover);
        color: var(--text-primary);
        border-color: rgba(231, 111, 60, 0.35);
    }
    /* Expanded: the input fills the rest of row 1, pushing the CTA to row 2. */
    .site-nav-search.is-expanded {
        flex: 1 1 100%;
        width: auto;
        max-width: none;
    }
    /* Whenever search is expanded on narrow, the CTA wraps below — make it full width. */
    .site-nav-search.is-expanded ~ .site-nav-cta {
        flex: 1 1 100%;
        max-width: none;
        justify-content: center;
    }
}

/* Very narrow: the CTA always wraps below the icon — pin it to a full-width row. */
@media (max-width: 480px) {
    .site-nav-cta {
        flex: 1 1 100%;
        max-width: none;
        justify-content: center;
    }
}

.site-nav-drawer {
    box-sizing: border-box;
    position: fixed;
    top: var(--site-nav-bar-height);
    left: 0;
    bottom: 0;
    width: var(--site-nav-drawer-panel-width);
    z-index: 95;
    background: rgba(11, 28, 45, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-right: 1px solid rgba(44, 74, 94, 0.3);
    box-shadow: 8px 0 36px rgba(0, 0, 0, 0.35);
    transform: translateX(-100%);
    visibility: hidden;
    transition: transform 0.22s ease, visibility 0.22s;
    overflow-y: auto;
}

@media (max-width: 899px) {
    body.site-nav-drawer-open .site-nav-drawer {
        transform: translateX(0);
        visibility: visible;
    }
}

@media (min-width: 900px) {
    .site-nav-drawer {
        transform: translateX(0);
        visibility: visible;
    }
    body.site-nav-drawer-collapsed .site-nav-drawer {
        transform: translateX(-100%);
        visibility: hidden;
    }
}

.site-nav-drawer-list {
    list-style: none;
    padding: 14px 10px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.site-nav-drawer-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 10px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    transition: background 0.15s, color 0.15s;
}
.site-nav-drawer-icon {
    flex-shrink: 0;
    display: block;
    color: var(--text-tertiary);
}
.site-nav-drawer-link:hover {
    background: var(--surface-hover);
    color: var(--text-primary);
}
.site-nav-drawer-link:hover .site-nav-drawer-icon {
    color: var(--text-secondary);
}
.site-nav-drawer-link[aria-current="page"] {
    background: var(--surface-elevated);
    color: var(--text-primary);
}
.site-nav-drawer-link[aria-current="page"] .site-nav-drawer-icon {
    color: var(--accent);
}
.site-nav-drawer-label {
    min-width: 0;
}

.site-nav-drawer-divider {
    border: none;
    border-top: 1px solid rgba(44, 74, 94, 0.45);
    margin: 12px 16px 0;
}
.site-nav-drawer-legal-wrap {
    padding: 12px 10px 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.site-nav-drawer-legal-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.site-nav-drawer-legal-link {
    display: block;
    padding: 8px 16px;
    border-radius: 8px;
    color: var(--text-tertiary);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: background 0.15s, color 0.15s;
}
.site-nav-drawer-legal-link:hover {
    background: var(--surface-hover);
    color: var(--text-secondary);
}
.site-nav-drawer-copyright {
    margin: 0;
    padding: 0 16px;
    font-size: 12px;
    line-height: 1.4;
    color: var(--text-tertiary);
}

.site-nav-backdrop {
    display: none;
    position: fixed;
    inset: var(--site-nav-bar-height) 0 0 0;
    z-index: 90;
    background: rgba(0, 0, 0, 0.5);
}

@media (max-width: 899px) {
    body.site-nav-drawer-open {
        overflow: hidden;
    }
    body.site-nav-drawer-open .site-nav-backdrop {
        display: block;
    }
}

/* ---------------- PAGE LAYOUT ---------------- */
.page {
    max-width: var(--page-max-width);
    margin: 0 auto;
    padding: 32px var(--page-gutter) 80px;
}
.page-narrow {
    max-width: 720px;
    margin: 0 auto;
    padding: 32px var(--page-gutter) 80px;
}
/* Detail pages: one full-width column for recipe intro + related / grid (matches landing content width). */
.page-detail {
    width: 100%;
    min-width: 0;
}
.page > .page-detail + * {
    margin-top: 48px;
    width: 100%;
    min-width: 0;
}
/* Legacy detail markup (pre-unified layout): intro lived in .page-narrow (720px) and the
   grid/related block in a sibling .page (1000px). Match the main column to --page-max-width
   until every object in S3 is re-rendered. */
body[data-page-type="cocktail"] .page-narrow,
body[data-page-type="collection"] .page-narrow,
body[data-page-type="ingredient"] .page-narrow {
    max-width: var(--page-max-width);
}

h1 { font-size: clamp(30px, 5vw, 44px); font-weight: 700; letter-spacing: -0.01em; line-height: 1.1; }
h2 { font-size: clamp(22px, 3.2vw, 28px); font-weight: 700; margin-bottom: 16px; }
h3 { font-size: 18px; font-weight: 600; }

p { color: var(--text-secondary); }
p + p { margin-top: 12px; }

.section-label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1.8px;
    color: var(--accent);
    text-transform: uppercase;
    margin-bottom: 12px;
}

.breadcrumb {
    display: flex;
    gap: 8px;
    font-size: 13px;
    color: var(--text-tertiary);
    margin-bottom: 16px;
}
.breadcrumb a { color: var(--accent); text-decoration: none; }
.breadcrumb a:hover { color: var(--accent-pressed); }
.breadcrumb span + span::before { content: "/"; padding-right: 8px; color: var(--text-tertiary); }

/* ---------------- HERO (cocktail / collection) ---------------- */
.hero {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    background: var(--surface);
    aspect-ratio: 3 / 2;
    margin-bottom: 20px;
}
.hero img { width: 100%; height: 100%; object-fit: cover; }
.hero-overlay {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    padding: 24px 20px 20px;
    background: linear-gradient(to top, rgba(0,0,0,0.78), transparent);
}
.hero-overlay h1 { color: #fff; text-shadow: 0 2px 8px rgba(0,0,0,0.4); }
.hero-placeholder {
    background: linear-gradient(135deg, var(--surface) 0%, var(--surface-elevated) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-tertiary);
    font-size: 14px;
}
.hero + .cta-module {
    margin-top: 16px;
    margin-bottom: 28px;
}

/* ---------------- META ROW ---------------- */
.meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 28px;
}
.meta-row span { display: inline-flex; gap: 6px; align-items: baseline; }
.meta-row .meta-label {
    text-transform: uppercase;
    font-size: 10px;
    letter-spacing: 1.2px;
    color: var(--text-tertiary);
}

/* ---------------- CHIPS ---------------- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.chip {
    display: inline-flex;
    padding: 6px 12px;
    border-radius: 100px;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 500;
}

/* ---------------- INGREDIENTS + INSTRUCTIONS ---------------- */
.ingredients {
    border-top: 1px solid var(--border);
    margin-bottom: 32px;
}
.ingredient-row {
    display: flex;
    align-items: baseline;
    gap: 16px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
    font-size: 15px;
}
.ingredient-quantity {
    flex: 0 0 120px;
    color: var(--text-secondary);
    font-variant-numeric: tabular-nums;
}
.ingredient-name {
    color: var(--text-primary);
    font-weight: 600;
    text-decoration: none;
}
.ingredient-name:hover { color: var(--accent); }
.ingredient-mod {
    color: var(--text-tertiary);
    font-size: 13px;
    font-weight: 400;
    margin-left: 6px;
}

.instructions {
    list-style: none;
    counter-reset: step;
    margin-bottom: 32px;
}
.instructions li {
    counter-increment: step;
    padding: 12px 0 12px 40px;
    position: relative;
    border-bottom: 1px solid var(--border);
    color: var(--text-primary);
    font-size: 15px;
    line-height: 1.6;
}
.instructions li:last-child { border-bottom: none; }
.instructions li::before {
    content: counter(step);
    position: absolute;
    left: 0;
    top: 12px;
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--accent);
    font-size: 12px;
    font-weight: 700;
}

.garnish-list {
    list-style: none;
    padding: 0;
    margin-bottom: 32px;
}
.garnish-list li {
    padding: 6px 0;
    color: var(--text-secondary);
    font-size: 14px;
}

/* ---------------- CTA MODULE ---------------- */
.cta-apple-logo {
    flex-shrink: 0;
    display: block;
    width: 21px;
    height: 21px;
}
.cta-module {
    background: var(--surface);
    border: 1px solid var(--border);
    border-left: 4px solid var(--accent);
    border-radius: 12px;
    padding: 24px 28px;
    margin: 40px 0;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.25);
}
.cta-module h3 {
    color: var(--text-primary);
    margin-bottom: 8px;
}
.cta-module p {
    color: var(--text-secondary);
    margin-bottom: 20px;
    font-size: 15px;
}
.cta-module .cta-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 13px 28px;
    border-radius: 10px;
    background: var(--accent);
    color: var(--text-on-accent);
    text-decoration: none;
    font-weight: 700;
    font-size: 17px;
    box-shadow: var(--cta-solid-ambient);
    transition:
        background 0.3s cubic-bezier(0.4, 0, 0.2, 1),
        box-shadow 0.4s cubic-bezier(0.4, 0, 0.2, 1),
        transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}
.cta-module .cta-button:hover {
    background: #F48550;
    box-shadow: var(--cta-solid-hover);
    transform: translateY(-2px);
}
.cta-module .cta-button:active {
    background: var(--accent-pressed);
    transform: translateY(0);
    box-shadow:
        inset 0 1px 1px rgba(0, 0, 0, 0.15),
        0 1px 8px rgba(231, 111, 60, 0.28),
        0 4px 16px rgba(231, 111, 60, 0.2),
        0 0 32px rgba(231, 111, 60, 0.18);
}
.cta-module .cta-button:focus-visible {
    outline: 2px solid rgba(255, 200, 170, 0.85);
    outline-offset: 3px;
}
.cta-module .cta-note {
    display: block;
    margin-top: 10px;
    font-size: 12px;
    color: var(--text-tertiary);
}

/* ---------------- DIRECTORY LIST (ingredients — no image tiles) ---------------- */
.directory-list {
    display: flex;
    flex-direction: column;
    margin-top: 16px;
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    background: var(--surface);
}
.directory-item.directory-item--compact {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    border-bottom: 1px solid var(--border);
    text-decoration: none;
    color: inherit;
    transition: background 0.12s;
}
.directory-item.directory-item--compact:last-child {
    border-bottom: none;
}
.directory-item.directory-item--compact:hover {
    background: var(--surface-hover);
}
.directory-item-name {
    flex: 1 1 auto;
    min-width: 0;
    font-weight: 600;
    font-size: 15px;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.directory-item-meta {
    flex: 0 1 auto;
    font-size: 13px;
    color: var(--text-secondary);
    white-space: nowrap;
    text-align: right;
}
.directory-item-chevron {
    flex: 0 0 auto;
    display: flex;
    color: var(--text-tertiary);
    opacity: 0.85;
}

/* ---------------- CARD GRID ---------------- */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
    margin-top: 16px;
}
.card {
    background: var(--surface);
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    border: 1px solid transparent;
    transition: border-color 0.15s, transform 0.15s;
    display: flex;
    flex-direction: column;
}
.card:hover {
    border-color: var(--border);
    transform: translateY(-2px);
}
.card-image {
    aspect-ratio: 3 / 2;
    background: var(--surface-elevated);
    overflow: hidden;
}
.card-image img { width: 100%; height: 100%; object-fit: cover; }
.card-body { padding: 16px; }
.card-title { color: var(--text-primary); font-size: 16px; font-weight: 600; margin-bottom: 4px; }
.card-subtitle { color: var(--text-secondary); font-size: 13px; line-height: 1.4; }

/* Collection cards (landing featured + /collections browse) */
.collection-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
    margin-top: 8px;
}
.collection-card {
    background: var(--surface);
    border-radius: 16px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    border: 1px solid transparent;
    transition: border-color 0.2s, transform 0.2s;
    display: flex;
    flex-direction: column;
}
.collection-card:hover {
    border-color: var(--border);
    transform: translateY(-2px);
}
.collection-card:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}
.collection-card-image {
    aspect-ratio: 3 / 2;
    background: var(--surface-elevated);
    overflow: hidden;
}
.collection-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.collection-card-body {
    padding: 18px 20px 20px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1 1 auto;
}
.collection-card-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.25;
}
.collection-card-desc {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.45;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.collection-card-meta {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--text-tertiary);
    margin-top: auto;
    padding-top: 4px;
}

/* ---------------- HOMEPAGE EXTRAS ---------------- */
.home-hero {
    text-align: center;
    padding: 64px var(--page-gutter) 40px;
    max-width: var(--page-max-width);
    margin: 0 auto;
}
.home-hero h1 { margin-bottom: 16px; }
.home-hero p { font-size: 18px; line-height: 1.55; max-width: 560px; margin: 0 auto 28px; }
.home-ctas { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: 100px;
    background: var(--accent);
    color: var(--text-on-accent);
    text-decoration: none;
    font-weight: 600;
    box-shadow: var(--cta-solid-ambient);
    transition:
        background 0.3s cubic-bezier(0.4, 0, 0.2, 1),
        box-shadow 0.4s cubic-bezier(0.4, 0, 0.2, 1),
        transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}
.btn-primary:hover {
    background: #F48550;
    box-shadow: var(--cta-solid-hover);
    transform: translateY(-2px);
}
.btn-primary:active {
    background: var(--accent-pressed);
    transform: translateY(0);
    box-shadow:
        inset 0 1px 1px rgba(0, 0, 0, 0.15),
        0 2px 10px rgba(231, 111, 60, 0.28),
        0 6px 20px rgba(231, 111, 60, 0.18),
        0 0 32px rgba(231, 111, 60, 0.16);
}
.btn-primary:focus-visible {
    outline: 2px solid rgba(255, 200, 170, 0.85);
    outline-offset: 3px;
}
@media (prefers-reduced-motion: reduce) {
    .site-nav-cta:hover,
    .site-nav-cta:active,
    .cta-module .cta-button:hover,
    .cta-module .cta-button:active,
    .btn-primary:hover,
    .btn-primary:active {
        transform: none;
    }
}
.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: 100px;
    background: var(--surface);
    border: 1px solid var(--accent);
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    box-shadow: 0 0 24px var(--accent-glow);
}
.btn-secondary:hover { background: var(--surface-hover); }

/* ---------------- BROWSER PAGE ---------------- */
.browser-toolbar {
    background: var(--bg);
    padding: 12px 0 16px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 20px;
}
/* Browse pages (/cocktails/, /ingredients/, /collections/): CTA above search + filters */
.page-cocktails-browser .cta-module,
.page-ingredients-directory .cta-module,
.page-collections-directory .cta-module {
    margin-top: 8px;
    margin-bottom: 20px;
}
.page-cocktails-browser .cta-module + .browser-toolbar,
.page-ingredients-directory .cta-module + .browser-toolbar,
.page-collections-directory .cta-module + .browser-toolbar {
    margin-top: 0;
}
.search-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 10px 14px;
}
.search-bar input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-size: 15px;
    font-family: inherit;
}
.search-bar input::placeholder { color: var(--text-tertiary); }
.search-bar svg { color: var(--text-tertiary); flex: 0 0 auto; }

.filter-groups {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    margin-top: 14px;
}
.filter-group {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}
.filter-group-label {
    font-size: 11px;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: var(--text-tertiary);
    margin-right: 4px;
}
.filter-chip {
    padding: 6px 12px;
    border-radius: 100px;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    user-select: none;
    transition: border-color 0.1s, color 0.1s, background 0.1s;
}
.filter-chip:hover { color: var(--text-primary); border-color: var(--text-tertiary); }
.filter-chip[aria-pressed="true"] {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--text-on-accent);
}
.filter-clear {
    padding: 6px 10px;
    border-radius: 100px;
    background: transparent;
    border: 1px solid transparent;
    color: var(--accent);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
}
.filter-clear:hover { color: var(--accent-pressed); }

.results-summary { color: var(--text-tertiary); font-size: 13px; margin-bottom: 16px; }
.empty-state {
    text-align: center;
    padding: 80px var(--page-gutter);
    color: var(--text-secondary);
    font-size: 16px;
}

/* ---------------- FOOTER ---------------- */
.site-footer {
    border-top: 1px solid rgba(44, 74, 94, 0.3);
    padding: 32px var(--page-gutter);
    max-width: var(--page-max-width);
    margin: 40px auto 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
.site-footer-brand { display: flex; gap: 12px; align-items: center; }
.site-footer-brand img { height: 20px; width: auto; }
.site-footer-copy { color: var(--text-secondary); opacity: 0.6; font-size: 13px; }
.site-footer-links { display: flex; gap: 20px; list-style: none; }
.site-footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 13px;
}
.site-footer-links a:hover { color: var(--text-primary); }

/* ---------------- MOBILE ---------------- */
@media (max-width: 600px) {
    :root { --page-gutter: 20px; }
    .page { padding: 24px var(--page-gutter) 60px; }
    .page-narrow { padding: 24px var(--page-gutter) 60px; }
    .page > .page-detail + * { margin-top: 40px; }
    .ingredient-quantity { flex: 0 0 90px; font-size: 14px; }
    .site-nav-inner {
        padding-top: 12px;
        padding-bottom: 12px;
        gap: 10px;
    }
    .site-nav-start {
        gap: 18px;
    }
    .home-hero { padding: 40px var(--page-gutter) 24px; }
    .cta-module { padding: 20px 22px; }
    .card-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
    .collection-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 12px;
    }
    .directory-item.directory-item--compact {
        display: grid;
        grid-template-columns: 1fr auto;
        grid-template-rows: auto auto;
        gap: 4px 10px;
        align-items: start;
        padding: 12px 14px;
    }
    .directory-item-name {
        grid-column: 1;
        grid-row: 1;
        white-space: normal;
    }
    .directory-item-chevron {
        grid-column: 2;
        grid-row: 1;
        margin-top: 2px;
    }
    .directory-item-meta {
        grid-column: 1 / -1;
        grid-row: 2;
        text-align: left;
        white-space: normal;
    }
}
