/**
 * OBRA — Stylesheet Oficial
 * Pure CSS (Vanilla) — Responsive, Dark/Light Mode, Editorial Brutalist Aesthetic
 */

/* ==========================================================================
   1. Tipografías & Fuentes Web
   ========================================================================== */
@font-face {
    font-family: 'TimesMono';
    src: url('../fonts/Hershey-Noailles-Times-Mono-Regular.woff') format('woff');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* ==========================================================================
   2. Variables de Diseño & Sistema de Temas
   ========================================================================== */
:root {
    /* Tipografías base */
    --font-mono: 'TimesMono', 'Courier New', Courier, monospace;
    --font-sans: 'Helvetica Neue', Helvetica, Arial, -apple-system, BlinkMacSystemFont, sans-serif;

    /* Tema Claro */
    --bg-color: #fffcf0;
    --text-color: #1b1b1b;
    --text-muted: #666666;

    /* Modal en Modo Claro: Tarjeta Oscura */
    --modal-bg: #1b1b1b;
    --modal-text: #fffcf0;
    --modal-border: rgba(255, 252, 240, 0.1);

    /* Transición suave de cambio de tema */
    --theme-transition: background-color 0.4s ease, color 0.4s ease, fill 0.4s ease, border-color 0.4s ease;
}

/* Tema Oscuro */
html.theme-dark {
    --bg-color: #1b1b1b;
    --text-color: #fffcf0;
    --text-muted: #999999;

    /* Modal en Modo Oscuro: Tarjeta Clara */
    --modal-bg: #fffcf0;
    --modal-text: #1b1b1b;
    --modal-border: rgba(27, 27, 27, 0.1);
}

/* ==========================================================================
   3. Reset & Base Global
   ========================================================================== */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    height: 100%;
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    min-height: 100%;
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-sans);
    line-height: 1.2;
    overflow-x: hidden;
    transition: var(--theme-transition);
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: inherit;
    text-decoration: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
}



button {
    background: none;
    border: none;
    color: inherit;
    font: inherit;
    cursor: pointer;
    outline: inherit;
}

ul,
ol {
    list-style: none;
}

img,
svg {
    display: block;
    max-width: 100%;
    height: auto;
}

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

.mono-label {
    font-family: var(--font-mono);
    font-size: clamp(1rem, 4.22vw, 1.66rem);
    text-transform: uppercase;
    line-height: 1.3;
}

.overline {
    text-decoration-line: overline;
    text-decoration-color: currentColor;
    text-decoration-thickness: 1px;
    text-decoration-style: solid;
}

@media (min-width: 1024px) {
    .mono-label {
        font-size: clamp(1.25rem, 1.58vw, 1.78rem);
        line-height: 1.35;
    }
}

/* ==========================================================================
   4. Layout Principal (Single Viewport Desktop & Fluid Mobile)
   ========================================================================== */
.site-wrapper {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 0.5rem 1rem 1.25rem 1rem;
    position: relative;
    z-index: 1;
}

@media (min-width: 1024px) {
    .site-wrapper {
        padding: 0.75rem 2rem 1.75rem 2rem;
        height: 100vh;
        overflow: hidden;
    }
}

/* ==========================================================================
   5. Header & Ticker Marquee
   ========================================================================== */
.site-header {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;

}

@media (min-width: 1024px) {
    .site-wrapper {
        padding-top: 0.15rem;
    }
}

/* Ticker Rodante */
.ticker-wrapper {
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    overflow: hidden;
    white-space: nowrap;
    padding: 0.25rem 0;
    user-select: none;
}

.ticker-track {
    display: inline-flex;
    width: max-content;
    animation: marquee 40s linear infinite;
}

.ticker-track:hover,
.ticker-track:active {
    animation-play-state: paused;
}

.ticker-content {
    display: inline-flex;
    gap: 3.5rem;
    padding-right: 3.5rem;
    font-family: var(--font-mono);
    font-size: clamp(0.861rem, 1.21vw, 1.24rem);
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.ticker-content span {
    white-space: nowrap;
    flex-shrink: 0;
}

@keyframes marquee {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

/* Sub-header Bar (RESTAURANT | RELOJ | BAR & TAPAS) */
.subheader-bar {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    width: 100%;

    gap: 0.5rem;
}

@media (min-width: 1024px) {
    .subheader-bar {
        grid-template-columns: 1fr auto 1fr;
        gap: 1rem;
        padding: 0.25rem 0;
    }
}

.subheader-left {
    text-align: left;
    white-space: nowrap;
}

.subheader-center {
    text-align: center;
    white-space: nowrap;
}

.subheader-right {
    text-align: right;
    white-space: nowrap;
}

.clock-display {
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.04em;
}

/* ==========================================================================
   6. Main Content Grid (Desktop: 3 Columnas | Mobile: Vertical)
   ========================================================================== */
.main-content-grid {
    display: grid;
    grid-template-columns: 1fr;
    align-items: center;
    justify-items: center;
    gap: 2.8rem;
    padding: 2rem 0;
    flex: 1;
    width: 100%;
}

@media (min-width: 1024px) {
    .main-content-grid {
        grid-template-columns: 1.1fr auto 1.1fr;
        padding: 0 0;
        gap: 1.5rem;
    }
}

/* Navegación (CARTA, MANIFESTO, INSTAGRAM, SPOTIFY con Inclinación) */
.main-navigation {
    width: 100%;
    display: flex;
    justify-content: center;
}

@media (min-width: 1024px) {
    .main-navigation {
        justify-content: flex-start;
    }
}

.nav-list {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    text-align: center;
    transform-origin: center;
    transition: transform 0.25s ease;
}

.nav-link {
    font-family: var(--font-sans);
    font-size: clamp(1.2rem, 1.0rem + 0.1vw, 1.75rem);
    font-weight: 500;
    letter-spacing: -0.015em;
    text-transform: uppercase;
    display: inline-block;
    cursor: pointer;
    line-height: 1.34;
    position: relative;
    color: inherit;
    opacity: 1;
    transition: none;
}

.nav-btn {
    text-align: inherit;
}

.nav-link:hover,
.nav-link:focus-visible {
    opacity: 1;
    color: inherit;
}

.nav-link::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 2px;
    width: 100%;
    height: 2px;
    background-color: currentColor;
    transform: scaleX(0);
    transform-origin: right center;
    transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.nav-link:hover::after,
.nav-link:focus-visible::after {
    transform: scaleX(1);
    transform-origin: left center;
}

@media (min-width: 1024px) {
    .nav-list {
        text-align: left;
        transform-origin: left center;
    }

    .nav-link {
        font-size: 1.75rem;
        line-height: 1.34;
        font-weight: 500;
    }
}

/* Hero / Logotipo Central OBRA */
.brand-hero {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

@media (min-width: 1024px) {
    .brand-hero {
        margin-right: 5%;
    }
}

.logo-obra-container {
    width: clamp(280px, 35vw, 450px);
    max-width: 90vw;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--text-color);
    cursor: default;
}

.logo-obra-inner {
    width: 90%;
    display: flex;
    justify-content: center;
    align-items: center;
}

@media (min-width: 1024px) {
    .brand-hero {

        max-width: 410px;
    }
}

.logo-obra-container svg,
.logo-obra-container svg path,
.logo-obra-container svg polygon,
.logo-obra-container svg .cls-2 {
    fill: currentColor;
    transition: fill 0.4s ease;
}

.logo-obra-container svg {
    width: 100%;
    height: auto;
    filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.04));
    transition: filter 0.3s ease, fill 0.4s ease;
}

/* Reservas / Book Now (Con Inclinación y Separación) */
.reservas-aside {
    width: 100%;
    display: flex;
    justify-content: center;

}

@media (min-width: 1024px) {
    .reservas-aside {
        justify-content: flex-end;
        margin-top: 0vw;
    }
}

.reservas-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.15rem;
    color: var(--text-color);
    transform: rotate(-4.8deg);
    transform-origin: center;
    transition: transform 0.25s ease;
}

@media (min-width: 1024px) {
    .reservas-link {
        transform-origin: right center;
    }
}

.reservas-link svg {
    width: clamp(220px, 16vw, 250px);
    height: auto;
    fill: currentColor;
}

@media (min-width: 1024px) {
    .reservas-link svg {
        width: clamp(180px, 16vw, 280px);
    }
}



.reservas-link:hover,
.reservas-link:focus-visible {

    transform: rotate(-4.8deg) scale(1.03);
}

/* ==========================================================================
   7. Footer (Horarios, Dirección & Contacto)
   ========================================================================== */
.site-footer {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
        "schedule schedule"
        "address contact";
    align-items: center;
    width: 100%;
    gap: 1.5rem 0.5rem;
    padding-top: 1.5rem;
    margin-bottom: 40px;
}

@media (min-width: 1024px) {
    .site-footer {
        grid-template-columns: 1fr auto 1fr;
        grid-template-areas: "address schedule contact";
        align-items: flex-end;
        gap: 1rem;
        padding-top: 0.5rem;
        margin-bottom: 0px;
    }

    .schedule-item {
        line-height: 0.9;
    }
}

.footer-address {
    grid-area: address;
    text-align: left;
    white-space: nowrap;
}

.footer-schedule {
    grid-area: schedule;
    text-align: center;
    margin-bottom: 6px;
}

.schedule-list {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.schedule-item {
    line-height: 0.9;
}


.footer-contact {
    grid-area: contact;
    text-align: right;
    white-space: nowrap;
}

.footer-link {
    display: inline-block;
    position: relative;
}

.footer-link:hover,
.footer-link:focus-visible {
    opacity: 1;
    color: inherit;
}

.footer-link::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 1px;
    background-color: currentColor;
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.2s ease;
}

.footer-link:hover::after,
.footer-link:focus-visible::after {
    transform: scaleX(1);
}

/* ==========================================================================
   8. Modal Manifesto (Ventana Emergente con Contraste Invertido)
   ========================================================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1.5rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s;
}

.modal-overlay:not([hidden]) {
    opacity: 1;
    visibility: visible;
}

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.modal-card {
    position: relative;
    z-index: 10;
    background-color: var(--modal-bg);
    color: var(--modal-text);
    width: 100%;
    max-width: 660px;
    min-height: 410px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 4rem 2.5rem 3.5rem 2.5rem;
    box-shadow: none;
    border: none;
    transform: scale(0.98);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-overlay:not([hidden]) .modal-card {
    transform: scale(1);
}

.modal-close-btn {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    width: 34px;
    height: 34px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--modal-text);
    opacity: 0.9;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.modal-close-btn:hover,
.modal-close-btn:focus-visible {
    opacity: 1;
    transform: scale(1.15);
}

.modal-close-btn svg {
    width: 22px;
    height: 22px;
    display: block;
}

.modal-close-btn svg polygon,
.modal-close-btn svg path {
    fill: currentColor;
    transition: fill 0.3s ease;
}

.manifesto-content {
    width: 100%;
    max-width: 435px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    text-align: center;
}

.manifesto-paragraph {
    font-family: var(--font-sans);
    font-size: clamp(0.74rem, 0.65rem + 0.35vw, 0.82rem);
    font-weight: 600;
    line-height: 1;
    letter-spacing: -0.04em;
    text-transform: uppercase;
}

.manifesto-desktop {
    display: none;
}

.manifesto-mobile {
    display: block;
}

@media (min-width: 1024px) {
    .modal-card {
        max-width: 720px;
        min-height: 450px;
        padding: 2rem 3rem 2rem 3rem
    }

    .manifesto-content {
        max-width: 480px;
    }

    .manifesto-paragraph {
        font-size: 0.9rem;
        line-height: 1.15;
        letter-spacing: -0.04em;
        font-weight: 700;
    }

    .manifesto-desktop {
        display: block;
    }

    .manifesto-mobile {
        display: none;
    }
}

/* ==========================================================================
   9. Ajustes Responsivos para Pantallas Bajas o Compactas
   ========================================================================== */
@media (max-height: 700px) and (min-width: 1024px) {
    .site-wrapper {
        height: auto;
        overflow-y: auto;
        padding-bottom: 2rem;
    }

    .logo-obra-container {
        width: 320px;
    }

    .main-content-grid {
        padding: 1.5rem 0;
        gap: 1.5rem;
    }
}

/* ==========================================================================
   10. Animaciones de Entrada (Fade In & Reveal)
   ========================================================================== */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-16px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(16px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.site-header {
    animation: fadeInDown 0.85s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.logo-obra-inner {
    animation: fadeIn 0.85s cubic-bezier(0.16, 1, 0.3, 1) 0.15s both;
}

.main-navigation .nav-item {
    opacity: 0;
    animation: fadeInLeft 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
    transform: rotate(-4.8deg) !important;
}

.main-navigation .nav-item:nth-child(1) {
    animation-delay: 0.1s;
}

.main-navigation .nav-item:nth-child(2) {
    animation-delay: 0.2s;
}

.main-navigation .nav-item:nth-child(3) {
    animation-delay: 0.3s;
}

.main-navigation .nav-item:nth-child(4) {
    animation-delay: 0.4s;
}

.reservas-aside {
    animation: fadeInRight 0.85s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both;
}

.site-footer {
    animation: fadeInUp 0.85s cubic-bezier(0.16, 1, 0.3, 1) 0.35s both;
}

@media (prefers-reduced-motion: reduce) {

    .site-header,
    .logo-obra-inner,
    .main-navigation .nav-item,
    .reservas-aside,
    .site-footer {
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
        filter: none !important;
    }
}