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

:root {
    --bg: #ffffff;
    --fg: #000000;
    --muted: #a0a0a0;
    --border: #eeeeee;
    --card-bg: #fafafa;
    --nav-bg: rgba(255, 255, 255, 0.85);
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #000000;
        --fg: #ffffff;
        --muted: #707070;
        --border: #1a1a1a;
        --card-bg: #0a0a0a;
        --nav-bg: rgba(0, 0, 0, 0.85);
    }
}

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

html {
    scroll-behavior: smooth;
    background: var(--bg);
    color-scheme: light dark;
}

body {
    background: var(--bg);
    color: var(--fg);
    font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.55;
    overflow-x: hidden;
}

/* ─── HERO ─── */
.hero {
    padding: 6rem 3rem 6rem;
    display: flex;
    flex-direction: column;
}

.hero-top {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    margin: 0 0 6rem 0;
    gap: 4rem;
}

.hero-text {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.hero-logo {
    border-radius: 8px;
}

.hero-heading {
    font-size: clamp(1.75rem, 5vw, 3rem);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.02em;
    max-width: 600px;
    margin: 0;
}

.hero-description {
    font-size: 0.95rem;
    color: var(--muted);
    line-height: 1.5;
    max-width: 420px;
    margin: 0;
}

.rotating-word {
    display: inline-block;
    min-width: 7rem;
    transition: opacity 0.5s ease;
}

.rotating-word.fade-out {
    opacity: 0;
}

.hero-cta {
    flex-shrink: 0;
}

.cta-container {
    min-height: 40px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1.25rem;
}

.download-btn {
    background: transparent !important;
    color: var(--fg) !important;
    padding: 0.8rem 1.5rem !important;
    border: 1px solid var(--border) !important;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: border-color 0.2s;
    cursor: pointer;
    width: 260px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    white-space: nowrap;
}

.download-btn:hover {
    border-color: var(--fg) !important;
}

.hidden {
    display: none !important;
}

.form-note {
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--muted);
    margin-top: 1rem;
    display: block;
}

.hero-video {
    width: 100%;
    margin-bottom: 5rem;
}

.preview-frame {
    aspect-ratio: 16 / 9;
    background: #000;
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

.preview-frame video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.hero-footer {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 4rem;
}

.hero-sub-text {
    max-width: 450px;
}

.sub {
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.35;
    letter-spacing: -0.01em;
    color: var(--fg);
}

.signup-form {
    display: flex;
    align-items: center;
    gap: 1rem;
    border-bottom: 2px solid var(--fg);
    padding-bottom: 0.5rem;
    width: 400px;
}

.signup-form input {
    background: transparent;
    border: none;
    color: var(--fg);
    font-size: 1rem;
    /* Prevents iOS zoom */
    font-family: inherit;
    font-weight: 600;
    width: 100%;
    outline: none;
}

.signup-form input::placeholder {
    color: #444;
    text-transform: uppercase;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.05em;
}

.signup-form .btn {
    background: transparent;
    border: none;
    color: var(--fg);
    font-weight: 800;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    padding: 0 0.5rem 0 1rem;
    cursor: pointer;
    text-transform: uppercase;
    white-space: nowrap;
}

.signup-form .btn:hover {
    opacity: 0.6;
}

/* ─── FEATURES STACK ─── */
.features-stack {
    padding: 4rem 3rem;
    border-top: 1px solid var(--border);
}

.feature-block {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 4rem;
    align-items: center;
    padding: 6rem 0;
    border-bottom: 1px solid var(--border);
}

.feature-block:last-child {
    border-bottom: none;
}

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

.feature-block-reverse > * {
    direction: ltr;
}

.f-label {
    font-size: 0.6rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--muted);
    display: block;
    margin-bottom: 1.5rem;
}

.feature-text h2 {
    font-size: clamp(1.5rem, 3vw, 2.25rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.03em;
    margin-bottom: 1.25rem;
}

.feature-text p {
    font-size: 1rem;
    color: var(--muted);
    line-height: 1.6;
    font-weight: 500;
    max-width: 440px;
}

.feature-visual {
    width: 100%;
}

.visual-placeholder {
    width: 100%;
    aspect-ratio: 16 / 10;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
}

/* ─── SMALL FEATURES GRID ─── */
.features-grid-small {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
    padding: 0 3rem 8rem;
}

.small-feature {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 2rem;
}

.small-feature h3 {
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
}

.small-feature p {
    font-size: 0.85rem;
    color: var(--muted);
    line-height: 1.5;
    font-weight: 500;
}

.cta-minimal {
    padding: 10rem 3rem;
    border-top: 1px solid var(--border);
}

.cta-content {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 4rem;
    width: 100%;
    max-width: 1200px;
}

.cta-content h2 {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.04em;
    margin-bottom: 1rem;
}

.cta-content p {
    font-size: 1.1rem;
    color: var(--muted);
    margin-bottom: 0;
}

.cta-text {
    display: flex;
    flex-direction: column;
}

.cta-content .signup-form {
    width: 100%;
    max-width: 450px;
}

@media (prefers-color-scheme: light) {
    .footer-links a,
    .footer-copy {
        color: #888;
    }

    .footer-links a:hover {
        color: #000;
    }

    .floating-pill span {
        color: #000 !important;
    }
}

/* ─── FOOTER ─── */
footer {
    border-top: 1px solid var(--border);
    padding: 6rem 3rem;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-copy {
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #444;
}

.footer-links {
    display: flex;
    gap: 2.5rem;
}

.footer-links a {
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    text-decoration: none;
    color: #444;
    letter-spacing: 0.05em;
    transition: color 0.15s;
}

.footer-links a:hover {
    color: #fff;
}

/* ─── RESPONSIVE ─── */
@media (max-width: 1024px) {
    .hero-heading {
        font-size: 4rem;
    }

    .features-grid-small {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .nav-inner {
        padding: 1.5rem;
    }

    .hero {
        padding: 4rem 1.5rem 4rem;
    }

    .hero-top {
        flex-direction: column;
        align-items: flex-start;
        gap: 3rem;
        margin-bottom: 3.5rem;
    }

    .hero-heading {
        font-size: 1.75rem;
        line-height: 1;
        max-width: 100%;
    }

    .signup-form {
        width: 100%;
    }

    .download-btn {
        width: 100% !important;
    }

    .cta-container {
        width: 100%;
    }

    .hero-video {
        height: 50vh;
        margin-bottom: 3rem;
    }

    .features-stack {
        padding: 2rem 1.5rem;
    }

    .feature-block {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 4rem 0;
    }

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

    .features-grid-small {
        grid-template-columns: 1fr;
        padding: 0 1.5rem 6rem;
    }

    .bento-large {
        min-height: auto;
    }

    .cta-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 2rem;
    }

    .cta-content p {
        margin-bottom: 1rem;
    }
}

/* ─── FLOATING PILL ─── */
.floating-pill {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 200;
    background: var(--nav-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    padding: 0.5rem 0.5rem 0.5rem 0.8rem;
    border-radius: 100px;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transform: translateY(150%);
    transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

.floating-pill.persistent {
    transform: translateY(0);
}

.logo-link {
    display: flex;
    align-items: center;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.logo-link:hover {
    opacity: 1;
}

.pill-divider {
    width: 1px;
    height: 16px;
    background: var(--border);
}

.floating-pill .btn {
    background: var(--fg);
    color: var(--bg);
    padding: 0.5rem 1.2rem;
    border-radius: 100px;
    font-size: 0.65rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-decoration: none;
    transition: opacity 0.2s;
}

.floating-pill .btn:hover {
    opacity: 0.8;
}

@media (max-width: 768px) {
    .floating-pill {
        right: 1.5rem;
        bottom: 1.5rem;
        width: calc(100% - 3rem);
        justify-content: center;
    }
}