/* ============================================================================
   WineDragons — shared landing-page stylesheet
   BLI-135 · extracted from index.html's inline <style> on 2026-08-14
   ----------------------------------------------------------------------------
   WHY THIS FILE EXISTS
   Before this, landing-page/ had no shared CSS at all. index.html carried a
   1,065-line inline <style> that was the real design system, while the pages
   BLI-117 added to the nav got 19-34 lines each and each redeclared :root with
   a different subset of tokens. The markup landed; the design system did not.

   RULES
   - Tokens live here and ONLY here. No page may redeclare :root.
   - This is the shared kit: tokens, reset, nav, buttons, section headers,
     store badges, content primitives, footer, modal/forms.
   - Page-specific layout (index's hero/steps/features, the venue map, a
     detail page's gallery) stays inline in that page. Do not move it here.
   - CACHE-BUSTING: Cloudflare Pages caches hard. Bump ?v= in every <link>
     when this file changes, or a deploy will look like it did nothing.
     Current: v=2
   ============================================================================ */

/* ── TOKENS ───────────────────────────────────────────────────────────────── */
:root {
    --wine: #a01729;
    --wine-dark: #6b0f1a;
    --wine-light: #c41e3a;
    --gold: #f59e0b;
    --bg: #fefbee;
    --text: #111827;
    --muted: #4b5563;
    /* --line and --nav-h were missing from index and hand-rolled per page.
       --nav-h matters: full-bleed pages (the venue map) size against it. */
    --line: #e5e7eb;
    --nav-h: 64px;
}

/* ── RESET ────────────────────────────────────────────────────────────────── */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: "Montserrat", "Inter", sans-serif;
    background: #f9fafb;
    color: var(--text);
    line-height: 1.5;
    overflow-x: hidden;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1rem;
}
@media (min-width: 640px) {
    .container {
        padding: 0 1.5rem;
    }
}
@media (min-width: 1024px) {
    .container {
        padding: 0 2rem;
    }
}

/* ── NAV ──────────────────────────────────────────────────────────────────── */
nav {
    background: linear-gradient(
        to right,
        var(--wine-dark),
        var(--wine),
        var(--wine-light)
    );
    position: sticky;
    top: 0;
    z-index: 50;
    height: var(--nav-h);
    display: flex;
    align-items: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}
nav .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}
.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}
.logo img.icon {
    height: 32px;
    filter: brightness(0) invert(1);
}
.logo img.text {
    height: 22px;
    margin-left: 0.5rem;
    filter: brightness(0) invert(1);
}
@media (max-width: 640px) {
    .logo img.text {
        display: none;
    }
}
.nav-links {
    display: none;
    gap: 1.5rem;
    align-items: center;
}
@media (min-width: 768px) {
    .nav-links {
        display: flex;
    }
}
.nav-link {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: color 0.2s;
}
.nav-link:hover {
    color: #fff;
}
/* Current page gets a persistent underline so the nav says where you are. */
.nav-link[aria-current="page"] {
    color: #fff;
    box-shadow: inset 0 -2px 0 0 var(--gold);
}
/* In-page marketing anchors: dropped below 1024px so the links to
   real content pages fit without overflowing the bar. */
.nav-link.nav-secondary {
    display: none;
}
@media (min-width: 1024px) {
    .nav-link.nav-secondary {
        display: inline-block;
    }
}
.nav-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

/* ── BUTTONS ──────────────────────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
    cursor: pointer;
    border: none;
    white-space: nowrap;
}
.btn-outline {
    color: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: transparent;
}
.btn-outline:hover {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 0.08);
}
.btn-white {
    background: #fff;
    color: var(--wine);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}
.btn-white:hover {
    background: #f3f4f6;
}
.btn-wine {
    background: var(--wine);
    color: #fff;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}
.btn-wine:hover {
    background: var(--wine-dark);
}

/* ── STORE BADGES ─────────────────────────────────────────────────────────── */
.store-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}
.store-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 0.625rem;
    padding: 0.6rem 1.1rem;
    text-decoration: none;
    color: #fff;
    transition: background 0.2s;
}
.store-badge:hover {
    background: rgba(0, 0, 0, 0.5);
}
.store-badge svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}
.store-badge-text {
    display: flex;
    flex-direction: column;
}
.store-badge-text .pre {
    font-size: 0.65rem;
    opacity: 0.8;
    line-height: 1;
}
.store-badge-text .name {
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.2;
}

/* ── SECTION HEADERS ──────────────────────────────────────────────────────── */
.section-label {
    text-align: center;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--wine);
    margin-bottom: 0.75rem;
}
.section-title {
    text-align: center;
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 1rem;
}
@media (min-width: 640px) {
    .section-title {
        font-size: 2.25rem;
    }
}
.section-sub {
    text-align: center;
    color: var(--muted);
    max-width: 40rem;
    margin: 0 auto 3rem;
    font-size: 1.05rem;
    line-height: 1.7;
}

/* ── CONTENT PAGE SHELL ───────────────────────────────────────────────────────
   New in BLI-135. `.page` is the band a content page's body sits in, sized
   against --nav-h so a full-bleed page (the venue map) can compute its height.

   ⚠️ DELIBERATELY NOT HERE: .card, .chip, .grid, .center, .cta.
   Every list and detail page already defines its own with DIFFERENT values —
   feed's card is padded and flat, stories' is a flex column with a cover image.
   Unifying them is a design decision that needs someone to actually look at the
   result, so it is a follow-up (BLI-144), not a blind find-and-replace. Adding
   shared versions now would only shadow-collide with the per-page rules, since
   an inline <style> always wins over this file. */
.page {
    background: var(--bg);
    min-height: calc(100vh - var(--nav-h));
    padding: 2rem 0 4rem;
}
.page-head {
    margin-bottom: 1.75rem;
}
.page-head h1 {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--wine-dark);
    margin-bottom: 0.35rem;
}
@media (min-width: 640px) {
    .page-head h1 {
        font-size: 2rem;
    }
}
.page-head p {
    color: var(--muted);
    font-size: 0.95rem;
}


/* ── CONTENT CARDS ────────────────────────────────────────────────────────────
   BLI-144. These were duplicated across seven pages with only trivial drift —
   `.center` padded 48px on list pages and 56px on detail pages, `.chip` was
   10px on lists and 11px on details, `.cta` margin-top varied 28/32/36px.
   Nobody chose those differences; they accumulated. Unified here.

   ⚠️ `.cover` and `.avatar` are deliberately NOT here. They mean *different
   things* on different pages — `.cover` is a 150px band on stories and a
   full-width image on a post; `.avatar` is a 160px band on the chefs grid and a
   96px circle on a chef profile. Same name, different component. Sharing them
   would silently break one of the two, so they stay page-local. */
.card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 14px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition:
        transform 0.12s,
        box-shadow 0.12s;
}
.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
}
/* Content sitting directly in the card rather than in a .card-body — the feed
   builds its cards that way in JS. */
.card-pad {
    padding: 16px;
}
.card-body {
    padding: 14px;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.card h3 {
    font-size: 17px;
    line-height: 1.3;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 16px;
}

.chip {
    align-self: flex-start;
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    background: #fdecef;
    color: var(--wine);
    border-radius: 999px;
    padding: 2px 8px;
    margin-bottom: 8px;
}
.snippet {
    color: var(--muted);
    font-size: 14px;
    margin-top: 6px;
    flex: 1;
}
.by,
.meta {
    color: var(--muted);
    font-size: 12px;
    margin-top: 10px;
}
.center {
    text-align: center;
    padding: 48px 0;
    color: var(--muted);
}

/* Call-to-action band that closes every content page. */
.cta {
    margin-top: 32px;
    text-align: center;
    background: linear-gradient(135deg, var(--wine), var(--wine-dark));
    color: #fff;
    border-radius: 14px;
    padding: 22px;
}
.cta a {
    display: inline-block;
    background: var(--gold);
    color: #3b2300;
    font-weight: 800;
    border-radius: 9px;
    padding: 10px 18px;
    font-family: "Montserrat", sans-serif;
    margin-top: 10px;
    text-decoration: none;
}

/* ── FOOTER ───────────────────────────────────────────────────────────────── */
footer {
    background: var(--wine-dark);
    padding: 3rem 0;
    color: #fff;
    text-align: center;
}
.footer-logos {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 1.5rem;
}
.footer-logos img.icon {
    height: 30px;
    filter: brightness(0) invert(1);
}
.footer-logos img.text {
    height: 20px;
    margin-left: 0.5rem;
    filter: brightness(0) invert(1);
}
.footer-app-links {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    margin-bottom: 1.75rem;
}
.footer-app-links .store-badge {
    padding: 0.4rem 0.875rem;
    border-radius: 0.5rem;
    font-size: 0.8rem;
}
.footer-app-links .store-badge svg {
    width: 16px;
    height: 16px;
}
.footer-app-links .store-badge-text .name {
    font-size: 0.825rem;
}
.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem 1.25rem;
    margin-bottom: 1rem;
}
.footer-links a {
    color: #d1d5db;
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 500;
}
.footer-links a:hover {
    color: #fff;
}
.footer-links span {
    color: #6b7280;
}
.footer-copyright {
    color: #6b7280;
    font-size: 0.8rem;
}

/* ── MODAL + FORMS ────────────────────────────────────────────────────────── */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}
.modal-content {
    background: #fff;
    padding: 2.5rem;
    border-radius: 1rem;
    max-width: 25rem;
    width: 90%;
    position: relative;
}
.close-modal {
    position: absolute;
    top: 1rem;
    right: 1.25rem;
    font-size: 1.5rem;
    cursor: pointer;
    color: #6b7280;
    background: none;
    border: none;
}
.form-group {
    margin-bottom: 1.25rem;
}
.form-group label {
    display: block;
    margin-bottom: 0.375rem;
    font-weight: 600;
    font-size: 0.875rem;
}
.form-group input {
    width: 100%;
    padding: 0.75rem;
    border: 1.5px solid #d1d5db;
    border-radius: 0.5rem;
    font-size: 1rem;
    transition: border-color 0.2s;
}
.form-group input:focus {
    outline: none;
    border-color: var(--wine);
}
.form-message {
    margin-top: 1rem;
    padding: 0.75rem;
    border-radius: 0.375rem;
    display: none;
    font-size: 0.875rem;
}
.form-message.error {
    background: #fee2e2;
    color: #b91c1c;
    display: block;
}
.form-message.success {
    background: #dcfce7;
    color: #15803d;
    display: block;
}
