@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --accent-primary: #000000;
    --text-primary: #111111;
    --text-secondary: #666666;
    
    --brand-green: #00E676;
    --mint: #eefbf4;
    
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-xl: 32px;
    --radius-full: 100px;

    --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
    --page-width: min(1200px, calc(100vw - 48px));
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: hidden; max-width: 100%; }
body { 
    margin: 0; 
    color: var(--text-primary); 
    background: var(--bg-primary); 
    font-family: var(--font-sans); 
    line-height: 1.6; 
    -webkit-font-smoothing: antialiased; 
    overflow-x: hidden;
}

.site-wrapper {
    overflow-x: hidden;
    width: 100%;
    position: relative;
}

button, input { font: inherit; }
img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }

/* Skip Link */
.skip-link { 
    position: fixed; z-index: 200; top: 10px; left: 10px; padding: 10px 15px; 
    border-radius: var(--radius-full); color: var(--bg-primary); background: var(--accent-primary); 
    transform: translateY(-150%); 
}
.skip-link:focus { transform: none; }

/* Typography */
h1, h2, h3, h4, h5, h6 { margin: 0; color: var(--accent-primary); line-height: 1.1; letter-spacing: -0.03em; }

.display-text { font-size: clamp(1.8rem, 8vw, 5rem); font-weight: 700; letter-spacing: -0.05em; line-height: 1; }
.headline-text { font-size: clamp(2.5rem, 5vw, 3rem); font-weight: 700; letter-spacing: -0.04em; line-height: 1.1; }
.title-text { font-size: clamp(1.25rem, 2vw, 1.5rem); font-weight: 600; letter-spacing: -0.02em; }
.body-text { font-size: 1rem; font-weight: 400; color: var(--text-secondary); line-height: 1.5; }
.label-text { font-size: 0.875rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--text-secondary); }

/* Buttons */
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-full);
    font-size: 0.9rem;
    font-weight: 600;
    padding: 0.8rem 1.5rem;
    transition: all 0.4s var(--ease);
    cursor: pointer;
    border: none;
    letter-spacing: -0.01em;
}
.button-primary {
    background: var(--accent-primary);
    color: var(--bg-primary);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}
.button-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(0, 199, 107, 0.4);
    background: #111111;
}
.button-light {
    background: rgba(0, 0, 0, 0.05);
    color: #000000;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05), inset 0 0 0 1px rgba(0, 0, 0, 0.1);
}
.button-light:hover {
    background: rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1), inset 0 0 0 1px rgba(0, 0, 0, 0.15);
}

/* Glass Navigation */
.site-header { 
    position: fixed; z-index: 100; top: 24px; left: 50%; 
    width: var(--page-width); transform: translateX(-50%); 
}
.glass-nav { 
    display: flex; align-items: center; justify-content: space-between; 
    padding: 16px 24px;
    background: rgba(255, 255, 255, 0.7); 
    backdrop-filter: blur(40px); 
    -webkit-backdrop-filter: blur(40px);
    border-radius: var(--radius-full);
    box-shadow: 0 4px 24px rgba(0,0,0,0.04), inset 0 0 0 1px rgba(255,255,255,0.4);
}
.wordmark { 
    display: inline-flex; gap: 8px; align-items: center; 
    font-weight: 700; letter-spacing: -0.04em; font-size: 1.25rem; color: var(--accent-primary);
}
.wordmark svg { width: 24px; height: 24px; }
/* Official mascot mark (Business Documents / Brand & Design) */
.wordmark-logo { width: 28px; height: 28px; object-fit: contain; display: block; }
.footer-logo .wordmark-logo { width: 24px; height: 24px; }
.wordmark svg path:first-child { fill: none; stroke: currentColor; stroke-width: 2; }
.wordmark svg path:last-child { fill: currentColor; }
.nav-links { display: flex; gap: 40px; }
.nav-links a { color: var(--text-secondary); font-size: 0.9rem; font-weight: 500; transition: color 0.3s; }
.nav-links a:hover { color: var(--accent-primary); }
.nav-join { 
    padding: 0.4rem 1rem; border-radius: var(--radius-full); 
    font-size: 0.85rem; font-weight: 600; color: var(--bg-primary); 
    background: var(--accent-primary); transition: transform 0.3s var(--ease);
}
.nav-join:hover { transform: scale(1.05); }

.nav-actions { display: flex; align-items: center; gap: 24px; }

.hamburger-btn {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 28px;
    height: 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 100;
}
.hamburger-btn span {
    width: 100%;
    height: 2px;
    background: var(--text-primary);
    border-radius: 10px;
    transition: all 0.3s linear;
    position: relative;
    transform-origin: 1px;
}
.hamburger-btn.open span:first-child { transform: rotate(45deg); }
.hamburger-btn.open span:nth-child(2) { opacity: 0; transform: translateX(20px); }
.hamburger-btn.open span:nth-child(3) { transform: rotate(-45deg); }

.mobile-menu {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    height: 100vh;
    background: var(--bg-primary);
    z-index: 99;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 40px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-20px);
    transition: all 0.4s cubic-bezier(0.77,0.2,0.05,1.0);
}
.mobile-menu.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.mobile-link {
    font-size: 2.5rem;
    font-weight: 600;
    color: var(--accent-primary);
    transition: color 0.3s;
}
.mobile-link:hover { color: var(--brand-green); }

/* Full Bleed Hero */
.hero { 
    position: relative; 
    min-height: 100vh; 
    display: flex; 
    align-items: center; 
    justify-content: center;
    padding: 120px 24px;
    background-color: #d8f5e5;
    overflow: hidden;
}

.ambient-glow {
    display: none;
}

.hero-content {
    position: relative; z-index: 2;
    text-align: center;
    max-width: 900px;
    padding: 0 24px;
}
.hero-copy h1 { 
    color: #111111; 
    margin-bottom: 32px; 
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    font-size: 1rem; /* Handled by spans */
}
.hero-copy h1 .static-text {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 16px;
}

.kinetic-row span {
    font-size: clamp(8rem, 20vw, 15rem);
    font-weight: 900;
    line-height: 1;
    white-space: nowrap;
    padding-right: 20px;
    animation: scrollLeft 40s linear infinite;
}

/* 3D Apple Timer Scroll Wheel */
.hero-subtitle {
    font-size: clamp(1.1rem, 2vw, 1.25rem);
    color: rgba(0, 0, 0, 0.8);
    max-width: 500px;
    margin: 0 auto 40px;
    line-height: 1.5;
}
.scroll-wheel-container {
    font-size: clamp(3.5rem, 10vw, 5.5rem);
    height: 1.5em; /* Prevent vertical clipping */
    perspective: 1000px;
    overflow: hidden;
    position: relative;
    width: 100%;
    min-width: 600px; /* Ensure wide enough for absolute text */
    max-width: 100vw;
    -webkit-mask-image: linear-gradient(to bottom, transparent, black 15%, black 85%, transparent);
}
.scroll-cylinder {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform: rotateX(0deg);
}
.wheel-item {
    position: absolute;
    width: 100%;
    height: 1.5em;
    line-height: 1.5em;
    left: 0;
    top: 0;
    font-size: inherit;
    font-weight: 700;
    letter-spacing: -0.05em;
    text-align: center;
    backface-visibility: hidden;
    color: #111111;
    padding: 0 0.15em;
}
/* Distinct Word Gradients */
.word-food { background: linear-gradient(90deg, #FF416C 0%, #FF4B2B 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; } /* Bold Red */
.word-apartments { background: linear-gradient(90deg, #F12711 0%, #F5AF19 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; } /* Bold Orange */
.word-furniture { background: linear-gradient(90deg, #D49B6A 0%, #8E5431 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; } /* Wood Brown */
.word-skincare { background: linear-gradient(90deg, #FC466B 0%, #3F5EFB 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; } /* Bold Magenta */
.word-coffee { background: linear-gradient(90deg, #FF512F 0%, #F09819 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; } /* Bold Sunset */
.word-clothing { background: linear-gradient(90deg, #00C9FF 0%, #92FE9D 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; } /* Bold Cyan */

.hero-copy p { color: rgba(0,0,0,0.7); margin-bottom: 40px; font-size: 1.25rem; font-weight: 400; max-width: 600px; margin-left: auto; margin-right: auto; }
.hero-actions { display: flex; justify-content: center; gap: 16px; margin-top: 48px; }

/* The Loop (Editorial Zig-Zag) */
.inside { padding: 160px 0; background: var(--bg-primary); }
.section-intro { width: var(--page-width); margin: 0 auto 120px; text-align: center; }
.section-intro p { margin: 24px auto 0; max-width: 600px; }

.editorial-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
    width: var(--page-width);
    margin: 0 auto 160px;
}
.editorial-row:last-child { margin-bottom: 0; }
.editorial-row.reverse .editorial-media { order: 2; }
.editorial-row.reverse .editorial-text { order: 1; }

.editorial-media {
    position: relative;
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: 0 32px 64px rgba(0,0,0,0.08);
}
.editorial-media img { width: 100%; height: auto; display: block; }
/* Placeholder for video feed */
.video-placeholder {
    aspect-ratio: 9/16;
    /* Placeholder until real app captures land: quiet mint wash + hairline so
       the slot reads as a deliberate phone frame, not a blank hole. */
    background: linear-gradient(165deg, #eafaf1 0%, #f7f7f7 70%);
    border: 1px solid rgba(0,0,0,0.06);
    border-radius: 24px;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    color: var(--text-secondary); text-align: center; padding: 32px;
    position: relative;
    overflow: hidden;
}
.video-placeholder::after {
    content: "";
    position: absolute; inset: 0;
    background: url("assets/cashout-logo.png") center 38% / 72px no-repeat;
    opacity: 0.9;
}
.video-placeholder svg { display: none; }
.video-placeholder > div { position: relative; z-index: 1; margin-top: 120px; }
.video-placeholder > div + div { margin-top: 4px; }

.editorial-text { padding: 40px; }
.editorial-text h3 { margin-bottom: 16px; }

/* Friends & Competition (Dark Section) */
.dark-section {
    background: var(--text-primary);
    color: var(--bg-primary);
    padding: 160px 0;
}
.dark-section h2, .dark-section h3 { color: var(--bg-primary); }
.dark-section .body-text { color: rgba(255,255,255,0.7); }
.dark-section .label-text { color: rgba(255,255,255,0.5); }

.feature-split { 
    display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: center; 
    width: var(--page-width); margin: 0 auto; 
}
.gift-film { 
    position: relative; width: 100%; border-radius: var(--radius-xl); overflow: hidden;
    box-shadow: 0 40px 80px rgba(0,0,0,0.3);
}
.gift-film img { width: 100%; height: auto; display: block; opacity: 0.9; }
.gift-caption {
    position: absolute; bottom: 32px; left: 32px; right: 32px;
    background: rgba(0,0,0,0.5); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    border-radius: var(--radius-lg); padding: 24px; border: 1px solid rgba(255,255,255,0.1);
}

.competition { width: var(--page-width); margin: 160px auto 0; text-align: center; }
.competition-copy { max-width: 600px; margin: 0 auto 64px; }
.leaderboard {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-xl);
    padding: 48px;
    max-width: 800px;
    margin: 0 auto;
    text-align: left;
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.5);
}
.leader-row { 
    display: grid; grid-template-columns: 40px 1fr auto; gap: 24px; align-items: center; 
    padding: 24px; border-bottom: 1px solid rgba(255,255,255,0.05); 
    transition: transform 0.3s var(--ease), background 0.3s;
}
.leader-row:hover {
    background: rgba(255,255,255,0.05);
    border-radius: var(--radius-lg);
    transform: scale(1.02);
}
.leader-row.is-leading { 
    background: linear-gradient(90deg, rgba(0, 230, 118, 0.1) 0%, rgba(0, 230, 118, 0.02) 100%); 
    color: var(--brand-green); 
    border-radius: var(--radius-lg); 
    border: 1px solid rgba(0, 230, 118, 0.3);
    box-shadow: 0 0 40px rgba(0, 230, 118, 0.15);
}
.leader-row.is-leading h3 { color: var(--brand-green) !important; font-weight: 700; }
.leader-row.is-leading .body-text { color: rgba(255,255,255,0.8); }
.row-val { font-size: 1.5rem; font-weight: 600; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }
.leader-row.is-leading .row-val { color: var(--brand-green); text-shadow: 0 0 20px rgba(0, 230, 118, 0.5); }

/* Waitlist Finale */
.waitlist-finale { 
    padding: 160px 0; background: var(--bg-secondary); position: relative; overflow: hidden; 
}
.waitlist-card {
    position: relative; z-index: 1;
    display: grid; grid-template-columns: 1fr 500px; gap: 80px; align-items: center;
    width: var(--page-width); margin: 0 auto;
    background: var(--bg-primary);
    border-radius: var(--radius-xl); padding: 80px;
    box-shadow: 0 40px 80px rgba(0,0,0,0.05);
}
.waitlist-card .section-intro { width: 100%; margin: 0; text-align: inherit; }
.waitlist-form-wrap {
    background: var(--bg-primary); 
    border-radius: var(--radius-lg); 
}

.waitlist-form { display: flex; flex-direction: column; gap: 20px; }
.form-group { display: flex; flex-direction: column; gap: 8px; }
.waitlist-form input {
    padding: 18px 24px; border: none; border-radius: var(--radius-full);
    background: var(--bg-secondary); outline: none; transition: background 0.3s, box-shadow 0.3s;
    font-size: 1rem;
}
.waitlist-form input:focus { background: var(--bg-primary); box-shadow: 0 0 0 2px var(--brand-green); }
.submit-btn {
    padding: 18px; background: var(--accent-primary); color: var(--bg-primary);
    border-radius: var(--radius-full); font-weight: 600; border: none; cursor: pointer;
    margin-top: 8px; transition: transform 0.3s, box-shadow 0.3s; font-size: 1rem;
}
.submit-btn:hover { transform: translateY(-2px); box-shadow: 0 12px 32px rgba(0,0,0,0.15); }

/* Form states inherited from student.js */
.form-notice, .form-error { margin-bottom: 20px; padding: 16px 24px; border-radius: var(--radius-full); font-size: 0.9rem; font-weight: 500; }
.form-notice { background: var(--mint); color: #147d4a; }
.form-error { background: #fee2e2; color: #b91c1c; }
.waitlist-success { text-align: center; }
.checkspot-toggle { margin-top: 32px; text-align: center; font-size: 0.9rem; color: var(--text-secondary); }
.checkspot-toggle a { color: var(--accent-primary); font-weight: 600; }

.position-line { font-size: 1.75rem; font-weight: 600; margin-bottom: 8px; letter-spacing: -0.03em; }
#waitlist-position-display { color: var(--brand-green); }
.referral-block { background: var(--bg-secondary); border-radius: var(--radius-lg); padding: 32px; text-align: center; margin: 32px 0; }
#my-ref-code { font-family: monospace; font-size: 2.5rem; font-weight: 700; margin: 16px 0; letter-spacing: 0.1em; color: var(--brand-green); }
.share-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 32px; }
.share-grid button { padding: 16px; border: none; background: var(--bg-primary); border-radius: var(--radius-full); font-weight: 500; cursor: pointer; transition: all 0.2s; box-shadow: 0 4px 12px rgba(0,0,0,0.03); }
.share-grid button:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,0.08); }

.followup-card { background: var(--bg-secondary); border-radius: var(--radius-lg); padding: 32px; text-align: left; }
.choice-row { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 12px; }
.choice-row label { display: flex; align-items: center; gap: 8px; font-size: 0.95rem; cursor: pointer; }

/* Merchants Footer */
.footer {
    background-color: #000;
    color: #fff;
    padding: 5rem 0 2rem;
    font-family: 'Inter', sans-serif;
}
.footer .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}
.footer-content {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 4rem;
    margin-bottom: 4rem;
}
.footer-brand-col {
    max-width: 300px;
}
.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
}
.footer-mission {
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
}
.footer-links-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 3rem;
}
.link-col h4 {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #fff;
}
.link-col a {
    display: block;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    margin-bottom: 1rem;
    transition: color 0.2s;
}
.link-col a:hover {
    color: #fff;
}
.footer-bottom {
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
    text-align: center;
}

/* Animation Utils */
.reveal { opacity: 0; transform: translateY(40px); transition: opacity 1s var(--ease), transform 1.2s var(--ease); }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

@media (max-width: 980px) {
    .editorial-row { grid-template-columns: 1fr; gap: 48px; text-align: center; }
    .editorial-row.reverse .editorial-media { order: 1; }
    .editorial-row.reverse .editorial-text { order: 2; }
    .feature-split { grid-template-columns: 1fr; gap: 64px; text-align: center; }
    .waitlist-card { grid-template-columns: 1fr; padding: 48px; gap: 48px; text-align: center; }
}

@media (max-width: 620px) {
    .nav-links { display: none; }
    .hamburger-btn { display: flex; }
    /* The wheel's 600px min-width (needed for absolute word layout on desktop)
       forced 225px of horizontal scroll on phones. */
    .scroll-wheel-container { min-width: 100%; }
    .hero-subtitle { padding: 0 24px; box-sizing: border-box; }
    .nav-join { padding: 8px 14px; font-size: 0.8rem; }
    .wordmark span { font-size: 1.1rem; }
    .hero-content { padding: 40px 24px; }
    .hero-actions { flex-direction: column; width: 100%; max-width: 320px; margin: 40px auto 0; gap: 16px; }
    .hero-actions .button { width: 100%; box-sizing: border-box; }
    .inside { padding: 64px 0; }
    .dark-section { padding: 64px 0; }
    .waitlist-finale { padding: 64px 0; }
    .waitlist-card { padding: 32px 24px; border-radius: 24px; }
    .leaderboard { padding: 16px; border-radius: 16px; }
    .leader-row { grid-template-columns: 24px 1fr auto; gap: 12px; padding: 16px 12px; }
    .leader-row h3 { font-size: 1rem; }
    .leader-row .row-val { font-size: 1.1rem; }
    .site-footer { flex-direction: column; gap: 32px; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
    .reveal { opacity: 1; transform: none; }
}

/* Staggered Apple-style Text Reveal */
.stagger-reveal {
    display: inline-block;
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    filter: blur(10px);
    transition: opacity 1s var(--ease), transform 1s var(--ease), filter 1s var(--ease);
    transition-delay: 0.4s;
    color: var(--brand-green);
}
.reveal.is-visible .stagger-reveal {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
}

/* Real app captures (replace the pre-launch placeholders) */
.app-shot {
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 24px 48px rgba(0,0,0,0.12);
    background: #000;
}
.app-shot img, .app-shot video {
    position: absolute;
    top: 0;
    left: 0;
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
    transform: translateY(var(--app-shot-shift));
}
.app-shot-screen {
    --app-shot-shift: -6.236%;
    aspect-ratio: 828 / 1684;
}
.app-shot-feed {
    --app-shot-shift: -1.622%;
    aspect-ratio: 720 / 1456;
}
.editorial-media.app-shot { width: 100%; max-width: 340px; margin: 0 auto; }
.gift-film.app-shot { aspect-ratio: 9/16; max-width: 340px; margin: 0 auto; }
