/* Base Reset & Variables */
:root {
    --bg-dark: #f0f2f5;
    --bg-card: #ffffff;
    --bg-card-hover: #f4f4f5;
    --text-primary: #09090b;
    --text-secondary: #71717a;
    --accent: #c026d3;
    --accent-hover: #d946ef;
    --success: #16a34a;
    --glass-border: rgba(0, 0, 0, 0.1);
    --glass-bg: rgba(255, 255, 255, 0.8);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* Background Effects */
.glow-bg {
    position: absolute;
    top: -20%;
    left: 20%;
    width: 60%;
    height: 60vmin;
    background: radial-gradient(circle, rgba(217, 70, 239, 0.15) 0%, rgba(9, 9, 11, 0) 70%);
    z-index: -2;
    pointer-events: none;
    border-radius: 50%;
}

.grain-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
    opacity: 0.15;
    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.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

/* Header */
header {
    padding: 1.25rem 5%;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 1.25rem;
    letter-spacing: -0.02em;
}

.brand-icon {
    color: var(--accent);
}

.header-btn {
    background: var(--text-primary);
    color: var(--bg-card);
    padding: 0.6rem 1.25rem;
    border-radius: 2rem;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}

.header-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* Hero Section */
.hero {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 5%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    background: rgba(217, 70, 239, 0.1);
    color: var(--accent);
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(217, 70, 239, 0.2);
}

h1 {
    font-family: 'Nunito Sans', sans-serif;
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.04em;
    margin-bottom: 1rem;
}

.text-gradient {
    background: linear-gradient(135deg, #09090b 0%, #71717a 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    max-width: 90%;
}

/* Form Styles */
.cta-container {
    margin-top: 1.5rem;
}

.waitlist-form {
    display: flex;
    gap: 0.5rem;
    max-width: 450px;
}

.waitlist-form input {
    flex: 1;
    padding: 1rem 1.25rem;
    border-radius: 0.75rem;
    border: 1px solid var(--glass-border);
    background: var(--bg-card);
    color: var(--text-primary);
    font-size: 1rem;
    outline: none;
    transition: all 0.2s ease;
}

.waitlist-form input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(217, 70, 239, 0.2);
}

.btn-primary {
    background: var(--accent);
    color: white;
    border: none;
    padding: 1rem 1.5rem;
    border-radius: 0.75rem;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
}

.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -5px rgba(217, 70, 239, 0.3);
}

.cta-subtext {
    margin-top: 1rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* Real iPhone Mockup Frame */
.iphone-wrapper {
    position: relative;
    width: 280px;
    height: 580px;
    margin: 0 auto;
}

.iphone-frame {
    width: 100%;
    height: 100%;
    background-color: #09090b; /* Native app dark theme */
    border-radius: 40px;
    box-shadow: 0 0 0 8px #18181b, 
                0 0 0 9px rgba(255,255,255,0.15), 
                0 30px 50px -10px rgba(0,0,0,0.3);
    position: relative;
    overflow: hidden;
    color: white;
    font-family: 'Inter', sans-serif;
    transform: perspective(1000px) rotateY(-10deg) rotateX(5deg);
    transform-style: preserve-3d;
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.iphone-wrapper.hover-lift .iphone-frame {
    transform: perspective(1000px) rotateY(0deg) rotateX(0deg);
}

.iphone-wrapper.hover-lift:hover .iphone-frame {
    transform: perspective(1000px) translateY(-10px) rotateY(0deg) rotateX(0deg);
}

.iphone-notch {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 110px;
    height: 25px;
    background: #18181b;
    border-bottom-left-radius: 14px;
    border-bottom-right-radius: 14px;
    z-index: 20;
}

.app-screen {
    padding: 50px 20px 20px;
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* Base App UI Styles */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}
.app-greeting { font-weight: 600; font-size: 1.125rem; }
.app-date { color: rgba(255,255,255,0.6); font-size: 0.875rem; }

/* Consistency Card */
.app-consistency-card {
    background: linear-gradient(135deg, var(--accent), var(--accent-hover));
    border-radius: 1rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}
.acc-title { font-size: 0.875rem; opacity: 0.9; margin-bottom: 0.5rem; text-transform: uppercase; letter-spacing: 0.05em; font-weight: 600; }
.acc-score { font-size: 3rem; font-weight: 800; font-family: 'Nunito Sans', sans-serif; line-height: 1; margin-bottom: 0.5rem; }
.acc-trend { font-size: 0.75rem; opacity: 0.9; display: flex; align-items: flex-start; gap: 0.4rem; line-height: 1.4; }

/* Habits List */
.app-section-title { font-size: 1rem; font-weight: 600; margin-bottom: 1rem; }
.app-habit-item {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 0.75rem;
    padding: 1rem;
    margin-bottom: 0.75rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.app-habit-name { font-weight: 600; font-size: 0.95rem; margin-bottom: 0.25rem; }
.app-habit-meta { font-size: 0.75rem; color: rgba(255,255,255,0.5); }
.tier-tag { background: rgba(255,255,255,0.15); font-size: 0.75rem; padding: 0.3rem 0.6rem; border-radius: 2rem; }
.log-tag { background: white; color: var(--accent); font-weight: 600; font-size: 0.75rem; padding: 0.4rem 0.8rem; border-radius: 2rem; cursor: pointer; }

/* Tiered Logging UI */
.app-top-nav { display: flex; align-items: center; gap: 0.5rem; color: rgba(255,255,255,0.6); font-size: 0.875rem; margin-bottom: 1.5rem; }
.app-screen-title { font-size: 1.5rem; font-weight: 700; margin-bottom: 1.5rem; }
.tier-card { border: 1px solid rgba(255,255,255,0.1); border-radius: 0.75rem; padding: 1rem; margin-bottom: 0.75rem; }
.tier-card.active-tier { background: rgba(217, 70, 239, 0.15); border-color: var(--accent); }
.tier-header { display: flex; justify-content: space-between; margin-bottom: 0.25rem; }
.tier-header h4 { font-weight: 600; font-size: 0.95rem; }
.tier-points { color: var(--accent); font-size: 0.875rem; font-weight: 600; }
.tier-card p { font-size: 0.75rem; color: rgba(255,255,255,0.6); }

.app-log-btn { background: var(--accent); color: white; width: 100%; border: none; padding: 1rem; border-radius: 0.75rem; font-weight: 600; margin-top: auto; margin-bottom: 0.5rem; cursor: pointer; }
.app-rest-btn { background: transparent; color: rgba(255,255,255,0.6); width: 100%; border: none; padding: 0.75rem; font-size: 0.875rem; cursor: pointer;}

/* Weekly View UI */
.weekly-container { display: flex; flex-direction: column; gap: 1rem; }
.week-row { background: rgba(255,255,255,0.05); padding: 1rem; border-radius: 0.75rem; border: 1px solid rgba(255,255,255,0.05); }
.week-header { display: flex; justify-content: space-between; font-size: 0.875rem; margin-bottom: 0.75rem; color: rgba(255,255,255,0.8); }
.week-dots { display: flex; gap: 0.25rem; justify-content: space-between; }
.dot { width: 28px; height: 28px; border-radius: 50%; background: rgba(255,255,255,0.05); display: flex; justify-content: center; align-items: center; font-size: 0.65rem; color: rgba(255,255,255,0.3); font-weight: 600;}
.dot.filled { background: var(--accent); color: white; }
.dot.rest { background: rgba(255,255,255,0.2); color: white;}
.week-score { font-weight: 700; color: var(--accent); }

/* Mockup Showcase Section */
.mockup-showcase { max-width: 1200px; margin: 4rem auto; padding: 0 5%; }
.showcase-header { text-align: center; margin-bottom: 4rem; }
.showcase-header h2 { font-size: 2.5rem; font-weight: 700; margin-bottom: 1rem; }
.showcase-header p { color: var(--text-secondary); max-width: 600px; margin: 0 auto; line-height: 1.6; }
.showcase-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 4rem; justify-items: center; }
.mockup-caption { text-align: center; margin-top: 1.5rem; font-weight: 600; font-size: 1.05rem; color: var(--text-primary); }

/* Features Section */
.features {
    max-width: 1200px;
    margin: 8rem auto;
    padding: 0 5%;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 4rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    padding: 2.5rem;
    border-radius: 1rem;
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    border-color: rgba(217, 70, 239, 0.3);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.3);
}

.feature-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: rgba(217, 70, 239, 0.1); /* Very subtle purple tint container */
    color: var(--accent);
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(217, 70, 239, 0.2);
}

.feature-icon svg {
    width: 20px;
    height: 20px;
}

.feature-card h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Target Audience Section */
.target-audience {
    max-width: 1200px;
    margin: 4rem auto;
    padding: 0 5%;
}

.audience-container {
    max-width: 700px;
    margin: 0 auto;
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: 1.5rem;
    padding: 3rem;
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.05);
}

.audience-eyebrow {
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.audience-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 2.5rem;
    letter-spacing: -0.02em;
}

.audience-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.audience-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1.05rem;
    color: var(--text-primary);
}

.audience-item svg {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    stroke-width: 2.5;
}

.icon-check {
    color: var(--accent);
}

.audience-item.not-for-you {
    margin-top: 1rem;
    padding: 1.25rem;
    background: rgba(0, 0, 0, 0.02);
    border-radius: 0.75rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.icon-cross {
    color: #ef4444;
}

.audience-item.not-for-you .icon-cross {
    color: var(--text-secondary);
}

@media (max-width: 768px) {
    .audience-container {
        padding: 2rem 1.5rem;
    }
}

/* Final CTA Section */
.final-cta {
    padding: 8rem 5%;
    background-color: #09090b; /* True deep blackish-grain bg like original */
    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.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.08'/%3E%3C/svg%3E");
    color: white;
    text-align: center;
}

.cta-inner {
    max-width: 900px;
    margin: 0 auto;
}

.final-cta h2 {
    font-family: 'Nunito Sans', sans-serif;
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    letter-spacing: -0.03em;
}

.cta-subtitle {
    font-size: 1.125rem;
    color: #a1a1aa;
    margin-bottom: 2.5rem;
}

.waitlist-form-centered {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    background: rgba(255, 255, 255, 0.05); /* Creates the unified "dark box" look from the ref image */
    padding: 0.5rem;
    border-radius: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    max-width: 450px;
    margin: 0 auto 1.5rem;
}

.waitlist-form-centered input {
    flex: 1;
    background: transparent;
    border: none;
    color: white;
    padding: 1rem;
    font-size: 1rem;
    outline: none;
}

.waitlist-form-centered input::placeholder {
    color: #71717a;
}

.waitlist-form-centered .btn-primary {
    padding: 1rem 1.5rem;
    border-radius: 0.75rem;
    white-space: nowrap;
}

.cta-microtext {
    font-size: 0.875rem;
    color: #71717a;
}

@media (max-width: 480px) {
    .waitlist-form-centered {
        flex-direction: column;
        padding: 1rem;
        background: transparent;
        border: none;
    }
    
    .waitlist-form-centered input {
        width: 100%;
        background: rgba(255, 255, 255, 0.05);
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 0.75rem;
        margin-bottom: 0.5rem;
    }
    
    .waitlist-form-centered .btn-primary {
        width: 100%;
        justify-content: center;
    }
}

/* Footer */
footer {
    border-top: 1px solid var(--glass-border);
    padding: 3rem 5%;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-content p {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* Responsive Design */
@media (max-width: 992px) {
    .hero {
        grid-template-columns: 1fr;
        gap: 3rem;
        text-align: center;
    }
    
    h1 {
        font-size: 3rem;
    }
    
    .subtitle {
        margin: 0 auto 2.5rem;
    }
    
    .waitlist-form {
        margin: 0 auto;
        flex-direction: column;
    }
    
    .btn-primary {
        justify-content: center;
    }

    .mockup-frame {
        max-width: 500px;
        margin: 0 auto;
        text-align: left;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 2.5rem;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}

/* Scroll Reveal Animation */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}
