:root {
    --primary: hsl(45 100% 62%);
    --primary-dark: hsl(45 100% 50%);
    --background: hsl(0 0% 7.1%);
    --surface: hsl(0 0% 11.8%);
    --foreground: hsl(0 0% 87.8%);
    --muted: hsl(0 0% 63.9%);
    --border: hsl(0 0% 20%);
    --radius: 1rem;
    --container-width: 1100px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Nunito', sans-serif;
    color: var(--foreground);
    background: var(--background);
    line-height: 1.5;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 2rem;
}

/* Typography */
h1 {
    font-size: clamp(2.5rem, 10vw, 4.5rem);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -0.04em;
    margin-bottom: 2rem;
}

h2 {
    font-size: clamp(1.75rem, 6vw, 2.5rem);
    font-weight: 700;
    letter-spacing: -0.03em;
}

h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

p {
    color: var(--muted);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius);
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

.btn-primary {
    background: var(--primary);
    color: #000000 !important;
    /* Force high contrast on yellow */
    padding: 0.8rem 2rem;
    font-size: 0.875rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.05rem;
    border-radius: 50px;
    /* Pillow shape for prominence */
}

.btn-primary:hover {
    background: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(var(--primary), 0.3);
}

.btn-secondary {
    background: white;
    color: var(--foreground);
    border: 1px solid var(--border);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

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

.w-full {
    width: 100%;
}

/* Header & Nav */
header {
    height: 72px;
    display: flex;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(10, 10, 10, 0.85);
    /* Slightly darker for better separation */
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 800;
}

.logo-img {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.logo-text {
    color: var(--foreground);
    font-weight: 900;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2.5rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--muted);
    font-weight: 800;
    font-size: 0.875rem;
    transition: color 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.nav-links a:hover {
    color: var(--primary);
}

/* Hero Section */
.hero {
    padding: 4rem 0 6rem 0;
    /* Tightened top for better immediacy */
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-content h1 {
    font-weight: 900;
    color: var(--foreground);
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--muted);
    margin-bottom: 2.5rem;
    /* Tightened from 3rem */
    line-height: 1.6;
    font-weight: 600;
}

.hero-actions {
    display: flex;
    gap: 1rem;
}

/* Hero Mockup */
.hero-mockup {
    position: relative;
    padding: 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

.mockup-perspective {
    position: relative;
    perspective: 1200px;
    width: 100%;
    max-width: 500px;
}

.main-mockup {
    width: 100%;
    height: auto;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: 0 40px 100px -20px rgba(0, 0, 0, 0.8), 0 0 40px -5px hsl(var(--primary) / 0.15);
    transform: rotateY(-12deg) rotateX(4deg);
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    background: var(--surface);
}

.mockup-perspective:hover .main-mockup {
    transform: rotateY(0deg) rotateX(0deg) scale(1.05);
}

.glow-sphere {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, var(--primary) 0%, transparent 80%);
    opacity: 0.2;
    filter: blur(80px);
    pointer-events: none;
    z-index: -1;
    animation: pulseGlow 6s infinite alternate ease-in-out;
}

@keyframes pulseGlow {
    0% {
        opacity: 0.15;
        transform: translate(-50%, -50%) scale(0.9);
    }

    100% {
        opacity: 0.25;
        transform: translate(-50%, -50%) scale(1.1);
    }
}

.buddy-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.buddy-img {
    width: 64px;
    height: 64px;
    object-fit: contain;
}

.buddy-stats {
    flex: 1;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.badge {
    color: var(--primary);
    background: rgba(59, 130, 246, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
}

.progress-track {
    height: 6px;
    background: var(--surface);
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--primary);
}

.mockup-analytics {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.analytics-card {
    background: var(--surface);
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid var(--border);
}

.analytics-card .label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--muted);
}

.analytics-card .value {
    display: block;
    font-size: 1.5rem;
    font-weight: 800;
    margin-top: 0.25rem;
}

.mini-chart {
    display: flex;
    align-items: flex-end;
    gap: 4px;
    height: 40px;
    margin-top: 1rem;
}

.bar {
    flex: 1;
    background: #d1d5db;
    border-radius: 2px;
}

.bar.active {
    background: var(--primary);
}

/* Features */
.features {
    padding: 5rem 0;
}

.section-badge {
    background: rgba(59, 130, 246, 0.1);
    color: var(--primary);
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.75rem;
    display: inline-block;
    margin-bottom: 1rem;
}

.section-title {
    font-size: 3rem;
    font-weight: 900;
    margin-bottom: 4rem;
    /* Tightened from 5rem */
    line-height: 1.1;
}

.btn-primary {
    background: var(--primary);
    color: var(--background);
}

.btn-primary:hover {
    background: white;
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--surface);
    color: var(--foreground);
    border: 1px solid var(--border);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

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

.feature-grid {
    display: flex;
    flex-direction: column;
    gap: 8rem;
    /* Tighter narrative flow */
}

.feature-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6rem;
    align-items: center;
}

.feature-row.reverse {
    direction: rtl;
}

.feature-row .feature-text {
    direction: ltr;
}

.feature-icon {
    width: 48px;
    height: 48px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    color: var(--primary);
}

.feature-visual {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.4s ease;
    min-height: 500px;
}

.feature-visual:hover {
    border-color: var(--primary);
    transform: scale(1.02);
}

.visual-card {
    background: var(--background);
    padding: 0.25rem;
    border-radius: 20px;
    box-shadow: 0 30px 60px -12px rgba(0, 0, 0, 0.8), 0 0 40px -10px hsl(var(--primary) / 0.1);
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.feature-visual:hover .visual-card {
    transform: scale(1.05);
}

.sync-status {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 2rem;
    font-weight: 800;
    font-size: 0.875rem;
    color: var(--primary);
}

.animate-spin {
    animation: spin 3s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.bg-near-black {
    background: #111;
}

.grayscale {
    filter: grayscale(1);
}

.feature-img {
    width: 100%;
    max-width: 650px;
    height: auto;
    object-fit: contain;
    display: block;
    border-radius: 16px;
}

/* CTA Section */
.cta {
    padding: 3rem 0;
    /* Tight, focused transition */
}

.cta-inner {
    background: var(--surface);
    color: var(--foreground);
    padding: 3.5rem 2rem;
    /* Compact box */
    border-radius: 20px;
    text-align: center;
    border: 1px solid var(--border);
}

.cta-inner h2 {
    font-size: 3.5rem;
    font-weight: 900;
    margin-bottom: 1.5rem;
}

.cta-inner p {
    color: var(--muted);
    font-size: 1.25rem;
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    font-weight: 600;
}

/* Footer */
footer {
    padding: 4rem 0;
    margin-top: 0;
    /* Remove gap between CTA and footer */
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    /* Asymmetric balance for cleaner info hierarchy */
    gap: 8rem;
    margin-bottom: 6rem;
}

.footer-info {
    max-width: 400px;
}

.footer-info .logo {
    margin-bottom: 1.5rem;
}

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

.link-group h4 {
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 1.5rem;
    color: var(--foreground);
    font-weight: 900;
}

.link-group a {
    display: block;
    text-decoration: none;
    color: var(--muted);
    font-size: 0.9375rem;
    margin-bottom: 1rem;
    transition: color 0.2s;
}

.link-group a:hover {
    color: var(--foreground);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    font-size: 0.875rem;
    color: var(--muted);
}

/* Animations & Reveal */
.reveal {
    opacity: 1;
    transform: translateY(0px);
    transition: all 1s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.fade-in {
    opacity: 0;
    animation: fadeIn 1s ease forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

/* Mobile Adjustments */
@media (max-width: 900px) {
    p {
        font-size: 1rem;
    }

    h1 {
        font-size: 2.75rem;
    }

    h2 {
        font-size: 2.25rem; /* Still large, but clamp() handles the scale */
    }

    .container {
        padding: 0 1.25rem;
    }

    header {
        height: 64px;
    }

    .logo-text {
        font-size: 1.125rem;
    }

    .hide-mobile {
        display: none !important;
    }

    .hero {
        grid-template-columns: 1fr;
        text-align: center;
        overflow: hidden;
        padding: 3rem 0;
        gap: 2.5rem;
        position: relative;
    }

    .hero::before {
        content: '';
        position: absolute;
        top: 0;
        left: 50%;
        transform: translateX(-50%);
        width: 100vw;
        height: 100%;
        background: radial-gradient(circle at top, hsla(45, 100%, 62%, 0.1) 0%, transparent 70%);
        pointer-events: none;
        z-index: -1;
    }

    .hero-subtitle {
        margin-left: auto;
        margin-right: auto;
        font-size: 1.1rem;
    }

    .hero-actions {
        justify-content: center;
        flex-direction: column;
        width: 100%;
    }

    .btn-large {
        width: 100%;
    }

    .hero-mockup {
        padding: 0;
    }

    .mockup-perspective {
        max-width: 100%;
    }

    .main-mockup {
        transform: none !important;
        /* Flatten on mobile for clarity */
        box-shadow: 0 20px 50px -10px rgba(0, 0, 0, 0.6);
        border-radius: 12px;
    }

    .feature-grid {
        gap: 6rem;
    }

    .feature-row {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .feature-row.reverse {
        direction: ltr;
    }

    .feature-visual {
        padding: 1rem;
        min-height: 320px;
        border-radius: 16px;
    }

    .visual-card {
        padding: 0;
    }

    .feature-img {
        width: 100%;
        max-width: 100%;
        padding: 0;
        border-radius: 12px;
    }

    .cta-inner {
        padding: 4rem 1.5rem;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
}