:root {
    /* Core Palette - Stone & Cream */
    --stone-50: #FAFAF9;
    --stone-100: #F5F5F4;
    --stone-200: #E7E5E4;
    --stone-300: #D6D3D1;
    --stone-400: #A8A29E;
    --stone-500: #78716C;
    --stone-600: #57534E;
    --stone-700: #44403C;
    --stone-800: #292524;
    --stone-900: #1C1917;

    /* Semantic Variables (Light Mode Default) */
    --bg-color: #FDFCF8;
    --surface-color: #FFFFFF;
    --secondary-bg: #FAFAFA;

    --text-color: #000000;
    --text-muted: #78716C;
    --placeholder: #9CA3AF;

    --primary-brand: #1C1917;
    --border-color: #E7E5E4;

    /* Accents */
    --accent-emerald: #10B981;
    --accent-orange: #F97316;
    --accent-purple: #A855F7;

    /* Radii - More Apple-like squircle feel */
    --radius-card: 40px;
    --radius-input: 18px;
    --radius-btn: 18px;
    --radius-pill: 100px;

    /* Layout */
    --max-width: 1400px;
    /* Slightly wider for modern monitors */
    --font-main: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

    /* Shadows */
    --shadow-soft: 0 4px 20px -2px rgba(28, 25, 23, 0.05);
    --shadow-hover: 0 30px 60px -10px rgba(28, 25, 23, 0.12);
    --shadow-button: 0 8px 16px -4px rgba(28, 25, 23, 0.15);

    /* Specifics */
    --hero-bg: radial-gradient(circle at 50% 0%, rgba(28, 25, 23, 0.04) 0%, transparent 70%);
    --window-border: var(--stone-200);
}

/* Scroll Animation Utilities */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.23, 1, 0.32, 1);
}

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

/* Dark Mode */
body.dark-mode {
    --bg-color: #0c0a09;
    /* Stone 950 approx */
    --surface-color: #1C1917;
    /* Stone 900 */
    --secondary-bg: #292524;
    /* Stone 800 */

    --text-color: #FAFAF9;
    /* Stone 50 */
    --text-muted: #A8A29E;
    /* Stone 400 */

    --primary-brand: #FAFAF9;
    --border-color: #292524;

    --shadow-soft: 0 10px 30px -5px rgba(0, 0, 0, 0.5);
    --shadow-hover: 0 20px 50px -5px rgba(0, 0, 0, 0.7);
    --shadow-button: 0 8px 20px -4px rgba(255, 255, 255, 0.1);

    --hero-bg: radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.03) 0%, transparent 60%);
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-main);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color 0.4s ease, color 0.4s ease;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Utils */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s;
}

.gradient-text {
    background: linear-gradient(135deg, var(--text-color) 30%, var(--stone-400) 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.8rem 1.6rem;
    font-weight: 600;
    border-radius: var(--radius-btn);
    border: none;
    cursor: pointer;
    font-size: 0.95rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.btn.rounded {
    border-radius: var(--radius-pill);
}

.btn.large {
    padding: 1rem 2.2rem;
    font-size: 1.1rem;
}

/* Primary Button with advanced hover */
.btn-primary {
    background: var(--primary-brand);
    color: var(--bg-color);
    box-shadow: var(--shadow-button);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.2);
    /* opacity: 0.95; */
}

.btn-primary:active {
    transform: translateY(-1px);
}

/* Secondary Button */
.btn-secondary {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-color);
}

.btn-secondary:hover {
    background: var(--surface-color);
    border-color: var(--text-color);
}

/* Theme Toggle */
.theme-toggle-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-color);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    margin-left: 1rem;
}

.theme-toggle-btn:hover {
    background: var(--surface-color);
    transform: rotate(15deg) scale(1.1);
    border-color: var(--text-color);
}

/* Navbar */
.navbar {
    width: 100%;
    height: 80px;
    border-bottom: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.8);
    /* Light mode glass default */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: background 0.3s, border-color 0.3s;
}

body.dark-mode .navbar {
    background: rgba(28, 25, 23, 0.8);
}

.nav-container {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.logo {
    font-weight: 800;
    font-size: 1.5rem;
    letter-spacing: -0.04em;
    color: var(--text-color);
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-item {
    font-size: 0.95rem;
    color: var(--text-muted);
    font-weight: 500;
    transition: color 0.2s;
}

.nav-item:hover {
    color: var(--text-color);
}

.mobile-menu-btn {
    display: none;
    color: var(--text-color);
    font-size: 1.6rem;
    cursor: pointer;
    z-index: 1001;
}

/* Mobile Nav Specifics */
@media (max-width: 768px) {
    .mobile-menu-btn {
        display: block;
    }

    .nav-right {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        height: 100vh;
        background: var(--surface-color);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2.5rem;
        transition: 0.4s cubic-bezier(0.19, 1, 0.22, 1);
        z-index: 1000;
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
    }

    .nav-right.active {
        right: 0;
    }

    .nav-item {
        font-size: 1.25rem;
    }
}

/* Main App Styles */

/* Hero Apple Section */
.hero-apple {
    padding: 10rem 1.5rem 8rem;
    text-align: center;
    background: var(--hero-bg);
}

.hero-apple h1 {
    font-size: 6rem;
    line-height: 1.05;
    font-weight: 800;
    margin-bottom: 2rem;
    letter-spacing: -0.05em;
    color: var(--text-color);
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--text-muted);
    max-width: 700px;
    margin: 0 auto 3.5rem;
    line-height: 1.4;
    font-weight: 400;
}

.hero-cta {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 6rem;
}

@media (max-width: 768px) {
    .hero-apple {
        padding: 8rem 1rem 4rem;
    }

    .hero-apple h1 {
        font-size: 3rem;
        margin-bottom: 1.5rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
        margin-bottom: 2.5rem;
    }

    .hero-cta {
        flex-direction: column;
        gap: 1rem;
        align-items: center;
        margin-bottom: 4rem;
    }

    .hero-cta .btn {
        width: 100%;
        max-width: 300px;
    }
}

.hero-mockup-container {
    max-width: 1100px;
    margin: 0 auto;
    perspective: 2000px;
}

.hero-image {
    width: 100%;
    height: auto;
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-hover);
    transform: rotateX(5deg);
    transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.hero-image:hover {
    transform: rotateX(0deg) scale(1.02);
}

/* Workflow Section */
.section-workflow {
    padding: 10rem 1.5rem;
    background: var(--bg-color);
}

.section-header {
    text-align: center;
    margin-bottom: 8rem;
}

.eyebrow {
    display: block;
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--accent-orange);
    margin-bottom: 1rem;
}

.section-header h2 {
    font-size: 4rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1.1;
}

.workflow-step {
    display: flex;
    align-items: center;
    gap: 8rem;
    margin-bottom: 12rem;
}

.workflow-step.alt {
    flex-direction: row-reverse;
}

.step-info {
    flex: 1;
}

.step-number {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-color);
    margin-bottom: 1.5rem;
    width: 50px;
    height: 50px;
    border: 2px solid var(--border-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.step-info h3 {
    font-size: 2.75rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.03em;
}

.step-info p {
    font-size: 1.15rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.step-details {
    list-style: none;
}

.step-details li {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.step-details i {
    color: var(--accent-emerald);
}

.step-visual {
    flex: 1.2;
}

.app-screenshot {
    width: 100%;
    height: auto;
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-hover);
    transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.app-screenshot:hover {
    transform: translateY(-10px) rotateY(-5deg);
}

.workflow-step.alt .app-screenshot:hover {
    transform: translateY(-10px) rotateY(5deg);
}

/* Stats Section */
.section-stats {
    padding: 2rem 0;
    margin-top: -5rem;
    position: relative;
    z-index: 10;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    justify-content: center;
}

.stat-card {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    padding: 1.8rem 2.2rem;
    border-radius: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.8rem;
    box-shadow: var(--shadow-hover);
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: white;
    flex-shrink: 0;
}

.stat-icon.blue {
    background: linear-gradient(135deg, #3B82F6, #06B6D4);
}

.stat-icon.purple {
    background: linear-gradient(135deg, #A855F7, #EC4899);
}

.stat-icon.green {
    background: linear-gradient(135deg, #10B981, #34D399);
}

.stat-info h3 {
    font-size: 2.5rem;
    line-height: 1;
    font-weight: 800;
}

.stat-info p {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 600;
}

/* Phase Dividers */
.phase-divider {
    text-align: center;
    margin: 8rem 0 4rem;
}

.phase-badge {
    display: inline-block;
    padding: 0.8rem 2rem;
    border-radius: 100px;
    font-weight: 800;
    font-size: 1.1rem;
    color: white;
    margin-bottom: 1rem;
    box-shadow: var(--shadow-button);
}

.phase-badge.blue {
    background: linear-gradient(to r, #3B82F6, #06B6D4);
}

.phase-badge.purple {
    background: linear-gradient(to r, #A855F7, #EC4899);
}

.phase-badge.green {
    background: linear-gradient(to r, #10B981, #059669);
}

.phase-badge.amber {
    background: linear-gradient(to r, #F59E0B, #D97706);
}

.phase-divider p {
    font-size: 1.25rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* Pro Tips */
.pro-tip {
    margin-top: 2rem;
    background: var(--stone-50);
    border-radius: 18px;
    padding: 1.25rem;
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    border: 1px solid var(--stone-200);
}

body.dark-mode .pro-tip {
    background: var(--stone-800);
    border-color: var(--stone-700);
}

.pro-tip i {
    color: #F59E0B;
    font-size: 1.2rem;
    margin-top: 0.1rem;
}

.pro-tip span {
    font-size: 0.95rem;
    color: var(--text-color);
    line-height: 1.5;
}

@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .phase-divider h2 {
        font-size: 2.5rem;
    }
}

/* Features Section */
.section-features {
    padding: 10rem 1.5rem;
    background: var(--secondary-bg);
}

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

.feature-card {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    padding: 3rem;
    border-radius: var(--radius-card);
    transition: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.feature-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-10px);
    border-color: var(--text-color);
}

.feature-icon {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: var(--text-color);
}

.feature-card h4 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.feature-card p {
    color: var(--text-muted);
    line-height: 1.6;
}

/* Final CTA */
.final-cta {
    padding: 8rem 1.5rem;
}

.cta-box {
    background: var(--primary-brand);
    color: var(--bg-color);
    padding: 6rem;
    border-radius: var(--radius-card);
    text-align: center;
}

.cta-box h2 {
    font-size: 4rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    letter-spacing: -0.04em;
}

.cta-box p {
    font-size: 1.25rem;
    margin-bottom: 3rem;
    opacity: 0.8;
}

/* Footer Apple */
.footer-apple {
    background: var(--surface-color);
    padding: 6rem 1.5rem;
    border-top: 1px solid var(--border-color);
}

.footer-top {
    display: flex;
    justify-content: space-between;
    margin-bottom: 4rem;
    flex-wrap: wrap;
    gap: 3rem;
}

.footer-brand h3 {
    font-size: 1.75rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.footer-nav {
    display: flex;
    gap: 5rem;
    flex-wrap: wrap;
}

.footer-col h5 {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 1.5rem;
}

.footer-col a {
    display: block;
    color: var(--text-muted);
    margin-bottom: 0.8rem;
    font-weight: 500;
}

.footer-col a:hover {
    color: var(--text-color);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 3rem;
    border-top: 1px solid var(--border-color);
}

.social-links {
    display: flex;
    gap: 1.5rem;
}

.social-links a {
    font-size: 1.4rem;
    color: var(--text-muted);
}

.social-links a:hover {
    color: var(--text-color);
}

/* --- Responsive Overhaul --- */

/* Tablet & Smaller (1024px) */
@media (max-width: 1024px) {
    .workflow-step {
        flex-direction: column !important;
        gap: 4rem;
        text-align: center;
    }

    .step-number {
        margin: 0 auto 1.5rem;
    }

    .step-details li {
        justify-content: center;
    }

    .hero-apple h1 {
        font-size: 4rem;
    }
}

/* Mobile Devices (768px) */
@media (max-width: 768px) {

    /* Layout */
    .container {
        padding: 0 1.25rem;
    }

    /* Navbar handled by Mobile Nav Specifics section above */

    /* Hero */
    .hero-apple {
        padding: 8rem 1rem 4rem;
        background: radial-gradient(circle at 50% 0%, rgba(28, 25, 23, 0.08) 0%, transparent 80%);
    }

    .hero-apple h1 {
        font-size: 2.75rem;
        margin-bottom: 1rem;
        line-height: 1.1;
    }

    .hero-subtitle {
        font-size: 1.05rem;
        margin-bottom: 2.5rem;
        padding: 0 0.5rem;
    }

    .hero-cta {
        flex-direction: column;
        gap: 1rem;
        align-items: center;
        margin-bottom: 4rem;
    }

    .hero-cta .btn {
        width: 100%;
        max-width: 320px;
        justify-content: center;
    }

    .hero-image {
        border-radius: 20px;
        transform: scale(0.92);
        /* Breathable scaling on small devices */
    }

    /* Stats Grid - Fixed Tiny Icons */
    .section-stats {
        margin-top: -4rem;
        /* Lift it more on mobile */
        padding: 0 1rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
        gap: 1.2rem;
    }

    .stat-card {
        padding: 2rem 1.5rem;
        border-radius: 30px;
        flex-direction: column;
        text-align: center;
        gap: 1.2rem;
        display: flex;
        align-items: center;
        justify-content: center;
        background: var(--surface-color);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
        /* Force shadow visibility */
    }

    .stat-icon {
        width: 64px;
        height: 64px;
        font-size: 1.5rem;
        margin: 0;
        /* Clear any residual margin */
    }

    .stat-info h3 {
        font-size: 2.5rem;
        margin-bottom: 0.2rem;
    }

    /* Workflow Headers */
    .section-header {
        margin-bottom: 4rem;
    }

    .section-header h2 {
        font-size: 2.25rem;
    }

    .phase-divider {
        margin: 5rem 0 3rem;
    }

    .phase-badge {
        font-size: 0.85rem;
        padding: 0.6rem 1.4rem;
    }

    .phase-divider p {
        font-size: 1rem;
    }

    .workflow-step {
        margin-bottom: 8rem;
    }

    .step-info h3 {
        font-size: 1.8rem;
    }

    .step-info p {
        font-size: 1rem;
    }

    .pro-tip {
        text-align: left;
        padding: 1rem;
        font-size: 0.85rem;
    }

    /* Features */
    .section-features {
        padding: 6rem 1rem;
    }

    .feature-card {
        padding: 2rem;
        border-radius: 24px;
    }

    /* Final CTA */
    .cta-box {
        padding: 4rem 1.5rem;
        border-radius: 30px;
    }

    .cta-box h2 {
        font-size: 2.25rem;
    }

    .cta-box p {
        font-size: 1.1rem;
    }

    /* Footer */
    .footer-apple {
        padding: 4rem 1rem;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 2rem;
        text-align: center;
    }
}

/* Download Page Specifics */
.download-card {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-card);
    padding: 4rem;
    max-width: 600px;
    margin: 4rem auto;
    box-shadow: var(--shadow-hover);
    text-align: center;
}

.download-card-header i {
    font-size: 5rem;
    color: var(--accent-emerald);
    margin-bottom: 2rem;
    filter: drop-shadow(0 10px 20px rgba(16, 185, 129, 0.2));
}

.download-card-header h2 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    font-weight: 800;
}

.download-card-header p {
    color: var(--text-muted);
    font-family: monospace;
    margin-bottom: 3rem;
}

.download-features {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-bottom: 3rem;
}

.d-feat {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: center;
}

.d-feat i {
    font-size: 1.5rem;
    color: var(--text-color);
}

.d-feat span {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
}

.full-width {
    width: 100%;
    justify-content: center;
}

.download-disclaimer {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 2rem;
}

/* Premium Steps */
.premium-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-top: 4rem;
}

.p-step {
    text-align: center;
    background: var(--surface-color);
    padding: 3rem;
    border-radius: var(--radius-card);
    border: 1px solid var(--border-color);
    transition: all 0.4s ease;
}

.p-step:hover {
    transform: translateY(-5px);
    border-color: var(--text-color);
}

.p-step-icon {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-color);
}

.p-step h4 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.p-step p {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.5;
}