/*
Theme Name: Mariposa Cinematic WP
Theme URI: https://www.mariposapub.it/
Author: Barbanera Studio
Description: Tema WordPress mobile-first per Mariposa Pub & Birreria, predisposto per plugin Barbanera e menu dinamico.
Version: 0.1.2
Requires PHP: 5.6
Text Domain: mariposa-cinematic-wp
*/

:root {
    --mp-black: #070403;
    --mp-ink: #100907;
    --mp-panel: #160d09;
    --mp-panel-2: #23140d;
    --mp-copper: #c47a43;
    --mp-brass: #e5ad66;
    --mp-gold: #f7d08c;
    --mp-ruby: #8d1f18;
    --mp-cream: #f8ecd9;
    --mp-muted: #b89b78;
    --mp-line: rgba(229, 173, 102, 0.32);
    --mp-line-strong: rgba(247, 208, 140, 0.72);
    --mp-shadow: rgba(0, 0, 0, 0.45);
    --mp-header: 74px;
    color-scheme: dark;
}

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

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background:
        radial-gradient(circle at 30% 0%, rgba(196, 122, 67, 0.16), transparent 32rem),
        linear-gradient(90deg, rgba(229, 173, 102, 0.035) 1px, transparent 1px),
        linear-gradient(0deg, rgba(229, 173, 102, 0.035) 1px, transparent 1px),
        var(--mp-black);
    background-size: auto, 72px 72px, 72px 72px, auto;
    color: var(--mp-cream);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.5;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at center, transparent 0 55%, rgba(0, 0, 0, 0.55) 100%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0));
    z-index: 0;
}

body.admin-bar .site-header {
    top: 46px;
}

@media (min-width: 783px) {
    body.admin-bar .site-header {
        top: 32px;
    }
}

a {
    color: var(--mp-gold);
}

img,
iframe {
    max-width: 100%;
}

button,
input,
textarea,
select {
    font: inherit;
}

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

.skip-link:focus {
    position: fixed;
    top: 10px;
    left: 10px;
    z-index: 1000;
    width: auto;
    height: auto;
    padding: 10px 14px;
    clip: auto;
    background: var(--mp-gold);
    color: var(--mp-black);
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 90;
    border-bottom: 1px solid var(--mp-line);
    background: rgba(7, 4, 3, 0.9);
    backdrop-filter: blur(16px);
}

.site-header__inner {
    display: grid;
    grid-template-columns: 58px 1fr auto;
    gap: 12px;
    align-items: center;
    min-height: var(--mp-header);
    padding: 10px 16px;
}

.brand-mark {
    display: block;
    width: 58px;
    height: 58px;
    border-radius: 50%;
}

.brand-mark img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 0 14px rgba(247, 208, 140, 0.28));
}

.nav-toggle {
    justify-self: end;
    display: grid;
    gap: 5px;
    width: 48px;
    height: 48px;
    place-content: center;
    border: 1px solid var(--mp-line);
    background: rgba(22, 13, 9, 0.9);
    color: var(--mp-gold);
}

.nav-toggle span:not(.screen-reader-text) {
    display: block;
    width: 22px;
    height: 2px;
    background: currentColor;
}

.primary-nav {
    position: fixed;
    top: var(--mp-header);
    right: 16px;
    left: 16px;
    display: none;
    padding: 12px;
    border: 1px solid var(--mp-line-strong);
    background: rgba(16, 9, 7, 0.98);
    box-shadow: 0 24px 50px var(--mp-shadow);
}

.primary-nav.is-open {
    display: grid;
}

.primary-nav a {
    padding: 14px 12px;
    border-bottom: 1px solid rgba(229, 173, 102, 0.14);
    color: var(--mp-cream);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-decoration: none;
    text-transform: uppercase;
}

.primary-nav a:last-child {
    border-bottom: 0;
}

.header-reserve {
    display: none;
}

main {
    position: relative;
    z-index: 1;
}

.hero-stage {
    position: relative;
    min-height: calc(100svh - var(--mp-header));
    padding: 34px 16px 140px;
    overflow: hidden;
    border-bottom: 1px solid var(--mp-line);
}

.hero-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    background: #050302;
    opacity: 0.45;
    filter: saturate(0.95) contrast(1.18) brightness(0.62) sepia(0.18);
    transform: scale(1.02);
}

.hero-stage::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 50% 18%, rgba(247, 208, 140, 0.18), transparent 24rem),
        radial-gradient(circle at 10% 64%, rgba(141, 31, 24, 0.24), transparent 16rem),
        linear-gradient(180deg, transparent 0 70%, rgba(7, 4, 3, 0.92) 100%);
    pointer-events: none;
}

.hero-stage__content {
    position: relative;
    z-index: 2;
    display: grid;
    justify-items: center;
    max-width: 880px;
    margin: 0 auto;
    text-align: center;
}

.hero-logo {
    width: min(46vw, 190px);
    margin-bottom: 16px;
    filter: drop-shadow(0 18px 34px rgba(0, 0, 0, 0.55));
    animation: sealPulse 6s ease-in-out infinite;
}

.eyebrow {
    margin: 0 0 8px;
    color: var(--mp-copper);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.hero-stage h1,
.section-heading h2,
.smith-panel h2,
.contact-card h2,
.content-panel h1 {
    margin: 0;
    color: var(--mp-gold);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 2.2rem;
    line-height: 0.96;
    text-transform: uppercase;
    text-wrap: balance;
}

.hero-stage h1 {
    width: min(100%, 330px);
    font-size: 1.78rem;
    line-height: 1.08;
}

.hero-copy {
    max-width: 680px;
    margin: 18px 0 0;
    color: var(--mp-muted);
    font-size: 1.02rem;
}

.hero-actions {
    display: grid;
    width: min(100%, 520px);
    gap: 12px;
    margin-top: 24px;
}

.button-main,
.button-ghost,
.mobile-action-bar a,
.mobile-action-bar button {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-height: 50px;
    padding: 13px 18px;
    border: 1px solid var(--mp-line-strong);
    color: var(--mp-cream);
    font-weight: 950;
    letter-spacing: 0.03em;
    text-decoration: none;
    text-transform: uppercase;
    cursor: pointer;
}

.button-main {
    background: linear-gradient(135deg, #8c4c25, #f6c577 52%, #9e5a2e);
    color: #100704;
    box-shadow: 0 12px 30px rgba(196, 122, 67, 0.28);
}

.button-ghost {
    background: rgba(16, 9, 7, 0.74);
}

.hero-dials {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    max-width: 720px;
    margin: 28px auto 0;
}

.hero-dials article {
    min-height: 100px;
    padding: 12px 8px;
    border: 1px solid var(--mp-line);
    background: rgba(16, 9, 7, 0.7);
    text-align: center;
}

.hero-dials span {
    display: block;
    color: var(--mp-gold);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.8rem;
    font-weight: 900;
}

.hero-dials p {
    margin: 6px 0 0;
    color: var(--mp-muted);
    font-size: 0.78rem;
}

.mechanic-field {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
}

.gear {
    position: absolute;
    width: 108px;
    aspect-ratio: 1;
    border: 8px dashed rgba(229, 173, 102, 0.52);
    border-radius: 50%;
    box-shadow:
        inset 0 0 0 12px rgba(196, 122, 67, 0.12),
        inset 0 0 0 28px rgba(7, 4, 3, 0.78),
        0 0 30px rgba(229, 173, 102, 0.18);
    opacity: 0.8;
    animation: gearSpin 22s linear infinite;
}

.gear::before,
.gear::after {
    content: "";
    position: absolute;
    border: 1px solid rgba(247, 208, 140, 0.42);
    border-radius: 50%;
}

.gear::before {
    inset: 18px;
}

.gear::after {
    inset: 42px;
    background: rgba(229, 173, 102, 0.12);
}

.gear--one {
    top: 9%;
    left: -42px;
}

.gear--two {
    right: -34px;
    top: 21%;
    width: 148px;
    animation-duration: 30s;
    animation-direction: reverse;
}

.gear--three {
    bottom: 18%;
    left: 7%;
    width: 86px;
    animation-duration: 18s;
}

.gear--four {
    right: 9%;
    bottom: 12%;
    width: 74px;
    animation-duration: 16s;
    animation-direction: reverse;
}

.steam {
    position: absolute;
    width: 130px;
    height: 130px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(248, 236, 217, 0.12), transparent 62%);
    filter: blur(6px);
    opacity: 0.55;
    animation: steamRise 8s ease-in-out infinite;
}

.steam--one {
    left: 14%;
    bottom: 20%;
}

.steam--two {
    right: 18%;
    bottom: 26%;
    animation-delay: 1.7s;
}

.copper-line {
    position: absolute;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(247, 208, 140, 0.56), transparent);
    animation: lineSweep 6s ease-in-out infinite;
}

.copper-line--one {
    top: 22%;
    left: 10%;
    width: 80%;
}

.copper-line--two {
    bottom: 22%;
    left: 5%;
    width: 90%;
    animation-delay: 2s;
}

.notice-strip {
    display: grid;
    gap: 8px;
    margin: 18px 16px 0;
    padding: 16px;
    border: 1px solid var(--mp-line);
    background: rgba(141, 31, 24, 0.22);
}

.notice-strip p {
    margin: 0;
    color: var(--mp-cream);
    font-weight: 800;
}

.section-frame {
    width: min(1120px, calc(100% - 32px));
    margin: 28px auto;
    padding: 22px 14px;
    border: 1px solid var(--mp-line);
    background:
        linear-gradient(135deg, rgba(247, 208, 140, 0.05), transparent 36%),
        rgba(16, 9, 7, 0.86);
    box-shadow: 0 26px 70px var(--mp-shadow);
}

.section-heading {
    max-width: 840px;
    margin: 0 auto 22px;
    text-align: center;
}

.section-heading h2,
.smith-panel h2,
.contact-card h2,
.content-panel h1 {
    font-size: clamp(2rem, 8vw, 4rem);
}

.section-heading p:not(.eyebrow),
.smith-panel p,
.contact-card p,
.content-panel,
.entry-content {
    color: var(--mp-muted);
}

.menu-controls {
    display: grid;
    gap: 12px;
    margin-bottom: 14px;
}

.menu-controls label,
.booking-fallback label {
    display: grid;
    gap: 7px;
    color: var(--mp-cream);
    font-weight: 900;
}

.menu-controls input[type="search"],
.booking-fallback input,
.booking-fallback textarea {
    width: 100%;
    min-height: 48px;
    border: 1px solid var(--mp-line);
    background: rgba(7, 4, 3, 0.9);
    color: var(--mp-cream);
    padding: 12px 14px;
}

.menu-check {
    display: flex !important;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 10px !important;
}

.menu-check input {
    width: 22px;
    height: 22px;
    accent-color: var(--mp-copper);
}

.menu-tabs {
    display: flex;
    gap: 8px;
    margin: 0 -14px 18px;
    padding: 0 14px 8px;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    scrollbar-color: var(--mp-copper) var(--mp-ink);
}

.menu-tabs button {
    flex: 0 0 auto;
    min-width: 134px;
    min-height: 62px;
    padding: 12px 14px;
    border: 1px solid var(--mp-line);
    background: #0b0605;
    color: var(--mp-cream);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1rem;
    font-weight: 900;
    text-transform: uppercase;
    scroll-snap-align: start;
    cursor: pointer;
}

.menu-tabs button.is-active {
    border-color: var(--mp-line-strong);
    background: linear-gradient(135deg, #92542e, #f2c378);
    color: #100704;
}

.menu-panel {
    animation: panelEnter 0.32s ease both;
}

.menu-panel__head {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: end;
    padding: 0 0 14px;
    border-bottom: 1px solid var(--mp-line);
}

.menu-panel h3 {
    margin: 0;
    color: var(--mp-gold);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.85rem;
    text-transform: uppercase;
}

.panel-ornament {
    position: relative;
    flex: 0 0 62px;
    width: 62px;
    height: 62px;
    border: 4px dashed var(--mp-line-strong);
    border-radius: 50%;
    animation: gearSpin 16s linear infinite reverse;
}

.panel-ornament::after {
    content: "";
    position: absolute;
    inset: 19px;
    border-radius: 50%;
    background: var(--mp-copper);
}

.menu-list {
    display: grid;
}

.menu-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
    padding: 18px 2px;
    border-bottom: 1px solid rgba(229, 173, 102, 0.18);
}

.menu-item.is-hidden-by-search {
    display: none;
}

.menu-item__title {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.menu-item h4 {
    margin: 0;
    color: var(--mp-gold);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.35rem;
    line-height: 1.12;
    text-transform: uppercase;
}

.menu-item__title span,
.menu-item__meta span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 8px;
    border: 1px solid var(--mp-line);
    background: rgba(196, 122, 67, 0.14);
    color: var(--mp-cream);
    font-size: 0.74rem;
    font-weight: 850;
    text-transform: uppercase;
}

.menu-item p {
    margin: 7px 0 0;
    color: #d8c2a4;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1rem;
}

.menu-item strong {
    justify-self: start;
    color: var(--mp-gold);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.28rem;
}

.menu-item__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.empty-menu {
    padding: 24px;
    border: 1px dashed var(--mp-line-strong);
    text-align: center;
}

.plugin-grid {
    display: grid;
    gap: 12px;
}

.plugin-card {
    position: relative;
    min-height: 178px;
    padding: 18px;
    overflow: hidden;
    border: 1px solid var(--mp-line);
    background: rgba(7, 4, 3, 0.64);
}

.plugin-card::after {
    content: "";
    position: absolute;
    right: -28px;
    bottom: -28px;
    width: 92px;
    aspect-ratio: 1;
    border: 7px dashed rgba(229, 173, 102, 0.2);
    border-radius: 50%;
    animation: gearSpin 26s linear infinite;
}

.plugin-card span {
    display: inline-flex;
    margin-bottom: 24px;
    padding: 4px 9px;
    border: 1px solid var(--mp-line);
    color: var(--mp-gold);
    font-size: 0.74rem;
    font-weight: 900;
    text-transform: uppercase;
}

.plugin-card h3 {
    margin: 0;
    color: var(--mp-gold);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.45rem;
}

.plugin-card p {
    max-width: 28rem;
    color: var(--mp-muted);
}

.smith-panel {
    display: grid;
    gap: 18px;
    align-items: center;
}

.booking-fallback {
    display: grid;
    gap: 12px;
}

.booking-plugin {
    color: var(--mp-cream);
}

.reviews-section {
    text-align: center;
}

.contact-section {
    display: grid;
    gap: 16px;
}

.contact-card,
.map-card {
    min-width: 0;
}

.map-card iframe {
    display: block;
    width: 100%;
    min-height: 320px;
    border: 1px solid var(--mp-line);
    filter: sepia(0.35) saturate(0.85) brightness(0.7);
}

.site-footer {
    position: relative;
    z-index: 1;
    margin-bottom: 70px;
    padding: 32px 16px;
    border-top: 1px solid var(--mp-line);
    background: #050302;
}

.site-footer__grid {
    display: grid;
    gap: 22px;
    width: min(1120px, 100%);
    margin: 0 auto;
}

.footer-logo {
    width: 120px;
}

.site-footer h2 {
    margin: 0 0 8px;
    color: var(--mp-gold);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.2rem;
}

.site-footer p {
    margin: 0 0 8px;
    color: var(--mp-muted);
}

.site-footer a {
    display: block;
    margin: 0 0 7px;
    color: var(--mp-cream);
    text-decoration: none;
}

.mobile-action-bar {
    position: fixed;
    z-index: 95;
    right: auto;
    bottom: 10px;
    left: 10px;
    width: min(calc(100vw - 20px), 370px);
    max-width: calc(100vw - 20px);
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
    padding: 6px;
    border: 1px solid var(--mp-line-strong);
    background: rgba(7, 4, 3, 0.94);
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.5);
    overflow: hidden;
}

.mobile-action-bar a,
.mobile-action-bar button {
    width: 100%;
    min-width: 0;
    min-height: 44px;
    padding: 8px 6px;
    border-color: rgba(229, 173, 102, 0.28);
    background: rgba(22, 13, 9, 0.94);
    color: var(--mp-gold);
    font-size: 0.66rem;
    letter-spacing: 0;
    overflow: hidden;
    white-space: nowrap;
}

.page-shell {
    width: min(980px, calc(100% - 32px));
    margin: 32px auto;
}

.content-panel {
    padding: 24px;
    border: 1px solid var(--mp-line);
    background: rgba(16, 9, 7, 0.86);
}

.entry-content {
    font-size: 1rem;
}

@media (min-width: 760px) {
    .site-header__inner {
        grid-template-columns: 70px 1fr auto;
        width: min(1180px, calc(100% - 28px));
        margin: 0 auto;
        padding: 10px 0;
    }

    .nav-toggle {
        display: none;
    }

    .primary-nav {
        position: static;
        display: flex;
        justify-content: center;
        gap: 18px;
        padding: 0;
        border: 0;
        background: transparent;
        box-shadow: none;
    }

    .primary-nav a {
        padding: 8px 0;
        border: 0;
        font-size: 13px;
    }

    .header-reserve {
        display: inline-flex;
        justify-content: center;
        align-items: center;
        min-height: 42px;
        padding: 9px 15px;
        border: 1px solid var(--mp-line-strong);
        color: var(--mp-gold);
        font-weight: 900;
        text-decoration: none;
        text-transform: uppercase;
    }

    .hero-stage {
        padding: 64px 26px 88px;
    }

    .hero-stage h1 {
        width: min(100%, 880px);
        font-size: 4rem;
    }

    .section-heading h2,
    .smith-panel h2,
    .contact-card h2,
    .content-panel h1 {
        font-size: 3.4rem;
    }

    .hero-actions {
        grid-template-columns: repeat(3, 1fr);
        width: min(100%, 760px);
    }

    .hero-dials {
        gap: 14px;
    }

    .section-frame {
        padding: 34px;
        margin: 42px auto;
    }

    .menu-controls {
        grid-template-columns: minmax(260px, 1fr) auto;
        align-items: end;
    }

    .menu-tabs {
        margin-inline: 0;
        padding-inline: 0;
    }

    .menu-item {
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: start;
        gap: 22px;
        padding: 23px 0;
    }

    .menu-item strong {
        justify-self: end;
        font-size: 1.55rem;
    }

    .menu-panel h3 {
        font-size: 2.8rem;
    }

    .plugin-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .smith-panel {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .booking-fallback {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .booking-fallback label:last-of-type {
        grid-column: 1 / -1;
    }

    .booking-fallback .button-main {
        grid-column: 1 / -1;
    }

    .contact-section {
        grid-template-columns: 0.85fr 1.15fr;
        align-items: stretch;
    }

    .site-footer {
        margin-bottom: 0;
    }

    .site-footer__grid {
        grid-template-columns: 150px 1fr 1fr 1fr;
    }

    .mobile-action-bar {
        display: none;
    }
}

@media (min-width: 1120px) {
    .hero-stage {
        min-height: 820px;
        display: grid;
        align-content: center;
    }

    .hero-stage h1 {
        font-size: 5.4rem;
    }

    .gear--one {
        left: 6%;
        width: 160px;
    }

    .gear--two {
        right: 7%;
        width: 210px;
    }

    .gear--three {
        left: 14%;
        width: 120px;
    }

    .gear--four {
        right: 18%;
        width: 100px;
    }

    .plugin-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
    }
}

@keyframes gearSpin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes steamRise {
    0% {
        transform: translateY(28px) scale(0.9);
        opacity: 0;
    }
    35% {
        opacity: 0.5;
    }
    100% {
        transform: translateY(-52px) scale(1.3);
        opacity: 0;
    }
}

@keyframes lineSweep {
    0%,
    100% {
        opacity: 0.18;
        transform: scaleX(0.72);
    }
    50% {
        opacity: 0.9;
        transform: scaleX(1);
    }
}

@keyframes sealPulse {
    0%,
    100% {
        transform: translateY(0) scale(1);
    }
    50% {
        transform: translateY(-5px) scale(1.015);
    }
}

@keyframes panelEnter {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
