/* ============================================
   KIIT Fest 9.0 — Thank You Page
   Single-Screen Centered Layout
   ============================================ */

/* === CUSTOM PROPERTIES === */
:root {
    --bg-primary: #0B0B10;
    --bg-surface: #101014;
    --text-primary: #F9F8F5;
    --text-secondary: rgba(249, 248, 245, 0.78);
    --text-muted: #CFCFD6;
    --accent: #F51154;
    --purple-violet: #5D24A5;
    --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
    --ease-out: cubic-bezier(0.0, 0, 0.2, 1);

    /* Font stacks */
    --font-heading: 'Space Grotesk', sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* === RESET === */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    overflow: hidden;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-body);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

::selection {
    background: var(--accent);
    color: var(--bg-primary);
}

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

a {
    color: inherit;
    text-decoration: none;
}

/* === PRELOADER === */
.preloader {
    position: fixed;
    inset: 0;
    background: var(--bg-primary);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.8s var(--ease-smooth), visibility 0.8s;
}

.preloader.loaded {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.preloader-logo {
    width: 120px;
    opacity: 0.7;
    animation: preloaderPulse 1.8s ease-in-out infinite;
}

@keyframes preloaderPulse {
    0%, 100% { opacity: 0.4; transform: scale(1); }
    50% { opacity: 0.9; transform: scale(1.03); }
}

/* === BACKGROUND CAROUSEL === */
.bg-carousel {
    position: fixed;
    inset: 0;
    z-index: 0;
    background-color: var(--bg-surface);
}

.carousel-slide {
    position: absolute;
    inset: -5%;
    width: 110%;
    height: 110%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    will-change: opacity, transform;
    transition: opacity 2.5s cubic-bezier(0.4, 0, 0.2, 1);
    transform: scale(1) translate(0, 0);
    filter: saturate(1.15) brightness(0.95);
}

.carousel-slide.active {
    opacity: 1;
}

/* Multiple Ken Burns directions — assigned via JS data-direction */
.carousel-slide.active[data-direction="0"] {
    animation: kenBurnsCenter 8s ease-out forwards;
}
.carousel-slide.active[data-direction="1"] {
    animation: kenBurnsLeft 8s ease-out forwards;
}
.carousel-slide.active[data-direction="2"] {
    animation: kenBurnsRight 8s ease-out forwards;
}
.carousel-slide.active[data-direction="3"] {
    animation: kenBurnsUp 8s ease-out forwards;
}

@keyframes kenBurnsCenter {
    from { transform: scale(1); }
    to { transform: scale(1.08); }
}

@keyframes kenBurnsLeft {
    from { transform: scale(1.02) translate(0, 0); }
    to { transform: scale(1.1) translate(-1.5%, 0.5%); }
}

@keyframes kenBurnsRight {
    from { transform: scale(1.02) translate(0, 0); }
    to { transform: scale(1.1) translate(1.5%, -0.5%); }
}

@keyframes kenBurnsUp {
    from { transform: scale(1.02) translate(0, 0); }
    to { transform: scale(1.1) translate(0.5%, -1.5%); }
}

/* Dark cinematic overlay with subtle brand tint */
.carousel-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
        radial-gradient(ellipse at 30% 50%, rgba(93, 36, 165, 0.08) 0%, transparent 60%),
        radial-gradient(ellipse at 70% 80%, rgba(245, 17, 84, 0.05) 0%, transparent 50%),
        radial-gradient(ellipse at center, rgba(11, 11, 16, 0.5) 0%, rgba(11, 11, 16, 0.82) 100%),
        linear-gradient(180deg, rgba(11, 11, 16, 0.4) 0%, rgba(11, 11, 16, 0.7) 100%);
}

/* Film grain texture */
.carousel-overlay::after {
    content: '';
    position: absolute;
    inset: 0;
    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.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
    background-repeat: repeat;
    opacity: 0.25;
    pointer-events: none;
}

/* === PAGE CONTENT === */
.page-content {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100vh;
    height: 100dvh;
}

/* === HERO — FULLSCREEN CENTERED === */
.hero {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 2rem;
    gap: 0;
}

/* Logo */
.hero-logo-wrap {
    margin-bottom: 2rem;
    opacity: 0;
    animation: fadeIn 1s var(--ease-smooth) 0.3s forwards;
}

.hero-logo {
    height: 52px;
    width: auto;
    filter: brightness(1.1);
}

/* Theme tag */
.hero-tag {
    font-family: var(--font-heading);
    font-size: 0.7rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.3em;
    color: var(--accent);
    margin-bottom: 1.8rem;
    display: flex;
    align-items: center;
    gap: 12px;
    opacity: 0;
    animation: fadeIn 1s var(--ease-smooth) 0.5s forwards;
}

.hero-tag::before,
.hero-tag::after {
    content: '';
    display: block;
    width: 24px;
    height: 1px;
    background: var(--accent);
    opacity: 0.6;
}

/* Main heading */
.hero-title {
    font-family: var(--font-heading);
    font-size: clamp(2.2rem, 5.5vw, 5rem);
    font-weight: 700;
    line-height: 1.08;
    letter-spacing: -0.03em;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    opacity: 0;
    transform: translateY(30px);
    animation: revealUp 1.2s var(--ease-out) 0.7s forwards;
}

.hero-title em {
    font-style: normal;
    color: var(--accent);
}

/* Supporting text */
.hero-subtitle {
    font-family: var(--font-body);
    font-size: clamp(0.95rem, 1.5vw, 1.2rem);
    color: var(--text-secondary);
    font-weight: 300;
    line-height: 1.7;
    max-width: 540px;
    margin-bottom: 1.5rem;
    opacity: 0;
    transform: translateY(20px);
    animation: revealUp 1s var(--ease-out) 0.9s forwards;
}

/* Closing line */
.hero-closing {
    font-family: var(--font-heading);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 12px;
    opacity: 0;
    animation: fadeIn 1s var(--ease-smooth) 1.1s forwards;
}

.hero-closing::before {
    content: '';
    width: 28px;
    height: 1px;
    background: var(--text-muted);
}



/* === ANIMATIONS === */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes revealUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* === RESPONSIVE === */

/* Tablets */
@media (max-width: 1024px) {
    .hero-logo {
        height: 44px;
    }
}

/* Mobile landscape & small tablets */
@media (max-width: 768px) {
    .hero {
        padding: 1.5rem;
    }

    .hero-logo {
        height: 38px;
    }

    .hero-logo-wrap {
        margin-bottom: 1.5rem;
    }

    .hero-tag {
        font-size: 0.6rem;
        letter-spacing: 0.2em;
        margin-bottom: 1.2rem;
    }

    .hero-title {
        margin-bottom: 1.2rem;
    }

    .hero-subtitle {
        margin-bottom: 1.2rem;
    }

    .hero-closing {
        margin-bottom: 0;
    }

    .hide-mobile {
        display: none;
    }
}

/* Small phones */
@media (max-width: 480px) {
    .hero {
        padding: 1.2rem;
    }

    .hero-logo {
        height: 30px;
    }

    .hero-logo-wrap {
        margin-bottom: 1.2rem;
    }

    .hero-tag {
        font-size: 0.55rem;
        margin-bottom: 1rem;
    }

    .hero-tag::before,
    .hero-tag::after {
        width: 16px;
    }

    .hero-title {
        font-size: clamp(1.8rem, 7vw, 2.5rem);
        margin-bottom: 1rem;
    }

    .hero-subtitle {
        font-size: 0.85rem;
        margin-bottom: 1rem;
    }

    .hero-closing {
        font-size: 0.6rem;
    }

    .hero-closing::before {
        width: 18px;
    }
}

/* Very short viewports (landscape phones) */
@media (max-height: 600px) {
    .hero-logo {
        height: 26px;
    }

    .hero-logo-wrap {
        margin-bottom: 0.8rem;
    }

    .hero-tag {
        margin-bottom: 0.6rem;
        font-size: 0.55rem;
    }

    .hero-title {
        font-size: clamp(1.4rem, 4vw, 2rem);
        margin-bottom: 0.6rem;
    }

    .hero-subtitle {
        font-size: 0.8rem;
        margin-bottom: 0.6rem;
    }

    .hero-closing {
        font-size: 0.6rem;
    }
}
