/* JAAMZ Records — public site styles
   Palette sampled from the brand's sunset gradient reference (deep blue -> bright blue -> pink -> orange). */

:root {
    --font-display: 'Space Grotesk', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

    --brand-blue-deep: #13276b;
    --brand-blue: #2147a1;
    --brand-blue-bright: #4a72e0;
    --brand-lavender: #9186c9;
    --brand-pink: #e18b7c;
    --brand-orange: #e2883f;
    --brand-orange-deep: #de8134;

    --bg: #0d1230;
    --card: rgba(12, 16, 38, 0.55);
    --card-solid: #161c3f;
    --border: rgba(255, 255, 255, 0.14);
    --text: #f4f4fb;
    --text-dim: #c7c9e0;
    --accent: var(--brand-orange);
    --accent-2: var(--brand-blue-bright);
    --gradient: linear-gradient(135deg, var(--brand-blue-bright), var(--brand-pink), var(--brand-orange));
    --danger: #ff5d7a;
    --success: #2ee6a6;
    --radius: 14px;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

body.intro-active { overflow: hidden; height: 100vh; }

/* --- Site-wide dynamic sky background -----------------------------------
   Four gradient layers (amanecer / día / atardecer / noche) crossfade based
   on the visitor's real local time — and, when geolocation is available,
   their real sunrise/sunset times via assets/js/sky.js. z-index is
   intentionally 0 (not negative): a negative z-index on a fixed element
   combined with the sticky/high-z-index header is a known Chromium
   compositing bug that hides the fixed element behind the body background.
   Instead the background stays at the bottom of the stack via z-index:0 and
   every real content wrapper below is explicitly promoted above it. */
.site-bg-sky {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    background: #0d1230;
}

.sky-layer {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 4s ease;
}

/* "día" — bright sunny sky, the default/fallback layer */
.sky-day {
    background: linear-gradient(180deg, #1466b3 0%, #2f8fdb 35%, #6cbdee 65%, #bfe4fb 100%);
}

/* amanecer — soft night blue easing into first light */
.sky-dawn {
    background: linear-gradient(180deg, #1c2a63 0%, #4d5fa0 32%, #d98fa0 68%, #f3b978 100%);
}

/* atardecer — the "divine" sunset: blue -> pink -> orange -> yellow */
.sky-sunset {
    background: linear-gradient(180deg, #142057 0%, #5c4d92 28%, #c96b96 52%, #e8814f 75%, #f4c15c 100%);
}

/* noche — deep night sky */
.sky-night {
    background: linear-gradient(180deg, #05061a 0%, #0b1030 45%, #141a45 100%);
}

.site-bg-sky[data-period="dawn"] .sky-dawn,
.site-bg-sky[data-period="day"] .sky-day,
.site-bg-sky[data-period="sunset"] .sky-sunset,
.site-bg-sky[data-period="night"] .sky-night {
    opacity: 1;
}

/* Sun / moon disc that glides across the sky in step with the active period */
.sun-glow {
    position: absolute;
    width: 140px;
    height: 140px;
    left: var(--sun-left, 50%);
    top: var(--sun-top, 20%);
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 244, 214, 0.95) 0%, rgba(255, 205, 120, 0.55) 35%, rgba(255, 205, 120, 0) 70%);
    opacity: 0;
    transition: left 4s ease, top 4s ease, opacity 3s ease, background 3s ease;
    filter: blur(1px);
}
.site-bg-sky[data-period="day"] .sun-glow { opacity: 0.9; }
.site-bg-sky[data-period="dawn"] .sun-glow,
.site-bg-sky[data-period="sunset"] .sun-glow {
    opacity: 0.85;
    background: radial-gradient(circle, rgba(255, 232, 214, 0.95) 0%, rgba(255, 140, 120, 0.5) 35%, rgba(255, 140, 120, 0) 70%);
}
.site-bg-sky[data-period="night"] .sun-glow {
    opacity: 0.5;
    width: 90px;
    height: 90px;
    background: radial-gradient(circle, rgba(232, 236, 255, 0.85) 0%, rgba(180, 190, 230, 0.35) 45%, rgba(180, 190, 230, 0) 75%);
}

/* Stars, only meaningful at night */
.stars {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 4s ease;
}
.site-bg-sky[data-period="night"] .stars { opacity: 1; }
.star {
    position: absolute;
    width: 2px;
    height: 2px;
    border-radius: 50%;
    background: #fff;
    animation: star-twinkle 3.5s ease-in-out infinite;
}
@keyframes star-twinkle {
    0%, 100% { opacity: var(--star-opacity, 0.8); }
    50% { opacity: 0.15; }
}

.cloud {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(ellipse at center, rgba(255, 255, 255, 0.55) 0%, rgba(255, 255, 255, 0.22) 40%, rgba(255, 255, 255, 0) 72%);
    filter: blur(25px);
    opacity: 0;
    animation-name: cloud-drift, cloud-appear;
    animation-timing-function: ease-in-out, ease-in;
    animation-iteration-count: infinite, 1;
    animation-fill-mode: none, forwards;
    transition: filter 4s ease;
}

.site-bg-sky[data-period="sunset"] .cloud,
.site-bg-sky[data-period="dawn"] .cloud {
    filter: blur(25px) sepia(0.35) saturate(2) hue-rotate(-15deg);
}
.site-bg-sky[data-period="night"] .cloud {
    filter: blur(25px) brightness(0.35) saturate(0.6);
}

@keyframes cloud-appear {
    to { opacity: var(--cloud-opacity, 0.4); }
}

@keyframes cloud-drift {
    0% { transform: translateX(0); }
    50% { transform: translateX(6vw); }
    100% { transform: translateX(0); }
}

main, .site-footer { position: relative; z-index: 1; }

/* --- Welcome intro splash (bienvenida.mp4), plays once per session --- */
.intro-splash {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: #060714;
    display: flex;
    align-items: center;
    justify-content: center;
}
.intro-splash video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.container {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 20px;
}

a { color: var(--brand-orange); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 {
    font-family: var(--font-display);
    font-weight: 700;
    letter-spacing: -0.01em;
    line-height: 1.15;
    margin: 0 0 0.5em;
}

h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); }

p { color: var(--text-dim); }

img { max-width: 100%; display: block; }

/* --- Header / Nav --- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(10, 13, 33, 0.55);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

.brand {
    display: flex;
    align-items: center;
}
.brand img {
    height: 40px;
    width: auto;
}
.brand:hover { text-decoration: none; }

.main-nav {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: nowrap;
}

.main-nav a {
    font-family: var(--font-display);
    color: var(--text-dim);
    font-weight: 500;
    font-size: 0.92rem;
    white-space: nowrap;
}

.main-nav a:hover, .main-nav a.active {
    color: var(--text);
    text-decoration: none;
}

.lang-switch {
    color: var(--text-dim);
    font-size: 0.85rem;
    display: flex;
    gap: 4px;
    align-items: center;
}
.lang-switch a { color: var(--text-dim); font-weight: 700; }
.lang-switch a.active { color: var(--brand-orange); }

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}
.nav-toggle span {
    width: 24px;
    height: 2px;
    background: var(--text);
    display: block;
}

/* --- Flash messages --- */
.flash { padding: 12px 0; text-align: center; font-weight: 600; }
.flash-success { background: rgba(46, 230, 166, 0.15); color: var(--success); }
.flash-error { background: rgba(255, 93, 122, 0.15); color: var(--danger); }

/* --- Buttons --- */
.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 999px;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.01em;
    border: none;
    cursor: pointer;
    background: var(--gradient);
    color: #0d1230;
}
.btn:hover { opacity: 0.9; text-decoration: none; }
.btn-outline {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text);
    border: 1px solid var(--border);
}
.btn-sm { padding: 8px 18px; font-size: 0.85rem; }
.btn-danger { background: var(--danger); color: #fff; }

/* --- Hero --- */
.hero {
    padding: 120px 0 90px;
    text-align: center;
}
.hero p.subtitle {
    max-width: 640px;
    margin: 0 auto 32px;
    font-size: 1.1rem;
}
.hero-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* --- Sections --- */
section { padding: 64px 0; }
.section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 32px;
    flex-wrap: wrap;
    gap: 12px;
}
.section-head p { margin: 0; }
.section-alt { background: rgba(8, 10, 28, 0.35); }

/* --- Grids / Cards --- */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 24px;
}

.card {
    background: var(--card);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform 0.15s ease, border-color 0.15s ease;
}
.card:hover { transform: translateY(-4px); border-color: var(--brand-orange); }

.card-media {
    aspect-ratio: 1 / 1;
    background: linear-gradient(135deg, var(--brand-blue), var(--brand-blue-deep));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-dim);
    font-size: 0.8rem;
    overflow: hidden;
}
.card-media img { width: 100%; height: 100%; object-fit: cover; }

.card-body { padding: 18px; }
.card-body h3 { font-size: 1.1rem; margin-bottom: 4px; }
.card-body .meta { font-size: 0.85rem; color: var(--text-dim); margin-bottom: 12px; }

.badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 3px 10px;
    border-radius: 999px;
    background: rgba(226, 136, 63, 0.18);
    color: var(--brand-orange);
    margin-bottom: 8px;
}

/* --- Artist profile --- */
.artist-profile { display: grid; grid-template-columns: 280px 1fr; gap: 40px; align-items: start; }
.artist-profile .photo { border-radius: var(--radius); overflow: hidden; aspect-ratio: 1/1; background: var(--card); }
.artist-profile .photo img { width: 100%; height: 100%; object-fit: cover; }
.socials { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 16px; }
.socials a {
    border: 1px solid var(--border);
    padding: 8px 16px;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text);
}
.socials a:hover { border-color: var(--brand-orange); text-decoration: none; }

/* --- Embeds --- */
.embed-wrap { border-radius: var(--radius); overflow: hidden; margin-bottom: 12px; }
.embed-wrap iframe { width: 100%; border: none; display: block; }

/* --- Forms --- */
.form-card {
    background: var(--card);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px;
    max-width: 640px;
}
.form-group { margin-bottom: 20px; }
label { display: block; font-weight: 600; margin-bottom: 6px; font-size: 0.9rem; }
input[type=text], input[type=email], input[type=tel], input[type=date], textarea, select {
    width: 100%;
    padding: 12px 14px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: rgba(8, 10, 28, 0.45);
    color: var(--text);
    font-size: 0.95rem;
    font-family: inherit;
}
textarea { resize: vertical; min-height: 120px; }
input:focus, textarea:focus, select:focus { outline: 2px solid var(--brand-blue-bright); }
.hp-field { position: absolute; left: -9999px; }
.field-hint { font-size: 0.8rem; color: var(--text-dim); margin-top: 4px; }

/* --- Filters --- */
.filter-bar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 32px; }
.filter-bar a {
    padding: 8px 16px;
    border-radius: 999px;
    border: 1px solid var(--border);
    color: var(--text-dim);
    font-size: 0.85rem;
    font-weight: 600;
}
.filter-bar a.active, .filter-bar a:hover { border-color: var(--brand-orange); color: var(--text); text-decoration: none; }

.empty-state { text-align: center; padding: 60px 20px; color: var(--text-dim); }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }

/* --- CTA band --- */
.cta-band {
    text-align: center;
    background: var(--gradient);
    color: #0d1230;
    border-radius: var(--radius);
    padding: 48px 24px;
}
.cta-band h2 { color: #0d1230; }
.cta-band .btn { background: #0d1230; color: #fff; }

/* --- Footer --- */
.site-footer { border-top: 1px solid var(--border); padding: 32px 0; margin-top: 40px; background: rgba(8, 10, 28, 0.35); }
.footer-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; }
.footer-inner p { margin: 0; font-size: 0.85rem; }
.footer-links { display: flex; gap: 20px; flex-wrap: wrap; }
.footer-links a { font-size: 0.85rem; color: var(--text-dim); }

/* --- Responsive --- */
@media (max-width: 860px) {
    .artist-profile { grid-template-columns: 1fr; }
    .artist-profile .photo { max-width: 280px; }
    .grid-2 { grid-template-columns: 1fr; }
}

@media (max-width: 980px) {
    .nav-toggle { display: flex; }
    .main-nav {
        position: absolute;
        top: 72px;
        left: 0;
        right: 0;
        background: rgba(10, 13, 33, 0.95);
        border-bottom: 1px solid var(--border);
        flex-direction: column;
        align-items: flex-start;
        padding: 20px;
        display: none;
        gap: 16px;
    }
    .main-nav.open { display: flex; }
}

@media (prefers-reduced-motion: reduce) {
    .intro-splash video { display: none; }
    .brand-mark, .home-nav-links a, .home-socials a { animation: none; }
    .cloud { animation: none; opacity: var(--cloud-opacity, 0.75); }
    .float-text { animation: none; }
    .star { animation: none; }
    .sky-layer, .sun-glow, .stars { transition: none; }
}

/* =====================================================================
   Home page — single-screen minimal splash (logo, tagline, mark, links, socials)
   ===================================================================== */

.home-splash {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 100px 20px 40px;
}

.home-splash-inner {
    max-width: 900px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.home-lang-switch {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 20;
    font-family: var(--font-display);
    font-size: 0.8rem;
    display: flex;
    gap: 6px;
    color: var(--text-dim);
}
.home-lang-switch a { color: var(--text-dim); font-weight: 700; }
.home-lang-switch a.active { color: var(--brand-orange); }

.home-logo {
    font-family: var(--font-display);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: -0.02em;
    line-height: 0.95;
    font-size: clamp(2.6rem, 9vw, 6.5rem);
    margin: 0;
}

.home-logo-sub {
    font-family: var(--font-display);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    font-size: clamp(1rem, 2.6vw, 1.8rem);
    color: var(--text);
    margin: 4px 0 0;
}

.home-tagline {
    font-family: var(--font-display);
    text-transform: uppercase;
    letter-spacing: 0.25em;
    font-size: clamp(0.75rem, 1.4vw, 1rem);
    font-weight: 500;
    color: var(--text-dim);
    margin: 16px 0 0;
}

.brand-mark {
    width: clamp(140px, 20vw, 220px);
    height: auto;
    color: var(--text);
    margin: 48px 0;
    animation: float-y 14s ease-in-out infinite;
}

.home-nav-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 14px 36px;
    margin-bottom: 40px;
}
.home-nav-links a {
    display: inline-block;
    font-family: var(--font-display);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    font-size: clamp(0.95rem, 1.6vw, 1.15rem);
    color: var(--text);
    animation: text-cloud-drift 13s ease-in-out infinite;
}
.home-nav-links a:hover { color: var(--brand-orange); text-decoration: none; }
.home-nav-links a:nth-child(1) { animation-delay: 0s; }
.home-nav-links a:nth-child(2) { animation-delay: 0.6s; }
.home-nav-links a:nth-child(3) { animation-delay: 1.2s; }
.home-nav-links a:nth-child(4) { animation-delay: 1.8s; }
.home-nav-links a:nth-child(5) { animation-delay: 2.4s; }
.home-nav-links a:nth-child(6) { animation-delay: 3s; }
.home-nav-links a:nth-child(7) { animation-delay: 3.6s; }

@keyframes text-cloud-drift {
    0%, 100% {
        transform: translateY(0);
        opacity: 0.82;
        text-shadow: 0 0 0 rgba(255, 255, 255, 0);
    }
    50% {
        transform: translateY(-10px);
        opacity: 1;
        text-shadow: 0 0 16px rgba(255, 255, 255, 0.45);
    }
}

.home-socials {
    display: flex;
    gap: 14px;
    margin-bottom: 32px;
}
.home-socials a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text);
    animation: float-y 12s ease-in-out infinite;
}
.home-socials a:hover { border-color: var(--brand-orange); color: var(--brand-orange); text-decoration: none; }
.home-socials svg { width: 18px; height: 18px; }
.home-socials a:nth-child(1) { animation-delay: 0s; }
.home-socials a:nth-child(2) { animation-delay: 0.5s; }
.home-socials a:nth-child(3) { animation-delay: 1s; }
.home-socials a:nth-child(4) { animation-delay: 1.5s; }
.home-socials a:nth-child(5) { animation-delay: 2s; }
.home-socials a:nth-child(6) { animation-delay: 2.5s; }

@keyframes float-y {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* Site-wide gentle floating text (headings/paragraphs/buttons), applied via
   main.js with randomized per-element duration/delay so nothing moves in
   lockstep — echoes the slow drifting sky/clouds background. */
.float-text {
    animation-name: float-text-y;
    animation-timing-function: ease-in-out;
    animation-iteration-count: infinite;
}
@keyframes float-text-y {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

.home-footer-note {
    font-size: 0.8rem;
    color: var(--text-dim);
}
.home-footer-note a { color: var(--text-dim); text-decoration: underline; }

@media (max-width: 640px) {
    .home-splash { padding: 90px 16px 32px; }
    .home-nav-links { gap: 12px 24px; }
    .home-lang-switch { top: 16px; right: 16px; }
}
