:root {
    --noche: #1a0f2e;
    --noche-claro: #2b1850;
    --calabaza: #ff7a1a;
    --amarillo: #ffc000;
    --rojo: #e60000;
    --crema: #fff3dc;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    min-height: 100vh;
    font-family: "Nunito", "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    color: var(--crema);
    background: linear-gradient(180deg, var(--noche) 0%, var(--noche-claro) 60%, var(--noche) 100%);
    background-attachment: fixed;
}

a:focus-visible,
button:focus-visible {
    outline: 3px solid var(--amarillo);
    outline-offset: 3px;
}

/* NAV: solo logo y botón regresar */
.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    min-height: 90px;
    padding: 0 16px;
    background: white;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.25);
}

.brand {
    display: flex;
    align-items: center;
    gap: 6px;
    color: black;
    text-decoration: none;
    font-weight: 800;
    font-size: 20px;
}

.brand .logo {
    width: 85px;
    height: 70px;
    object-fit: contain;
}

.btn-regresar {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 30px;
    background: var(--rojo);
    color: white;
    font-weight: 800;
    font-size: 18px;
    text-decoration: none;
    box-shadow: 0 4px 6px rgba(230, 0, 0, 0.3);
    transition: background 0.2s, transform 0.2s;
}

.btn-regresar:hover { background: darkred; transform: translateX(-3px); }

/* PORTADA */
.hero {
    display: flex;
    flex-direction: column-reverse;
    align-items: center;
    gap: 24px;
    max-width: 1150px;
    margin: 0 auto;
    padding: 40px 20px 20px;
}

.hero-texto { text-align: center; }

.hero h1 {
    margin: 0 0 16px;
    font-family: "Creepster", "Chiller", "Segoe UI", cursive;
    font-weight: 400;
    font-size: clamp(44px, 9vw, 84px);
    line-height: 1.05;
    letter-spacing: 2px;
    color: var(--calabaza);
    text-shadow: 3px 3px 0 #000, 0 0 30px rgba(255, 122, 26, 0.55);
}

.hero p {
    margin: 0 auto 24px;
    max-width: 46ch;
    font-size: 20px;
    line-height: 1.6;
}

.btn-sabores {
    display: inline-block;
    padding: 14px 32px;
    border-radius: 30px;
    background: var(--amarillo);
    color: black;
    font-weight: 800;
    font-size: 20px;
    text-decoration: none;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.35);
    transition: background 0.2s, color 0.2s, transform 0.2s;
}

.btn-sabores:hover { background: var(--calabaza); color: white; transform: translateY(-3px); }

.hero-imagen {
    position: relative;
    width: min(100%, 520px);
}

/* luna detrás de Coki */
.hero-imagen::before {
    content: "";
    position: absolute;
    inset: 8% -6% auto auto;
    width: 70%;
    aspect-ratio: 1;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 243, 220, 0.5), rgba(255, 122, 26, 0.15) 55%, transparent 70%);
    filter: blur(8px);
}

.hero-imagen img {
    position: relative;
    display: block;
    width: 100%;
    height: auto;
    border-radius: 24px;
    border: 4px solid var(--calabaza);
    box-shadow: 0 0 40px rgba(255, 122, 26, 0.45), 0 20px 40px rgba(0, 0, 0, 0.5);
    animation: flotar 5s ease-in-out infinite;
}

@keyframes flotar {
    0%, 100% { transform: translateY(0) rotate(-1deg); }
    50% { transform: translateY(-10px) rotate(1deg); }
}

/* GALERÍA */
.galeria-seccion {
    max-width: 1150px;
    margin: 0 auto;
    padding: 50px 20px 20px;
    text-align: center;
}

.galeria-seccion h2 {
    margin: 0 0 6px;
    font-family: "Creepster", "Chiller", "Segoe UI", cursive;
    font-weight: 400;
    font-size: clamp(36px, 7vw, 56px);
    letter-spacing: 1.5px;
    color: var(--amarillo);
}

.galeria-ayuda { margin: 0 0 28px; opacity: 0.85; font-size: 17px; }

.galeria {
    column-count: 1;
    column-gap: 18px;
    text-align: left;
}

.foto {
    display: block;
    width: 100%;
    margin: 0 0 18px;
    padding: 0;
    border: 3px solid rgba(255, 243, 220, 0.25);
    border-radius: 16px;
    overflow: hidden;
    background: #000;
    cursor: zoom-in;
    break-inside: avoid;
    transition: border-color 0.25s, transform 0.25s, box-shadow 0.25s;
}

.foto img { display: block; width: 100%; height: auto; }

.foto:hover {
    border-color: var(--calabaza);
    transform: scale(1.02);
    box-shadow: 0 0 25px rgba(255, 122, 26, 0.5);
}

/* CIERRE */
.cierre {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 50px 20px 70px;
    text-align: center;
}

.cierre p {
    margin: 0;
    font-family: "Creepster", "Chiller", "Segoe UI", cursive;
    font-size: clamp(32px, 6vw, 46px);
    letter-spacing: 1.5px;
    color: var(--calabaza);
}

.btn-claro {
    background: transparent;
    border: 2px solid var(--crema);
    box-shadow: none;
}

.btn-claro:hover { background: var(--crema); color: var(--noche); }

/* VISOR */
.visor {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 16px;
    background: rgba(10, 5, 20, 0.94);
}

.visor[hidden] { display: none; }

.visor img {
    max-width: 100%;
    max-height: 100%;
    border-radius: 12px;
    box-shadow: 0 0 40px rgba(255, 122, 26, 0.4);
}

.visor-btn {
    position: absolute;
    width: 48px;
    height: 48px;
    border: none;
    border-radius: 50%;
    background: var(--calabaza);
    color: white;
    font-size: 20px;
    cursor: pointer;
    transition: background 0.2s;
}

.visor-btn:hover { background: var(--rojo); }
.visor-cerrar { top: 14px; right: 14px; }
.visor-ant { left: 10px; top: 50%; transform: translateY(-50%); }
.visor-sig { right: 10px; top: 50%; transform: translateY(-50%); }

body.visor-abierto { overflow: hidden; }

/* TABLET */
@media (min-width: 640px) {
    .galeria { column-count: 2; }
    .brand .logo { width: 100px; height: 80px; }
    .brand { font-size: 24px; }
}

/* ESCRITORIO */
@media (min-width: 1033px) {
    .nav { padding: 0 50px; }
    .hero { flex-direction: row; justify-content: space-between; gap: 50px; padding-top: 60px; }
    .hero-texto { text-align: left; flex: 1; }
    .hero p { margin-left: 0; }
    .hero-imagen { flex: 0 0 480px; }
    .galeria { column-count: 3; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .hero-imagen img { animation: none; }
    * { transition: none !important; }
}