/* ============================================
   ClawTalk Marketing Page — Styles
   ============================================ */

/* --- Design Tokens --- */
:root {
    --bg: #0a0c10;
    --bg-elevated: #14161d;
    --bg-section-alt: #0e1016;
    --text: #e4e4e7;
    --text-strong: #fafafa;
    --text-muted: #71717a;
    --accent: #D92D26;
    --accent-dark: #A61E1A;
    --accent-glow: rgba(217, 45, 38, 0.25);
    --accent-subtle: rgba(217, 45, 38, 0.12);
    --border: #1e2028;
    --border-hover: rgba(217, 45, 38, 0.3);
    --font-body: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, sans-serif;
    --font-mono: "SF Mono", "JetBrains Mono", "Fira Code", monospace;
    --radius: 16px;
    --radius-sm: 10px;
    --radius-lg: 24px;
    --nav-height: 64px;
}

/* --- Reset --- */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--text);
    font-size: 1.125rem;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

body.nav-open {
    overflow: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul, ol {
    list-style: none;
}

button {
    border: none;
    background: none;
    cursor: pointer;
    font: inherit;
    color: inherit;
}

/* --- Typography --- */
.eyebrow {
    font-size: 0.8125rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--accent);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.eyebrow::before {
    content: "";
    width: 3px;
    height: 1em;
    background: var(--accent);
    border-radius: 2px;
}

h1 {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.1;
    color: var(--text-strong);
}

h2 {
    font-size: clamp(1.75rem, 4vw, 3rem);
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.2;
    color: var(--text-strong);
}

h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-strong);
    line-height: 1.3;
}

/* --- Layout --- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.section {
    padding: 7rem 0;
}

.section--alt {
    background: var(--bg-section-alt);
}

.section-header {
    text-align: center;
    max-width: 640px;
    margin: 0 auto 4rem;
}

.section-header p {
    margin-top: 1rem;
    color: var(--text-muted);
    font-size: 1.125rem;
}

/* ============================================
   Navigation
   ============================================ */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    z-index: 100;
    transition: background 0.3s ease, border-color 0.3s ease;
    border-bottom: 1px solid transparent;
}

.nav--scrolled {
    background: rgba(10, 12, 16, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom-color: var(--border);
}

.nav__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.nav__brand {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    z-index: 101;
}

.nav__logo {
    height: 32px;
    width: auto;
}

.nav__wordmark {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-strong);
    letter-spacing: -0.01em;
}

.nav__links {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav__link {
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text-muted);
    transition: color 0.2s ease;
}

.nav__link:hover {
    color: var(--text-strong);
}

.nav__cta {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-strong);
    background: var(--accent);
    padding: 0.5rem 1.25rem;
    border-radius: 100px;
    transition: background 0.2s ease, box-shadow 0.2s ease;
}

.nav__cta:hover {
    background: var(--accent-dark);
    box-shadow: 0 0 20px var(--accent-glow);
}

.nav__hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    z-index: 101;
    padding: 4px;
}

.nav__hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text-strong);
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav__hamburger.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.nav__hamburger.active span:nth-child(2) {
    opacity: 0;
}

.nav__hamburger.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.nav__mobile-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(10, 12, 16, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 99;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2rem;
}

.nav__mobile-overlay.active {
    display: flex;
}

.nav__mobile-overlay a {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-strong);
}

/* ============================================
   Hero
   ============================================ */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: calc(var(--nav-height) + 2rem) 1.5rem 4rem;
    position: relative;
    overflow: hidden;
}

.hero__bg {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 60% 50% at 50% 40%, rgba(217, 45, 38, 0.08) 0%, transparent 70%);
    pointer-events: none;
}

.hero__content {
    position: relative;
    max-width: 720px;
}

.hero h1 {
    margin-bottom: 1.25rem;
}

.hero__subtitle {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: var(--text-muted);
    max-width: 560px;
    margin: 0 auto 2.5rem;
    line-height: 1.6;
}

.hero__ctas {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.25rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.hero__app-store-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.625rem;
    background: var(--text-strong);
    color: #000;
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hero__app-store-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(255, 255, 255, 0.1);
}

.hero__app-store-btn svg {
    width: 24px;
    height: 24px;
}

.hero__github-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text);
    border: 1px solid var(--border);
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    font-weight: 500;
    font-size: 1rem;
    transition: border-color 0.2s ease, color 0.2s ease;
}

.hero__github-btn:hover {
    border-color: var(--text-muted);
    color: var(--text-strong);
}

.hero__github-btn svg {
    width: 20px;
    height: 20px;
}

.hero__price {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-top: 0.75rem;
}

/* Phone mockup */
.hero__mockup {
    position: relative;
    margin-top: 4rem;
    width: 280px;
    height: 580px;
}

.phone-frame {
    width: 100%;
    height: 100%;
    border: 3px solid #2a2d35;
    border-radius: 40px;
    background: #111318;
    position: relative;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.phone-frame__notch {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 28px;
    background: #000;
    border-radius: 0 0 18px 18px;
    z-index: 2;
}

.phone-frame__screen {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 1rem;
    background: linear-gradient(160deg, #14161d 0%, #0a0c10 100%);
}

.phone-frame__screen img {
    width: 60px;
    height: 60px;
    border-radius: 14px;
    opacity: 0.8;
}

.phone-frame__screen span {
    font-size: 0.8125rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* Scroll indicator */
.hero__scroll {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.08em;
}

.hero__scroll svg {
    width: 20px;
    height: 20px;
}

/* ============================================
   Features
   ============================================ */
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.feature-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-hover);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(217, 45, 38, 0.1);
}

.feature-card__icon {
    width: 48px;
    height: 48px;
    background: var(--accent-subtle);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
    color: var(--accent);
}

.feature-card__icon svg {
    width: 24px;
    height: 24px;
}

.feature-card h3 {
    margin-bottom: 0.5rem;
}

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

/* ============================================
   How It Works — Pipeline
   ============================================ */
.pipeline {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 0;
    position: relative;
    margin-bottom: 5rem;
}

.pipeline__step {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    flex: 1;
    max-width: 220px;
    position: relative;
}

.pipeline__icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--bg-elevated);
    border: 2px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
    color: var(--accent);
    position: relative;
    z-index: 2;
}

.pipeline__icon svg {
    width: 28px;
    height: 28px;
}

.pipeline__step h3 {
    font-size: 1rem;
    margin-bottom: 0.375rem;
}

.pipeline__step p {
    font-size: 0.8125rem;
    color: var(--text-muted);
    line-height: 1.5;
    max-width: 180px;
}

/* Connector lines between steps */
.pipeline__step:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 32px;
    left: calc(50% + 40px);
    width: calc(100% - 80px);
    height: 2px;
    background: var(--border);
    z-index: 1;
}

.pipeline__step:not(:last-child)::before {
    content: "";
    position: absolute;
    top: 27px;
    right: -8px;
    width: 12px;
    height: 12px;
    border-right: 2px solid var(--accent);
    border-bottom: 2px solid var(--accent);
    transform: rotate(-45deg);
    z-index: 3;
}

/* Architecture diagram */
.architecture {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.arch-box {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.75rem 2rem;
    text-align: center;
    min-width: 240px;
}

.arch-box__title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-strong);
    margin-bottom: 0.75rem;
}

.arch-box__items {
    font-size: 0.8125rem;
    color: var(--text-muted);
    line-height: 1.6;
}

.arch-connector {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.375rem;
    color: var(--accent);
}

.arch-connector__line {
    font-size: 1.5rem;
    letter-spacing: -0.1em;
    color: var(--border);
}

.arch-connector__label {
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    white-space: nowrap;
}

/* ============================================
   Security
   ============================================ */
.security-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.security-item {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.security-item__icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: rgba(74, 222, 128, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #4ade80;
}

.security-item__icon svg {
    width: 20px;
    height: 20px;
}

.security-item h3 {
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.security-item p {
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* ============================================
   Pricing
   ============================================ */
.pricing {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.pricing__glow {
    position: absolute;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(217, 45, 38, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

.pricing-card {
    position: relative;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 3rem;
    text-align: center;
    max-width: 420px;
    width: 100%;
}

.pricing-card__label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--accent);
    margin-bottom: 1rem;
}

.pricing-card__price {
    font-size: 4rem;
    font-weight: 700;
    color: var(--text-strong);
    letter-spacing: -0.03em;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.pricing-card__note {
    color: var(--text-muted);
    font-size: 1rem;
    margin-bottom: 2rem;
}

.pricing-card__features {
    text-align: left;
    margin-bottom: 2rem;
}

.pricing-card__features li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0;
    font-size: 0.9375rem;
    color: var(--text);
}

.pricing-card__features li svg {
    width: 18px;
    height: 18px;
    color: #4ade80;
    flex-shrink: 0;
}

.pricing-card__cta {
    display: inline-flex;
    align-items: center;
    gap: 0.625rem;
    background: var(--accent);
    color: var(--text-strong);
    padding: 0.875rem 2rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
    width: 100%;
    justify-content: center;
}

.pricing-card__cta:hover {
    background: var(--accent-dark);
    box-shadow: 0 0 30px var(--accent-glow);
    transform: translateY(-1px);
}

.pricing-card__cta svg {
    width: 20px;
    height: 20px;
}

.pricing-card__alt {
    margin-top: 1rem;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.pricing-card__alt a {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.pricing-card__alt a:hover {
    color: var(--text-strong);
}

.pricing-card__req {
    margin-top: 1.5rem;
    font-size: 0.8125rem;
    color: var(--text-muted);
    opacity: 0.7;
}

/* ============================================
   Footer
   ============================================ */
.footer {
    border-top: 1px solid var(--border);
    padding: 3rem 0 2rem;
}

.footer__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.footer__brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer__brand img {
    height: 24px;
    width: auto;
}

.footer__brand span {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.footer__links {
    display: flex;
    gap: 1.5rem;
}

.footer__links a {
    font-size: 0.875rem;
    color: var(--text-muted);
    transition: color 0.2s ease;
}

.footer__links a:hover {
    color: var(--text-strong);
}

.footer__license {
    font-size: 0.8125rem;
    color: var(--text-muted);
    background: var(--bg-elevated);
    padding: 0.25rem 0.75rem;
    border-radius: 100px;
    border: 1px solid var(--border);
}

.footer__copy {
    width: 100%;
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
    font-size: 0.8125rem;
    color: var(--text-muted);
}

/* ============================================
   Scroll Reveal Animations
   ============================================ */
@media (prefers-reduced-motion: no-preference) {
    [data-reveal] {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
                    transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
    }

    [data-reveal].revealed {
        opacity: 1;
        transform: translateY(0);
    }

    @keyframes bounce-down {
        0%, 100% {
            transform: translateX(-50%) translateY(0);
            opacity: 0.5;
        }
        50% {
            transform: translateX(-50%) translateY(8px);
            opacity: 1;
        }
    }

    .hero__scroll {
        animation: bounce-down 2s ease-in-out infinite;
    }

    @keyframes glow-pulse {
        0%, 100% { box-shadow: 0 0 20px rgba(217, 45, 38, 0); }
        50% { box-shadow: 0 0 40px rgba(217, 45, 38, 0.2); }
    }

    .pricing-card {
        animation: glow-pulse 4s ease-in-out infinite;
    }
}

/* ============================================
   Responsive
   ============================================ */

/* Tablet */
@media (max-width: 1200px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .security-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .pipeline__step p {
        font-size: 0.75rem;
    }
}

/* Mobile */
@media (max-width: 768px) {
    :root {
        --nav-height: 56px;
    }

    .section {
        padding: 4.5rem 0;
    }

    .section-header {
        margin-bottom: 2.5rem;
    }

    /* Nav */
    .nav__links {
        display: none;
    }

    .nav__hamburger {
        display: flex;
    }

    /* Hero */
    .hero {
        min-height: auto;
        padding-top: calc(var(--nav-height) + 4rem);
        padding-bottom: 3rem;
    }

    .hero__mockup {
        width: 220px;
        height: 460px;
        margin-top: 3rem;
    }

    .phone-frame {
        border-radius: 32px;
    }

    .phone-frame__notch {
        width: 96px;
        height: 24px;
        border-radius: 0 0 14px 14px;
    }

    .hero__scroll {
        display: none;
    }

    /* Features */
    .features-grid {
        grid-template-columns: 1fr;
    }

    .feature-card {
        padding: 1.5rem;
    }

    /* Pipeline */
    .pipeline {
        flex-direction: column;
        align-items: center;
        gap: 2rem;
    }

    .pipeline__step {
        max-width: 100%;
        flex-direction: row;
        text-align: left;
        gap: 1rem;
    }

    .pipeline__icon {
        margin-bottom: 0;
        flex-shrink: 0;
    }

    .pipeline__step p {
        max-width: none;
        font-size: 0.8125rem;
    }

    .pipeline__step:not(:last-child)::after {
        top: auto;
        left: 31px;
        bottom: -2rem;
        width: 2px;
        height: 2rem;
    }

    .pipeline__step:not(:last-child)::before {
        display: none;
    }

    /* Architecture */
    .architecture {
        flex-direction: column;
    }

    .arch-connector {
        transform: rotate(90deg);
    }

    /* Security */
    .security-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    /* Pricing */
    .pricing-card {
        padding: 2rem 1.5rem;
    }

    .pricing-card__price {
        font-size: 3rem;
    }

    /* Footer */
    .footer__inner {
        flex-direction: column;
        align-items: flex-start;
    }

    .footer__links {
        flex-wrap: wrap;
        gap: 1rem;
    }

    .footer__copy {
        text-align: left;
    }
}
