/* =================================================================
   PULSE AI — SaaS Product Page
   Hand-written CSS. No framework.
   ================================================================= */

:root {
    --ink: #0A0A14;
    --surface: #13132A;
    --cream: #F0F0F5;
    --indigo: #6366F1;
    --light: #818CF8;
    --muted: rgba(240, 240, 245, 0.55);
    --line: rgba(240, 240, 245, 0.12);

    --display: 'Space Grotesk', 'Helvetica Neue', sans-serif;
    --body: 'Inter', 'Helvetica Neue', sans-serif;
    --mono: 'JetBrains Mono', 'Courier New', monospace;

    --max: 1140px;
    --gutter: clamp(1.25rem, 4vw, 2.5rem);
    --section: clamp(5rem, 10vw, 8rem);
    --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; scroll-behavior: smooth; }
body {
    font-family: var(--body);
    font-weight: 400;
    font-size: 17px;
    line-height: 1.7;
    color: var(--cream);
    background: var(--ink);
    overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
ul { list-style: none; }

/* ---------- Accessibility helpers ---------- */
.skip-link {
    position: absolute;
    top: -100px;
    left: 1rem;
    z-index: 1000;
    padding: 0.6rem 1.2rem;
    font-family: var(--mono);
    font-size: 0.8rem;
    color: #fff;
    background: var(--indigo);
    border-radius: 6px;
    transition: top 0.2s var(--ease);
}
.skip-link:focus {
    top: 1rem;
}

/* ---------- Typography ---------- */
h1, h2, h3, h4 {
    font-family: var(--display);
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: -0.025em;
}
h1 { font-size: clamp(2.6rem, 6vw, 4.2rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: clamp(1.15rem, 2vw, 1.4rem); }
p { max-width: 64ch; }
.label {
    font-family: var(--mono);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--indigo);
}

/* ---------- Layout ---------- */
.wrap {
    max-width: var(--max);
    margin: 0 auto;
    padding-left: var(--gutter);
    padding-right: var(--gutter);
}
section {
    padding-top: var(--section);
    padding-bottom: var(--section);
    position: relative;
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-block;
    font-family: var(--body);
    font-weight: 500;
    font-size: 0.95rem;
    padding: 0.85rem 2rem;
    border-radius: 8px;
    transition: background 0.3s var(--ease), color 0.3s var(--ease), transform 0.3s var(--ease);
}
.btn--primary {
    background: var(--indigo);
    color: #fff;
}
.btn--primary:hover {
    background: var(--light);
    transform: translateY(-1px);
}
.btn--ghost {
    border: 1px solid var(--line);
    color: var(--cream);
}
.btn--ghost:hover {
    border-color: var(--indigo);
    color: var(--indigo);
    transform: translateY(-1px);
}
.btn--dark {
    background: var(--ink);
    color: var(--cream);
}
.btn--dark:hover {
    background: var(--surface);
    transform: translateY(-1px);
}

/* ===========================
   NAVIGATION
   =========================== */
.nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    padding: 1.2rem 0;
    transition: background 0.35s var(--ease), border-color 0.35s var(--ease);
    border-bottom: 1px solid transparent;
}
.nav.is-scrolled {
    background: rgba(10, 10, 20, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom-color: var(--line);
}
.nav__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.nav__brand {
    font-family: var(--display);
    font-weight: 700;
    font-size: 1.35rem;
    letter-spacing: -0.02em;
    color: var(--cream);
}
.nav__links {
    display: flex;
    align-items: center;
    gap: 2.4rem;
}
.nav__links a {
    font-family: var(--body);
    font-size: 0.9rem;
    font-weight: 400;
    color: var(--muted);
    transition: color 0.25s var(--ease);
}
.nav__links a:hover,
.nav__links a.is-active {
    color: var(--cream);
}

/* Mobile toggle */
.nav__toggle {
    display: none;
    width: 44px;
    height: 44px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 6px;
}
.nav__toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--cream);
    transition: transform 0.35s var(--ease), opacity 0.2s;
}
.nav__toggle.is-open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav__toggle.is-open span:nth-child(2) { opacity: 0; }
.nav__toggle.is-open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* Mobile drawer */
.mobile-menu {
    position: fixed;
    inset: 0;
    background: var(--ink);
    z-index: 99;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2rem;
}
.mobile-menu.is-open { display: flex; }
.mobile-menu a {
    font-family: var(--display);
    font-size: clamp(2rem, 7vw, 3rem);
    font-weight: 700;
    color: var(--cream);
    letter-spacing: -0.02em;
    transition: color 0.25s var(--ease);
}
.mobile-menu a:hover { color: var(--indigo); }

/* ===========================
   HERO
   =========================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    overflow: hidden;
    padding-top: 6rem;
    padding-bottom: 4rem;
}
.hero__glow {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 900px;
    height: 900px;
    transform: translate(-50%, -50%);
    background: radial-gradient(
        circle,
        rgba(99, 102, 241, 0.10) 0%,
        rgba(129, 140, 248, 0.05) 40%,
        transparent 70%
    );
    pointer-events: none;
    z-index: 0;
}
.hero__content {
    position: relative;
    z-index: 1;
    max-width: 720px;
    margin: 0 auto;
    padding: 0 var(--gutter);
}
.hero h1 {
    margin-bottom: 1.2rem;
}
.hero__sub {
    font-size: clamp(1.05rem, 1.6vw, 1.2rem);
    font-weight: 300;
    line-height: 1.65;
    color: var(--muted);
    max-width: 52ch;
    margin: 0 auto 2.4rem;
}
.hero__ctas {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ===========================
   METRICS BAR
   =========================== */
.metrics {
    padding: 3.5rem 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    background: var(--surface);
}
.metrics__inner {
    display: flex;
    justify-content: center;
    gap: clamp(2rem, 6vw, 5rem);
    flex-wrap: wrap;
}
.metric {
    text-align: center;
}
.metric__num {
    font-family: var(--display);
    font-weight: 700;
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    letter-spacing: -0.02em;
    color: var(--cream);
    line-height: 1.1;
}
.metric__label {
    font-family: var(--mono);
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--muted);
    margin-top: 0.4rem;
}

/* ===========================
   FEATURE ROWS
   =========================== */
.features {
    background: var(--ink);
}
.feature-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(2.5rem, 5vw, 5rem);
    align-items: center;
    padding: 4rem 0;
}
.feature-row + .feature-row {
    border-top: 1px solid var(--line);
}
.feature-row--flip .feature-text { order: 2; }
.feature-row--flip .feature-mock { order: 1; }

.feature-text h2 {
    font-size: clamp(1.15rem, 2vw, 1.4rem);
    margin-bottom: 0.5rem;
}
.feature-text .label {
    margin-bottom: 1rem;
    display: block;
}
.feature-text p {
    color: var(--muted);
    font-weight: 300;
    font-size: 0.97rem;
    line-height: 1.75;
}
.feature-text p + p {
    margin-top: 0.9rem;
}

/* Mock UI blocks (no images) */
.feature-mock {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 2rem 1.8rem;
    min-height: 280px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.mock-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 1.2rem;
}
.mock-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--indigo);
    opacity: 0.6;
}
.mock-dot:nth-child(2) { opacity: 0.4; }
.mock-dot:nth-child(3) { opacity: 0.25; }
.mock-title {
    font-family: var(--mono);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--muted);
    margin-left: auto;
}
.mock-row {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.6rem 0;
    border-bottom: 1px solid rgba(240, 240, 245, 0.05);
}
.mock-row:last-child { border-bottom: none; }
.mock-bar {
    height: 6px;
    border-radius: 3px;
    background: var(--indigo);
    opacity: 0.5;
}
.mock-label {
    font-family: var(--mono);
    font-size: 0.68rem;
    color: var(--muted);
    letter-spacing: 0.06em;
    white-space: nowrap;
}
.mock-value {
    font-family: var(--mono);
    font-size: 0.72rem;
    color: var(--indigo);
    letter-spacing: 0.04em;
    margin-left: auto;
    white-space: nowrap;
}
.mock-block {
    background: rgba(99, 102, 241, 0.08);
    border: 1px solid rgba(99, 102, 241, 0.15);
    border-radius: 6px;
    padding: 0.8rem 1rem;
    margin-top: 0.5rem;
}
.mock-block .mock-label {
    color: var(--light);
}

/* ===========================
   TRUST STRIP
   =========================== */
.trust {
    padding: 2.8rem 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    background: var(--surface);
}
.trust__inner {
    display: flex;
    justify-content: center;
    gap: clamp(1.5rem, 4vw, 3.5rem);
    flex-wrap: wrap;
}
.trust__item {
    font-family: var(--mono);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--muted);
}
.trust__sep {
    color: var(--indigo);
    opacity: 0.4;
}

/* ===========================
   PAGE HERO (sub pages)
   =========================== */
.page-hero {
    padding-top: 10rem;
    padding-bottom: 4rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.page-hero__glow {
    position: absolute;
    top: 40%;
    left: 50%;
    width: 700px;
    height: 700px;
    transform: translate(-50%, -50%);
    background: radial-gradient(
        circle,
        rgba(99, 102, 241, 0.08) 0%,
        transparent 65%
    );
    pointer-events: none;
}
.page-hero h1 {
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
}
.page-hero p {
    font-size: clamp(1rem, 1.4vw, 1.15rem);
    font-weight: 300;
    color: var(--muted);
    max-width: 50ch;
    margin: 0 auto;
    position: relative;
    z-index: 1;
    line-height: 1.7;
}

/* ===========================
   PRICING TABLE
   =========================== */
.pricing-section {
    background: var(--ink);
}
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 3.5rem;
}
.price-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 2.5rem 2rem;
    display: flex;
    flex-direction: column;
}
.price-card--featured {
    border-color: var(--indigo);
    position: relative;
}
.price-card--featured::before {
    content: 'Most Popular';
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    font-family: var(--mono);
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    background: var(--indigo);
    color: #fff;
    padding: 0.3rem 1rem;
    border-radius: 100px;
    white-space: nowrap;
}
.price-card__name {
    font-family: var(--display);
    font-weight: 700;
    font-size: 1.3rem;
    margin-bottom: 0.3rem;
}
.price-card__desc {
    font-size: 0.85rem;
    color: var(--muted);
    margin-bottom: 1.5rem;
}
.price-card__price {
    font-family: var(--display);
    font-weight: 700;
    font-size: clamp(2.4rem, 4vw, 3rem);
    letter-spacing: -0.03em;
    line-height: 1;
    margin-bottom: 0.3rem;
}
.price-card__period {
    font-size: 0.82rem;
    color: var(--muted);
    margin-bottom: 2rem;
}
.price-card__features {
    flex: 1;
    margin-bottom: 2rem;
}
.price-card__features li {
    padding: 0.45rem 0;
    font-size: 0.9rem;
    color: var(--cream);
    border-bottom: 1px solid rgba(240, 240, 245, 0.05);
    padding-left: 1.4rem;
    position: relative;
}
.price-card__features li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--indigo);
    opacity: 0.5;
}
.price-card--featured .price-card__features li::before {
    opacity: 1;
}
.price-card .btn {
    text-align: center;
    width: 100%;
}

/* ===========================
   FAQ
   =========================== */
.faq {
    margin-top: 4rem;
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
}
.faq__item {
    border-bottom: 1px solid var(--line);
    padding: 1.8rem 0;
}
.faq__item:first-child {
    border-top: 1px solid var(--line);
}
.faq__q {
    font-family: var(--body);
    font-weight: 500;
    font-size: 1.05rem;
    margin-bottom: 0.6rem;
    letter-spacing: 0;
    line-height: 1.4;
}
.faq__a {
    font-size: 0.92rem;
    color: var(--muted);
    font-weight: 300;
    line-height: 1.7;
}

/* ===========================
   DEMO PAGE
   =========================== */
.demo-steps {
    margin-top: 3rem;
    max-width: 600px;
}
.demo-step {
    padding: 1rem 0;
    border-bottom: 1px solid var(--line);
    font-size: 1.05rem;
    font-weight: 300;
    color: var(--cream);
    line-height: 1.6;
}
.demo-step:first-child {
    border-top: 1px solid var(--line);
}
.demo-contact {
    margin-top: 3rem;
}
.demo-contact a {
    font-family: var(--mono);
    font-size: 1rem;
    color: var(--indigo);
    letter-spacing: 0.02em;
    transition: color 0.25s var(--ease);
}
.demo-contact a:hover {
    color: var(--light);
}

/* ===========================
   FOOTER
   =========================== */
.site-footer {
    border-top: 1px solid var(--line);
    padding: 3rem 0 2rem;
    background: var(--ink);
}
.footer__inner {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 2rem;
}
.footer__brand {
    font-family: var(--display);
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: -0.02em;
}
.footer__links {
    display: flex;
    gap: 2rem;
}
.footer__links a {
    font-size: 0.88rem;
    color: var(--muted);
    transition: color 0.25s var(--ease);
}
.footer__links a:hover { color: var(--cream); }
.footer__bottom {
    display: flex;
    justify-content: space-between;
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--line);
    font-size: 0.78rem;
    color: var(--muted);
    flex-wrap: wrap;
    gap: 1rem;
}
.footer__bottom a {
    color: var(--indigo);
    transition: color 0.25s var(--ease);
}
.footer__bottom a:hover { color: var(--light); }

/* ===========================
   REVEAL ANIMATION
   =========================== */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal.is-in {
    opacity: 1;
    transform: translateY(0);
}
.reveal[data-delay="1"] { transition-delay: 0.1s; }
.reveal[data-delay="2"] { transition-delay: 0.2s; }
.reveal[data-delay="3"] { transition-delay: 0.3s; }

@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
    html { scroll-behavior: auto; }
}

/* ===========================
   RESPONSIVE
   =========================== */
@media (max-width: 820px) {
    .nav__links { display: none; }
    .nav__toggle { display: flex; }

    .feature-row {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    .feature-row--flip .feature-text { order: 0; }
    .feature-row--flip .feature-mock { order: 0; }

    .pricing-grid {
        grid-template-columns: 1fr;
        max-width: 420px;
        margin-left: auto;
        margin-right: auto;
    }

    .metrics__inner {
        gap: 2rem;
    }

    .footer__inner {
        flex-direction: column;
    }
    .footer__links {
        flex-direction: column;
        gap: 0.8rem;
    }
}
