/* =========================================================================
   CASA NOVA ITALIAN — "What's On" page
   Author: Front-end template prepared for WordPress + ACF integration
   --------------------------------------------------------------------------
   TABLE OF CONTENTS
   1.  Fonts (@font-face — self-hosted PP Museum)
   2.  Design tokens (CSS variables)
   3.  Base / reset
   4.  Helpers & buttons
   5.  Site header
   6.  Hero
   7.  Toolbar / filters
   8.  Section head
   9.  Promotion card (the repeatable unit)
   10. Badges
   11. Available Locations component
   12. Empty state
   13. CTA band
   14. Footer
   15. Responsive
   16. Motion / reduced-motion
   ========================================================================= */


/* 1. FONTS ================================================================ */
/* Authentic Casa Nova heading typeface, self-hosted for the template.       */
@font-face {
    font-family: "PP Museum";
    src: url("../fonts/PPMuseum-Light.woff2") format("woff2"),
         url("../fonts/PPMuseum-Light.woff") format("woff");
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "PP Museum";
    src: url("../fonts/PPMuseum-Regular.woff2") format("woff2"),
         url("../fonts/PPMuseum-Regular.woff") format("woff");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "PP Museum";
    src: url("../fonts/PPMuseum-Ultrabold.woff2") format("woff2"),
         url("../fonts/PPMuseum-Ultrabold.woff") format("woff");
    font-weight: 800;
    font-style: normal;
    font-display: swap;
}


/* 2. DESIGN TOKENS ======================================================== */
:root {
    /* Brand palette — pulled directly from the live Casa Nova theme */
    --c-olive:        #2c3819;   /* deep Italian olive — primary brand */
    --c-olive-deep:   #212a13;   /* darker olive for footers / overlays */
    --c-terracotta:   #c74c05;   /* signature burnt-orange accent */
    --c-terracotta-d: #a63f04;   /* pressed / hover state */
    --c-peach:        #f9ceb3;   /* soft peach accent */
    --c-peach-soft:   #fbe7d8;   /* peach tint for chips / fills */

    /* Warm editorial neutrals */
    --c-cream:        #faf6f0;   /* page background — warm, premium */
    --c-cream-2:      #f3ece2;   /* alternate surface */
    --c-white:        #ffffff;
    --c-ink:          #2d2d2d;   /* body text */
    --c-ink-soft:     #5b5b53;   /* secondary text */
    --c-muted:        #9c968c;   /* muted / inactive */
    --c-line:         #e6ddcf;   /* warm hairline border */

    /* Typography */
    --font-head: "PP Museum", "Fraunces", Georgia, serif;
    --font-body: "Montserrat", -apple-system, BlinkMacSystemFont, sans-serif;

    /* Structure */
    --maxw: 1240px;
    --radius: 12px;
    --radius-sm: 8px;
    --radius-pill: 999px;
    --shadow-sm: 0 6px 18px rgba(44, 56, 25, 0.06);
    --shadow-md: 0 18px 50px rgba(44, 56, 25, 0.12);
    --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
    --t-fast: 0.25s;
    --t: 0.4s;
}


/* 3. BASE / RESET ========================================================= */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body.whatson {
    margin: 0;
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.65;
    color: var(--c-ink);
    background-color: var(--c-cream);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, h4 { margin: 0; font-family: var(--font-head); font-weight: 400; line-height: 1.1; }
button { font-family: inherit; cursor: pointer; }

::selection { background: var(--c-terracotta); color: #fff; }


/* 4. HELPERS & BUTTONS ==================================================== */
.sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5em;
    padding: 0.85em 1.9em;
    font-family: var(--font-body);
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border-radius: var(--radius-sm);
    border: 1.5px solid transparent;
    transition: background-color var(--t-fast) var(--ease),
                color var(--t-fast) var(--ease),
                border-color var(--t-fast) var(--ease),
                transform var(--t-fast) var(--ease);
}
.btn:hover { transform: translateY(-2px); }

.btn--solid {
    background-color: var(--c-terracotta);
    color: var(--c-white);
    border-color: var(--c-terracotta);
}
.btn--solid:hover {
    background-color: var(--c-white);
    color: var(--c-terracotta);
    border-color: var(--c-terracotta);
}

.btn--outline {
    background-color: transparent;
    color: var(--c-olive);
    border-color: var(--c-olive);
}
.btn--outline:hover {
    background-color: var(--c-olive);
    color: var(--c-white);
}

.btn--lg { padding: 1.05em 2.6em; font-size: 0.9rem; }


/* 5. SITE HEADER ========================================================== */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(250, 246, 240, 0.9);
    backdrop-filter: saturate(180%) blur(10px);
    border-bottom: 1px solid var(--c-line);
}
.site-header__inner {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 0.75rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}
.site-header__logo { height: 46px; width: auto; }
.site-nav__list { display: flex; gap: 1.75rem; }
.site-nav__list a {
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--c-ink);
    padding-bottom: 2px;
    border-bottom: 2px solid transparent;
    transition: color var(--t-fast), border-color var(--t-fast);
}
.site-nav__list a:hover,
.site-nav__list a.is-active { color: var(--c-terracotta); border-color: var(--c-terracotta); }
.site-header__cta { flex-shrink: 0; }


/* 6. HERO ================================================================= */
.hero {
    position: relative;
    min-height: 68vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    color: var(--c-white);
}
.hero__media { position: absolute; inset: 0; z-index: 0; background: var(--c-olive-deep); }
.hero__img {
    width: 100%; height: 100%; object-fit: cover;
    animation: heroZoom 14s var(--ease) forwards;
}
.hero__overlay {
    position: absolute; inset: 0;
    background: linear-gradient(180deg,
        rgba(33, 42, 19, 0.45) 0%,
        rgba(33, 42, 19, 0.55) 55%,
        rgba(33, 42, 19, 0.78) 100%);
}
.hero__inner {
    position: relative;
    z-index: 1;
    max-width: 720px;
    padding: 6rem 1.5rem;
}
.hero__eyebrow {
    margin: 0 0 1rem;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.35em;
    text-transform: uppercase;
    color: var(--c-peach);
}
.hero__title {
    font-size: clamp(3rem, 8vw, 6rem);
    text-transform: uppercase;
    letter-spacing: 0.02em;
    margin-bottom: 1.25rem;
}
.hero__lede {
    max-width: 540px;
    margin: 0 auto 2rem;
    font-size: 1.05rem;
    color: rgba(255, 255, 255, 0.92);
}
.hero__scroll {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--c-white);
}
.hero__scroll-line {
    width: 1px; height: 42px;
    background: rgba(255, 255, 255, 0.5);
    position: relative;
    overflow: hidden;
}
.hero__scroll-line::after {
    content: "";
    position: absolute; top: -100%; left: 0;
    width: 100%; height: 100%;
    background: var(--c-peach);
    animation: scrollLine 2s var(--ease) infinite;
}


/* 7. TOOLBAR / FILTERS ==================================================== */
.toolbar {
    position: sticky;
    top: 63px; /* below sticky header */
    z-index: 40;
    background: var(--c-cream);
    border-bottom: 1px solid var(--c-line);
}
.toolbar__inner {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 1.1rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
    flex-wrap: wrap;
}
.toolbar__filters { display: flex; flex-wrap: wrap; gap: 0.5rem; }

.filter-pill {
    padding: 0.55em 1.15em;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: var(--c-ink-soft);
    background: transparent;
    border: 1.5px solid var(--c-line);
    border-radius: var(--radius-pill);
    transition: all var(--t-fast) var(--ease);
    white-space: nowrap;
}
.filter-pill:hover { border-color: var(--c-terracotta); color: var(--c-terracotta); }
.filter-pill.is-active {
    background: var(--c-olive);
    border-color: var(--c-olive);
    color: var(--c-white);
}

.toolbar__tools { display: flex; gap: 0.75rem; flex-wrap: wrap; }

.field {
    position: relative;
    display: flex;
    align-items: center;
}
.field__icon {
    position: absolute;
    left: 0.85rem;
    width: 18px; height: 18px;
    color: var(--c-muted);
    pointer-events: none;
}
.field__input {
    font-family: var(--font-body);
    font-size: 0.85rem;
    color: var(--c-ink);
    padding: 0.65em 1em 0.65em 2.6em;
    border: 1.5px solid var(--c-line);
    border-radius: var(--radius-sm);
    background: var(--c-white);
    transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.field__input:focus {
    outline: none;
    border-color: var(--c-terracotta);
    box-shadow: 0 0 0 3px rgba(199, 76, 5, 0.12);
}
.field--search .field__input { width: 220px; }
.field--select .field__input {
    appearance: none;
    -webkit-appearance: none;
    padding-right: 2.4em;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 9l6 6 6-6' fill='none' stroke='%239c968c' stroke-width='2'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.8rem center;
    background-size: 16px;
}


/* 8. SECTION HEAD ========================================================= */
.section-head {
    max-width: 640px;
    margin: 0 auto 3.5rem;
    text-align: center;
}
.section-head__eyebrow {
    margin: 0 0 0.75rem;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: var(--c-terracotta);
}
.section-head__title {
    font-size: clamp(2rem, 4.5vw, 3rem);
    text-transform: uppercase;
    color: var(--c-olive);
    margin-bottom: 1rem;
}
.section-head__lede { margin: 0; color: var(--c-ink-soft); }


/* 9. PROMOTION CARD (repeatable unit) ===================================== */
.promotions { padding: 5rem 0 6rem; }
.promotions__inner { max-width: var(--maxw); margin: 0 auto; padding: 0 1.5rem; }

.promo-list {
    display: flex;
    flex-direction: column;
    gap: 4.5rem;
}

.promo {
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    align-items: center;
    gap: 3rem;
    background: var(--c-white);
    border: 1px solid var(--c-line);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: box-shadow var(--t) var(--ease), transform var(--t) var(--ease);
}
.promo:hover { box-shadow: var(--shadow-md); transform: translateY(-4px); }

/* Alternate the layout automatically — no per-card classes needed,
   so the WordPress loop can output identical markup for every card. */
.promo:nth-child(even) .promo__media { order: 2; }

/* --- Media --- */
.promo__media {
    position: relative;
    align-self: stretch;
    min-height: 340px;
    overflow: hidden;
    background: var(--c-cream-2);
}
.promo__img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.9s var(--ease);
}
.promo:hover .promo__img { transform: scale(1.05); }

/* --- Body --- */
.promo__body { padding: 2.75rem 2.75rem 2.5rem; }

.promo__validity {
    margin: 0 0 0.85rem;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--c-terracotta);
}
.promo__title {
    font-size: clamp(1.8rem, 3.5vw, 2.6rem);
    text-transform: uppercase;
    color: var(--c-olive);
    margin-bottom: 1rem;
}
.promo__desc { margin: 0 0 1.5rem; color: var(--c-ink-soft); }

.promo__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.75rem;
    padding: 1.1rem 0;
    margin: 0 0 1.5rem;
    border-top: 1px solid var(--c-line);
    border-bottom: 1px solid var(--c-line);
}
.promo__meta-item {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--c-ink);
}
.promo__meta-item svg { width: 19px; height: 19px; color: var(--c-terracotta); flex-shrink: 0; }

.promo__footer {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-top: 1.75rem;
}
.promo__terms { font-size: 0.82rem; }
.promo__terms summary {
    cursor: pointer;
    font-weight: 600;
    color: var(--c-ink-soft);
    list-style: none;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    transition: color var(--t-fast);
}
.promo__terms summary::-webkit-details-marker { display: none; }
.promo__terms summary::before {
    content: "+";
    font-size: 1.1em;
    line-height: 1;
    color: var(--c-terracotta);
}
.promo__terms[open] summary::before { content: "\2013"; }
.promo__terms summary:hover { color: var(--c-terracotta); }
.promo__terms p {
    margin: 0.75rem 0 0;
    max-width: 46ch;
    font-size: 0.8rem;
    line-height: 1.6;
    color: var(--c-muted);
}


/* 10. BADGES ============================================================== */
.badge {
    position: absolute;
    top: 1.1rem;
    left: 1.1rem;
    z-index: 2;
    padding: 0.5em 1em;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--c-white);
    background: var(--c-olive);
    border-radius: var(--radius-pill);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
}
/* Badge colour variants — map each ACF badge type to a modifier */
.badge--happy-hour { background: var(--c-terracotta); }
.badge--new        { background: #2c7a4b; }
.badge--limited    { background: #b23a2e; }
.badge--everyday   { background: var(--c-olive); }
.badge--weekends   { background: #7a5230; }
.badge--popular    { background: #b8860b; }
.badge--event      { background: #5a3d7a; }


/* 11. AVAILABLE LOCATIONS COMPONENT ====================================== */
/* The single source of truth. ALL five venues render every time; active
   ones are highlighted with a checkmark, inactive ones are clearly muted —
   so a guest can never be left wondering (e.g. "is Green Hills included?"). */
.locations { margin-top: 0.5rem; }
.locations__label {
    margin: 0 0 0.85rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--c-olive);
}
.locations__list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.location-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.42em 0.9em 0.42em 0.8em;
    font-size: 0.78rem;
    font-weight: 600;
    border-radius: var(--radius-pill);
    border: 1.5px solid var(--c-line);
    color: var(--c-muted);
    background: var(--c-cream);
    transition: all var(--t-fast) var(--ease);
}
/* Leading marker — dash for inactive, check for active */
.location-chip::before {
    content: "\2013"; /* en dash */
    font-weight: 700;
    color: var(--c-muted);
}
.location-chip--active {
    color: var(--c-olive);
    background: var(--c-peach-soft);
    border-color: var(--c-peach);
}
.location-chip--active::before {
    content: "\2713"; /* checkmark */
    color: var(--c-terracotta);
}


/* 12. EMPTY STATE ======================================================== */
.empty-state {
    max-width: 480px;
    margin: 2rem auto;
    padding: 4rem 2rem;
    text-align: center;
    border: 1.5px dashed var(--c-line);
    border-radius: var(--radius);
    background: var(--c-white);
}
.empty-state__mark {
    width: 64px; height: 64px;
    margin: 0 auto 1.5rem;
    display: flex; align-items: center; justify-content: center;
    color: var(--c-terracotta);
    background: var(--c-peach-soft);
    border-radius: 50%;
}
.empty-state__mark svg { width: 30px; height: 30px; }
.empty-state__title {
    font-size: 1.6rem;
    text-transform: uppercase;
    color: var(--c-olive);
    margin-bottom: 0.75rem;
}
.empty-state__text { margin: 0 0 1.75rem; color: var(--c-ink-soft); }


/* 13. CTA BAND =========================================================== */
.cta-band {
    background: var(--c-olive);
    color: var(--c-white);
    text-align: center;
}
.cta-band__inner {
    max-width: 640px;
    margin: 0 auto;
    padding: 5rem 1.5rem;
}
.cta-band__title {
    font-size: clamp(2rem, 4.5vw, 3rem);
    text-transform: uppercase;
    margin-bottom: 1rem;
}
.cta-band__text { margin: 0 0 2rem; color: rgba(255, 255, 255, 0.85); }


/* 14. FOOTER ============================================================= */
.site-footer { background: var(--c-olive-deep); color: rgba(255, 255, 255, 0.85); }
.site-footer__inner {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 4rem 1.5rem 2.5rem;
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
    gap: 2.5rem;
}
.site-footer__logo { height: 52px; width: auto; margin-bottom: 1rem; filter: brightness(0) invert(1); }
.site-footer__tag { margin: 0; font-size: 0.88rem; color: rgba(255, 255, 255, 0.6); }
.site-footer__heading {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--c-peach);
    margin-bottom: 1.1rem;
    font-family: var(--font-body);
}
.site-footer__links { display: flex; flex-direction: column; gap: 0.6rem; }
.site-footer__links a { font-size: 0.9rem; color: rgba(255, 255, 255, 0.75); transition: color var(--t-fast); }
.site-footer__links a:hover { color: var(--c-white); }
.site-footer__social { display: flex; gap: 0.75rem; margin-top: 1rem; }
.site-footer__social a {
    width: 38px; height: 38px;
    display: flex; align-items: center; justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 50%;
    transition: background var(--t-fast), border-color var(--t-fast);
}
.site-footer__social a:hover { background: var(--c-terracotta); border-color: var(--c-terracotta); }
.site-footer__social svg { width: 18px; height: 18px; }
.site-footer__bar {
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    text-align: center;
    padding: 1.5rem;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.55);
}
.site-footer__bar p { margin: 0; }


/* 15. RESPONSIVE ========================================================= */
@media (max-width: 960px) {
    .promo { grid-template-columns: 1fr; }
    /* Stack: image always on top, regardless of odd/even */
    .promo:nth-child(even) .promo__media { order: 0; }
    .promo__media { min-height: 260px; }
    .promo__body { padding: 2.25rem 2rem; }
    .site-footer__inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
    .site-nav { display: none; }            /* hamburger handled by theme header */
    .toolbar { position: static; }
    .toolbar__inner { justify-content: flex-start; }
    .toolbar__tools { width: 100%; }
    .field--search { flex: 1; }
    .field--search .field__input { width: 100%; }
    .field--select { flex: 1; }
    .field--select .field__input { width: 100%; }
    .hero { min-height: 58vh; }
    .promotions { padding: 3.5rem 0 4rem; }
    .promo-list { gap: 3rem; }
}

@media (max-width: 520px) {
    .promo__body { padding: 1.9rem 1.5rem; }
    .promo__footer { gap: 1rem; }
    .promo__footer .btn { width: 100%; }
    .site-footer__inner { grid-template-columns: 1fr; }
    .site-header__cta { display: none; }
}


/* 16. MOTION ============================================================= */
@keyframes heroZoom {
    from { transform: scale(1.08); }
    to   { transform: scale(1); }
}
@keyframes scrollLine {
    0%   { top: -100%; }
    100% { top: 100%; }
}

/* Respect users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
    .hero__img { animation: none; }
}
