/**
 * Bocata Box Theme — Home single-page (dark).
 *
 * Fondo negro, acento amarillo ácido, pensado para conversión en móvil
 * de un trabajador del polígono: logo grande, status en vivo, CTA al
 * flujo de pedido, cómo llegar.
 */

/* ---------- Body dark (front-page) ---------- */
body.home {
    background: var(--wp--preset--color--background);
    color: var(--wp--preset--color--foreground);
}

/* ---------- Override del header base (layout.css) ----------
   layout.css del starter-theme pone el header con position:relative,
   background --color-secondary y padding propio.
   Para Bocata Box queremos header fixed, negro, con nav a la derecha.
   Usamos !important para superar los !important del base. */
body.home .wp-site-blocks > header.wp-block-template-part,
body.home .wp-site-blocks > .wp-block-template-part:first-child {
    position: static !important;
    height: auto !important;
    overflow: visible !important;
    font-size: inherit;
    line-height: inherit;
    background: transparent !important;
}

body.home .site-header--bocatabox {
    position: fixed !important;
    height: auto !important;
    overflow: visible !important;
}

/* ---------- Site header — logo izquierda + nav derecha ---------- */
.site-header.site-header--bocatabox {
    position: fixed;
    top: var(--wp-admin--admin-bar--height, 0);
    left: 0;
    right: 0;
    z-index: 100;
    background-color: rgba(0, 0, 0, 0.85) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 0 var(--gutter, 1rem) !important;
    border-bottom: 1px solid rgba(255,255,255,0.06) !important;
}

.site-header__inner {
    max-width: var(--wide-width, 1200px);
    margin-inline: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: clamp(56px, 8vw, 72px);
}

.site-header__brand {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    color: inherit;
    flex-shrink: 0;
}

.site-header__logo {
    height: clamp(28px, 5vw, 40px);
    width: auto;
    object-fit: contain;
}

.site-header__brand-text {
    font-weight: 800;
    font-size: clamp(1.1rem, 3vw, 1.5rem);
    color: var(--wp--preset--color--accent);
    text-transform: uppercase;
    letter-spacing: -0.01em;
}

.site-header--bocatabox .header-cta-btn {
    background: var(--wp--preset--color--accent) !important;
    color: #000000 !important;
}
.site-header--bocatabox .header-cta-btn:hover {
    background: #E6DA00 !important;
    color: #000000 !important;
}

/* ---------- Hero cinematográfico (inspirado BricksFusion) ---------- */

/* --- Contenedor principal --- */
.hero {
    position: relative;
    min-height: min(85svh, 700px);
    background: var(--wp--preset--color--background);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    padding: calc(clamp(56px, 8vw, 72px) + clamp(2rem, 5vw, 4rem)) var(--gutter, 1rem) clamp(2rem, 5vw, 4rem);
}

/* --- Capa 1: Aurora (3 radial-gradients + blur) --- */
.hero__aurora {
    position: absolute;
    inset: -20%;
    width: 140%;
    height: 140%;
    background:
        radial-gradient(ellipse 80% 50% at 20% 50%, rgba(242,229,0,0.18), transparent 70%),
        radial-gradient(ellipse 60% 80% at 80% 20%, rgba(230,184,0,0.14), transparent 70%),
        radial-gradient(ellipse 70% 60% at 50% 80%, rgba(184,150,10,0.10), transparent 70%);
    filter: blur(60px);
    pointer-events: none;
    z-index: 0;
    animation: auroraShift 24s ease-in-out infinite alternate;
}

@keyframes auroraShift {
    0%   { transform: translateX(-3%) translateY(-2%) rotate(-3deg); }
    33%  { transform: translateX(2%) translateY(1%) rotate(1deg); }
    66%  { transform: translateX(-1%) translateY(2%) rotate(3deg); }
    100% { transform: translateX(3%) translateY(-1%) rotate(-1deg); }
}

/* --- Capa 2: Grid isométrico --- */
.hero__grid {
    position: absolute;
    inset: 0;
    background:
        repeating-linear-gradient(
            30deg,
            rgba(42,42,42,0.08) 0px,
            rgba(42,42,42,0.08) 1px,
            transparent 1px,
            transparent 80px
        ),
        repeating-linear-gradient(
            -30deg,
            rgba(42,42,42,0.08) 0px,
            rgba(42,42,42,0.08) 1px,
            transparent 1px,
            transparent 80px
        );
    pointer-events: none;
    z-index: 1;
    animation: gridDrift 30s linear infinite;
}

@keyframes gridDrift {
    0%   { background-position: 0 0, 0 0; }
    100% { background-position: 80px 80px, -80px 80px; }
}

/* --- Capa 3: Shards (cristales flotantes) --- */
.hero__shards {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 2;
}

.hero__shard {
    position: absolute;
    backdrop-filter: blur(14px) saturate(1.1);
    -webkit-backdrop-filter: blur(14px) saturate(1.1);
    background: linear-gradient(135deg, rgba(38,38,38,0.4), transparent);
    border: 1px solid rgba(42,42,42,0.2);
    opacity: 0.5;
}

.hero__shard::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.06), transparent 60%);
    pointer-events: none;
}

.hero__shard--1 {
    width: 200px; height: 200px;
    top: 8%; left: 5%;
    clip-path: polygon(50% 0%, 100% 35%, 80% 100%, 10% 70%);
    animation: shardFloat1 18s ease-in-out 0s infinite;
}
.hero__shard--2 {
    width: 150px; height: 150px;
    top: 60%; left: 2%;
    clip-path: polygon(30% 0%, 100% 20%, 70% 100%, 0% 80%);
    animation: shardFloat2 16s ease-in-out 2s infinite;
}
.hero__shard--3 {
    width: 400px; height: 400px;
    top: 5%; right: -5%;
    clip-path: polygon(40% 0%, 100% 30%, 90% 100%, 0% 70%);
    animation: shardFloat1 22s ease-in-out 4s infinite;
}
.hero__shard--4 {
    width: 120px; height: 120px;
    bottom: 15%; left: 15%;
    clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
    animation: shardFloat2 14s ease-in-out 6s infinite;
}
.hero__shard--5 {
    width: 280px; height: 280px;
    bottom: 5%; right: 8%;
    clip-path: polygon(20% 0%, 100% 15%, 80% 100%, 0% 85%);
    animation: shardFloat1 20s ease-in-out 8s infinite;
}
.hero__shard--6 {
    width: 160px; height: 160px;
    top: 40%; right: 15%;
    clip-path: polygon(50% 0%, 95% 40%, 70% 100%, 5% 60%);
    animation: shardFloat2 17s ease-in-out 10s infinite;
}

@keyframes shardFloat1 {
    0%, 100% { transform: translateY(0) rotate(0deg); opacity: 0.4; }
    50%      { transform: translateY(-20px) rotate(6deg); opacity: 0.8; }
}
@keyframes shardFloat2 {
    0%, 100% { transform: translateY(0) rotate(0deg); opacity: 0.5; }
    50%      { transform: translateY(20px) rotate(-6deg); opacity: 0.7; }
}

/* --- Capa 4: Grain (SVG noise inline) --- */
.hero__grain {
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    background-size: 200px 200px;
    opacity: 0.04;
    mix-blend-mode: overlay;
    pointer-events: none;
    z-index: 3;
}

/* --- Capa 5: Vignette --- */
.hero__vignette {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 50% 50% at 50% 50%, transparent 40%, rgba(0,0,0,0.6) 100%);
    pointer-events: none;
    z-index: 4;
}

/* --- Contenido del hero --- */
.hero__content {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: clamp(0.75rem, 2vw, 1.25rem);
    max-width: 640px;
    width: 100%;
}

/* Eyebrow (status badge) */
.hero__eyebrow {
    margin-bottom: 1rem;
    animation: heroFadeIn 0.7s cubic-bezier(.2,.7,.2,1) 0.1s both;
}

/* H1 */
.hero__title {
    margin: 0;
    font-size: clamp(2.2rem, 6vw, 4.5rem);
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: -0.03em;
    color: #FAFAFA;
    max-width: 640px;
    animation: heroFadeIn 0.7s cubic-bezier(.2,.7,.2,1) 0.22s both;
}

/* Gradient text animado */
.hero__title-grad {
    background: linear-gradient(90deg, #F2E500, #FAFAFA, #F2E500);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: heroGradient 8s ease-in-out infinite, heroFadeIn 0.7s cubic-bezier(.2,.7,.2,1) 0.22s both;
}

@keyframes heroGradient {
    0%, 100% { background-position: 0% center; }
    50%      { background-position: 100% center; }
}

/* Subtítulo */
.hero__subtitle {
    margin: 0;
    font-size: clamp(0.95rem, 2vw, 1.15rem);
    color: #A1A1A1;
    max-width: 540px;
    line-height: 1.5;
    animation: heroFadeIn 0.7s cubic-bezier(.2,.7,.2,1) 0.34s both;
}

/* CTAs duales */
.hero__ctas {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
    width: 100%;
    max-width: 460px;
    margin-top: 0.25rem;
    animation: heroFadeIn 0.7s cubic-bezier(.2,.7,.2,1) 0.46s both;
}

@media (min-width: 560px) {
    .hero__ctas {
        grid-template-columns: 1fr 1fr;
    }
}

.cta-btn--hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 0.2rem;
    padding: 1rem 1.25rem;
    min-height: 6rem;
    font-family: inherit;
    line-height: 1.15;
    letter-spacing: 0;
    text-transform: none;
    border-radius: 0.75rem;
    text-decoration: none;
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.cta-btn--hero .cta-btn__top {
    font-size: var(--text-m, 1rem);
    font-weight: 500;
    opacity: 0.85;
}

.cta-btn--hero .cta-btn__main {
    font-size: var(--text-xl, 1.25rem);
    font-weight: 800;
    letter-spacing: -0.01em;
}

.cta-btn--hero.cta-btn--primary {
    background: linear-gradient(135deg, #F2E500 0%, #E6B800 100%);
    color: #000000;
    border: none;
    border-radius: 0.75rem;
    box-shadow: 0 4px 20px rgba(242, 229, 0, 0.3), 0 0 40px rgba(242, 229, 0, 0.1);
    font-weight: 700;
}

.cta-btn--hero.cta-btn--primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 28px rgba(242, 229, 0, 0.45), 0 0 60px rgba(242, 229, 0, 0.15);
    background: linear-gradient(135deg, #F5EA1A 0%, #E8C200 100%);
}

.cta-btn--hero.cta-btn--outline {
    background: transparent;
    color: #FAFAFA;
    border: 1.5px solid rgba(250, 250, 250, 0.3);
    border-radius: 0.75rem;
}

.cta-btn--hero.cta-btn--outline:hover {
    transform: translateY(-2px);
    background: rgba(250, 250, 250, 0.08);
    border-color: rgba(250, 250, 250, 0.5);
    color: #FAFAFA;
}

/* Hint con bounce */
.hero__ctas-hint {
    margin: 0.5rem 0 0;
    font-size: var(--text-s, 0.875rem);
    color: var(--wp--preset--color--foreground-light);
    animation: hintFadeIn 0.7s cubic-bezier(.2,.7,.2,1) 0.58s both, hint-bounce 2s ease-in-out 1.3s infinite;
}

@keyframes hintFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes hint-bounce {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(8px); }
}

/* --- Fade-in escalonado --- */
@keyframes heroFadeIn {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* --- Accesibilidad: reduced motion --- */
@media (prefers-reduced-motion: reduce) {
    .hero__aurora,
    .hero__grid,
    .hero__shard,
    .hero__title-grad,
    .hero__eyebrow,
    .hero__title,
    .hero__subtitle,
    .hero__ctas,
    .hero__ctas-hint {
        animation: none !important;
    }
    .hero__eyebrow,
    .hero__title,
    .hero__subtitle,
    .hero__ctas,
    .hero__ctas-hint {
        opacity: 1 !important;
        transform: none !important;
    }
}

/* --- Responsive: mobile (<768px) --- */
@media (max-width: 767px) {
    .hero__shard {
        opacity: 0.25;
    }
    .hero__shard--1 { width: 100px; height: 100px; }
    .hero__shard--2 { width: 80px; height: 80px; }
    .hero__shard--3 { width: 180px; height: 180px; }
    .hero__shard--4 { width: 60px; height: 60px; }
    .hero__shard--5 { width: 140px; height: 140px; }
    .hero__shard--6 { width: 80px; height: 80px; }
}

/* ---------- Status badge abierto/cerrado ---------- */
.bocatabox-status {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.9rem;
    border-radius: 999px;
    font-size: var(--text-s, 0.875rem);
    font-weight: 500;
    line-height: 1.3;
}

.bocatabox-status__dot {
    width: 0.6rem;
    height: 0.6rem;
    border-radius: 50%;
    flex-shrink: 0;
}

.bocatabox-status--open {
    background: rgba(34, 197, 94, 0.14);
    color: #4ade80;
    border: 1px solid rgba(34, 197, 94, 0.35);
}

.bocatabox-status--open .bocatabox-status__dot {
    background: #22c55e;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.25);
    animation: bocatabox-pulse 2s ease-in-out infinite;
}

.bocatabox-status--closed {
    background: rgba(239, 68, 68, 0.12);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.bocatabox-status--closed .bocatabox-status__dot {
    background: #ef4444;
}

@keyframes bocatabox-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.55; }
}

/* ---------- Cómo llegar ---------- */
.como-llegar {
    background: var(--wp--preset--color--background);
    padding: clamp(2.5rem, 5vw, 4.5rem) var(--gutter, 1rem);
    border-top: 1px solid var(--wp--preset--color--border);
}

.como-llegar__inner {
    max-width: 720px;
    margin-inline: auto;
}

.como-llegar__title {
    margin: 0 0 var(--space-m, 1.75rem);
    font-size: var(--text-3xl, 2.25rem);
    font-weight: 900;
    color: var(--wp--preset--color--accent);
    text-align: center;
    letter-spacing: -0.01em;
}

.como-llegar__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-l, 2rem);
    align-items: start;
}

@media (min-width: 768px) {
    .como-llegar__grid {
        grid-template-columns: 1fr 1fr;
    }
}

.como-llegar__info {
    display: flex;
    flex-direction: column;
    gap: var(--space-s, 1rem);
}

.como-llegar__address {
    margin: 0;
    font-size: var(--text-l, 1.125rem);
    line-height: 1.5;
    color: var(--wp--preset--color--foreground);
}

.como-llegar__address strong {
    color: var(--wp--preset--color--foreground);
    font-weight: 700;
}

.como-llegar__tel a {
    font-size: var(--text-xl, 1.5rem);
    font-weight: 700;
    color: var(--wp--preset--color--accent);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.como-llegar__tel a:hover {
    color: var(--wp--preset--color--primary-light);
}

.como-llegar__horario {
    margin: 0;
    font-size: var(--text-m, 1rem);
    color: var(--wp--preset--color--foreground-light);
    line-height: 1.6;
}

.como-llegar__horario strong {
    color: var(--wp--preset--color--foreground);
    display: block;
    margin-bottom: 0.25rem;
}

.como-llegar__actions {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs, 0.75rem);
}

.como-llegar__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.95rem 1.5rem;
    border-radius: 0.6rem;
    font-size: var(--text-m, 1rem);
    font-weight: 700;
    text-decoration: none;
    text-align: center;
    transition: transform 0.2s ease, background 0.2s ease;
}

.cta-btn--primary.como-llegar__btn {
    background: var(--wp--preset--color--accent);
    color: var(--wp--preset--color--background);
}

.cta-btn--primary.como-llegar__btn:hover {
    background: var(--wp--preset--color--primary-light);
    transform: translateY(-1px);
}

.cta-btn--outline.como-llegar__btn {
    background: transparent;
    color: var(--wp--preset--color--foreground);
    border: 1.5px solid var(--wp--preset--color--border);
}

.cta-btn--outline.como-llegar__btn:hover {
    border-color: var(--wp--preset--color--accent);
    color: var(--wp--preset--color--accent);
}

/* ---------- Site footer minimal ---------- */
.site-footer--bocatabox {
    background: var(--wp--preset--color--background);
    border-top: 1px solid var(--wp--preset--color--border);
    padding: var(--space-m, 2rem) var(--gutter, 1rem);
}

.site-footer__inner {
    max-width: var(--wide-width, 1200px);
    margin-inline: auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem 1.5rem;
    font-size: var(--text-xs, 0.8rem);
    color: var(--wp--preset--color--foreground-light);
    text-align: center;
}

.site-footer__copy,
.site-footer__credit {
    margin: 0;
}

.site-footer__copy a,
.site-footer__credit a,
.site-footer__legales a {
    color: var(--wp--preset--color--foreground-light);
    text-decoration: none;
}

.site-footer__copy a:hover,
.site-footer__credit a:hover,
.site-footer__legales a:hover {
    color: var(--wp--preset--color--accent);
}

.site-footer__legales {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0 1rem;
}

/* ---------- Ajustes dark del flujo de pedido embebido en home ---------- */
/* La sección pedido hereda el fondo negro del body. Las cards siguen con --surface (#1A1A1A) */
.bocatabox-pedido {
    padding-top: clamp(2rem, 4vw, 3.5rem);
    padding-bottom: var(--space-xl, 3rem);
}
