/* Design tokens - Premium Palette */
:root {
    --primary-blue: #00234a;
    --primary-gold: #c5a059;
    --gold-gradient: linear-gradient(135deg, #c5a059 0%, #f7e0a3 50%, #906e30 100%);
    --blue-gradient: linear-gradient(180deg, #00234a 0%, #00152e 100%);
    --white: #FFFFFF;
    --bg-light: #fafbfc;
    --text-dark: #1a1a1a;
    --text-light: #555555;
    --nav-height: 90px;
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.1);
}

/* Animations Core */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.19, 1, 0.22, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Base styles refinement */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Montserrat', sans-serif;
    color: var(--text-dark);
    line-height: 1.7;
    background-color: var(--bg-light);
    overflow-x: hidden;
}

h1,
h2,
h3 {
    font-family: 'Playfair Display', serif;
    letter-spacing: -0.02em;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Header & Nav - Sticky Glass Effect */
.header {
    height: var(--nav-height);
    background: rgba(255, 255, 255, 0.9);
    -webkit-backdrop-filter: blur(15px);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(0, 35, 74, 0.05);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    display: flex;
    align-items: center;
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo {
    display: flex;
    align-items: center;
}

.logo__img {
    height: 65px;
    width: auto;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
    transition: transform 0.3s ease;
}

.logo__img:hover {
    transform: scale(1.05);
}

.nav__list {
    display: flex;
    list-style: none;
    gap: 2.5rem;
}

.nav__link {
    text-decoration: none;
    color: var(--primary-blue);
    font-weight: 500;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.nav__link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0%;
    height: 1px;
    background: var(--primary-gold);
    transition: width 0.3s ease;
}

.nav__link:hover::after {
    width: 100%;
}

.nav__link:hover {
    color: var(--primary-gold);
}

.menu-btn {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 20px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}

.menu-btn span {
    width: 100%;
    height: 3px;
    background: var(--primary-blue);
    border-radius: 2px;
    transition: all 0.3s;
}

.menu-btn.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.menu-btn.active span:nth-child(2) {
    opacity: 0;
}

.menu-btn.active span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

/* Music Control Premium UI */
.music-control {
    position: fixed;
    left: 2rem;
    bottom: 2rem;
    width: 60px;
    height: 60px;
    background: var(--gold-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(197, 160, 89, 0.4);
    z-index: 1001;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.music-control:hover {
    transform: scale(1.1) rotate(5deg);
}

.music-icon {
    display: flex;
    align-items: flex-end;
    gap: 3px;
    height: 20px;
}

.music-icon .bar {
    width: 3px;
    height: 100%;
    background: var(--white);
    border-radius: 2px;
    transition: height 0.3s;
}

.music-control.playing .bar {
    animation: barAnim 1s ease-in-out infinite;
}

.music-control.playing .bar:nth-child(1) {
    animation-delay: 0.1s;
    animation-duration: 0.8s;
}

.music-control.playing .bar:nth-child(2) {
    animation-delay: 0.3s;
    animation-duration: 1.2s;
}

.music-control.playing .bar:nth-child(3) {
    animation-delay: 0.2s;
    animation-duration: 0.9s;
}

@keyframes barAnim {

    0%,
    100% {
        height: 5px;
    }

    50% {
        height: 20px;
    }
}

/* Hero Section - Immersive Triumphant Atmosphere */
.hero {
    height: 100vh;
    background: var(--primary-blue);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white);
    margin-top: -var(--nav-height);
    background-image: url('graduation_hero_voluntas_dei.png');
    background-size: cover;
    background-position: center;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(0, 35, 74, 0.4) 0%, rgba(0, 21, 46, 0.8) 100%);
    z-index: 1;
}

.hero__content {
    position: relative;
    z-index: 2;
    max-width: 900px;
}

.hero__tagline {
    display: block;
    font-size: 1.1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 5px;
    color: var(--primary-gold);
    margin-bottom: 1.5rem;
    opacity: 0;
    animation: fadeIn 1.5s ease 0.2s forwards;
}

.hero__title {
    font-size: 5rem;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 0.5rem;
    opacity: 0;
    transform: translateY(40px);
    animation: revealUp 1.2s cubic-bezier(0.19, 1, 0.22, 1) forwards;
}

.hero__subtitle {
    font-size: 1.8rem;
    font-style: italic;
    font-weight: 400;
    margin-bottom: 2rem;
    color: var(--primary-gold);
    opacity: 0;
    animation: fadeIn 1.5s ease 0.5s forwards;
}

/* Countdown Styles */
.countdown {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 3rem;
    opacity: 0;
    animation: fadeIn 1.5s ease 0.8s forwards;
}

.countdown__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    padding: 1rem 1.5rem;
    border-radius: 12px;
    border: 1px solid rgba(197, 160, 89, 0.2);
    min-width: 100px;
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
}

.countdown__number {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--white);
    line-height: 1;
}

.countdown__label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--primary-gold);
    margin-top: 0.5rem;
}

/* Buttons - Premium Feel */
.btn {
    display: inline-block;
    padding: 1.2rem 3rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.85rem;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    border: none;
}

.btn--primary {
    background: var(--gold-gradient);
    color: var(--white);
    box-shadow: 0 10px 20px rgba(197, 160, 89, 0.2);
}

.btn--primary:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 15px 30px rgba(197, 160, 89, 0.4);
}

.btn--gold {
    background: var(--gold-gradient);
    color: var(--white);
    font-size: 1rem;
}

.btn--gold:hover {
    background: var(--gold-hover);
    transform: scale(1.05);
}

.btn--large {
    padding: 1.2rem 3rem;
    font-size: 1.1rem;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

/* Section Basics */
.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin: 4rem 0 3rem;
    color: var(--primary-blue);
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: var(--primary-gold);
    margin: 10px auto;
}

.section-title--white {
    color: var(--white);
}

/* Events - Card Refinement */
.event-card {
    background: var(--white);
    padding: 4rem 3rem;
    border-radius: 20px;
    text-align: center;
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    border: 1px solid rgba(0, 35, 74, 0.05);
    position: relative;
    overflow: hidden;
}

.event-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--gold-gradient);
}

.event-card:hover {
    transform: translateY(-20px) scale(1.02);
    box-shadow: 0 40px 80px rgba(0, 35, 74, 0.12);
}

.event-card__month {
    display: block;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

/* Registration Badge & Rules */
.registration__badge {
    display: inline-block;
    padding: 0.8rem 2rem;
    background: rgba(197, 160, 89, 0.15);
    border: 1px solid var(--primary-gold);
    color: var(--primary-gold);
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 3rem;
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
    animation: badgePulse 2s infinite;
}

@keyframes badgePulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(197, 160, 89, 0.4);
    }

    50% {
        transform: scale(1.05);
        box-shadow: 0 0 20px 10px rgba(197, 160, 89, 0);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(197, 160, 89, 0);
    }
}

.registration__rules {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-bottom: 4rem;
}

.rule-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.rule-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.rule-text {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.registration__form-preview {
    margin: 0 auto;
}

.event-card__date {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    color: var(--primary-gold);
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    transition: transform 0.3s ease;
    display: block;
}

.event-card__time {
    font-size: 0.9rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 2rem;
    display: block;
}

.event-card__title {
    font-size: 1.8rem;
    margin-bottom: 2rem;
    color: var(--primary-blue);
    line-height: 1.3;
}

.event-card__location {
    font-style: italic;
    color: var(--text-light);
    margin-bottom: 2rem;
    display: block;
}

.btn-calendar {
    display: inline-block;
    padding: 0.8rem 1.8rem;
    background: transparent;
    border: 1px solid var(--primary-gold);
    color: var(--primary-gold);
    text-decoration: none;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
}

.btn-calendar:hover {
    background: var(--gold-gradient);
    color: var(--white);
    border-color: transparent;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(197, 160, 89, 0.3);
}

/* Registration Section - Luxury Dark Mode */
.registration {
    background: var(--blue-gradient);
    padding: 10rem 0;
    position: relative;
    overflow: hidden;
}

.registration::after {
    content: 'XXIII';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: 'Playfair Display', serif;
    font-size: 30vw;
    color: rgba(197, 160, 89, 0.03);
    z-index: 0;
    pointer-events: none;
}

.registration__content {
    position: relative;
    z-index: 1;
}

.registration__info {
    max-width: 700px;
    margin: 0 auto;
}

.registration__text {
    font-size: 1.4rem;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 2rem;
}

/* Animations */
@keyframes revealUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

/* Location */
.location {
    padding-bottom: 6rem;
}

.location__map-container {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.location__address {
    text-align: center;
    font-weight: 300;
    font-size: 1.1rem;
}

/* Footer */
.footer {
    background: #00152e;
    color: rgba(255, 255, 255, 0.6);
    padding: 3rem 0;
    text-align: center;
    font-size: 0.9rem;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 768px) {
    :root {
        --nav-height: 70px;
    }

    .header {
        background: var(--white);
    }

    .logo__img {
        height: 40px;
    }

    .menu-btn {
        display: flex;
    }

    .nav__list {
        position: fixed;
        top: var(--nav-height);
        left: 0;
        width: 100%;
        background: var(--white);
        flex-direction: column;
        align-items: center;
        padding: 3rem 0;
        gap: 2rem;
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
        transform: translateY(-150%);
        transition: transform 0.5s cubic-bezier(0.19, 1, 0.22, 1);
        display: flex;
        opacity: 0;
        pointer-events: none;
    }

    .nav__list.active {
        transform: translateY(0);
        opacity: 1;
        pointer-events: all;
    }

    .hero__tagline {
        font-size: 0.8rem;
        letter-spacing: 3px;
        padding: 0 1rem;
    }

    .hero__title {
        font-size: 2.2rem;
        padding: 0 1rem;
    }

    .hero__subtitle {
        font-size: 1rem;
        margin-bottom: 2rem;
        padding: 0 1.5rem;
    }

    .countdown {
        gap: 0.8rem;
        padding: 0 1rem;
    }

    .countdown__item {
        padding: 0.8rem 0.5rem;
        min-width: 70px;
    }

    .countdown__number {
        font-size: 1.5rem;
    }

    .countdown__label {
        font-size: 0.5rem;
        letter-spacing: 1px;
    }

    .section-title {
        font-size: 1.8rem;
        margin: 4rem 0 2rem;
        padding: 0 1rem;
    }

    .events__grid {
        gap: 2rem;
        padding: 0 1rem;
    }

    .event-card {
        padding: 3rem 1.5rem;
    }

    .event-card__date {
        font-size: 2rem;
    }

    .event-card__title {
        font-size: 1.5rem;
    }

    .registration__rules {
        flex-direction: column;
        gap: 2rem;
    }

    .registration__text {
        font-size: 1.1rem;
        padding: 0 1rem;
    }

    .btn--large {
        padding: 1rem 2rem;
        font-size: 0.9rem;
    }

    .music-control {
        bottom: 1.5rem;
        left: 1.5rem;
        width: 50px;
        height: 50px;
    }
}