/* =====================================================================
   OSSAPCON 2027 — UI ENHANCEMENT LAYER
   Additive polish + motion on top of the existing navy/maroon/gold theme.
   Nothing here removes existing styles; it only refines and animates.
   Palette:  navy #002267 / #06294b · maroon #a32735 / #7b1e2b · gold #f5c85b / #d4af37
===================================================================== */

:root {
    --oss-navy: #002267;
    --oss-navy-2: #06294b;
    --oss-maroon: #a32735;
    --oss-maroon-2: #7b1e2b;
    --oss-gold: #f5c85b;
    --oss-gold-2: #d4af37;
    --oss-ink: #1f2733;
    --oss-muted: #5a6472;
    --oss-ease: cubic-bezier(.22, .61, .36, 1);
}

/* ---------- Typography ---------- */
html { scroll-behavior: smooth; }

body {
    font-family: "Poppins", "Segoe UI", Arial, Helvetica, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    color: var(--oss-ink);
}

h1, h2, h3, h4, h5,
.countdown-title,
.welcome-title,
.ossap-message-title,
.committee-main-heading h2,
.registration-heading h2 {
    font-family: "Poppins", "Segoe UI", Arial, sans-serif;
    letter-spacing: -0.4px;
}

/* Gentle gradient sheen on the big section titles */
.welcome-title,
.ossap-message-title,
.committee-main-heading h2,
.registration-heading h2 {
    background: linear-gradient(90deg, #1c2533 0%, #3a4657 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Animate the little accent lines under headings when revealed */
.welcome-title-line,
.ossap-message-line,
.committee-heading-line,
.registration-heading-line {
    background: linear-gradient(90deg, var(--oss-maroon), var(--oss-gold-2)) !important;
    transform-origin: left center;
}
.text-center .welcome-title-line,
.text-center .ossap-message-line,
.committee-main-heading .committee-heading-line,
.registration-heading .registration-heading-line {
    transform-origin: center;
}

/* =====================================================================
   NAVBAR — glass + scrolled state + animated underline
===================================================================== */
.main-navbar {
    transition: background .35s var(--oss-ease), box-shadow .35s var(--oss-ease), padding .35s var(--oss-ease);
    background: linear-gradient(135deg, #002267 0%, #01306f 55%, #001a4d 100%);
}
.main-navbar.navbar-scrolled {
    background: rgba(0, 26, 71, .92);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 30px -12px rgba(0, 0, 0, .55);
    padding-top: 3px;
    padding-bottom: 3px;
}

.main-navbar .nav-link {
    position: relative;
}
.main-navbar .nav-link::after {
    content: "";
    position: absolute;
    left: 22px;
    right: 22px;
    bottom: 4px;
    height: 2px;
    background: linear-gradient(90deg, var(--oss-gold), var(--oss-gold-2));
    border-radius: 4px;
    transform: scaleX(0);
    transform-origin: center;
    transition: transform .3s var(--oss-ease);
}
.main-navbar .nav-link:hover::after,
.main-navbar .nav-link.active::after {
    transform: scaleX(1);
}
.conference-logo { transition: transform .35s var(--oss-ease), box-shadow .35s var(--oss-ease); }
.navbar-brand:hover .conference-logo { transform: scale(1.05) rotate(-1deg); box-shadow: 0 8px 20px rgba(0,0,0,.25); }

/* =====================================================================
   HEADER BANNER — subtle zoom-in on load
===================================================================== */
.header-banner {
    animation: ossBannerIn 1.2s var(--oss-ease) both;
}
@keyframes ossBannerIn {
    from { opacity: 0; transform: scale(1.04); }
    to   { opacity: 1; transform: scale(1); }
}

/* =====================================================================
   CAROUSEL — rounded frame + zoom on active slide + styled controls
===================================================================== */
.home-carousel .carousel-item.active .carousel-banner {
    animation: ossSlideZoom 6s ease-out both;
}
@keyframes ossSlideZoom {
    from { transform: scale(1.06); }
    to   { transform: scale(1); }
}
.carousel-control-prev, .carousel-control-next { width: 6%; opacity: .85; }
.carousel-control-prev-icon, .carousel-control-next-icon {
    background-color: rgba(0, 34, 103, .55);
    border-radius: 50%;
    padding: 20px;
    background-size: 45%;
    transition: background-color .3s var(--oss-ease), transform .3s var(--oss-ease);
}
.carousel:hover .carousel-control-prev-icon,
.carousel:hover .carousel-control-next-icon { background-color: var(--oss-maroon); }
.carousel-control-prev:hover .carousel-control-prev-icon,
.carousel-control-next:hover .carousel-control-next-icon { transform: scale(1.12); }

/* =====================================================================
   COUNTDOWN — gradient section, floating glowing boxes
===================================================================== */
/* =====================================================
   SAVE THE DATE / CONFERENCE COUNTDOWN
===================================================== */

.conference-countdown {
    position: relative;
    overflow: hidden;

    padding: 75px 0 !important;

    background:
        radial-gradient(
            circle at 15% 30%,
            rgba(50, 120, 255, 0.25),
            transparent 30%
        ),
        radial-gradient(
            circle at 85% 70%,
            rgba(255, 196, 65, 0.12),
            transparent 28%
        ),
        linear-gradient(
            135deg,
            #00153f 0%,
            #002267 45%,
            #064d8b 100%
        );

    background-size: 140% 140%;

    animation: countdownBackground 10s ease-in-out infinite alternate;
}


/* =====================================================
   BACKGROUND DECORATION
===================================================== */

.conference-countdown::before,
.conference-countdown::after {
    content: "";

    position: absolute;

    border-radius: 50%;

    pointer-events: none;
}


/* LARGE CIRCLE */

.conference-countdown::before {
    width: 330px;
    height: 330px;

    top: -190px;
    left: -100px;

    border: 55px solid rgba(255, 255, 255, 0.035);

    animation: floatingCircle 8s ease-in-out infinite;
}


/* GOLD GLOW */

.conference-countdown::after {
    width: 260px;
    height: 260px;

    right: -80px;
    bottom: -150px;

    background: rgba(240, 181, 43, 0.08);

    filter: blur(5px);

    animation: floatingGlow 7s ease-in-out infinite alternate;
}


/* Keep content above decorations */

.conference-countdown .container {
    position: relative;
    z-index: 2;
}


/* =====================================================
   SAVE THE DATE
===================================================== */

.countdown-small-title {
    display: inline-block;

    margin-bottom: 16px !important;

    padding: 8px 20px;

    color: #002267;

    background: #f4c54d;

    border-radius: 50px;

    font-size: 12px;
    font-weight: 800;

    letter-spacing: 3px;
    text-transform: uppercase;

    box-shadow:
        0 8px 25px rgba(0, 0, 0, 0.15);

    animation: saveDatePulse 2.5s ease-in-out infinite;
}


/* =====================================================
   TITLE
===================================================== */

.countdown-title {
    margin-bottom: 10px !important;

    color: #ffffff;

    font-size: 42px;
    font-weight: 800;

    letter-spacing: 1px;

    text-shadow:
        0 4px 18px rgba(0, 0, 0, 0.18);

    animation: fadeSlideUp .8s ease both;
}


/* =====================================================
   DATE
===================================================== */

.conference-date {
    margin-bottom: 35px !important;

    color: rgba(255, 255, 255, 0.82);

    font-size: 20px;
    font-weight: 500;

    letter-spacing: .5px;

    animation: fadeSlideUp 1s ease both;
}


/* =====================================================
   COUNTDOWN WRAPPER
===================================================== */

.countdown-wrapper {
    display: flex;

    justify-content: center;
    align-items: center;

    flex-wrap: wrap;

    gap: 18px;
}


/* =====================================================
   COUNTDOWN BOX
===================================================== */

.countdown-box {
    position: relative;

    width: 145px;
    min-height: 125px;

    display: flex;
    flex-direction: column;

    align-items: center;
    justify-content: center;

    overflow: hidden;

    background: rgba(255, 255, 255, 0.10);

    border: 1px solid rgba(255, 255, 255, 0.20);

    border-radius: 18px;

    box-shadow:
        0 15px 35px rgba(0, 0, 0, 0.16);

    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);

    transition:
        transform .35s ease,
        background .35s ease,
        border-color .35s ease;

    animation: countdownBoxIn .7s ease both;
}


/* Stagger animation */

.countdown-box:nth-child(1) {
    animation-delay: .10s;
}

.countdown-box:nth-child(2) {
    animation-delay: .20s;
}

.countdown-box:nth-child(3) {
    animation-delay: .30s;
}

.countdown-box:nth-child(4) {
    animation-delay: .40s;
}


/* Small gold top line */

.countdown-box::before {
    content: "";

    position: absolute;

    top: 0;
    left: 50%;

    width: 45%;
    height: 3px;

    transform: translateX(-50%);

    background: #f4c54d;

    border-radius: 0 0 5px 5px;
}


/* Hover */

.countdown-box:hover {
    transform: translateY(-8px);

    background: rgba(255, 255, 255, 0.15);

    border-color: rgba(244, 197, 77, 0.5);
}


/* NUMBER */

.countdown-box span {
    color: #ffffff;

    font-size: 43px;
    font-weight: 800;

    line-height: 1;

    text-shadow:
        0 3px 12px rgba(0, 0, 0, .18);
}


/* LABEL */

.countdown-box small {
    margin-top: 11px;

    color: #f4c54d;

    font-size: 12px;
    font-weight: 700;

    letter-spacing: 1.5px;

    text-transform: uppercase;
}


/* =====================================================
   ANIMATIONS
===================================================== */

@keyframes countdownBackground {

    0% {
        background-position: 0% 50%;
    }

    100% {
        background-position: 100% 50%;
    }

}


@keyframes saveDatePulse {

    0%,
    100% {
        transform: scale(1);
        box-shadow:
            0 8px 25px rgba(0, 0, 0, 0.15);
    }

    50% {
        transform: scale(1.04);
        box-shadow:
            0 10px 30px rgba(244, 197, 77, 0.30);
    }

}


@keyframes fadeSlideUp {

    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }

}


@keyframes countdownBoxIn {

    from {
        opacity: 0;
        transform: translateY(25px) scale(.96);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }

}


@keyframes floatingCircle {

    0%,
    100% {
        transform: translate(0, 0);
    }

    50% {
        transform: translate(25px, 18px);
    }

}


@keyframes floatingGlow {

    from {
        transform: translate(0, 0) scale(1);
    }

    to {
        transform: translate(-25px, -15px) scale(1.12);
    }

}


/* =====================================================
   MOBILE
===================================================== */

@media (max-width: 767px) {

    .conference-countdown {
        padding: 55px 0 !important;
    }

    .countdown-small-title {
        padding: 7px 16px;

        font-size: 10px;
        letter-spacing: 2px;
    }

    .countdown-title {
        font-size: 29px;
    }

    .conference-date {
        margin-bottom: 27px !important;

        font-size: 16px;
    }

    .countdown-wrapper {
        gap: 12px;
    }

    .countdown-box {
        width: calc(50% - 8px);
        max-width: 145px;

        min-height: 105px;

        border-radius: 14px;
    }

    .countdown-box span {
        font-size: 34px;
    }

    .countdown-box small {
        margin-top: 8px;

        font-size: 10px;
    }

}


/* Respect reduced-motion accessibility preference */

@media (prefers-reduced-motion: reduce) {

    .conference-countdown,
    .conference-countdown::before,
    .conference-countdown::after,
    .countdown-small-title,
    .countdown-title,
    .conference-date,
    .countdown-box {
        animation: none !important;
    }

}

/* =====================================================================
   COMMITTEE CARDS — image overlay + refined lift
===================================================================== */
.committee-card { position: relative; border: 1px solid rgba(0,0,0,.04); }
.committee-image-wrapper { position: relative; }
.committee-image-wrapper::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(6, 41, 75, .45) 0%, transparent 45%);
    opacity: 0;
    transition: opacity .4s var(--oss-ease);
}
.committee-card:hover .committee-image-wrapper::after { opacity: 1; }
.committee-member-info { position: relative; }
.committee-member-info::before {
    content: "";
    position: absolute;
    top: 0; left: 50%;
    width: 0; height: 3px;
    background: linear-gradient(90deg, var(--oss-maroon), var(--oss-gold-2));
    border-radius: 3px;
    transform: translateX(-50%);
    transition: width .35s var(--oss-ease);
}
.committee-card:hover .committee-member-info::before { width: 55px; }

/* =====================================================================
   REGISTRATION TABLE — polished header + row hover + button shimmer
===================================================================== */
.registration-table thead th {
    background: linear-gradient(135deg, #0f5ca8 0%, #0b477d 100%) !important;
}
.registration-table tbody tr { transition: transform .25s var(--oss-ease); }
.registration-table tbody tr:hover td { background: #eaf5ff !important; }
.registration-table-wrapper { border: 1px solid rgba(15, 92, 168, .12); }

.registration-btn {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, var(--oss-maroon) 0%, var(--oss-maroon-2) 100%) !important;
    box-shadow: 0 10px 24px -12px rgba(163, 39, 53, .7);
    letter-spacing: .4px;
}
.registration-btn::after {
    content: "";
    position: absolute;
    top: 0; left: -120%;
    width: 60%; height: 100%;
    background: linear-gradient(120deg, transparent, rgba(255,255,255,.45), transparent);
    transform: skewX(-20deg);
    transition: left .6s var(--oss-ease);
}
.registration-btn:hover::after { left: 130%; }

/* =====================================================================
   SCROLL REVEAL — applied by enhance.js (content stays visible if JS off)
===================================================================== */
.js-reveal { opacity: 0; transform: translateY(34px); }
.js-reveal.is-visible {
    opacity: 1;
    transform: none;
    transition: opacity .7s var(--oss-ease), transform .7s var(--oss-ease);
}
/* Staggered children (cards, countdown boxes) */
.js-reveal-stagger > * { opacity: 0; transform: translateY(28px); }
.js-reveal-stagger.is-visible > * {
    opacity: 1;
    transform: none;
    transition: opacity .6s var(--oss-ease), transform .6s var(--oss-ease);
}
.js-reveal-stagger.is-visible > *:nth-child(1) { transition-delay: .05s; }
.js-reveal-stagger.is-visible > *:nth-child(2) { transition-delay: .12s; }
.js-reveal-stagger.is-visible > *:nth-child(3) { transition-delay: .19s; }
.js-reveal-stagger.is-visible > *:nth-child(4) { transition-delay: .26s; }
.js-reveal-stagger.is-visible > *:nth-child(5) { transition-delay: .33s; }
.js-reveal-stagger.is-visible > *:nth-child(6) { transition-delay: .40s; }
.js-reveal-stagger.is-visible > *:nth-child(7) { transition-delay: .47s; }
.js-reveal-stagger.is-visible > *:nth-child(8) { transition-delay: .54s; }

/* =====================================================================
   SCROLL PROGRESS BAR
===================================================================== */
.oss-scroll-progress {
    position: fixed;
    top: 0; left: 0;
    height: 3px;
    width: 0%;
    z-index: 2000;
    background: linear-gradient(90deg, var(--oss-maroon), var(--oss-gold), var(--oss-gold-2));
    box-shadow: 0 0 10px rgba(245, 200, 91, .6);
    transition: width .1s linear;
}

/* =====================================================================
   BACK-TO-TOP BUTTON
===================================================================== */
.oss-back-to-top {
    position: fixed;
    right: 22px;
    bottom: 26px;
    width: 48px;
    height: 48px;
    z-index: 1999;
    display: grid;
    place-items: center;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    color: #fff;
    background: linear-gradient(135deg, var(--oss-navy) 0%, var(--oss-navy-2) 100%);
    box-shadow: 0 12px 26px -8px rgba(0, 26, 71, .65);
    opacity: 0;
    visibility: hidden;
    transform: translateY(18px) scale(.85);
    transition: opacity .35s var(--oss-ease), transform .35s var(--oss-ease), background .3s var(--oss-ease);
}
.oss-back-to-top.show { opacity: 1; visibility: visible; transform: translateY(0) scale(1); }
.oss-back-to-top:hover { background: linear-gradient(135deg, var(--oss-maroon), var(--oss-maroon-2)); transform: translateY(-3px) scale(1.06); }
.oss-back-to-top svg { width: 20px; height: 20px; }

/* =====================================================================
   ACCESSIBILITY — respect reduced motion
===================================================================== */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
    .js-reveal, .js-reveal-stagger > * { opacity: 1 !important; transform: none !important; }
}
