/* =========================================================
   NOVA Landing Page — Brand Guide CSS
   Sistem Pengumuman Kelulusan SMAN 5 Bandar Lampung
   ========================================================= */

:root {
    /* Brand Colors */
    --nova-gold: #C87D2A;
    --deep-space: #0A0E1A;
    --stellar-white: #F4F0E8;
    --cosmic-blue: #1E3A5F;
    --stardust: #F0C472;

    /* Gold Scale */
    --gold-50: #FDF8F0;
    --gold-100: #FAECD4;
    --gold-200: #F4D4A0;
    --gold-400: #D99A45;
    --gold-600: #C87D2A;
    --gold-800: #8B5618;
    --gold-900: #5C3810;

    /* Semantic */
    --success: #16A34A;
    --danger: #DC2626;
    --warning: #D97706;
    --info: #2563EB;
    --neutral: #6B7280;

    /* Typography */
    --font-display: 'Cormorant Garamond', Georgia, serif;
    --font-body: 'DM Sans', system-ui, sans-serif;
    --font-mono: 'JetBrains Mono', 'Courier New', monospace;
}

/* ---- Reset & Base ---- */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background: var(--deep-space);
    color: var(--stellar-white);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
}

/* ---- Star Canvas ---- */
#starfield {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* ---- Container ---- */
.nova-container {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* ---- Header ---- */
.nova-header {
    width: 100%;
    padding: 1.25rem 2rem;
}

.nova-header__inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: flex-end;
}

.nova-admin-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--neutral);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.02em;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    transition: color 0.2s, background 0.2s;
}

.nova-admin-link:hover {
    color: var(--stellar-white);
    background: rgba(255, 255, 255, 0.06);
}

/* ---- Hero ---- */
.nova-hero {
    flex: 0 0 auto;
    text-align: center;
    padding: 0 1.5rem 1rem;
}

.nova-hero__content {
    max-width: 640px;
    margin: 0 auto;
}

/* Logo */
.nova-logo {
    margin-bottom: 1.5rem;
}

.nova-logo__mark {
    width: 130px;
    height: 130px;
    filter: drop-shadow(0 0 15px rgba(200, 125, 42, 0.4));
    animation: nova-glow 4s ease-in-out infinite;
}

@keyframes nova-glow {
    0%, 100% { filter: drop-shadow(0 0 15px rgba(200, 125, 42, 0.4)); }
    50% { filter: drop-shadow(0 0 45px rgba(240, 196, 114, 0.7)); }
}

/* Star animations — twinkling & shimmering */
.nova-star {
    transform-origin: 100px 100px;
}

/* Outer glow breathes */
.nova-star--glow {
    animation: star-breathe 3s ease-in-out infinite;
}

@keyframes star-breathe {
    0%, 100% { opacity: 0.1; transform: scale(1); }
    50% { opacity: 0.25; transform: scale(1.06); }
}

/* Main body subtle shimmer */
.nova-star--body {
    animation: star-shimmer 5s ease-in-out infinite;
}

@keyframes star-shimmer {
    0%, 100% { opacity: 1; }
    30% { opacity: 0.88; }
    60% { opacity: 1; }
    80% { opacity: 0.92; }
}

/* Light rays twinkle */
.nova-ray--v {
    animation: ray-twinkle 2.5s ease-in-out infinite;
}

.nova-ray--h {
    animation: ray-twinkle 2.5s ease-in-out 0.6s infinite;
}

.nova-ray--d1 {
    animation: ray-twinkle 3s ease-in-out 1s infinite;
}

.nova-ray--d2 {
    animation: ray-twinkle 3s ease-in-out 1.8s infinite;
}

@keyframes ray-twinkle {
    0%, 100% { opacity: 0.15; stroke-width: 0.8; }
    50% { opacity: 0.6; stroke-width: 2; }
}

/* Inner facet sparkle */
.nova-star--inner {
    animation: facet-sparkle 4s ease-in-out infinite;
}

@keyframes facet-sparkle {
    0%, 100% { opacity: 0.25; }
    40% { opacity: 0.5; }
    60% { opacity: 0.2; }
    80% { opacity: 0.45; }
}

/* Center glow pulses like a heartbeat */
.nova-star--center-glow {
    animation: center-pulse 2s ease-in-out infinite;
}

@keyframes center-pulse {
    0%, 100% { r: 18; opacity: 0.7; }
    50% { r: 25; opacity: 1; }
}

/* Core white point twinkles */
.nova-star--core {
    animation: core-twinkle 1.5s ease-in-out infinite;
}

@keyframes core-twinkle {
    0%, 100% { r: 4; opacity: 0.85; }
    25% { r: 6; opacity: 1; }
    75% { r: 3; opacity: 0.7; }
}

/* Wordmark */
.nova-wordmark {
    font-family: var(--font-display);
    font-size: 56px;
    font-weight: 600;
    letter-spacing: 0.08em;
    color: var(--stellar-white);
    margin-bottom: 0.25rem;
    line-height: 1.1;
}

.nova-subtitle {
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--nova-gold);
    margin-bottom: 0.3rem;
}

.nova-school {
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 400;
    color: var(--neutral);
    margin-bottom: 1.5rem;
}

.nova-tagline {
    font-family: var(--font-display);
    font-size: 28px;
    font-weight: 500;
    font-style: italic;
    color: var(--stardust);
    line-height: 1.3;
}

/* ---- Main Section ---- */
.nova-main {
    flex: 1 0 auto;
    width: 100%;
    max-width: 520px;
    padding: 2rem 1.5rem;
}

/* ---- Announcement / Countdown ---- */
.nova-announcement {
    text-align: center;
}

.nova-announcement__icon {
    margin-bottom: 1rem;
    color: var(--nova-gold);
}

.nova-announcement__title {
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 600;
    color: var(--stellar-white);
    margin-bottom: 0.75rem;
}

.nova-announcement__date {
    font-family: var(--font-body);
    font-size: 16px;
    font-weight: 500;
    color: var(--stardust);
    margin-bottom: 0.5rem;
}

.nova-announcement__hint {
    font-size: 14px;
    color: var(--neutral);
    margin-bottom: 2rem;
}

/* Countdown Cards */
.nova-countdown {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.nova-countdown__card {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(200, 125, 42, 0.08);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(200, 125, 42, 0.2);
    border-radius: 14px;
    padding: 1rem 1.25rem;
    min-width: 80px;
    box-shadow: 0 0 20px rgba(200, 125, 42, 0.08);
    transition: box-shadow 0.3s;
}

.nova-countdown__card:hover {
    box-shadow: 0 0 30px rgba(200, 125, 42, 0.15);
}

.nova-countdown__value {
    font-family: var(--font-mono);
    font-size: 32px;
    font-weight: 500;
    color: var(--nova-gold);
    line-height: 1.2;
}

.nova-countdown__label {
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 500;
    color: var(--neutral);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 0.25rem;
}

/* ---- Search Form ---- */
.nova-search {
    display: flex;
    justify-content: center;
}

.nova-search__card {
    width: 100%;
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 2rem 1.75rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
}

.nova-search__header {
    text-align: center;
    margin-bottom: 1.5rem;
    color: var(--nova-gold);
}

.nova-search__title {
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 600;
    color: var(--stellar-white);
    margin: 0.75rem 0 0.5rem;
}

.nova-search__desc {
    font-size: 14px;
    color: var(--neutral);
}

/* Input Group */
.nova-input-group {
    position: relative;
    margin-bottom: 1rem;
}

.nova-input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--neutral);
    width: 18px;
    height: 18px;
    pointer-events: none;
}

.nova-input {
    width: 100%;
    padding: 0.85rem 1rem 0.85rem 2.75rem;
    font-family: var(--font-mono);
    font-size: 15px;
    color: var(--stellar-white);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.nova-input::placeholder {
    color: rgba(244, 240, 232, 0.3);
    font-family: var(--font-body);
}

.nova-input:focus {
    border-color: var(--nova-gold);
    box-shadow: 0 0 0 3px rgba(200, 125, 42, 0.15);
}

/* CTA Button */
.nova-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.9rem 1.5rem;
    font-family: var(--font-body);
    font-size: 15px;
    font-weight: 500;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}

.nova-btn--gold {
    background: var(--nova-gold);
    color: #fff;
    box-shadow: 0 4px 16px rgba(200, 125, 42, 0.35);
}

.nova-btn--gold:hover {
    background: var(--gold-400);
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(200, 125, 42, 0.45);
}

.nova-btn--gold:active {
    transform: translateY(0);
}

.nova-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Search Result */
.nova-search__result {
    margin-top: 1rem;
    padding: 0.85rem 1rem;
    border-radius: 10px;
    font-size: 14px;
    text-align: center;
}

.nova-search__result--error {
    background: rgba(220, 38, 38, 0.12);
    border: 1px solid rgba(220, 38, 38, 0.25);
    color: #FCA5A5;
}

.nova-search__result--loading {
    background: rgba(37, 99, 235, 0.1);
    border: 1px solid rgba(37, 99, 235, 0.2);
    color: #93C5FD;
}

/* ---- Stats Section ---- */
.nova-stats {
    width: 100%;
    max-width: 700px;
    padding: 1rem 1.5rem 2rem;
}

.nova-stats__grid {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.nova-stats__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    min-width: 120px;
    padding: 1.25rem 1rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 14px;
}

.nova-stats__item--success {
    border-color: rgba(22, 163, 74, 0.2);
}

.nova-stats__item--success .nova-stats__value {
    color: var(--success);
}

.nova-stats__item--gold {
    border-color: rgba(200, 125, 42, 0.2);
}

.nova-stats__item--gold .nova-stats__value {
    color: var(--nova-gold);
}

.nova-stats__value {
    font-family: var(--font-mono);
    font-size: 28px;
    font-weight: 500;
    color: var(--stellar-white);
    line-height: 1.2;
}

.nova-stats__value--pct::after {
    content: '%';
    font-size: 18px;
    opacity: 0.6;
    margin-left: 1px;
}

.nova-stats__label {
    font-size: 12px;
    font-weight: 500;
    color: var(--neutral);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* ---- Footer ---- */
.nova-footer {
    width: 100%;
    padding: 2rem 1.5rem;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    margin-top: auto;
}

.nova-footer__school {
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 500;
    color: var(--stellar-white);
    margin-bottom: 0.15rem;
}

.nova-footer__year {
    font-size: 13px;
    color: var(--neutral);
    margin-bottom: 0.5rem;
}

.nova-footer__copy {
    font-size: 11px;
    color: rgba(107, 114, 128, 0.6);
}

/* ---- Icon Sizes ---- */
.nova-icon--sm {
    width: 16px;
    height: 16px;
}

.nova-icon--md {
    width: 22px;
    height: 22px;
}

.nova-icon--lg {
    width: 28px;
    height: 28px;
}

/* ---- Loading Spinner ---- */
.nova-spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: nova-spin 0.6s linear infinite;
}

@keyframes nova-spin {
    to { transform: rotate(360deg); }
}

/* ---- Responsive ---- */
@media (max-width: 640px) {
    .nova-wordmark {
        font-size: 42px;
    }

    .nova-tagline {
        font-size: 22px;
    }

    .nova-logo__mark {
        width: 80px;
        height: 80px;
    }

    .nova-countdown__card {
        min-width: 68px;
        padding: 0.75rem 1rem;
    }

    .nova-countdown__value {
        font-size: 26px;
    }

    .nova-search__card {
        padding: 1.5rem 1.25rem;
    }

    .nova-stats__grid {
        gap: 0.75rem;
    }

    .nova-stats__item {
        min-width: 100px;
        padding: 1rem 0.75rem;
    }

    .nova-stats__value {
        font-size: 24px;
    }
}

@media (max-width: 400px) {
    .nova-wordmark {
        font-size: 36px;
    }

    .nova-tagline {
        font-size: 20px;
    }

    .nova-countdown {
        gap: 0.5rem;
    }

    .nova-countdown__card {
        min-width: 60px;
    }

    .nova-countdown__value {
        font-size: 22px;
    }
}
