/* Root Variables */
:root {
    --primary-color:    #000000;
    --secondary-color:  #ffffff;
    --accent-color:     #3b82f6;
    --accent-dark:      #1d4ed8;
    --text-primary:     #000000;
    --text-secondary:   #505050;
    --bg-primary:       #ffffff;
    --bg-secondary:     #f5f5f5;
    --border-color:     #e5e5e5;

    --font-display: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-body:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    /* The 'Graph' curve that makes everything feel like butter */
    --reading-ease: cubic-bezier(0.16, 1, 0.3, 1);
    --transition:   all 0.3s var(--reading-ease);
}

body.dark-mode {
    --primary-color:    #ffffff;
    --secondary-color:  #000000;
    --accent-color:     #60a5fa;
    --bg-primary:       #0a0a0a;
    --bg-secondary:     #1a1a1a;
    --text-primary:     #ffffff;
    --text-secondary:   #999999;
    --border-color:     #2a2a2a;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    scroll-snap-type: y mandatory;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    transition: background-color 0.3s, color 0.3s;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 600;
    line-height: 1.2;
}
p { line-height: 1.6; color: var(--text-secondary); }

.top-notch {
    position: fixed;
    top: 1.25rem;
    left: 50%;
    transform: translateX(-50%) translateY(0);
    z-index: 1000;

    display: flex;
    align-items: center;
    gap: 0;

    background: rgba(255,255,255,0.72);
    border: 1px solid var(--border-color);
    border-radius: 999px;
    padding: 0.45rem 0.6rem;
    box-shadow: 0 4px 24px rgba(0,0,0,0.08), 0 1px 4px rgba(0,0,0,0.04);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);

    white-space: nowrap;


    transition:
        transform 0.5s cubic-bezier(0.16, 1, 0.3, 1),
        box-shadow 0.3s ease,
        background 0.3s ease,
        opacity 0.4s ease;

    animation: notchSlideIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.1s both;
}

body.dark-mode .top-notch {
    background: rgba(10,10,10,0.75);
    box-shadow: 0 4px 24px rgba(0,0,0,0.4), 0 1px 4px rgba(0,0,0,0.2);
}


.top-notch.is-scrolling {
    animation: none;
    transform: translateX(-50%) translateY(calc(-100% - 1.25rem + 8px));
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.top-notch.is-scrolling.is-hovered,
.top-notch.is-hovered {
    animation: none;
    transform: translateX(-50%) translateY(0);
    box-shadow: 0 8px 32px rgba(0,0,0,0.12), 0 2px 8px rgba(0,0,0,0.06);
}

body.dark-mode .top-notch.is-hovered {
    box-shadow: 0 8px 32px rgba(0,0,0,0.55), 0 2px 8px rgba(0,0,0,0.3);
}

@keyframes notchSlideIn {
    from { opacity: 0; transform: translateX(-50%) translateY(-20px); }
    to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.notch-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    flex-shrink: 0;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s;
    text-decoration: none;
}
.notch-logo:hover { transform: scale(1.1); opacity: 0.8; }

.notch-icon {
    width: 26px;
    height: 26px;
    object-fit: contain;
    display: block;
}

.notch-icon-light  { display: block;  }
.notch-icon-dark   { display: none;   }
body.dark-mode .notch-icon-light { display: none;  }
body.dark-mode .notch-icon-dark  { display: block; }

.notch-divider {
    width: 1px;
    height: 20px;
    background: var(--border-color);
    margin: 0 0.5rem;
    flex-shrink: 0;
}

.notch-links {
    display: flex;
    align-items: center;
    gap: 0.15rem;
}

.notch-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 0.45rem 0.85rem;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 500;
    letter-spacing: 0.01em;
    color: var(--text-secondary);
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}
.notch-link svg {
    opacity: 0.6;
    transition: opacity 0.2s;
    flex-shrink: 0;
}
.notch-link:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
    transform: translateY(-1px);
}
.notch-link:hover svg { opacity: 1; }

@media (max-width: 760px) {
    .top-notch {
        top: 1rem;
        padding: 0.4rem 0.5rem;
    }

    .notch-link {
        padding: 0.45rem 0.55rem;
        font-size: 0;         
        gap: 0;
    }
    .notch-link svg {
        width: 16px; height: 16px;
        opacity: 0.7;
    }
    .notch-link:hover svg { opacity: 1; }
}

@media (max-width: 480px) {
    .notch-link:nth-child(n+4) { display: none; }
}

.floating-theme-toggle {
    position: fixed;
    top: 1.5rem; right: 1.5rem;
    width: 48px; height: 48px;
    border-radius: 50%;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    z-index: 1000;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transition: var(--transition);
}
.floating-theme-toggle:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}
body.dark-mode .floating-theme-toggle:hover {
    box-shadow: 0 8px 24px rgba(255,255,255,0.1);
}


.hero {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    scroll-snap-align: start;
    scroll-snap-stop: always;
}

.hero-parallax-bg {
    position: absolute;
    inset: -15% 0;            
    background-size: cover;
    background-position: center;
    z-index: 0;
    opacity: 0; 
    filter: blur(8px) brightness(0.3);
    transform: scale(1.05); 
    
    /* 1 Second Fade-in transition */
    transition: opacity 1s ease-in-out, filter 0.3s ease;
}

.hero-parallax-bg.loaded {
    opacity: 0.9; /* Triggers the 1s fade-in to visible */
}

body.dark-mode .hero-parallax-bg {
    filter: blur(8px) brightness(0.15);
}


.hero-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(180deg, transparent 0%, var(--bg-primary) 100%);
    z-index: 1; pointer-events: none;
}

.hero-content {
    position: relative; z-index: 2; text-align: center;
    max-width: 720px; padding: 2rem;
    display: flex; flex-direction: column; align-items: center;
}

.hero-title {
    animation: fadeUp 0.8s var(--reading-ease) 0.25s forwards;

    font-size: clamp(4rem, 12vw, 9rem);
    font-weight: 700; letter-spacing: -0.04em; line-height: 0.95;
    margin-bottom: 1.25rem; opacity: 0;
    /* animation: fadeUp 0.8s var(--reading-ease) 0.25s forwards; */
}

.hero-coming-soon {
    font-size: clamp(1rem, 2.5vw, 1.35rem);
    letter-spacing: 0.3em; text-transform: uppercase;
    color: var(--text-secondary); margin-bottom: 0.75rem;
    opacity: 0; animation: fadeUp 0.7s var(--reading-ease) 0.4s forwards;
}

.shine-text {
    background: linear-gradient(90deg, var(--text-secondary) 0%, var(--text-primary) 45%, var(--text-secondary) 65%, var(--text-secondary) 100%);
    background-size: 220% auto;
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    animation: shineMove 4s linear 1.2s infinite;
}
@keyframes shineMove { 0% { background-position: 180% center; } 100% { background-position: -40% center; } }

.hero-byline { font-size: 0.9rem; margin-bottom: 1.75rem; opacity: 0; animation: fadeUp 0.7s var(--reading-ease) 0.52s forwards; }
.hero-description { font-size: clamp(1rem, 1.8vw, 1.15rem); line-height: 1.75; margin-bottom: 2.5rem; opacity: 0; animation: fadeUp 0.7s var(--reading-ease) 0.64s forwards; }
.br-desktop { display: block; }
.hero-cta { opacity: 0; animation: fadeUp 0.7s var(--reading-ease) 0.76s forwards; margin-bottom: 4rem; }

.scroll-indicator {
    display: flex; flex-direction: column; align-items: center; gap: 8px;
    opacity: 0; animation: fadeUp 0.7s var(--reading-ease) 1.1s forwards;
}
.scroll-line {
    width: 1px; height: 48px;
    background: linear-gradient(to bottom, var(--text-primary), transparent);
    transform-origin: top; animation: scrollPulse 1.8s ease-in-out infinite;
}
@keyframes scrollPulse { 0% { transform: scaleY(0); opacity: 0; } 30% { opacity: 1; } 100% { transform: scaleY(1); opacity: 0; } }
.scroll-indicator span { font-size: 0.7rem; letter-spacing: 0.14em; text-transform: uppercase; }

.btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 0.875rem 2rem; border-radius: 8px;
    font-family: var(--font-body); font-size: 0.95rem; font-weight: 600;
    cursor: pointer; border: none; text-decoration: none;
    transition: var(--transition); letter-spacing: 0.01em; white-space: nowrap;
}
.btn-primary { background: var(--primary-color); color: var(--secondary-color); border: 1px solid var(--primary-color); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,0.15); }
body.dark-mode .btn-primary:hover { box-shadow: 0 8px 24px rgba(255,255,255,0.08); }

.story {
    position: relative;
    background: var(--bg-primary);
}

.story-layout-deck {
    display: flex; max-width: 1200px;
    margin: 0 auto; padding: 0 4rem; gap: 6rem;
}

/* Scrollable Text */
.story-texts { flex: 1; }

.story-text-panel {
    height: 100vh;
    display: flex; flex-direction: column; justify-content: center;
    scroll-snap-align: start;
    scroll-snap-stop: always;
}

/* Entrance Animation */
.reveal-text {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s var(--reading-ease), transform 0.8s var(--reading-ease);
}
.reveal-text.in-view {
    opacity: 1;
    transform: translateY(0);
}

.story-num { display: block; font-size: 0.78rem; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; color: var(--accent-color); margin-bottom: 1.25rem; }
.story-heading { font-size: clamp(2rem, 4vw, 3rem); font-weight: 700; letter-spacing: -0.03em; line-height: 1.1; margin-bottom: 1.25rem; }
.story-text-panel p { font-size: 1.05rem; line-height: 1.8; color: var(--text-secondary); max-width: 440px; }
.mobile-card { display: none; }


.story-cards-deck {
    flex: 1;
    position: relative;
}

.deck-card {
    position: sticky;
    top: 25vh;
    height: 50vh;
    margin-bottom: 50vh;
    width: 100%;
    border-radius: 16px;
    background-size: cover;
    background-position: center;
    border: 1px solid var(--border-color);
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    transition: transform 0.4s var(--reading-ease), box-shadow 0.4s ease;
    transform-style: preserve-3d;
}

.deck-card:last-child { margin-bottom: 0; }

body.dark-mode .deck-card { box-shadow: 0 10px 40px rgba(0,0,0,0.6); }

.deck-card:nth-child(1) { top: 25vh;               z-index: 1; }
.deck-card:nth-child(2) { top: calc(25vh + 12px);  z-index: 2; }
.deck-card:nth-child(3) { top: calc(25vh + 24px);  z-index: 3; }
.deck-card:nth-child(4) { top: calc(25vh + 36px);  z-index: 4; }
.deck-card:nth-child(5) { top: calc(25vh + 48px);  z-index: 5; }

.early-access {
    border-top: 1px solid var(--border-color);
    background: var(--bg-secondary);
    scroll-snap-align: start;
    scroll-snap-stop: always;
    padding: 8rem 2rem;
    min-height: 100vh;
    display: flex; align-items: center; justify-content: center;
}
.early-access-inner { max-width: 640px; margin: 0 auto; text-align: center; }

.section-label { text-transform: uppercase; font-size: 0.8rem; letter-spacing: 0.2em; color: var(--accent-color); font-weight: 600; margin-bottom: 0.75rem; display: block; }
.section-title { font-size: clamp(2rem, 5vw, 3.25rem); font-weight: 700; letter-spacing: -0.03em; line-height: 1.15; margin-bottom: 1.25rem; }
.early-sub { font-size: 1.05rem; line-height: 1.7; margin-bottom: 2.5rem; }
.signup-row { display: flex; gap: 10px; max-width: 500px; margin: 0 auto 0.75rem; flex-wrap: wrap; }
.signup-input {
    flex: 1; min-width: 200px; padding: 0.875rem 1.25rem;
    border: 1px solid var(--border-color); border-radius: 8px;
    font-family: var(--font-body); font-size: 0.95rem;
    background: var(--bg-primary); color: var(--text-primary);
    outline: none; transition: var(--transition);
}
.signup-input:focus { border-color: var(--accent-color); box-shadow: 0 0 0 3px rgba(59,130,246,0.12); }
.signup-input.error { border-color: #ef4444; box-shadow: 0 0 0 3px rgba(239,68,68,0.1); }
.signup-note { font-size: 0.82rem; text-align: center; }

.signup-success { display: none; flex-direction: column; align-items: center; gap: 1rem; padding: 1rem 0; }
.signup-success.visible { display: flex; }
.success-check { width: 52px; height: 52px; border-radius: 50%; background: rgba(59,130,246,0.1); border: 1px solid rgba(59,130,246,0.25); display: flex; align-items: center; justify-content: center; font-size: 1.4rem; color: var(--accent-color); }

.footer {
    background: var(--bg-secondary); border-top: 1px solid var(--border-color);
    padding: 2.5rem 2rem; text-align: center;
    scroll-snap-align: end;
}
.footer-content p { margin: 0.4rem 0; font-size: 0.88rem; }

.modal-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.45); backdrop-filter: blur(6px);
    z-index: 2000; display: flex; align-items: center; justify-content: center;
    padding: 1.5rem; opacity: 0; pointer-events: none; transition: opacity 0.35s var(--reading-ease);
}
body.dark-mode .modal-overlay { background: rgba(0,0,0,0.7); }
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal {
    background: var(--bg-primary); border: 1px solid var(--border-color); border-radius: 16px;
    padding: 2.5rem; max-width: 420px; width: 100%; position: relative;
    transform: translateY(24px) scale(0.97); transition: transform 0.4s var(--reading-ease); box-shadow: 0 24px 64px rgba(0,0,0,0.15);
}
body.dark-mode .modal { box-shadow: 0 24px 64px rgba(0,0,0,0.6); }
.modal-overlay.open .modal { transform: translateY(0) scale(1); }
.modal-close {
    position: absolute; top: 1.1rem; right: 1.1rem; width: 32px; height: 32px; border-radius: 50%;
    background: var(--bg-secondary); border: 1px solid var(--border-color); font-size: 0.9rem;
    cursor: pointer; display: flex; align-items: center; justify-content: center; transition: var(--transition);
}
.modal-close:hover { background: var(--border-color); color: var(--text-primary); }
.modal-title { font-size: clamp(1.75rem, 4vw, 2.25rem); margin-bottom: 0.75rem; }
.modal-sub { font-size: 0.95rem; line-height: 1.65; margin-bottom: 1.75rem; }
.modal-success-wrap { display: none; flex-direction: column; align-items: center; gap: 1rem; padding: 1rem 0; text-align: center; }
.modal-success-wrap.visible { display: flex; }

@keyframes fadeUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
.btn.loading { opacity: 0.55; cursor: wait; pointer-events: none; }

@media (max-width: 900px) {
    .story-layout-deck { flex-direction: column; padding: 0 2rem; gap: 0; }
    .story-cards-deck { display: none; }
    
    .story-text-panel {
        height: auto; min-height: 100vh;
        padding: 4rem 0; text-align: center; align-items: center;
        scroll-snap-align: start;
    }
    .story-text-panel p { max-width: 100%; }
    
    .mobile-card {
        display: block; width: 100%; aspect-ratio: 4/3; margin-top: 2.5rem;
        border-radius: 12px; background-size: cover; background-position: center;
        border: 1px solid var(--border-color);
    }
}
@media (max-width: 600px) {
    .hero-title { font-size: 3.5rem; }
    .br-desktop { display: none; }
    .story-layout-deck { padding: 0 1.25rem; }
    .signup-row { flex-direction: column; }
    .signup-input { min-width: 100%; }
    .early-access { padding: 5rem 1.5rem; }
    .modal { padding: 2rem 1.5rem; }
}