/* ── 1. FONT IMPORT CONFIRMATION + CSS VARIABLES ── */
:root {
    --bg-deep: #080f1f;
    --bg-card: rgba(255, 255, 255, 0.05);
    --border-glow: rgba(180, 200, 255, 0.15);
    --text-primary: #e8eeff;
    --text-secondary: rgba(180, 200, 255, 0.6);
    --glow-blue: rgba(120, 160, 255, 0.4);
    --glow-warm: rgba(255, 200, 120, 0.3);
    --glow-cold: rgba(80, 100, 180, 0.2);
    --accent-gold: #c8a84b;
}

/* ── 2. RESET — removes browser default spacing ── */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ── MOBILE SAFETY NET — prevents SVGs/images from breaking layout ── */
img,
svg {
    max-width: 100%;
    height: auto;
}

html,
body {
    max-width: 100%;
    overflow-x: hidden;
}

/* ── 3. BODY — the fixed deep space background ── */
body {
    background-color: #080f1f;
    /* was #04070f — slightly lighter navy */
    background-image: radial-gradient(ellipse at center,
            #0f1e45 0%,
            /* was #0a1128 — more visible center glow */
            #080f1f 70%);
    /* was #04070f */
    background-attachment: fixed;
    background-size: cover;
    min-height: 100vh;
    font-family: 'Inter', sans-serif;
    color: var(--text-primary);
    overflow-x: hidden;
}

/* ── 4. STARS CONTAINER — covers full viewport, fixed ── */
#stars-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    /* clicks pass through to content below */
    z-index: 0;
}

/* ── 5. INDIVIDUAL STAR ── */
.star {
    position: absolute;
    border-radius: 50%;
    background: white;
    animation: twinkle var(--duration, 3s) ease-in-out infinite;
}

/* ── 6. TWINKLE ANIMATION ── */
@keyframes twinkle {

    0%,
    100% {
        opacity: var(--opacity-low, 0.2);
    }

    50% {
        opacity: var(--opacity-high, 1);
    }
}

/* ── 7. SHOOTING STAR ── */
#shooting-star {
    position: fixed;
    top: 0;
    left: 0;
    width: 150px;
    height: 1.5px;
    background: linear-gradient(to right, transparent, white, transparent);
    opacity: 0;
    pointer-events: none;
    z-index: 1;
}

@keyframes shoot {
    0% {
        opacity: 1;
        transform: translate(0, 0) rotate(var(--angle, 20deg));
    }

    100% {
        opacity: 0;
        transform: translate(300px, 150px) rotate(var(--angle, 20deg));
    }
}

/* ── 8. PAGE WRAPPER — sits above the fixed background ── */
#page-wrapper {
    position: relative;
    z-index: 2;
    min-height: 200vh;
    /* tall enough to scroll and test the fixed bg */
}

/* hero section */
#hero {
    min-height: 100vh;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 60px 80px;
    gap: 40px;
}

.hero-left,
.hero-right {
    flex: 1;
}

.hero-center {
    flex: 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 24px;
}

/* logo */
.logo {
    font-family: 'Cinzel Decorative', serif;
    font-size: 1.6rem;
    color: var(--text-primary);
    text-shadow: 0 0 12px var(--glow-blue);
}

/* Moon wrapper */

.moon-wrapper {
    position: relative;
    width: 280px;
    height: 280px;
    animation: floatmoon 5s ease-in-out infinite;
    margin-bottom: 30px;

}

@keyframes floatmoon {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}




@keyframes spin {
    from {
        transform: translate(-50%, -50%) rotateX(72deg) rotate(0deg);
    }

    to {
        transform: translate(-50%, -50%) rotateX(72deg) rotate(360deg);
    }
}

/* Moon svg Glow */
#hero-moon {
    filter: drop-shadow(0 0 25px var(--glow-blue));
    animation: moonglow 4s ease-in-out infinite;
}

@keyframes moonglow {

    0%,
    100% {
        filter: drop-shadow(0 0 20px var(--glow-blue));
    }

    50% {
        filter: drop-shadow(0 0 35px var(--glow-blue));
    }
}

/* phase date text */
.phase-name {
    font-family: 'Cinzel', serif;
    font-size: 1.8rem;
    margin-bottom: 10px;
}

.data-line {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.phase-data {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 100%;
    max-width: 480px;
}

.phase-data p {
    width: 100%;
}

.description {
    max-width: 100%;
    margin: 0 0 6px 0;
    line-height: 1.4;
}

.zodiac {
    font-style: italic;
    color: var(--accent-gold);
    text-decoration: underline;
    cursor: pointer;
}

/* right column */
.hero-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    text-align: left;
}

.hero-right svg {
    margin-bottom: 16px;
}




#clock-time {
    font-family: 'Courier New', Courier, monospace;
    display: inline-block;

}

#clock {
    filter: drop-shadow(0 0 8px var(--glow-blue));
}



/* ── RESPONSIVE: stack hero columns on smaller screens ── */
@media (max-width: 900px) {
    #hero {
        flex-direction: column;
        padding: 40px 24px;
        gap: 30px;
        text-align: center;
    }

    .hero-left,
    .hero-right {
        flex: none;
        width: 100%;
        align-items: center;
        text-align: center;
    }

    .hero-right {
        align-items: center;
        text-align: center;
        width: 100%;
    }

    #clock {
        width: 80px;
        height: 80px;
    }

    .hero-center {
        flex: 2;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-align: center;
        gap: 10px;
    }

    .moon-wrapper {
        width: min(280px, 75vw);
        height: min(280px, 75vw);
    }
}



/* ── FADE-IN ON SCROLL ── */
.fade-section {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-section.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ── PHASE TIMELINE SECTION ── */
#phase-timeline {
    padding: 80px 20px 60px;
    text-align: center;
}

#phase-timeline h2 {
    font-family: 'Cinzel', serif;
    font-size: 1.8rem;
    font-weight: 400;
    letter-spacing: 0.08em;
    color: var(--text-primary);
    margin-bottom: 60px;
}

#timeline-strip {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 20px;
    flex-wrap: wrap;
}

/* ── EACH PHASE CARD ── */
.phase-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: var(--bg-card);
    border: 1px solid var(--border-glow);
    border-radius: 16px;
    padding: 20px 16px;
    width: 140px;
    backdrop-filter: blur(12px);
    transition: transform 0.3s ease;
    cursor: default;
}

.phase-card:hover {
    transform: translateY(-4px);
}

/* Today's card — bigger, glowing border */
.phase-card.today-card {
    width: 175px;
    border-color: var(--glow-blue);
    box-shadow: 0 0 20px rgba(120, 160, 255, 0.2);
}

.card-phase-name {
    font-family: 'Cinzel', serif;
    font-size: 0.75rem;
    margin-top: 12px;
    text-align: center;
    color: var(--text-primary);
}

.card-illumination {
    font-size: 0.72rem;
    color: var(--text-secondary);
    margin-top: 4px;
    text-align: center;
}

.card-date {
    font-size: 0.7rem;
    color: var(--text-secondary);
    margin-top: 4px;
    text-align: center;
}

.today-label {
    font-size: 0.65rem;
    color: var(--glow-blue);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 6px;
}

/* ── MOON CALENDAR SECTION ── */
#moon-calendar {
    padding: 80px 40px 60px;
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
}

.section-title {
    font-family: 'Cinzel', serif;
    font-size: 1.8rem;
    font-weight: 400;
    letter-spacing: 0.08em;
    color: var(--text-primary);
    margin-bottom: 40px;
}

/* ── CONTROLS (dropdowns + button) ── */
.calendar-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-bottom: 32px;
}

.calendar-controls select,
.calendar-controls button {
    background: #0d1530;
    border: 1px solid var(--border-glow);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    padding: 8px 14px;
    border-radius: 8px;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    outline: none;
}

/* Dropdown options inherit the dark background */
.calendar-controls select option {
    background: #0d1530;
    color: var(--text-primary);
}

.calendar-controls button {
    color: var(--accent-gold);
    border-color: var(--accent-gold);
    transition: background 0.2s ease;
}

.calendar-controls button:hover {
    background: rgba(200, 168, 75, 0.1);
}

/* ── DAY HEADER ROW ── */
.calendar-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    margin-bottom: 4px;
}

.calendar-header span {
    font-size: 0.72rem;
    color: var(--text-secondary);
    letter-spacing: 0.06em;
    text-align: center;
    padding: 6px 0;
}

/* ── CALENDAR GRID ── */
.calendar-wrap {
    max-width: 820px;
    margin: 0 auto;
}

#calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

/* ── EACH DAY CELL ── */
.cal-day {
    background: var(--bg-card);
    border: 1px solid var(--border-glow);
    border-radius: 10px;
    padding: 8px 4px 6px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    min-height: 80px;
    position: relative;
    cursor: default;
    transition: border-color 0.2s ease;
}

.cal-day:hover {
    border-color: rgba(180, 200, 255, 0.4);
}

/* Empty cells (before the 1st of the month) */
.cal-day.empty {
    background: transparent;
    border-color: transparent;
    cursor: default;
}

/* Today's cell */
.cal-day.today {
    border-color: rgba(120, 160, 255, 0.9);
    box-shadow: 0 0 16px rgba(120, 160, 255, 0.35), inset 0 0 12px rgba(120, 160, 255, 0.08);
    background: rgba(120, 160, 255, 0.1);
}

/* Date number */
.cal-date-num {
    font-size: 0.72rem;
    color: var(--text-secondary);
    align-self: flex-start;
    padding-left: 4px;
    line-height: 1;
}

.cal-day.today .cal-date-num {
    color: #ffffff;
    font-weight: 700;
    font-size: 0.85rem;
    border-radius: 4px;
    padding: 1px 5px;
}

/* Phase label on major days */
.cal-phase-label {
    font-size: 0.55rem;
    color: var(--accent-gold);
    letter-spacing: 0.04em;
    text-align: center;
    line-height: 1.2;
}

/* ── TOOLTIP ── */
.cal-tooltip {
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    background: rgba(10, 17, 40, 0.95);
    border: 1px solid var(--border-glow);
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 0.72rem;
    color: var(--text-primary);
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease;
    z-index: 10;
}

.cal-day:hover .cal-tooltip {
    opacity: 1;
}

/* ── RESPONSIVE ── */
@media (max-width: 700px) {
    #moon-calendar {
        padding: 60px 12px 40px;
    }

    .cal-day {
        min-height: 60px;
        padding: 4px 2px;
    }
}

/* ── PHASE GUIDE SECTION ── */
#phase-guide {
    padding: 80px 40px 100px;
    text-align: center;
}

.phase-guide-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
    margin-top: 60px;
}

/* The circular container — everything rotates inside this */
.phase-ring-container {
    position: relative;
    width: clamp(280px, 80vw, 420px);
    height: clamp(310px, 88vw, 460px);
    margin: 0 auto;
}

/* Earth sits dead center */
.earth-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
}

/* Each moon node: rotated outward from center */
.phase-node {
    position: absolute;
    width: clamp(44px, 12vw, 64px);
    height: clamp(44px, 12vw, 64px);
    display: flex;
    flex-direction: column;
    align-items: center;

    /* This is the key: rotate the node by its angle,
       then push it 170px outward along the rotated X axis */
    transform: rotate(var(--angle)) translateX(170px);
}

/* The label: counter-rotate so it stays upright */

.phase-node-label {
    display: block;
    margin-top: 6px;
    font-size: 0.62rem;
    color: var(--text-secondary);
    text-align: center;
    white-space: nowrap;
}

/* Highlighted node — current phase */
.phase-node.current-phase .guide-moon {
    filter: drop-shadow(0 0 8px var(--glow-blue));
}

.phase-node.current-phase .phase-node-label {
    color: var(--accent-gold);
    font-weight: 500;
}

/* Glow on all guide moons */
.guide-moon {
    filter: drop-shadow(0 0 6px rgba(180, 200, 255, 0.25));
    transition: filter 0.3s ease;
}

/* Current phase glows brighter */
.phase-node.current-phase .guide-moon {
    filter: drop-shadow(0 0 12px var(--glow-blue));
}

/* Sunlight arrow */
.sunlight-arrow {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    user-select: none;
}

.sunlight-label {
    font-family: 'Cinzel', serif;
    font-size: 0.75rem;
    letter-spacing: 0.15em;
    color: var(--accent-gold);
}

.sunlight-line {
    display: flex;
    align-items: center;
    gap: 0;
}

.arrow-shaft {
    width: 60px;
    height: 2px;
    background: var(--accent-gold);
    opacity: 0.8;
}

.arrow-head {
    color: var(--accent-gold);
    font-size: 1rem;
    line-height: 1;
    margin-left: -2px;
}

.arrow-head-left {
    color: var(--accent-gold);
    font-size: 1rem;
    line-height: 1;
    margin-right: -2px;
}



.phase-guide-wrap {
    flex-direction: column;
    align-items: center;
}

.sunlight-arrow {
    flex-direction: row;
    gap: 16px;
}

/* ── ABOUT + CONTACT ── */
#about {
    padding: 80px 80px 40px;
}

.about-wrap {
    display: flex;
    gap: 60px;
    align-items: flex-start;
    max-width: 900px;
    margin: 0 auto 60px;
}

.about-left {
    flex: 2;
}

.about-right {
    flex: 1;
}

/* Vertical divider line between columns */
.about-divider {
    width: 1px;
    align-self: stretch;
    background: var(--border-glow);
}

.about-text {
    color: var(--text-secondary);
    font-size: 0.92rem;
    line-height: 1.75;
    margin-bottom: 16px;
    text-align: justify;
}

.about-footer-note {
    font-size: 0.78rem;
    margin-top: 24px;
    opacity: 0.6;
    font-style: italic;
}

.contact-name {
    color: var(--text-primary);
    font-weight: 500;
}

.contact-link {
    color: var(--accent-gold);
    text-decoration: none;
    border-bottom: 1px solid rgba(200, 168, 75, 0.3);
    transition: border-color 0.2s ease;
}

.contact-link:hover {
    border-color: var(--accent-gold);
}

/* Footer bar at the very bottom */
.site-footer {
    text-align: center;
    padding: 24px 0 40px;
    border-top: 1px solid var(--border-glow);
    color: var(--text-secondary);
    font-size: 0.75rem;
    opacity: 0.5;
    max-width: 900px;
    margin: 0 auto;
}

/* Responsive: stack columns on mobile */
@media (max-width: 700px) {
    #about {
        padding: 60px 24px 40px;
    }

    .about-wrap {
        flex-direction: column;
        gap: 40px;
    }

    .about-divider {
        width: 100%;
        height: 1px;
        align-self: auto;
    }
}