.parallax-container {
    height: 100vh;
    overflow-x: hidden;
    overflow-y: auto;
    perspective: 1px;
}

.parallax-layer {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

.parallax-layer-back {
    transform: translateZ(-1px) scale(2);
    z-index: -1;
    background-size: cover;
    background-position: center;
}

/* Base Styles */
* { box-sizing: border-box; }
body {
    background-color: var(--bg-page);
    color: var(--on-surface);
    font-family: var(--font-body);
    margin: 0;
    padding: 0;
}

.golden-text { color: var(--primary-container); }
.bg-card { background-color: var(--surface-card); }
.border-golden { border: 1px solid var(--primary-container); }
.btn-golden { background: var(--role-btn-primary-bg); color: var(--role-btn-primary-fg); box-shadow: var(--role-btn-primary-shadow); font-weight: bold; cursor: pointer; border: none; padding: 12px 24px; border-radius: 4px; text-align: left; }
.cta-button { width: 100%; max-width: 300px; text-align: center; }

/* Layout */
.header-bar {
    position: sticky;
    width: 100%;
    top: 0;
    z-index: 50;
    background-color: color-mix(in srgb, var(--bg-page) 63%, transparent);
    padding: 10px 20px;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    border-bottom: 1px solid var(--outline-variant);
    gap: 14px;
    transition: opacity 0.4s ease;
}
.header-bar::before {
    content: '';
    position: absolute;
    inset: 0;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: -1;
    pointer-events: none;
}
.hamburger-menu { cursor: pointer; background: none; border: none; padding: 0; }
.logo-text { font-weight: 700; font-size: 1.2rem; color: var(--primary-container); text-decoration: none; font-family: var(--font-display); }

/* Header avatar always sits at the far right. Below 768px .nav-links becomes a fixed
   bottom bar (out of the header flow), so the avatar itself must claim the free space;
   on desktop it groups next to the auto-pushed nav. */
#user-chip { margin-left: auto; }
@media (min-width: 768px) { #user-chip { margin-left: 14px; } }

/* #2 fix (mobile): the wordmark is absolutely centered (inline style on .logo-text) and wide enough that
   on phone widths it sits UNDER the right-hand user cluster — reported as "feedback button covering the
   EXPANCHESS name". At <=600px drop the title out of absolute positioning into normal flex flow: flex items
   cannot overlap, so the feedback button can never cover the wordmark regardless of width. Desktop keeps the
   absolute-centered title. Regression pinned by test/playwright/p9-feedback-no-overlap (@375 + @1280).
   !important is required to beat the element's inline position:absolute. */
@media (max-width: 600px) {
    .header-bar .logo-text {
        position: static !important;
        transform: none !important;
        left: auto !important;
        top: auto !important;
        font-size: 1rem;
    }
}

/* Buttons & Overlays */
.btn-icon { background: none; border: none; color: var(--primary-container); cursor: pointer; font-size: 1.2rem; }
.btn-profile {
    background: var(--role-btn-primary-bg);
    border: none;
    color: var(--role-btn-primary-fg);
    cursor: pointer;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    padding: 0;
}
.header-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.hidden { display: none; }
.m-r-2 { margin-right: 10px; }
.m-l-2 { margin-left: 10px; }
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    z-index: 1000;
    padding: 20px;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.modal-overlay.visible {
    display: flex;
    opacity: 1;
}


.overlay-content { background: var(--surface-card); border: 1px solid var(--outline-variant); border-radius: 12px; position: relative; width: 80vw; max-width: 400px; color: var(--on-surface); padding: 20px; }
#submit-beta-btn {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.overlay-iframe { width: 100%; height: 100%; border: none; border-radius: 12px; }
.bottom-panel-custom { background: rgba(10,10,10,0.8); display: flex; gap: 15px; padding: 15px; align-items: center; justify-content: center; width: 100%; }


.nav-links {
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: 1rem;
    color: var(--outline);
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: var(--bg-page);
    padding: 0.5rem 1rem;
    border-top: 1px solid var(--outline-variant);
    z-index: 50;
}
@media (min-width: 768px) {
    .hamburger-menu { display: none; }
    .nav-links {
        position: static;
        background: none;
        padding: 0;
        border: none;
        flex-direction: row;
        justify-content: flex-start;
        margin-left: auto;
        gap: 1.5rem;
    }
}
.nav-links a { text-decoration: none; color: var(--outline); }
.nav-links a:hover { color: var(--on-surface); }

.hero-content { flex: 1; text-align: left; }
.content-page.hero-section {
    filter: grayscale();
}
.hero-section {
    margin-top: 80px;
    min-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-size: cover;
    background-position: center;
}
.overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.6); }
.badge-future { border: 2px solid var(--role-btn-outline-border); padding: 4px 12px; display: inline-block; color: var(--role-btn-outline-fg); font-weight: bold; font-size: 12px; text-transform: uppercase; margin-bottom: 24px; letter-spacing: 0.1em; }

.main-container {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.main-title { font-size: 25px; font-weight: 900; color: var(--on-surface); margin-bottom: 2px; line-height: 1.2; }
@media (min-width: 768px) { .main-title { font-size: 2.4rem; } }
.main-text { font-size: 14px; margin-bottom: 24px; max-width: 600px; color: var(--on-surface-variant); }
@media (min-width: 768px) { .main-text { font-size: 1.25rem; } }

.button-container { display: flex; flex-direction: column; gap: 16px; margin-bottom: 32px; }
.btn-trailer { border: 1px solid var(--role-btn-outline-border); color: var(--role-btn-outline-fg); padding: 12px 24px; border-radius: 4px; background: linear-gradient(var(--role-btn-outline-bg), var(--role-btn-outline-bg)), rgba(0,0,0,0.2); backdrop-filter: blur(8px); cursor: pointer; text-decoration: none; text-align: left; }
.social-icons-container { display: flex; justify-content: space-between; margin-top: 15px; width: 100%; max-width: 300px; }
.social-btn {
    color: var(--primary-container);
    width: 30px;
    height: 30px;
    padding: 0;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.social-btn:hover { color: var(--on-surface); border-color: var(--on-surface); }
.social-btn img {
    width: 30px;
    height: 30px;
}

.countdown-container { width: 100%; max-width: 300px; padding: 16px; border-radius: 8px; border-left: 3px solid var(--role-btn-outline-border); text-align: left; backdrop-filter: blur(8px); background: rgba(17,17,17,0.7); box-shadow: 0 25px 50px -12px rgba(0,0,0,0.5); }
.countdown-label { color: var(--role-label-fg); letter-spacing: 0.1em; font-size: 14px; font-weight: 600; margin-bottom: 16px; text-transform: uppercase; }
.countdown-grid { display: grid; grid-template-columns: repeat(4, 1fr); text-align: center; }
.count-value {
    font-size: 14px;
    font-family: var(--font-display);
    color: var(--on-surface);
    line-height: 1;
}

@keyframes pulse-radiation {
    0% { text-shadow: 0 0 0px var(--primary-container); }
    50% { text-shadow: 0 0 20px var(--primary-container), 0 0 10px var(--primary-container); }
    100% { text-shadow: 0 0 0px var(--primary-container); }
}
.count-label { font-size: 6px; text-transform: uppercase; color: var(--outline); margin-top: 4px; }

/* Progress Timeline */
.progress-timeline-container {
    width: 90%;
    max-width: 300px;
    margin: 80px 0px; /* Increased bottom margin for labels */
    position: relative;
    color: var(--on-surface);
    min-height: 100px; /* Ensure space for labels */
}
.progress-track {
    height: 4px;
    background: var(--outline-variant);
    border-radius: 2px;
    position: relative;
}

.segment {
    position: absolute;
    height: 100%;
    top: 0;
    transition: width 0.3s ease;
}
.segment.done { background-color: var(--primary-container); }
.segment.active { background: linear-gradient(to right, var(--primary-container), var(--secondary)); }
.segment.future { background-color: var(--outline-variant); }

.milestone-wrapper {
    position: absolute;
    top: -6px;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 2;
}
.milestone-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--outline-variant);
    border: 2px solid var(--bg-page);
    z-index: 2;
}
.milestone-dot.done {
    background: var(--primary-container);
    box-shadow: 0 0 8px var(--primary-container);
    display: flex; align-items: center; justify-content: center;
    font-size: 10px; color: var(--on-primary);
}
.milestone-dot.current {
    background: var(--secondary);
    box-shadow: 0 0 12px var(--secondary);
    border-color: var(--surface-card);
}
.milestone-label {
    position: absolute;
    top: 20px;
    left: 50%;
    font-size: 15px;
    text-transform: uppercase;
    color: var(--outline);
    white-space: nowrap;
    transform-origin: left top;
    transform: rotate(45deg); /* Adjusted for better legibility */
}
.milestone-label.active { color: var(--on-surface); }

@media (max-width: 600px) {
    .milestone-label {
        transform: rotate(60deg);
        top: 25px;
    }
}

.location-marker-container {
    position: absolute;
    top: -25px;
    width: 24px;
    height: 24px;
    transform: translateX(-50%) translateY(-50%);
    z-index: 3;
}

.location-marker {
    width: 110%;
    height: 110%;
    background: var(--primary-container);
    border: 2px solid var(--on-surface);
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
}

.radiation-pulse {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: transparent;
    box-shadow: 0 0 10px 4px rgba(212, 175, 55, 0.6);
    animation: radiation-wave 2s infinite ease-out;
    pointer-events: none;
    transform: translate(-50%, -50%);
}

.milestone-timer-floating {
    position: absolute;
    top: -48px;
    transform: translateX(-50%);
    font-size: 16px;
    color: var(--on-surface);
    white-space: nowrap;
    background: var(--surface-card);
    padding: 3px 6px;
    border-radius: 6px;
    border: 1px solid var(--outline-variant);
    animation: none;
    z-index: 3;
}

.milestone-timer-floating::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 8px solid var(--outline-variant);
}

.milestone-timer-floating::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    border-radius: 4px;
    border: none;
    background: transparent;
    /* Soften the glow to avoid border-like appearance */
    box-shadow: 0 0 10px 4px rgba(212, 175, 55, 0.6);
    animation: radiation-wave 2s infinite ease-out;
    pointer-events: none;
}

@keyframes radiation-wave {
    0% {
        transform: translate(-50%, -50%) scaleX(1) scaleY(1);
        opacity: 0.8;
        box-shadow: 0 0 10px 4px rgba(212, 175, 55, 0.6);
    }
    100% {
        transform: translate(-50%, -50%) scaleX(1.5) scaleY(2.5);
        opacity: 0;
        box-shadow: 0 0 20px 10px rgba(212, 175, 55, 0);
    }
}

.stats-section { background-color: var(--surface-card); border-bottom: 1px solid var(--outline-variant); padding: 48px 0; }
.stats-grid { max-width: 1200px; margin: 0 auto; padding: 0 24px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 32px; }
@media (min-width: 1024px) { .stats-grid { grid-template-columns: repeat(4, 1fr); } }
.stat-value { font-size: 15px; font-weight: 900; color: var(--primary-container); }
.stat-label { font-size: 12px; text-transform: uppercase; color: var(--on-surface); }

.main-container { max-width: 900px; margin: 0 auto; padding: 80px 24px; background: var(--surface-container-lowest); }
@media (min-width: 1024px) { .main-container { max-width: 1100px; } }
.section-card { text-align: left; padding: 0; border-radius: 4px; }
.card-title { font-size: 2.25rem; font-weight: 700; margin-bottom: 32px; line-height: 1.2; }
.card-text { font-size: 0.8rem; margin-bottom: 32px; color: var(--outline); }
.card-list { list-style: none; padding: 0; margin-bottom: 32px; font-size: 0.8rem; space-y: 16px; }
.list-item { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.check-icon { width: 20px; height: 20px; color: var(--primary-container); }

.card-carousel-container { max-width: 900px; margin: 0 auto; padding: 48px 24px; }
@media (min-width: 1024px) { .card-carousel-container { max-width: 1100px; } }
.carousel-title { font-size: 26px; font-weight: 400; margin-bottom: 16px; line-height: 1.2; }
.carousel-list { display: flex; gap: 24px; overflow-x: auto; padding-bottom: 24px; scroll-snap-type: x mandatory; }
.card-item { width: 300px; height: 315px; flex-shrink: 0; background-color: var(--surface-card); border-radius: 8px; border: 1px solid var(--role-panel-border); position: relative; overflow: hidden; display: flex; flex-direction: column; scroll-snap-align: center; box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5), 0 0 10px rgba(212, 175, 55, 0.1); transition: transform 0.3s, box-shadow 0.3s; }
.card-item:hover { box-shadow: 0 8px 25px rgba(0, 0, 0, 0.7), 0 0 20px rgba(212, 175, 55, 0.2); }
.perk-img { width: 100%; height: 100%; object-fit: cover; }
.perk-content { position: absolute; bottom: 0; left: 0; width: 100%; padding: 32px 24px 13px 12px; background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.7) 70%, rgba(0,0,0,0) 100%); display: flex; flex-direction: column; color: var(--on-surface); }
.perk-subtitle { font-size: 0.8rem; color: var(--primary-container); margin-bottom: 6px; font-style: italic; }
.perk-description { font-size: 0.75rem; color: var(--outline); line-height: 1.4; margin-top: 2px; margin-bottom: 0px; }

.carousel-nav { display: flex; justify-content: center; gap: 8px; padding-top: 16px; }
.nav-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--outline-variant); cursor: pointer; transition: background 0.3s; }
.nav-dot.active { background: var(--primary-container); }

.roadmap-section { background-color: var(--bg-page); padding: 80px 24px; color: var(--on-surface); }
.section-title { font-size: 2rem; text-align: center; margin-bottom: 64px; }
.roadmap-timeline { display: grid; grid-template-columns: repeat(1, 1fr); gap: 32px; max-width: 1000px; margin: 0 auto; }
@media (min-width: 768px) {
    .roadmap-timeline { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
    .roadmap-timeline { grid-template-columns: repeat(4, 1fr); }
}
.roadmap-item { display: flex; align-items: center; gap: 16px; text-align: left; }
.roadmap-icon-col { flex-shrink: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; width: 64px; }
.roadmap-icon { width: 64px; height: 64px; border: 2px solid var(--primary-container); border-radius: 50%; display: flex; align-items: center; justify-content: center; object-fit: cover; }
.roadmap-content { flex-grow: 1; }
.roadmap-timeframe { color: var(--primary-container); font-size: 0.8rem; text-transform: uppercase; }
.roadmap-title { font-size: 1.25rem; font-weight: 700; margin-bottom: 12px; }
.roadmap-desc { color: var(--outline); font-size: 0.9rem; line-height: 1.5; }

.community-section { background-color: var(--bg-page); padding: 80px 24px; color: var(--on-surface); }
.community-title { font-size: 2rem; text-align: center; margin-bottom: 64px; }
.testimonial-grid { display: grid; grid-template-columns: repeat(1, 1fr); gap: 32px; max-width: 1200px; margin: 0 auto; }
@media (min-width: 768px) {
    .testimonial-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
    .testimonial-grid { grid-template-columns: repeat(3, 1fr); }
}

.testimonial-card { background-color: var(--surface-card); padding: 32px; border-radius: 16px; border: 1px solid var(--role-panel-border); }
.testimonial-text { font-size: 1rem; color: var(--on-surface-variant); margin-bottom: 16px; line-height: 1.6; }
.testimonial-author { color: var(--primary-container); font-weight: 700; }

#beta-confirmation {
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}
#beta-confirmation.show {
    opacity: 1;
}

#join-beta-btn {
    text-align: left;
}
