/* --- RESET & VARIABLES --- */
:root {
    --frame-bg: #050505;
    --desk-bg: #EAEAEA;
    --text: #FFFFFF;
    --text-muted: #888888;
    --card-bg: #111111;
    --ease: cubic-bezier(0.16, 1, 0.3, 1);
    
    /* Functional Colors */
    --accent-blue: #3b82f6; 
    --accent-danger: #EF4444; 
    --accent-success: #10B981;
    --accent-neutral: #555555; 

    --pad-x: 6vw;
}

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

/* 1. THE STAGE */
html, body {
    height: 100%; width: 100%;
    background-color: var(--desk-bg);
    font-family: 'Inter', sans-serif;
    -webkit-font-smoothing: antialiased;
    overflow: hidden;
    display: flex; justify-content: center; align-items: center;
    transition: background-color 0.8s var(--ease);
}

body.immersive-mode { background-color: var(--frame-bg); }

/* NOISE TEXTURE */
.noise-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    pointer-events: none; z-index: 5; opacity: 0.035; 
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

/* 2. THE DEVICE */
.device-wrapper {
    width: calc(100% - 40px); height: calc(100% - 40px);
    transform: scale(0.96); border-radius: 32px; 
    box-shadow: 0 40px 100px rgba(0,0,0,0.2);
    overflow: hidden; transition: all 0.9s var(--ease);
    background: #000; position: relative; z-index: 10;
}
body.immersive-mode .device-wrapper { transform: scale(1); border-radius: 0px; width: 100%; height: 100%; box-shadow: none; }

/* 3. VISUAL FX */
.gradient-sphere {
    position: absolute; width: 800px; height: 800px;
    background: radial-gradient(circle, rgba(60, 100, 255, 0.12) 0%, rgba(0,0,0,0) 70%);
    top: -20%; right: -10%; z-index: 1; filter: blur(80px);
    animation: pulseAurora 12s infinite alternate ease-in-out;
    pointer-events: none; opacity: 0; transition: opacity 1s;
}
body.immersive-mode .gradient-sphere { opacity: 1; }

@keyframes pulseAurora {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(-30px, 30px) scale(1.05); }
}

/* 4. THE APP FRAME */
.app-frame {
    background-color: var(--frame-bg); color: var(--text);
    width: 100%; height: 100%; overflow-y: auto;
    scrollbar-width: none; -ms-overflow-style: none;
    transition: filter 0.5s var(--ease); position: relative; z-index: 2; 
}
.app-frame::-webkit-scrollbar { display: none; }

/* --- NAV --- */
nav {
    width: 100%; padding: 2rem var(--pad-x);
    position: sticky; top: 0; z-index: 100;
    background: rgba(5,5,5,0.7); backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255,255,255,0);
    transition: border-color 0.5s; display: flex; justify-content: center;
}
body.immersive-mode nav { border-bottom: 1px solid rgba(255,255,255,0.06); }

.nav-content { width: 100%; display: flex; justify-content: space-between; align-items: center; }
.logo { font-weight: 600; font-size: 1.15rem; letter-spacing: -0.03em; }
.nav-right { display: flex; align-items: center; gap: 2.5rem; }
.link { color: var(--text-muted); text-decoration: none; font-size: 0.95rem; font-weight: 500; transition: color 0.2s; }
.link:hover { color: #fff; }
.price-pill { background: #fff; color: #000; padding: 0.7rem 1.4rem; border-radius: 100px; font-weight: 500; font-size: 0.9rem; letter-spacing: -0.01em; transition: transform 0.2s, opacity 0.2s; cursor: pointer; }
.price-pill:hover { opacity: 0.9; }

/* --- HERO --- */
.hero {
    min-height: 85vh; display: flex; flex-direction: column; justify-content: center;
    padding: 0 var(--pad-x); position: relative;
}
.hero-content { width: 100%; max-width: 1100px; }

h1 {
    font-size: clamp(3rem, 7vw, 6.5rem); line-height: 1; font-weight: 600; 
    letter-spacing: -0.05em; margin-bottom: 2rem; text-align: left; color: #fff;
    background: linear-gradient(to bottom right, #fff 40%, #999 100%);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.hero-desc p { font-size: 1.25rem; color: var(--text-muted); line-height: 1.6; max-width: 520px; margin-bottom: 3rem; text-align: left; font-weight: 400; }
.cta-row { display: flex; flex-direction: column; gap: 1.5rem; align-items: flex-start; }
.store-buttons { display: flex; gap: 1.25rem; align-items: center; }
.store-buttons.center { justify-content: center; }
.btn-store { display: flex; align-items: center; opacity: 0.9; transition: opacity 0.2s, transform 0.2s; }
.btn-store:hover { opacity: 1; transform: translateY(-1px); }
.btn-store img { height: 44px; width: auto; display: block; }

/* TRUST BADGE (In Hero) */
.trust-badge {
    display: flex; align-items: center; gap: 12px; margin-top: 10px;
    font-size: 0.95rem; color: #777; font-weight: 500;
}
.avatars { display: flex; margin-right: 4px; }
.avatar { width: 24px; height: 24px; border-radius: 50%; border: 2px solid #050505; margin-left: -8px; }
.avatar:first-child { margin-left: 0; }

/* --- WORKFLOW --- */
.workflow { padding: 5rem var(--pad-x) 5rem var(--pad-x); }
.workflow-head { margin-bottom: 4rem; max-width: 600px; }
.workflow-head h2 { font-size: 1.5rem; font-weight: 400; color: #fff; margin-bottom: 1rem; }
.workflow-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
.flow-card {
    background: var(--card-bg); border-radius: 24px; padding: 3rem; min-height: 320px;
    display: flex; flex-direction: column; justify-content: space-between;
    transition: all 0.5s var(--ease); border: 1px solid rgba(255,255,255,0.05);
    position: relative; overflow: hidden;
}
.flow-bg {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: radial-gradient(circle at top right, rgba(59, 130, 246, 0.12), transparent 60%);
    opacity: 0; transition: opacity 0.5s ease; z-index: 1;
}
.workflow-grid:hover .flow-card { opacity: 0.5; filter: grayscale(100%); } 
.workflow-grid .flow-card:hover { opacity: 1; filter: grayscale(0%); transform: scale(1.02); border-color: rgba(59, 130, 246, 0.3); }
.workflow-grid .flow-card:hover .flow-bg { opacity: 1; }
.flow-top, .flow-content { position: relative; z-index: 2; }
.flow-top { display: flex; justify-content: space-between; margin-bottom: 2rem; }
.flow-num { font-family: monospace; color: #444; font-size: 0.9rem; }
.flow-icon { color: #fff; opacity: 0.8; }
.flow-content h3 { font-size: 2.5rem; letter-spacing: -0.04em; margin-bottom: 1rem; color: #fff; }
.flow-content p { font-size: 1.15rem; color: var(--text-muted); line-height: 1.5; max-width: 320px; }

/* --- SIGNALS --- */
.signals { padding: 5rem var(--pad-x) 5rem var(--pad-x); } 
.section-head { margin-bottom: 4rem; border-bottom: 1px solid rgba(255,255,255,0.1); padding-bottom: 1.5rem; }
.section-sub { font-size: 1.1rem; color: #666; margin-top: 0.5rem; max-width: 500px; }
h2 { font-size: 1.5rem; font-weight: 400; letter-spacing: -0.02em; color: var(--text-muted); }

.bento-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }

.card {
    background: var(--card-bg); border-radius: 28px; padding: 2.5rem; min-height: 300px;
    display: flex; flex-direction: column; justify-content: space-between;
    transition: transform 0.4s var(--ease), background 0.3s;
    border: 1px solid rgba(255,255,255,0.03);
    position: relative; overflow: hidden;
}
.card:hover { transform: translateY(-8px); background: #161616; border-color: rgba(255,255,255,0.1); }
.card.large { grid-column: span 3; min-height: 380px; justify-content: center; }
.card.large h3 { font-size: 2.75rem; margin-bottom: 1rem; letter-spacing: -0.04em; }
.card.large p { font-size: 1.25rem; max-width: 650px; }
.card-label { font-size: 0.75rem; font-family: 'Inter', monospace; color: #555; letter-spacing: 0.05em; margin-bottom: auto; text-transform: uppercase; }
.card h3 { font-size: 1.75rem; font-weight: 500; margin-bottom: 0.5rem; letter-spacing: -0.03em; }
.card p { font-size: 1rem; color: var(--text-muted); line-height: 1.5; }

/* VISUALS */
.visual-bar-group {
    display: flex; align-items: flex-end; gap: 8px; height: 50px; width: 80px;
    position: absolute; bottom: 2.5rem; right: 2.5rem; opacity: 0.8;
}
.v-bar { width: 8px; background: rgba(255,255,255,0.1); border-radius: 2px; }
.v-bar.active { background: #fff; }
.v-bar.success { background: var(--accent-success); }

.visual-line { width: 100%; height: 3px; background: rgba(255,255,255,0.1); margin-top: 1.5rem; border-radius: 10px; overflow: hidden; }
.line-fill { height: 100%; border-radius: 10px; }
.line-fill.neutral { background: var(--accent-neutral); }
.line-fill.active { background: var(--accent-blue); }
.line-fill.danger { background: var(--accent-danger); }

/* --- INSIGHT (QUOTE) --- */
.insight-container { padding: 0 var(--pad-x); display: flex; justify-content: center; margin: 2rem 0; }
.insight-card {
    background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.05);
    border-radius: 16px; padding: 2.5rem; max-width: 500px;
    text-align: center; backdrop-filter: blur(10px);
    display: flex; flex-direction: column; align-items: center;
}
.insight-icon { color: var(--accent-blue); margin-bottom: 1rem; opacity: 0.8; }
.insight-text { font-family: 'Georgia', serif; font-size: 1.15rem; color: #eee; line-height: 1.5; margin-bottom: 1rem; font-style: italic; }
.insight-author { font-family: 'Inter', sans-serif; font-size: 0.75rem; color: #666; text-transform: uppercase; letter-spacing: 0.05em; }

/* --- SYSTEM (SPECS) --- */
.system-section { padding: 0 var(--pad-x) 5rem var(--pad-x); }
.specs-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem;
    padding: 3rem; background: #0A0A0A; border-radius: 24px;
    border: 1px solid rgba(255,255,255,0.05);
}
.spec-item { display: flex; flex-direction: column; gap: 1rem; }
.spec-icon { color: #fff; opacity: 0.8; margin-bottom: 0.5rem; }
.spec-item h4 { font-size: 1.1rem; font-weight: 500; color: #fff; margin: 0; }
.spec-item p { font-size: 0.95rem; color: #888; line-height: 1.6; margin: 0; }

/* --- FINAL CTA & FOOTER --- */
.final-cta {
    padding: 8rem var(--pad-x) 6rem var(--pad-x);
    display: flex;
    justify-content: center;
    text-align: center;
}

.cta-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2.5rem;
    max-width: 600px;
}

.cta-content h2 {
    font-size: clamp(3rem, 5vw, 4rem); 
    font-weight: 600;
    color: #fff;
    margin: 0; 
    letter-spacing: -0.04em;
    line-height: 1.1;
}

.price-detail {
    font-size: 1.25rem;
    color: #888;
    margin: 0; 
    font-weight: 400;
}

.support-line {
    margin-top: 1rem;
    font-size: 0.95rem;
    color: #444; 
    transition: color 0.3s ease;
}
.support-line:hover { color: #666; }

.support-line a {
    color: inherit;
    text-decoration: none;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 2px;
    transition: all 0.2s;
}
.support-line a:hover {
    color: #fff;
    border-bottom-color: #fff;
}

/* --- FOOTER --- */
footer {
    padding: 4rem var(--pad-x) 2rem var(--pad-x);
    border-top: 1px solid rgba(255,255,255,0.06); 
    background: #050505;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 4rem;
}

.footer-col h5 {
    font-size: 0.75rem; 
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #444;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.footer-col a {
    display: block;
    color: #888;
    text-decoration: none;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    transition: color 0.2s;
}
.footer-col a:hover { color: #fff; }

.brand-col {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.brand-col .logo {
    display: block;
    margin-bottom: 1rem;
    color: #fff;
    font-size: 1.2rem;
}

.footer-desc {
    color: #555;
    font-size: 0.9rem;
    max-width: 280px;
    line-height: 1.6;
    margin-bottom: 2rem;
}

.copyright {
    font-size: 0.8rem;
    color: #333;
    font-family: 'Inter', sans-serif; /* CHANGED from monospace */
}

/* --- MODALS (UNIFIED & CLEAN) --- */
.modal-overlay {
    position: fixed; top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.6); backdrop-filter: blur(12px);
    z-index: 999; display: flex; justify-content: center; align-items: center;
    opacity: 0; pointer-events: none; transition: opacity 0.5s var(--ease);
}
.modal-overlay.active { opacity: 1; pointer-events: all; }

.modal-content {
    background: #FFFFFF; 
    width: 90%; 
    max-width: 720px; 
    padding: 4rem;
    border-radius: 2px; 
    box-shadow: 0 50px 100px rgba(0,0,0,0.4);
    transform: scale(0.96) translateY(20px); 
    transition: transform 0.6s var(--ease);
    color: #111; 
    max-height: 90vh; 
    overflow-y: auto;
    font-family: 'Inter', sans-serif; /* Consistent font */
}
.modal-overlay.active .modal-content { transform: scale(1) translateY(0); }

/* Modal Button */
.modal-close { 
    position: absolute; 
    top: 2rem; right: 2rem; 
    background: none; border: none; 
    font-size: 1.5rem; 
    color: #999; 
    cursor: pointer; 
    transition: color 0.2s; 
    padding: 10px;
    line-height: 1;
}
.modal-close:hover { color: #000; }

/* Modal Typography */
.story-date { 
    display: block; 
    font-size: 0.8rem; 
    font-weight: 600; 
    color: #888; 
    margin-bottom: 1rem; 
    text-transform: uppercase; 
    letter-spacing: 0.05em; 
}

.modal-content h2 { 
    font-family: 'Inter', sans-serif;
    font-size: 2.25rem; 
    color: #111; 
    margin-bottom: 2.5rem; 
    letter-spacing: -0.03em; 
    font-weight: 600; 
    line-height: 1.2;
}

.modal-content p { 
    font-size: 1.05rem; 
    line-height: 1.6; 
    color: #333; 
    margin-bottom: 1.5rem; 
}

.modal-content p.intro { 
    font-size: 1.15rem; 
    color: #444; 
    margin-bottom: 2.5rem; 
}

.legal-block { margin-bottom: 2.5rem; }
.legal-block h3 { 
    font-size: 1rem; 
    font-weight: 600; 
    margin-bottom: 0.75rem; 
    color: #000; 
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.legal-footer { 
    margin-top: 3rem; 
    font-size: 0.9rem; 
    color: #666; 
    border-top: 1px solid #eee; 
    padding-top: 1.5rem; 
}
.legal-footer a { color: #111; text-decoration: underline; }


/* --- ANIMATIONS --- */
.stagger { opacity: 0; transform: translateY(20px); animation: fadeUp 1s var(--ease) forwards; }
.delay-1 { animation-delay: 0.15s; }
.delay-2 { animation-delay: 0.3s; }
.delay-3 { animation-delay: 0.45s; }
@keyframes fadeUp { to { opacity: 1; transform: translateY(0); } }
.fade-scroll { opacity: 0; transform: translateY(40px); transition: all 1s var(--ease); }
.visible { opacity: 1; transform: translateY(0); }

/* --- MOBILE --- */
@media (max-width: 768px) {
    html, body { background-color: var(--frame-bg); height: auto; display: block; overflow: auto; }
    .device-wrapper { width: 100%; height: auto; border-radius: 0; box-shadow: none; transform: none; }
    .app-frame { overflow: visible; height: auto; }
    h1 { font-size: 3.5rem; letter-spacing: -0.04em; }
    .hero { padding: 8rem 1.5rem; min-height: auto; }
    nav { padding: 1.5rem; }
    .bento-grid, .workflow-grid, .specs-grid { grid-template-columns: 1fr; gap: 1rem; }
    .card.large { grid-column: span 1; min-height: 300px; }
    .visual-bar-group { right: 1.5rem; bottom: 1.5rem; }
    .footer-grid { grid-template-columns: 1fr; gap: 2.5rem; }
    .signals, .system-section, .workflow { padding: 5rem 1.5rem; }
    .final-cta { padding: 5rem 1.5rem 4rem 1.5rem; } 
    .modal-content { padding: 2rem; width: 92%; border-radius: 8px; }
    .trust-badge { position: relative; bottom: auto; left: auto; margin-top: 3rem; }
}