* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
    --bg: #0a0a0a;
    --surface: #141414;
    --border: #222;
    --text: #e5e5e5;
    --muted: #888;
    --accent: #2563eb;
    --accent-hover: #1d4ed8;
    --link: #60a5fa;
    --green: #22c55e;
    --yellow: #eab308;
    --red: #ef4444;
}
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
}
a { color: var(--link); text-decoration: underline; }
a.btn, nav a, .footer a { text-decoration: none; }
a:hover { color: var(--accent); }

/* Nav */
nav {
    display: flex; justify-content: space-between; align-items: center;
    gap: 1rem;
    max-width: 1100px; margin: 0 auto; padding: 1.5rem 2rem;
    position: relative;
}
.logo { font-size: 1.2rem; font-weight: 700; color: var(--text); }
.logo span { color: var(--link); }
nav .links { display: flex; flex-wrap: wrap; justify-content: flex-end;
    gap: 0.6rem 0.85rem; align-items: center; }
nav .links a { color: var(--muted); font-size: 0.9rem; white-space: nowrap; }
nav .links a:hover { color: var(--text); }
/* Hamburger toggle — hidden at desktop, shown at mobile */
.menu-toggle {
    display: none; background: transparent; border: 1px solid var(--border);
    color: var(--text); font-size: 1.4rem; line-height: 1; padding: 0.45rem 0.7rem;
    border-radius: 6px; cursor: pointer; touch-action: manipulation;
}
.menu-toggle:hover { border-color: var(--link); color: var(--link); }
.menu-toggle:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }

/* Hero */
.hero {
    max-width: 1100px; margin: 0 auto; padding: 4rem 2rem 2rem;
    text-align: center;
}
.badge {
    display: inline-block; padding: 0.3rem 0.8rem; border-radius: 20px;
    background: rgba(96,165,250,0.1); color: var(--link);
    font-size: 0.8rem; font-weight: 500; margin-bottom: 1.5rem;
    border: 1px solid rgba(96,165,250,0.2);
}
h1 {
    font-size: 3.2rem; font-weight: 800; line-height: 1.15;
    letter-spacing: -0.03em; margin-bottom: 1.2rem;
}
h1 .highlight { color: var(--link); }
.subtitle {
    font-size: 1.15rem; color: var(--muted); max-width: 600px;
    margin: 0 auto 2rem;
}
.cta-group { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.btn {
    display: inline-block; padding: 0.75rem 1.8rem; border-radius: 8px;
    font-weight: 600; font-size: 0.95rem; transition: all 0.2s;
    cursor: pointer; border: none;
}
.btn-primary {
    background: var(--accent); color: #fff;
}
.btn-primary:hover { background: var(--accent-hover); color: #fff; }
a.btn-primary { color: #fff; }
a.btn-primary:hover { color: #fff; }
.btn-secondary {
    background: var(--surface); color: var(--text);
    border: 1px solid var(--border);
}
.btn-secondary:hover { border-color: var(--muted); }

/* Live Demo */
.demo {
    max-width: 1100px; margin: 3rem auto; padding: 0 2rem;
}
.demo-box {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: 12px; overflow: hidden;
}
.demo-header {
    display: flex; align-items: center; gap: 0.8rem;
    padding: 1rem 1.5rem; border-bottom: 1px solid var(--border);
}
.demo-header input {
    flex: 1; padding: 0.6rem 1rem; background: var(--bg);
    border: 1px solid var(--border); border-radius: 6px;
    color: var(--text); font-size: 0.9rem; outline: none;
}
.demo-header input:focus { border-color: var(--accent); }
.demo-header button {
    padding: 0.6rem 1.2rem; background: var(--accent); color: #fff;
    border: none; border-radius: 6px; font-weight: 600; cursor: pointer;
    font-size: 0.9rem;
}
.demo-header button:hover { background: var(--accent-hover); }
.demo-header button:disabled { opacity: 0.5; cursor: not-allowed; }
.demo-result {
    padding: 1.5rem; min-height: 200px;
    font-family: 'SF Mono', 'Fira Code', monospace; font-size: 0.85rem;
}
.demo-placeholder { color: var(--muted); text-align: center; padding: 3rem 0; }
.score-display {
    display: flex; align-items: center; gap: 2rem; margin-bottom: 1.5rem;
    flex-wrap: wrap;
}
.score-circle {
    width: 110px; height: 110px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.35rem; font-weight: 800; flex-shrink: 0;
}
.score-a { border: 3px solid var(--green); color: var(--green); }
.score-b { border: 3px solid var(--yellow); color: var(--yellow); }
.score-c { border: 3px solid var(--yellow); color: var(--yellow); }
.score-d { border: 3px solid var(--red); color: var(--red); }
.score-f { border: 3px solid var(--red); color: var(--red); }
.score-meta { flex: 1; }
.score-meta h3 { font-size: 1.1rem; margin-bottom: 0.3rem; }
.score-meta p { color: var(--muted); font-size: 0.9rem; font-family: -apple-system, system-ui, sans-serif; }
.priorities { list-style: none; }
.priorities li {
    padding: 0.6rem 0; border-bottom: 1px solid var(--border);
    display: flex; gap: 0.8rem; align-items: flex-start;
    font-family: -apple-system, system-ui, sans-serif; font-size: 0.9rem;
}
.priorities li:last-child { border-bottom: none; }
.sev {
    padding: 0.15rem 0.5rem; border-radius: 4px; font-size: 0.75rem;
    font-weight: 600; flex-shrink: 0;
}
.sev-high { background: rgba(239,68,68,0.15); color: var(--red); }
.sev-medium { background: rgba(234,179,8,0.15); color: var(--yellow); }

/* Features */
.features {
    max-width: 1100px; margin: 4rem auto; padding: 0 2rem;
}
.features h2 {
    text-align: center; font-size: 2rem; margin-bottom: 0.5rem;
}
.features .sub {
    text-align: center; color: var(--muted); margin-bottom: 2.5rem;
}
.feature-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
    gap: 1.5rem;
}
.feature-card {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: 10px; padding: 1.5rem;
}
.feature-card .icon { font-size: 1.5rem; margin-bottom: 0.8rem; }
.feature-card h3, .feature-card .feature-title { font-size: 1rem; margin-bottom: 0.4rem; font-weight: 700; }
.feature-card p { color: var(--muted); font-size: 0.9rem; }

/* Pricing */
.pricing {
    max-width: 1100px; margin: 4rem auto; padding: 0 2rem;
}
.pricing h2 { text-align: center; font-size: 2rem; margin-bottom: 0.5rem; }
.pricing .sub { text-align: center; color: var(--muted); margin-bottom: 2.5rem; }
.pricing-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
    gap: 1.5rem;
}
.price-card {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: 10px; padding: 1.8rem; text-align: center;
}
.price-card.featured { border-color: var(--accent); }
.billing-toggle {
    display: flex; justify-content: center; gap: 0.4rem; margin: -1rem auto 2rem;
    flex-wrap: wrap;
}
.billing-toggle button {
    background: var(--surface); color: var(--muted); border: 1px solid var(--border);
    border-radius: 999px; padding: 0.5rem 1.1rem; font-size: 0.9rem; cursor: pointer;
    min-height: 44px; font-family: inherit;
}
.billing-toggle button[aria-pressed="true"] {
    color: var(--text); border-color: var(--accent);
}
.billing-toggle .save { color: var(--green); font-size: 0.8rem; margin-left: 0.3rem; }
.price-card h3, .price-card .plan-name { font-size: 1rem; color: var(--muted); margin-bottom: 0.5rem; }
.price-card .price { font-size: 2.2rem; font-weight: 800; margin-bottom: 0.3rem; }
.price-card .period { color: var(--muted); font-size: 0.85rem; margin-bottom: 1.2rem; }
.price-card ul { list-style: none; text-align: left; margin-bottom: 1.5rem; }
.price-card li {
    padding: 0.3rem 0; font-size: 0.9rem; color: var(--muted);
}
.price-card li::before { content: "✓ "; color: var(--green); }

/* Code Example */
.code-section {
    max-width: 1100px; margin: 4rem auto; padding: 0 2rem;
}
.code-section h2 { text-align: center; font-size: 2rem; margin-bottom: 2rem; }
.code-block {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: 10px; padding: 1.5rem; overflow-x: auto;
    font-family: 'SF Mono', 'Fira Code', monospace; font-size: 0.85rem;
    line-height: 1.8;
}
.code-block .comment { color: #9ca3af; }
.code-block .string { color: #22c55e; }
.code-block .keyword { color: #c084fc; }
.code-block .func { color: #60a5fa; }

/* Footer */
footer {
    max-width: 1100px; margin: 4rem auto 0; padding: 2rem;
    border-top: 1px solid var(--border); text-align: center;
    color: var(--muted); font-size: 0.85rem;
}

/* Signup rows (email, then verification code). `flex:1` on the input alone left
   min-width:auto, so the input refused to shrink below its intrinsic width and
   pushed the button past the right edge — that was the homepage's horizontal
   scroll on mobile. min-width:0 lets it shrink; wrap is the backstop. */
.signup-row { display: flex; flex-wrap: wrap; gap: 0.8rem; }
.signup-row input { flex: 1 1 12rem; min-width: 0; }
.signup-row .btn { flex: 0 0 auto; }
@media (max-width: 480px) {
    /* Too narrow for a useful email field beside a button — stack them. */
    .signup-row input, .signup-row .btn { flex: 1 1 100%; }
}

@media (max-width: 768px) {
    /* Nav: collapse into a dropdown menu triggered by hamburger */
    nav { padding: 1rem; }
    .menu-toggle { display: inline-flex; align-items: center; justify-content: center; }
    nav .links {
        display: none;
        position: absolute; top: calc(100% - 0.25rem); right: 1rem; left: 1rem;
        flex-direction: column; align-items: stretch; gap: 0;
        background: var(--surface); border: 1px solid var(--border);
        border-radius: 10px; padding: 0.4rem 0;
        box-shadow: 0 16px 40px rgba(0,0,0,0.4); z-index: 1000;
    }
    nav .links.open { display: flex; }
    nav .links a {
        padding: 0.85rem 1.1rem; font-size: 0.95rem;
        border-bottom: 1px solid var(--border); color: var(--text);
    }
    nav .links a:last-child { border-bottom: none; }
    nav .links a.btn {
        margin: 0.5rem 1rem 0.4rem; border: none; padding: 0.7rem 1rem;
        text-align: center;
    }

    /* Hero */
    .hero { padding: 2rem 1.2rem; }
    h1 { font-size: 1.75rem; line-height: 1.3; }
    .hero p { font-size: 0.95rem; padding: 0 0.5rem; }

    /* Demo box */
    .demo { padding: 0 1rem; margin: 2rem auto; }
    .demo-header { 
        flex-wrap: wrap; padding: 1rem; gap: 0.6rem;
    }
    .demo-header span { display: none; }
    .demo-header input { 
        width: 100%; flex: none; font-size: 1rem; 
        padding: 0.75rem 1rem;
    }
    .demo-header button { 
        width: 100%; flex: none; padding: 0.75rem; 
        font-size: 1rem;
    }
    .demo-result { padding: 1rem; font-size: 0.8rem; }
    .demo-placeholder { padding: 2rem 0; font-size: 0.9rem; }

    /* Score display */
    .score-display { flex-direction: column; text-align: center; gap: 1rem; }

    /* Grids */
    .pricing-grid { grid-template-columns: 1fr !important; gap: 1rem; padding: 0 1rem; }
    .features-grid { grid-template-columns: 1fr !important; padding: 0 1rem; }

    /* Code examples */
    .code-example { margin: 1.5rem 1rem; }
    .code-example pre { font-size: 0.75rem; overflow-x: auto; }

    /* Sections */
    section { padding: 2.5rem 1.2rem; }

    /* CTA buttons */
    .cta-buttons { flex-direction: column; align-items: center; gap: 0.8rem; }
    .cta-buttons a, .cta-buttons .btn { 
        width: 100%; max-width: 300px; text-align: center; 
        display: block; padding: 0.8rem 1rem;
    }
}
@media (max-width: 380px) {
    h1 { font-size: 1.5rem; }
    nav .links a { font-size: 0.75rem; }
    nav .links .btn.btn-primary { font-size: 0.75rem; padding: 0.4rem 0.8rem; }
}
details.faq { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 1rem 1.2rem; margin-bottom: 0.7rem; }
details.faq summary { cursor: pointer; font-weight: 600; color: var(--text); }
details.faq p { color: var(--muted); margin-top: 0.6rem; line-height: 1.7; }
