/* Empire Debut™ — New Models presentation (Latin Empire X) */

.empire-debut {
    position: relative;
    margin: 48px 0 56px;
    padding: 0;
    overflow: hidden;
    border-radius: 24px;
    border: 1px solid rgba(212, 175, 55, 0.35);
    background: radial-gradient(ellipse 120% 80% at 50% 0%, rgba(212, 175, 55, 0.14) 0%, transparent 55%),
        linear-gradient(165deg, #0a0608 0%, #120a10 40%, #080608 100%);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.65), inset 0 1px 0 rgba(255, 220, 150, 0.08);
}

.empire-debut::before,
.empire-debut::after {
    content: '';
    position: absolute;
    top: 0;
    width: 18%;
    height: 100%;
    z-index: 3;
    pointer-events: none;
    background: linear-gradient(90deg, rgba(8, 4, 6, 0.95), transparent);
}
.empire-debut::after {
    left: auto;
    right: 0;
    background: linear-gradient(-90deg, rgba(8, 4, 6, 0.95), transparent);
}

.debut-curtain-top {
    height: 4px;
    background: linear-gradient(90deg, transparent, #d4af37, #fff8dc, #d4af37, transparent);
    background-size: 200% 100%;
    animation: debutShimmer 4s linear infinite;
}

@keyframes debutShimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.debut-header {
    text-align: center;
    padding: 36px 24px 20px;
    position: relative;
    z-index: 2;
}

.debut-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 6px 16px;
    border-radius: 999px;
    border: 1px solid rgba(212, 175, 55, 0.5);
    background: rgba(212, 175, 55, 0.08);
    color: var(--gold-main);
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    margin-bottom: 14px;
}

.debut-eyebrow .debut-pulse {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ff4466;
    box-shadow: 0 0 12px #ff4466;
    animation: debutPulse 1.2s ease-in-out infinite;
}

@keyframes debutPulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.4); opacity: 0.6; }
}

.debut-title {
    font-family: 'Cinzel', serif;
    font-size: clamp(1.8rem, 5vw, 2.8rem);
    letter-spacing: 0.06em;
    margin: 0 0 10px;
    line-height: 1.15;
}

.debut-title span {
    background: linear-gradient(135deg, #fff8dc, #d4af37, #aa7700);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.debut-subtitle {
    color: #9a9080;
    font-size: 0.92rem;
    max-width: 520px;
    margin: 0 auto 20px;
    line-height: 1.6;
}

.debut-countdown {
    display: inline-flex;
    align-items: center;
    gap: 8px 14px;
    flex-wrap: wrap;
    justify-content: center;
    padding: 10px 18px;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.45);
    border: 1px dashed rgba(212, 175, 55, 0.35);
    font-size: 0.72rem;
    color: #b8a880;
}

.debut-countdown strong {
    color: var(--gold-main);
    font-variant-numeric: tabular-nums;
}

/* Film grain overlay */
.debut-film-grain {
    position: absolute;
    inset: 0;
    z-index: 4;
    pointer-events: none;
    opacity: 0.07;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' 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");
    animation: grainShift 0.5s steps(2) infinite;
}

@keyframes grainShift {
    0% { transform: translate(0, 0); }
    100% { transform: translate(-2%, 1%); }
}

.debut-header--compact {
    padding: 28px 20px 12px;
}

.debut-header--compact .debut-subtitle {
    margin-bottom: 8px;
    font-size: 0.82rem;
}

/* Cinematic stage */
.debut-stage {
    padding: 0 20px 12px;
    position: relative;
    z-index: 2;
}

.debut-cinema {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid rgba(0, 0, 0, 0.8);
    box-shadow: 0 0 0 1px rgba(212, 175, 55, 0.25), 0 30px 70px rgba(0, 0, 0, 0.85);
    background: #000;
}

.debut-letterbox {
    height: clamp(28px, 5vw, 48px);
    background: #000;
    position: relative;
    z-index: 5;
}

.debut-cinema-screen {
    position: relative;
    aspect-ratio: 21 / 9;
    min-height: 280px;
    max-height: 520px;
    overflow: hidden;
    background: #050505;
}

.debut-hero-img {
    position: absolute;
    inset: -5%;
    width: 110%;
    height: 110%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 1.2s ease;
    filter: contrast(1.05) saturate(1.08);
}

.debut-hero-img.active {
    opacity: 1;
    animation: debutKenBurns 18s ease-out forwards;
}

@keyframes debutKenBurns {
    0% { transform: scale(1.08) translate(0, 0); }
    100% { transform: scale(1.18) translate(-2%, -1%); }
}

.debut-vignette {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    background: radial-gradient(ellipse 80% 70% at 50% 45%, transparent 30%, rgba(0, 0, 0, 0.65) 100%),
        linear-gradient(0deg, rgba(0, 0, 0, 0.85) 0%, transparent 35%, transparent 65%, rgba(0, 0, 0, 0.75) 100%);
}

/* Trailer typewriter overlay */
.debut-trailer-overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: clamp(40px, 8vw, 80px) 24px;
    pointer-events: none;
}

.debut-trailer-overlay .debut-trailer-actions {
    pointer-events: auto;
}

.debut-type {
    margin: 0;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.5s ease, transform 0.5s ease;
    text-shadow: 0 2px 24px rgba(0, 0, 0, 0.95), 0 0 40px rgba(0, 0, 0, 0.8);
    max-width: 90%;
}

.debut-type.visible {
    opacity: 1;
    transform: translateY(0);
}

.debut-type.is-typing::after {
    content: '|';
    display: inline-block;
    margin-left: 2px;
    color: var(--gold-main);
    animation: debutCursor 0.7s step-end infinite;
    font-weight: 300;
}

@keyframes debutCursor {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.debut-type.presents {
    font-size: clamp(0.65rem, 2vw, 0.78rem);
    letter-spacing: 0.35em;
    font-weight: 700;
    color: rgba(255, 248, 220, 0.9);
    text-transform: uppercase;
    min-height: 1.4em;
}

.debut-cinema[data-phase="intro"] .debut-type.presents,
.debut-cinema[data-phase="name"] .debut-type.name {
    display: block;
}

.debut-type.name {
    font-family: 'Cinzel', serif;
    font-size: clamp(2rem, 7vw, 3.5rem);
    letter-spacing: 0.12em;
    color: #fff;
    margin-top: 8px;
    min-height: 1.2em;
}

.debut-type.line {
    font-family: 'Montserrat', sans-serif;
    font-size: clamp(0.95rem, 2.8vw, 1.25rem);
    font-weight: 400;
    font-style: italic;
    color: #f0e6d0;
    line-height: 1.5;
    min-height: 2.8em;
    margin-top: 12px;
}

.debut-type.closing {
    font-size: clamp(0.7rem, 2vw, 0.85rem);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--gold-main);
    margin-top: 16px;
    min-height: 1.4em;
}

.debut-cinema[data-phase="speech"] .debut-type.presents,
.debut-cinema[data-phase="speech"] .debut-type.name {
    opacity: 0.35;
    transform: scale(0.92);
    filter: blur(0.3px);
}

.debut-cinema[data-phase="outro"] .debut-type.line,
.debut-cinema[data-phase="cta"] .debut-type.line {
    opacity: 0.25;
}

.debut-trailer-meta {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: center;
    margin-top: 14px;
    font-size: 0.72rem;
    color: #999;
    opacity: 0;
    transition: opacity 0.6s;
}

.debut-cinema[data-phase="cta"] .debut-trailer-meta {
    opacity: 1;
}

.debut-trailer-meta .live-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    background: #ff3b3b;
    color: #fff;
    font-weight: 700;
}

.debut-trailer-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-top: 18px;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.6s, transform 0.6s;
}

.debut-trailer-actions.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Playback controls */
.debut-cinema-controls {
    display: flex;
    justify-content: center;
    gap: 12px;
    padding: 14px 20px 8px;
    position: relative;
    z-index: 2;
}

.debut-ctrl-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid rgba(212, 175, 55, 0.4);
    background: rgba(0, 0, 0, 0.5);
    color: var(--gold-main);
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
}

.debut-ctrl-btn:hover {
    background: rgba(212, 175, 55, 0.15);
    transform: scale(1.06);
}

.debut-btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 22px;
    border-radius: 999px;
    background: linear-gradient(135deg, #f0d080, #d4af37, #aa7700);
    color: #000;
    font-weight: 800;
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.debut-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(212, 175, 55, 0.45);
}

.debut-btn-ghost {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 18px;
    border-radius: 999px;
    border: 1px solid rgba(212, 175, 55, 0.5);
    color: var(--gold-main);
    font-weight: 600;
    font-size: 0.72rem;
    text-decoration: none;
    background: rgba(0, 0, 0, 0.4);
    transition: background 0.2s;
}

.debut-btn-ghost:hover {
    background: rgba(212, 175, 55, 0.12);
}

/* Filmstrip */
.debut-filmstrip-wrap {
    padding: 0 20px 32px;
    position: relative;
    z-index: 2;
}

.debut-filmstrip-label {
    font-size: 0.65rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(212, 175, 55, 0.7);
    margin-bottom: 12px;
    text-align: center;
}

.debut-filmstrip {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding: 8px 4px 16px;
    scrollbar-width: thin;
    scrollbar-color: var(--gold-main) #111;
}

.debut-filmstrip::-webkit-scrollbar {
    height: 6px;
}
.debut-filmstrip::-webkit-scrollbar-thumb {
    background: var(--gold-main);
    border-radius: 3px;
}

.debut-film-card {
    flex: 0 0 140px;
    scroll-snap-align: center;
    position: relative;
    border-radius: 14px;
    overflow: hidden;
    border: 2px solid transparent;
    cursor: pointer;
    transition: border-color 0.3s, transform 0.3s, box-shadow 0.3s;
    aspect-ratio: 3/4;
}

.debut-film-card.active {
    border-color: var(--gold-main);
    box-shadow: 0 0 24px rgba(212, 175, 55, 0.4);
    transform: translateY(-4px);
}

.debut-film-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(105deg, transparent 40%, rgba(255, 255, 255, 0.15) 50%, transparent 60%);
    transform: translateX(-100%);
    transition: transform 0.6s;
}

.debut-film-card:hover::after {
    transform: translateX(100%);
}

.debut-film-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.debut-film-card .debut-film-new {
    position: absolute;
    top: 8px;
    left: 8px;
    font-size: 0.55rem;
    font-weight: 800;
    padding: 3px 7px;
    border-radius: 4px;
    background: var(--gold-main);
    color: #000;
}

.debut-film-card .debut-film-name {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 10px 8px;
    font-size: 0.68rem;
    font-weight: 700;
    text-align: center;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.95));
}

/* Sparkles */
.debut-sparkles {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.debut-sparkles i {
    position: absolute;
    width: 3px;
    height: 3px;
    background: #fff8dc;
    border-radius: 50%;
    opacity: 0;
    animation: sparkleFloat 4s ease-in-out infinite;
}

.debut-sparkles i:nth-child(1) { left: 10%; top: 20%; animation-delay: 0s; }
.debut-sparkles i:nth-child(2) { left: 85%; top: 15%; animation-delay: 0.8s; }
.debut-sparkles i:nth-child(3) { left: 25%; top: 70%; animation-delay: 1.6s; }
.debut-sparkles i:nth-child(4) { left: 70%; top: 65%; animation-delay: 2.2s; }
.debut-sparkles i:nth-child(5) { left: 50%; top: 40%; animation-delay: 3s; }

@keyframes sparkleFloat {
    0%, 100% { opacity: 0; transform: translateY(0) scale(0); }
    30% { opacity: 1; transform: translateY(-12px) scale(1); }
    70% { opacity: 0.6; transform: translateY(-24px) scale(0.5); }
}

.debut-footer-cta {
    text-align: center;
    padding: 0 20px 28px;
}

.debut-footer-cta a {
    color: var(--gold-main);
    font-size: 0.78rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-decoration: none;
    font-weight: 600;
}

.debut-footer-cta a:hover {
    text-decoration: underline;
}

/* In-view reveal */
.empire-debut.debut-visible .debut-spotlight {
    animation: debutReveal 1s ease forwards;
}

@keyframes debutReveal {
    from { transform: scale(0.96); opacity: 0.6; }
    to { transform: scale(1); opacity: 1; }
}

@media (max-width: 900px) {
    .debut-cinema-screen {
        aspect-ratio: 16 / 9;
        min-height: 220px;
    }
    .empire-debut::before,
    .empire-debut::after {
        width: 8%;
    }
}

@media (max-width: 520px) {
    .empire-debut {
        margin: 28px -8px 40px;
        border-radius: 16px;
    }
    .debut-spotlight {
        min-height: 380px;
    }
    .debut-film-card {
        flex: 0 0 120px;
    }
}
