/* Morro Bay Lobster Co — brand theme (see branding.md for source palette) */
/* Mobile-first: base rules target small screens, min-width queries enhance for larger screens. */

:root {
    --coral: #fa7e72;
    --red-orange: #ef452a;
    --sky-blue: #7de0f7;
    --sandy-yellow: #f7c365;
    --muted-brown: #984f49;
    --dark-chocolate: #5e201d;
    --black: #000000;
    --white: #ffffff;

    /* Semantic aliases — these are the ones that flip in dark mode below. */
    --text: var(--dark-chocolate);
    --bg: var(--white);
    --bg-soft: #fff6f4;
    --heading: var(--dark-chocolate);
    --surface: var(--white);
    --muted: var(--muted-brown);
    --link: var(--red-orange);
    --link-hover: var(--muted-brown);
    --footer-bg: var(--dark-chocolate);
}

/* Dark mode follows the visitor's OS/browser setting — no toggle, no JS. */
@media (prefers-color-scheme: dark) {
    :root {
        --text: #f5e9e4;
        --bg: #1c0f0d;
        --bg-soft: #2a1613;
        --heading: var(--sandy-yellow);
        --surface: #2a1613;
        --muted: #e2a99b;
        --link: var(--coral);
        --link-hover: var(--sandy-yellow);
        --footer-bg: #120807;
    }
}

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

[hidden] { display: none !important; }

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--text);
    background-color: var(--bg);
    font-size: 16px;
}

h1, h2, .logo {
    font-family: 'Playfair Display', serif;
    color: var(--heading);
}

a { color: var(--link); }
a:hover { color: var(--link-hover); }

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

/* Motion: only the decorative SVG wave animates, and only if the user hasn't asked for less motion. */
@media (prefers-reduced-motion: reduce) {
    .wave-divider path { animation: none !important; }
}

/* Header / nav */

header {
    background: var(--surface);
    padding: 0.85rem 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 0;
    z-index: 1000;
}

nav {
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    padding: 0 1rem;
}

.logo {
    font-size: 1.15rem;
    font-weight: 700;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.logo-mark { height: 2.75rem; width: auto; }

.nav-links {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text);
    font-weight: 500;
    font-size: 0.95rem;
}

.nav-social {
    display: inline-flex;
    align-items: center;
    color: var(--text);
}

.nav-social svg { width: 1.3rem; height: 1.3rem; fill: currentColor; display: block; }
.nav-social img { width: 1.35rem; height: 1.35rem; display: block; }
.nav-social:hover { opacity: 0.65; }

.nav-links a.button {
    background: var(--red-orange);
    color: var(--white);
    padding: 0.55rem 1rem;
    border-radius: 6px;
}

.nav-links a.button:hover { background: var(--muted-brown); }

/* Layout */

main { max-width: 1000px; margin: 0 auto; }

section {
    padding: 1.75rem 1.25rem;
    max-width: 800px;
    margin: 0 auto;
}

h2, #menu h1 {
    font-size: 1.6rem;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid var(--coral);
    display: inline-block;
}

/* Hero */

#hero {
    text-align: center;
    padding: 2rem 1.25rem 0;
    background: linear-gradient(180deg, var(--bg-soft) 0%, var(--bg) 100%);
}

.hero-logo { width: 128px; height: auto; margin: 0 auto 1rem; }

#hero h1 { font-size: 1.4rem; margin-bottom: 0.6rem; line-height: 1.3; }
.subtitle { font-size: 0.95rem; color: var(--muted); }

/* Decorative wave divider (SVG + CSS animation only, no JS) */

.wave-divider {
    display: block;
    width: 100%;
    height: auto;
    margin-top: 0.5rem;
    margin-bottom: -0.5rem;
}

#hero + section { padding-top: 1.5rem; }

.wave-divider path { animation: wave-drift 9s ease-in-out infinite; }

@keyframes wave-drift {
    0%   { transform: translateX(0); }
    50%  { transform: translateX(-2.5%); }
    100% { transform: translateX(0); }
}

/* Calendar widget */

.calendar-wrapper {
    width: 100%;
}

.calendar-list {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.calendar-item {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 0.4rem 1rem;
    padding: 0.85rem 1rem;
    background: var(--surface);
    border-left: 4px solid var(--sky-blue);
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.cal-date {
    font-weight: 700;
    color: var(--red-orange);
    font-size: 0.9rem;
    white-space: nowrap;
}

.cal-event {
    font-size: 0.9rem;
    color: var(--text);
}

.cal-map-link {
    color: var(--link);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.cal-map-link:hover { color: var(--link-hover); }

.calendar-status {
    text-align: center;
    color: var(--muted);
    font-style: italic;
    padding: 1.5rem;
    background: var(--bg-soft);
    border-radius: 8px;
}

.schedule-note {
    margin-top: 1rem;
    font-size: 0.75rem;
    color: var(--muted);
    line-height: 1.7;
    text-align: center;
}

/* Instagram section */

#instagram-feed {
    min-height: 100px;
}

.feed-placeholder {
    text-align: center;
    color: var(--muted);
    font-style: italic;
    background: var(--bg-soft);
    border-radius: 8px;
    padding: 1.75rem 1rem;
}

.feed-placeholder a { font-weight: 600; }

.ig-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    max-width: 420px;
    margin: 0 auto;
}

.ig-tile {
    position: relative;
    display: block;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: 8px;
    background: var(--bg-soft);
}

.ig-tile img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.25s ease;
}

.ig-tile:hover img { transform: scale(1.04); }

@media (prefers-reduced-motion: reduce) {
    .ig-tile img { transition: none; }
    .ig-tile:hover img { transform: none; }
}

.ig-video {
    position: absolute;
    top: 0.4rem;
    right: 0.5rem;
    color: var(--white);
    font-size: 0.85rem;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}

#instagram h2 a {
    color: var(--heading);
    text-decoration: none;
}

#instagram h2 a:hover { color: var(--link); }

/* Fan Favorites carousel */

.favorites-carousel { position: relative; }

.favorites-track {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 0.75rem;
    scrollbar-width: thin;
}

.favorite-card {
    flex: 0 0 100%;
    scroll-snap-align: start;
    background: var(--surface);
    border-left: 4px solid var(--sky-blue);
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
    padding: 1.1rem;
}

.favorite-platform {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    text-transform: uppercase;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    color: var(--muted);
    margin-bottom: 0.6rem;
}

.platform-icon { width: 1.1em; height: 1.1em; fill: currentColor; }

.favorite-quote {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-size: 1.05rem;
    color: var(--text);
    margin-bottom: 0.6rem;
}

.favorite-handle { font-size: 0.9rem; font-weight: 700; }

.favorites-controls {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.favorites-btn {
    background: var(--bg-soft);
    color: var(--link);
    border: none;
    border-radius: 6px;
    width: 2.25rem;
    height: 2.25rem;
    font-size: 1.1rem;
    cursor: pointer;
}

.favorites-btn:hover { color: var(--link-hover); }
.favorites-btn:disabled { opacity: 0.4; cursor: default; }

/* Contact */

#contact { text-align: center; }

.review-ask {
    margin-top: 1.5rem;
    font-size: 0.9rem;
    color: var(--muted);
}

.mailto-button {
    display: inline-block;
    width: 100%;
    margin-top: 1rem;
    background: var(--red-orange);
    color: var(--white);
    text-decoration: none;
    font-weight: 600;
    padding: 0.95rem 1.8rem;
    border-radius: 8px;
}

.mailto-button:hover { background: var(--muted-brown); color: var(--white); }

/* Menu page */

.menu-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-top: 1rem;
}

.menu-card {
    background: var(--bg-soft);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.menu-card img {
    aspect-ratio: 4 / 3;
    object-fit: cover;
    width: 100%;
}

.menu-grid-compact {
    grid-template-columns: repeat(auto-fill, minmax(150px, 220px));
    gap: 1rem;
}

.menu-grid-compact .menu-card-body { padding: 0.7rem 0.9rem; }
.menu-grid-compact .item-name { font-size: 1rem; }

.menu-photo {
    aspect-ratio: 4 / 3;
    background: var(--sandy-yellow);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--dark-chocolate);
    font-size: 0.85rem;
    text-align: center;
    padding: 1rem;
}

.menu-card-body { padding: 1.1rem; }

.item-name {
    display: block;
    font-family: 'Playfair Display', serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--heading);
    margin-bottom: 0.4rem;
}

.item-desc {
    font-size: 0.92rem;
    color: var(--muted);
}

/* Press section */

.press-list {
    list-style: none;
    display: grid;
    gap: 0.85rem;
}

.press-item {
    background: var(--bg-soft);
    border-left: 4px solid var(--coral);
    border-radius: 8px;
    padding: 0.9rem 1.1rem;
}

.press-outlet {
    display: block;
    text-transform: uppercase;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: var(--muted);
    margin-bottom: 0.2rem;
}

.press-headline {
    font-family: 'Playfair Display', serif;
    font-size: 1.05rem;
    font-style: italic;
    color: var(--text);
    text-decoration: none;
}

.press-headline:hover { color: var(--link); text-decoration: underline; }

.press-date {
    display: block;
    font-size: 0.82rem;
    color: var(--muted);
    margin-top: 0.3rem;
}

.menu-section-heading { margin-top: 2.5rem; }

.menu-section-note {
    font-size: 0.9rem;
    color: var(--muted);
    margin: -0.75rem 0 1rem;
}

.menu-list {
    list-style: none;
    margin-top: 1rem;
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.85rem;
}

.menu-list li {
    background: var(--bg-soft);
    border-left: 4px solid var(--coral);
    border-radius: 8px;
    padding: 0.85rem 1.1rem;
}

.menu-list .item-name { margin-bottom: 0; font-size: 1.05rem; }
.menu-list .item-desc { margin-top: 0.15rem; }

.menu-footnote {
    margin-top: 2rem;
    font-size: 0.9rem;
    color: var(--muted);
    font-style: italic;
}

.back-link { display: inline-block; margin-top: 1.5rem; }

/* Footer */

footer {
    text-align: center;
    padding: 1.75rem 1rem;
    background: var(--footer-bg);
    color: var(--white);
    margin-top: 2.5rem;
}

footer a { color: var(--sandy-yellow); text-decoration: none; }
footer a:hover { text-decoration: underline; }

.footer-links { margin-top: 0.5rem; }
.footer-links a { margin: 0 0.5rem; }

.footer-credit { margin-top: 0.75rem; font-size: 0.8rem; opacity: 0.75; }

/* ---- Tablet and up ---- */
@media (min-width: 640px) {
    body { font-size: 17px; }

    section { padding: 2.5rem 1.5rem; }

    h2, #menu h1 { font-size: 1.85rem; }

    #hero { padding: 4rem 1.5rem 0; }
    .hero-logo { width: 168px; margin-bottom: 1.25rem; }
    #hero h1 { font-size: 2.5rem; }
    .subtitle { font-size: 1.15rem; }

    .mailto-button { width: auto; }

    .menu-grid { grid-template-columns: repeat(2, 1fr); gap: 2rem; }
    .menu-grid-compact { grid-template-columns: repeat(auto-fill, minmax(160px, 220px)); gap: 1.25rem; }
    .menu-list { grid-template-columns: repeat(2, 1fr); gap: 1rem; }
    .ig-grid { gap: 0.6rem; max-width: 520px; }
    .press-list { grid-template-columns: repeat(3, 1fr); }

    .cal-event { text-align: right; }

    .favorite-card { flex-basis: calc(50% - 0.5rem); }
}

/* ---- Desktop ---- */
@media (min-width: 900px) {
    .hero-logo { width: 190px; }
    #hero h1 { font-size: 2.9rem; }

    .logo { font-size: 1.4rem; }
    .logo-mark { height: 3.25rem; }

    .favorite-card { flex-basis: calc(33.333% - 0.67rem); }
    .favorites-controls { display: none; }
}
