/* ==========================================================================
   Rubins Fine Roastery — Digital Menu
   Design language: fine-dining tasting menu meets specialty coffee atelier.
   Display: Fraunces (characterful serif) / Body: Manrope (clean geometric sans)
   ========================================================================== */

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

:root {
    /* Fixed atelier palette (independent of admin-set primary/accent) */
    --ink: #14100d;
    --parchment: #ece3d2;
    --parchment-card: #f6f0e4;
    --wine: #5c2a2a;
    --stone: #8a7f6e;
    --stone-dark: #55493a;
    --hairline: rgba(184, 144, 90, 0.35);

    /* Theme-resolved tokens (overridden below) */
    --bg: var(--parchment);
    --bg-elevated: var(--parchment-card);
    --text: var(--ink);
    --text-muted: var(--stone-dark);
    --rule: var(--hairline);
    --nav-bg: rgba(246, 240, 228, 0.92);
    --shadow: rgba(20, 16, 13, 0.12);
    --img-filter: none;
}

html[data-theme="dark"] {
    --bg: #14100d;
    --bg-elevated: #1c1712;
    --text: #ece3d2;
    --text-muted: #b8ac97;
    --rule: rgba(184, 144, 90, 0.28);
    --nav-bg: rgba(20, 16, 13, 0.92);
    --shadow: rgba(0, 0, 0, 0.45);
    --img-filter: brightness(0.92) saturate(1.05);
}

html, body { background: var(--bg); }

body {
    font-family: 'Manrope', system-ui, -apple-system, sans-serif;
    color: var(--text);
    line-height: 1.6;
    padding-bottom: 40px;
    transition: background 0.25s ease, color 0.25s ease;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: 'Fraunces', Georgia, serif; }

/* ---------- Top controls ---------- */

.top-controls {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 30;
    display: flex;
    gap: 8px;
}

.ctrl-btn {
    background: var(--bg-elevated);
    color: var(--text);
    border: 1px solid var(--rule);
    border-radius: 999px;
    width: 40px;
    height: 40px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 4px 14px var(--shadow);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.15s ease, border-color 0.15s ease;
}

.ctrl-btn:hover { transform: translateY(-1px); border-color: var(--accent, #b8905a); }

.theme-switch .icon-moon { display: none; font-size: 1rem; }
.theme-switch .icon-sun { display: none; font-size: 1.05rem; }
html[data-theme="light"] .theme-switch .icon-moon { display: inline; }
html[data-theme="dark"] .theme-switch .icon-sun { display: inline; }

/* ---------- Hero ---------- */

.hero {
    background: var(--primary, var(--ink));
    color: #ece3d2;
    padding: 64px 20px 52px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 60% 50% at 50% 0%, rgba(184, 144, 90, 0.16), transparent 70%);
    pointer-events: none;
}

.hero-inner {
    position: relative;
    max-width: 560px;
    margin: 0 auto;
    text-align: center;
}

.hero .logo {
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 20px;
    border: 1px solid rgba(184, 144, 90, 0.4);
}

.eyebrow {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--accent, #b8905a);
    margin-bottom: 14px;
}

.hero-name {
    font-size: clamp(2.1rem, 6vw, 3rem);
    font-weight: 500;
    font-style: italic;
    letter-spacing: 0.01em;
    line-height: 1.15;
}

.hero-rule {
    width: 56px;
    height: 1px;
    background: var(--accent, #b8905a);
    margin: 22px auto;
}

.site-desc {
    font-size: 0.95rem;
    color: rgba(236, 227, 210, 0.75);
    max-width: 420px;
    margin: 0 auto 22px;
}

.phone-link {
    display: inline-block;
    color: var(--accent, #b8905a);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.85rem;
    letter-spacing: 0.03em;
    border: 1px solid rgba(184, 144, 90, 0.5);
    padding: 9px 22px;
    border-radius: 999px;
    transition: background 0.15s ease, color 0.15s ease;
}

.phone-link:hover { background: var(--accent, #b8905a); color: var(--ink); }

/* ---------- Category nav ---------- */

.category-nav {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    gap: 4px;
    overflow-x: auto;
    background: var(--nav-bg);
    backdrop-filter: blur(8px);
    padding: 14px 18px;
    border-bottom: 1px solid var(--rule);
    white-space: nowrap;
    scrollbar-width: none;
}

.category-nav::-webkit-scrollbar { display: none; }

.category-nav a {
    text-decoration: none;
    color: var(--text-muted);
    padding: 8px 16px;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    border-radius: 999px;
    transition: color 0.15s ease, background 0.15s ease;
}

.category-nav a:hover { color: var(--text); background: var(--rule); }

/* ---------- Main / sections ---------- */

main { max-width: 740px; margin: 0 auto; padding: 48px 20px 24px; }

.category-section { margin-bottom: 56px; scroll-margin-top: 74px; }

.reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.5s ease, transform 0.5s ease; }
.reveal.in-view { opacity: 1; transform: translateY(0); }

.section-heading {
    display: flex;
    align-items: baseline;
    gap: 18px;
    margin-bottom: 22px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--rule);
}

.section-numeral {
    font-family: 'Fraunces', serif;
    font-size: 1.1rem;
    font-style: italic;
    color: var(--accent, #b8905a);
    flex-shrink: 0;
    min-width: 1.6em;
}

.section-heading-text h2 {
    font-size: 1.5rem;
    font-weight: 500;
    letter-spacing: 0.01em;
}

.category-desc {
    color: var(--text-muted);
    font-size: 0.85rem;
    font-style: italic;
    margin-top: 4px;
}

/* ---------- Product list (menu-style rows) ---------- */

.product-list { display: flex; flex-direction: column; gap: 26px; }

.product-item {
    display: flex;
    gap: 18px;
    transition-delay: 0.03s;
}

.product-image {
    flex-shrink: 0;
    width: 84px;
    height: 84px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 10px var(--shadow);
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: var(--img-filter);
}

.product-body { flex: 1; min-width: 0; }

.product-line {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.product-line h3 {
    font-size: 1.05rem;
    font-weight: 500;
    white-space: nowrap;
    flex-shrink: 0;
}

.leader {
    flex: 1;
    border-bottom: 1px dotted var(--rule);
    height: 0;
    transform: translateY(-4px);
    min-width: 16px;
}

.price {
    font-family: 'Fraunces', serif;
    font-weight: 500;
    font-size: 1.02rem;
    color: var(--accent, #b8905a);
    flex-shrink: 0;
    white-space: nowrap;
}

.product-desc {
    font-size: 0.86rem;
    color: var(--text-muted);
    margin-top: 5px;
    max-width: 52ch;
}

.empty-state {
    text-align: center;
    padding: 80px 16px;
    color: var(--text-muted);
    font-style: italic;
}

/* ---------- Footer ---------- */

.menu-footer {
    text-align: center;
    padding: 40px 20px 20px;
    color: var(--text-muted);
    font-size: 0.82rem;
    max-width: 480px;
    margin: 0 auto;
}

.footer-rule {
    width: 40px;
    height: 1px;
    background: var(--rule);
    margin: 0 auto 24px;
}

.footer-label {
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--accent, #b8905a);
    margin-bottom: 8px;
}

.footer-address { margin-bottom: 10px; }

.menu-footer a { color: var(--accent, #b8905a); text-decoration: none; }
.menu-footer a:hover { text-decoration: underline; }

.menu-footer .powered {
    margin-top: 20px;
    opacity: 0.55;
    font-size: 0.7rem;
    letter-spacing: 0.03em;
}

/* ---------- Responsive ---------- */

@media (max-width: 480px) {
    .hero { padding: 56px 16px 40px; }
    .hero-name { font-size: 1.9rem; }
    .product-image { width: 68px; height: 68px; }
    .product-line h3 { font-size: 0.98rem; }
    main { padding: 36px 16px 16px; }
}

@media (prefers-reduced-motion: reduce) {
    .reveal { transition: none; opacity: 1; transform: none; }
}
