/* ==========================================================================
   Design tokens
   ========================================================================== */
:root {
    /* Brand */
    --brand-600: #4f46e5;
    --brand-700: #4338ca;
    --brand-violet: #7c3aed;
    --brand-100: #e0e7ff;
    --brand-200: #c7d2fe;
    --violet-200: #ddd6fe;
    --gradient-brand: linear-gradient(135deg, var(--brand-600) 0%, var(--brand-violet) 100%);

    /* Neutrals */
    --ink-900: #111827;
    --ink-800: #1f2937;
    --ink-700: #374151;
    --ink-600: #4b5563;
    --ink-400: #9ca3af;
    --ink-300: #d1d5db;
    --line: #e5e7eb;
    --surface: #ffffff;
    --surface-muted: #f8fafc;
    --surface-muted-2: #f1f5f9;
    --gradient-muted: linear-gradient(135deg, var(--surface-muted) 0%, var(--surface-muted-2) 100%);

    /* Status */
    --success: #059669;
    --success-bg: #d1fae5;
    --warning: #b45309;
    --warning-bg: #fef3c7;
    --danger: #b91c1c;
    --danger-bg: #fef2f2;

    /* Type */
    --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;

    /* Layout */
    --container: 1200px;
    --gutter: 1.5rem;
    --nav-height: 72px;
    --radius-sm: 0.5rem;
    --radius: 0.75rem;
    --radius-lg: 1rem;
    --shadow-brand: 0 10px 30px rgba(79, 70, 229, 0.18);
    --shadow-card: 0 10px 30px rgba(17, 24, 39, 0.08);
    --ease: 0.25s ease;
}

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

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

body {
    font-family: var(--font-sans);
    line-height: 1.6;
    color: var(--ink-800);
    background: var(--surface);
    overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
ul { list-style: none; }

a { color: var(--brand-600); }

:focus-visible {
    outline: 3px solid var(--brand-600);
    outline-offset: 2px;
    border-radius: 4px;
}

.skip-link {
    position: absolute;
    left: 1rem;
    top: -100px;
    z-index: 100;
    background: var(--ink-900);
    color: #fff;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-weight: 600;
}
.skip-link:focus { top: 1rem; }

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

.container-narrow { max-width: 800px; }

section {
    padding: 5rem 0;
    position: relative;
}

/* Keep anchored headings clear of the fixed navbar */
section[id], main[id] { scroll-margin-top: calc(var(--nav-height) + 1rem); }

h1, h2, h3 { color: var(--ink-800); line-height: 1.2; }

section h2 {
    font-size: clamp(1.875rem, 4vw, 2.5rem);
    margin-bottom: 1rem;
}

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

.section-intro {
    color: var(--ink-600);
    font-size: 1.125rem;
}

/* ==========================================================================
   Buttons (work on both <a> and <button>)
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 44px;
    padding: 0.75rem 1.5rem;
    border: 2px solid transparent;
    border-radius: var(--radius-sm);
    font: inherit;
    font-weight: 600;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: transform var(--ease), box-shadow var(--ease), background-color var(--ease), color var(--ease);
}

.btn-sm { padding: 0.5rem 1.125rem; }
.btn-lg { padding: 1rem 2rem; font-size: 1.0625rem; border-radius: var(--radius); }
.btn-block { display: flex; width: 100%; }

.btn-primary {
    background: var(--gradient-brand);
    color: #fff;
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.25);
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(79, 70, 229, 0.35);
}
.btn-primary:active { transform: translateY(0); }

.btn-secondary,
.btn-outline {
    background: var(--surface);
    color: var(--brand-600);
    border-color: var(--brand-600);
}
.btn-secondary:hover,
.btn-outline:hover {
    background: var(--brand-100);
    transform: translateY(-2px);
}

.btn[disabled],
.btn[aria-busy="true"] {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* ==========================================================================
   Navigation
   ========================================================================== */
.navbar {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 50;
    height: var(--nav-height);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
    transition: box-shadow var(--ease);
}

.navbar.scrolled { box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08); }

.nav-container {
    max-width: var(--container);
    height: 100%;
    margin: 0 auto;
    padding: 0 var(--gutter);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo img { display: block; height: 40px; width: auto; }

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.375rem;
    font-weight: 700;
    text-decoration: none;
}

.gradient-text {
    background: var(--gradient-brand);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: var(--brand-600);
}

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

.nav-links a:not(.btn) {
    color: var(--ink-600);
    text-decoration: none;
    font-weight: 500;
    position: relative;
    transition: color var(--ease);
}

.nav-links a:not(.btn):hover { color: var(--brand-600); }

.nav-links a:not(.btn)::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-brand);
    transition: width var(--ease);
}

.nav-links a:not(.btn):hover::after { width: 100%; }

.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    padding: 10px;
    background: none;
    border: none;
    cursor: pointer;
}

.hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--ink-800);
    border-radius: 2px;
    transition: transform var(--ease), opacity var(--ease);
}

/* 2px bar + 5px gap = 7px offset to the middle bar */
.hamburger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.hamburger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 768px) {
    .hamburger { display: flex; }

    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 0 var(--gutter);
        background: var(--surface);
        box-shadow: 0 8px 16px rgba(0, 0, 0, 0.08);
        max-height: 0;
        overflow: hidden;
        visibility: hidden;
        transition: max-height 0.3s ease, padding 0.3s ease, visibility 0s linear 0.3s;
    }

    .nav-links.open {
        max-height: 480px;
        padding: 0.5rem var(--gutter) 1.25rem;
        visibility: visible;
        transition: max-height 0.3s ease, padding 0.3s ease, visibility 0s;
    }

    .nav-links a:not(.btn) {
        padding: 0.875rem 0;
        border-bottom: 1px solid var(--line);
    }

    .nav-links a:not(.btn)::after { display: none; }

    .nav-links .btn { margin-top: 1rem; }
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
    padding-top: calc(var(--nav-height) + 4rem);
    padding-bottom: 5rem;
    background: var(--gradient-muted);
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -30%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(79, 70, 229, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    gap: 3rem;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-content { animation: fadeInUp 0.7s ease-out both; }

.badge {
    display: inline-block;
    background: var(--brand-100);
    color: var(--brand-700);
    padding: 0.4rem 1rem;
    border-radius: 2rem;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

h1 {
    font-size: clamp(2.25rem, 5.5vw, 3.5rem);
    margin-bottom: 1.25rem;
    letter-spacing: -0.02em;
}

.hero-description {
    font-size: 1.1875rem;
    color: var(--ink-600);
    margin-bottom: 2rem;
}

.button-group {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 3rem;
}

.trust-badges {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    padding-top: 2rem;
    border-top: 1px solid var(--line);
}

.badge-item { display: flex; flex-direction: column; }

.badge-item .number {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--ink-800);
    line-height: 1.2;
}

.badge-item .label {
    color: var(--ink-600);
    font-size: 0.875rem;
}

/* Product mock */
.hero-visual { animation: fadeInUp 0.7s ease-out 0.15s both; }

.mock {
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: 0 30px 60px rgba(79, 70, 229, 0.18), 0 0 0 1px rgba(79, 70, 229, 0.08);
    overflow: hidden;
}

.mock-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0.75rem 1rem;
    background: var(--surface-muted-2);
    border-bottom: 1px solid var(--line);
}

.mock-bar .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--ink-300); }

.mock-url {
    margin-left: 0.75rem;
    font-size: 0.75rem;
    color: var(--ink-600);
    background: var(--surface);
    padding: 0.2rem 0.75rem;
    border-radius: 1rem;
}

.mock-body { padding: 1.5rem; display: grid; gap: 1.25rem; }

.mock-score { display: flex; align-items: center; gap: 1rem; }

.ring {
    --p: 0;
    width: 72px;
    height: 72px;
    flex-shrink: 0;
    border-radius: 50%;
    background: conic-gradient(var(--brand-600) calc(var(--p) * 1%), var(--brand-100) 0);
    display: grid;
    place-items: center;
}

.ring span {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--surface);
    display: grid;
    place-items: center;
    font-weight: 700;
    color: var(--ink-800);
}

.mock-title { font-weight: 700; }
.mock-sub { font-size: 0.875rem; color: var(--ink-600); }

.mock-list { display: grid; gap: 0.625rem; font-size: 0.875rem; color: var(--ink-700); }
.mock-list li { display: flex; align-items: center; gap: 0.75rem; }

.pill {
    flex-shrink: 0;
    min-width: 4rem;
    text-align: center;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.15rem 0.5rem;
    border-radius: 1rem;
}
.pill.ok { background: var(--success-bg); color: var(--success); }
.pill.warn { background: var(--warning-bg); color: var(--warning); }
.pill.todo { background: var(--surface-muted-2); color: var(--ink-600); }

.mock-ai {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    padding: 0.875rem 1rem;
    background: var(--brand-100);
    border-radius: var(--radius);
    font-size: 0.875rem;
    color: var(--brand-700);
}

.mock-ai-tag {
    flex-shrink: 0;
    background: var(--gradient-brand);
    color: #fff;
    font-size: 0.6875rem;
    font-weight: 700;
    padding: 0.15rem 0.45rem;
    border-radius: 0.375rem;
}

@media (max-width: 900px) {
    .hero-grid { grid-template-columns: minmax(0, 1fr); }
    .hero-content { text-align: center; }
    .button-group { justify-content: center; }
    .badge-item { align-items: center; text-align: center; }
    .hero-visual { max-width: 520px; margin: 0 auto; width: 100%; }
}

@media (max-width: 480px) {
    .button-group .btn { width: 100%; }
    .trust-badges { gap: 0.75rem; }
    .badge-item .number { font-size: 1.375rem; }
}

/* ==========================================================================
   Problem
   ========================================================================== */
.problem { background: var(--surface); padding: 4rem 0; }

.problem .section-header,
.solution .section-header { margin-bottom: 2.25rem; }

.problem-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.25rem;
}

.problem-card {
    --tone: var(--danger);
    --tone-bg: var(--danger-bg);
    --tone-border: #fee2e2;
    padding: 1.25rem 1.5rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--tone-border);
    background: var(--tone-bg);
    transition: transform var(--ease), box-shadow var(--ease);
}

.problem-card.tone-amber { --tone: var(--warning); --tone-bg: #fefce8; --tone-border: #fde68a; }
.problem-card.tone-orange { --tone: #c2410c; --tone-bg: #fff7ed; --tone-border: #fed7aa; }

.problem-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-card); }

.problem-head { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.5rem; }

.icon-large {
    width: 2.25rem;
    height: 2.25rem;
    flex-shrink: 0;
    padding: 0.4rem;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.8);
    color: var(--tone);
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.problem-card h3 { font-size: 1.125rem; }
.problem-card p { color: var(--ink-600); font-size: 0.9375rem; }

.stats-strip {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem 2.5rem;
    margin-top: 1.5rem;
    padding: 1rem 1.5rem;
    background: var(--ink-800);
    color: var(--ink-300);
    border-radius: var(--radius);
    font-size: 0.9375rem;
    text-align: center;
}

.stats-strip strong { color: #fff; font-size: 1.125rem; margin-right: 0.375rem; }

@media (max-width: 800px) {
    .problem-grid { grid-template-columns: minmax(0, 1fr); gap: 0.875rem; }
}

/* ==========================================================================
   Solution: three animated cards in a row
   ========================================================================== */
.solution { background: var(--gradient-muted); padding: 4.5rem 0; }

.solution-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.5rem;
}

.solution-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    transition: transform var(--ease), box-shadow var(--ease), border-color var(--ease);
}

.solution-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-brand);
    border-color: var(--brand-200);
}

.solution-card h3 { font-size: 1.25rem; margin: 1.25rem 0.25rem 0.5rem; }
.solution-card p { color: var(--ink-600); font-size: 0.9375rem; margin: 0 0.25rem 0.25rem; }

@media (max-width: 900px) {
    .solution-grid { grid-template-columns: minmax(0, 1fr); max-width: 520px; margin: 0 auto; }
}

/* Shared visual panel */
.viz {
    height: 170px;
    border-radius: var(--radius);
    background: linear-gradient(135deg, var(--brand-100) 0%, #ede9fe 100%);
    padding: 1.25rem;
    font-size: 0.8125rem;
    color: var(--ink-700);
    overflow: hidden;
}

.viz-label { font-weight: 600; color: var(--ink-600); }
.viz-value { font-weight: 700; color: var(--ink-700); white-space: nowrap; }
.viz-value.is-brand { color: var(--brand-700); }

/* 1. Speed: horizontal bars */
.viz-speed { display: flex; flex-direction: column; justify-content: center; gap: 1.25rem; }

.viz-row {
    display: grid;
    grid-template-columns: 5.5rem minmax(0, 1fr) 4.25rem;
    align-items: center;
    gap: 0.625rem;
}

.viz-track { height: 14px; border-radius: 7px; background: rgba(255, 255, 255, 0.7); overflow: hidden; }

.viz-bar {
    display: block;
    height: 100%;
    width: var(--w);
    border-radius: 7px;
    background: var(--gradient-brand);
    transform-origin: left center;
}

.viz-bar.is-muted, .viz-pillar.is-muted { background: var(--ink-300); }

/* 2. Price: vertical pillars */
.viz-price {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    padding-bottom: 0.875rem;
}

.viz-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    gap: 0.375rem;
    min-height: 0;
}

.viz-pillar {
    display: block;
    width: 56px;
    height: var(--h);
    border-radius: 8px 8px 3px 3px;
    background: var(--gradient-brand);
    transform-origin: bottom center;
}

/* 3. AI: evidence score and message */
.viz-ai { display: flex; flex-direction: column; justify-content: center; gap: 0.875rem; }

.ai-doc {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    background: var(--surface);
    border-radius: var(--radius-sm);
    padding: 0.625rem 0.75rem;
    box-shadow: 0 2px 8px rgba(79, 70, 229, 0.08);
}

.ai-file { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

@property --p {
    syntax: '<number>';
    inherits: false;
    initial-value: 0;
}

.ai-score {
    --p: 0;
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    border-radius: 50%;
    background: conic-gradient(var(--success) calc(var(--p) * 1%), var(--success-bg) 0);
    display: grid;
    place-items: center;
}

.ai-score span {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--surface);
    display: grid;
    place-items: center;
    font-weight: 700;
    color: var(--success);
}

.ai-msg {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    min-height: 2.75rem;
    color: var(--brand-700);
}

.ai-tag {
    flex-shrink: 0;
    background: var(--gradient-brand);
    color: #fff;
    font-size: 0.6875rem;
    font-weight: 700;
    padding: 0.15rem 0.45rem;
    border-radius: 0.375rem;
}

.ai-body { position: relative; flex: 1; }

.ai-typing {
    position: absolute;
    left: 0;
    top: 0.4rem;
    display: inline-flex;
    gap: 4px;
    opacity: 0;
}
.ai-typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--brand-600); opacity: 0.4; }

/* --- Animation states (only when JS reveal is active) --- */
.reveal-ready .solution-card:nth-child(2) { transition-delay: 0.12s; }
.reveal-ready .solution-card:nth-child(3) { transition-delay: 0.24s; }

.reveal-ready .solution-card .viz-bar { transform: scaleX(0); transition: transform 1s cubic-bezier(.2, .8, .2, 1); }
.reveal-ready .solution-card .viz-row + .viz-row .viz-bar { transition-delay: 0.45s; }
.reveal-ready .solution-card.is-visible .viz-bar { transform: scaleX(1); }

.reveal-ready .solution-card .viz-pillar { transform: scaleY(0); transition: transform 0.9s cubic-bezier(.2, .8, .2, 1) 0.2s; }
.reveal-ready .solution-card .viz-col + .viz-col .viz-pillar { transition-delay: 0.7s; }
.reveal-ready .solution-card.is-visible .viz-pillar { transform: scaleY(1); }

.reveal-ready .solution-card .viz-col .viz-value { opacity: 0; transition: opacity 0.4s ease 0.9s; }
.reveal-ready .solution-card .viz-col + .viz-col .viz-value { transition-delay: 1.4s; }
.reveal-ready .solution-card.is-visible .viz-col .viz-value { opacity: 1; }

.ai-score { transition: --p 1.4s cubic-bezier(.2, .8, .2, 1) 0.4s; }
.reveal-ready .solution-card .ai-score { --p: 0 !important; }
.reveal-ready .solution-card.is-visible .ai-score { --p: 84 !important; }

.reveal-ready .solution-card .ai-text { opacity: 0; }

.reveal-ready .solution-card.is-visible .ai-typing { animation: typing-show 1.9s linear forwards; }

.reveal-ready .solution-card.is-visible .ai-typing i { animation: typing-dot 0.9s ease-in-out infinite; }
.reveal-ready .solution-card.is-visible .ai-typing i:nth-child(2) { animation-delay: 0.15s; }
.reveal-ready .solution-card.is-visible .ai-typing i:nth-child(3) { animation-delay: 0.3s; }

.reveal-ready .solution-card.is-visible .ai-text { animation: fade-in-text 0.5s ease 1.8s forwards; }

@keyframes typing-dot {
    0%, 100% { opacity: 0.3; transform: translateY(0); }
    50% { opacity: 1; transform: translateY(-3px); }
}

@keyframes typing-show {
    0%, 92% { opacity: 1; }
    100% { opacity: 0; }
}

@keyframes fade-in-text {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   Features
   ========================================================================== */
.features { background: var(--surface); }

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.5rem;
}

.feature-card {
    padding: 1.75rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    transition: transform var(--ease), box-shadow var(--ease), border-color var(--ease);
}

.feature-card:hover {
    box-shadow: var(--shadow-card);
    transform: translateY(-4px);
    border-color: var(--brand-600);
}

.feature-icon {
    width: 2.5rem;
    height: 2.5rem;
    padding: 0.5rem;
    margin-bottom: 1rem;
    color: var(--brand-600);
    background: var(--brand-100);
    border-radius: var(--radius-sm);
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.feature-card h3 { font-size: 1.125rem; margin-bottom: 0.5rem; }
.feature-card p { color: var(--ink-600); font-size: 0.9375rem; }

/* ==========================================================================
   Frameworks
   ========================================================================== */
.frameworks { background: var(--gradient-muted); }

.frameworks-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.5rem;
}

.framework-card {
    padding: 1.75rem;
    border: 2px solid var(--brand-100);
    border-radius: var(--radius-lg);
    background: var(--surface);
    transition: transform var(--ease), box-shadow var(--ease), border-color var(--ease);
}

.framework-card:hover {
    border-color: var(--brand-600);
    box-shadow: var(--shadow-brand);
    transform: translateY(-4px);
}

.framework-card.is-live { border-color: var(--brand-600); }

.framework-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.framework-code {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 3.5rem;
    height: 2.5rem;
    padding: 0 0.625rem;
    border-radius: var(--radius-sm);
    background: var(--gradient-brand);
    color: #fff;
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.status {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.625rem;
    border-radius: 1rem;
    background: var(--surface-muted-2);
    color: var(--ink-600);
}

.status-live { background: var(--success-bg); color: var(--success); }

.framework-card h3 { font-size: 1.25rem; margin-bottom: 0.25rem; }
.framework-card > p { color: var(--ink-600); font-size: 0.9375rem; margin-bottom: 1rem; }

.framework-list { font-size: 0.875rem; }

.framework-list li {
    display: flex;
    gap: 0.5rem;
    padding: 0.25rem 0;
    color: var(--ink-600);
}

.framework-price {
    margin-top: 1rem;
    padding-top: 0.875rem;
    border-top: 1px solid var(--line);
    font-size: 0.9375rem;
    color: var(--ink-600);
}

.framework-price strong { color: var(--brand-700); font-size: 1.125rem; }
.framework-price.is-soon { font-size: 0.875rem; font-weight: 600; color: var(--ink-600); }

.framework-list li::before {
    content: "•";
    color: var(--brand-600);
    font-weight: 700;
}

/* Must follow both grid definitions */
@media (max-width: 960px) {
    .features-grid, .frameworks-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 600px) {
    .features-grid, .frameworks-grid { grid-template-columns: minmax(0, 1fr); }
}

/* ==========================================================================
   Why us: comparison
   ========================================================================== */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.why-us { background: var(--surface); }

.cmp-wrap {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 20px;
    box-shadow: 0 24px 48px rgba(17, 24, 39, 0.08);
    padding: 1.75rem 1.25rem 0.75rem;
}

.cmp-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    table-layout: fixed;
}

.cmp-table th,
.cmp-table td {
    padding: 1rem 0.75rem;
    text-align: center;
    vertical-align: middle;
    white-space: nowrap;
    border-bottom: 1px solid var(--line);
}

.cmp-table tbody tr:last-child > * { border-bottom: none; }

/* Column widths: label column wider, our column slightly wider */
.cmp-table thead td { width: 24%; border-bottom: none; }
.cmp-table thead th.is-us { width: 20%; }

/* Header */
.cmp-table thead th {
    white-space: normal;
    vertical-align: bottom;
    padding-top: 1.5rem;
    padding-bottom: 1.25rem;
    border-bottom: 2px solid var(--line);
}

.cmp-name { display: block; font-size: 1rem; font-weight: 700; color: var(--ink-800); }

.cmp-eg {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--ink-600);
}

/* Row labels */
.cmp-table tbody th {
    text-align: left;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--ink-800);
    padding-left: 0.5rem;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cmp-table tbody tr:hover > * { background: var(--surface-muted); }

/* Our column: a raised, highlighted card running top to bottom */
.cmp-table .is-us {
    position: relative;
    background: #f5f3ff;
    border-left: 2px solid var(--brand-600);
    border-right: 2px solid var(--brand-600);
    border-bottom-color: #e0e7ff;
}

.cmp-table tbody tr:hover > .is-us { background: #ede9fe; }

/* Raised effect: side shadows on every cell of our column, drawn above neighbours */
.cmp-table .is-us {
    z-index: 1;
    box-shadow:
        -14px 0 28px -16px rgba(79, 70, 229, 0.45),
        14px 0 28px -16px rgba(79, 70, 229, 0.45);
}

.cmp-table thead th.is-us {
    box-shadow:
        0 -14px 32px -12px rgba(79, 70, 229, 0.45),
        -14px 0 28px -16px rgba(79, 70, 229, 0.45),
        14px 0 28px -16px rgba(79, 70, 229, 0.45);
}

.cmp-table tbody tr:last-child > .is-us {
    box-shadow:
        0 22px 36px -14px rgba(79, 70, 229, 0.5),
        -14px 0 28px -16px rgba(79, 70, 229, 0.45),
        14px 0 28px -16px rgba(79, 70, 229, 0.45);
}

.cmp-table thead th.is-us {
    background: var(--gradient-brand);
    border: 2px solid var(--brand-600);
    border-bottom: none;
    border-radius: 16px 16px 0 0;
}

.cmp-table thead th.is-us .cmp-name { color: #fff; font-size: 1.125rem; }
.cmp-table thead th.is-us .cmp-eg { color: var(--brand-100); }

.cmp-table tbody tr:last-child > .is-us {
    border-bottom: 2px solid var(--brand-600);
    border-radius: 0 0 16px 16px;
}

.cmp-pill {
    position: absolute;
    top: -0.75rem;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.2rem 0.75rem;
    border-radius: 999px;
    background: var(--success);
    color: #fff;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    box-shadow: 0 4px 10px rgba(5, 150, 105, 0.3);
}

/* Values */
.cmp-val { display: inline-flex; flex-direction: column; align-items: center; gap: 0.125rem; }

.cmp-price { font-size: 1.125rem; font-weight: 700; color: var(--ink-800); }
.cmp-table td.is-us .cmp-price { font-size: 1.5rem; color: var(--brand-700); }
.cmp-sub { font-size: 0.75rem; color: var(--ink-600); }

.cmp-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--ink-700);
}

.cmp-table td.is-us .cmp-badge { font-weight: 700; color: var(--ink-800); }

.cmp-ico {
    display: inline-grid;
    place-items: center;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    font-size: 0.8125rem;
    font-weight: 800;
    flex-shrink: 0;
}

.cmp-badge.yes .cmp-ico { background: var(--success-bg); color: var(--success); }
.cmp-badge.part .cmp-ico { background: var(--warning-bg); color: var(--warning); }
.cmp-badge.no .cmp-ico { background: var(--surface-muted-2); color: var(--ink-400); }

.cmp-table td.is-us .cmp-badge.yes .cmp-ico { background: var(--success); color: #fff; }

/* Collapsed sources */
.cmp-sources {
    margin-top: 1rem;
    font-size: 0.8125rem;
    color: var(--ink-600);
    text-align: center;
}

.cmp-sources summary {
    display: inline-block;
    cursor: pointer;
    color: var(--ink-600);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.cmp-sources[open] { text-align: left; }
.cmp-sources[open] summary { margin-bottom: 0.75rem; }
.cmp-sources p { margin-bottom: 0.5rem; }
.cmp-sources ul { list-style: disc; padding-left: 1.25rem; }
.cmp-sources li { margin-bottom: 0.25rem; }
.cmp-sources a { color: var(--ink-600); }

/* Mid-width: tighten before switching to cards */
@media (max-width: 1100px) {
    .cmp-table th, .cmp-table td { padding-left: 0.5rem; padding-right: 0.5rem; }
    .cmp-badge { font-size: 0.8125rem; }
    .cmp-table tbody th { font-size: 0.875rem; }
}

/* Mobile: one card per row, our value highlighted on top */
@media (max-width: 860px) {
    .cmp-wrap { padding: 0; border: none; box-shadow: none; background: none; }

    .cmp-table, .cmp-table tbody, .cmp-table tr, .cmp-table th, .cmp-table td { display: block; width: 100%; }

    .cmp-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }

    .cmp-table tbody tr {
        margin-bottom: 0.875rem;
        background: var(--surface);
        border: 1px solid var(--line);
        border-radius: 16px;
        overflow: hidden;
        box-shadow: var(--shadow-card);
    }

    .cmp-table tbody tr:hover > * { background: inherit; }

    .cmp-table tbody th {
        padding: 0.875rem 1rem 0.5rem;
        border: none;
        white-space: normal;
        font-size: 0.9375rem;
    }

    .cmp-table tbody td,
    .cmp-table tbody td.is-us {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 1rem;
        padding: 0.625rem 1rem;
        text-align: right;
        border: none;
        border-top: 1px solid var(--line);
        border-radius: 0;
        white-space: normal;
    }

    .cmp-table tbody td::before {
        content: attr(data-col);
        font-size: 0.8125rem;
        font-weight: 600;
        color: var(--ink-600);
        text-align: left;
    }

    .cmp-table tbody td.is-us,
    .cmp-table tbody tr:last-child > td.is-us {
        position: relative;
        margin: 0.25rem 0.5rem 0.5rem;
        width: auto;
        background: #f5f3ff;
        border: 1px solid var(--brand-200);
        border-radius: 12px;
        box-shadow: 0 8px 20px -6px rgba(79, 70, 229, 0.35);
    }

    .cmp-table tbody td.is-us + td { border-top: none; }
    .cmp-table tbody td.is-us::before { color: var(--brand-700); }

    .cmp-val { align-items: flex-end; }
    .cmp-table td.is-us .cmp-price { font-size: 1.25rem; }
}

/* ==========================================================================
   Pricing
   ========================================================================== */
.pricing { background: var(--surface); }

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(290px, 100%), 1fr));
    gap: 2rem;
    align-items: start;
    padding-top: 1rem;
}

.pricing-card {
    position: relative;
    background: var(--surface);
    padding: 2rem;
    border-radius: var(--radius-lg);
    border: 2px solid var(--line);
    transition: transform var(--ease), box-shadow var(--ease);
}

.pricing-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-card);
}

.pricing-card.featured {
    border-color: var(--brand-600);
    box-shadow: 0 20px 40px rgba(79, 70, 229, 0.18);
}

.pricing-card.featured:hover { box-shadow: 0 28px 56px rgba(79, 70, 229, 0.26); }

.pricing-badge {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translate(-50%, -50%);
    white-space: nowrap;
    background: var(--brand-600);
    color: #fff;
    padding: 0.375rem 1rem;
    border-radius: 2rem;
    font-size: 0.8125rem;
    font-weight: 600;
}

.pricing-card h3 { font-size: 1.5rem; margin-bottom: 0.25rem; }

.pricing-desc { color: var(--ink-600); margin-bottom: 1.25rem; }

.price {
    font-size: 2.75rem;
    font-weight: 700;
    color: var(--ink-800);
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.price-period {
    font-size: 1rem;
    font-weight: 500;
    color: var(--ink-600);
    margin-left: 0.25rem;
}

.pricing-card .btn { margin-bottom: 1.75rem; }

.pricing-features li {
    display: flex;
    gap: 0.5rem;
    padding: 0.4rem 0;
    color: var(--ink-700);
    font-size: 0.9375rem;
}

.pricing-features li::before {
    content: "✓";
    color: var(--success);
    font-weight: 700;
    flex-shrink: 0;
}

.pricing-note {
    max-width: 720px;
    margin: 2rem auto 0;
    text-align: center;
    color: var(--ink-600);
    font-size: 0.9375rem;
}

.pricing-note a { font-weight: 600; }

.margin-text {
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--line);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--brand-600);
}

/* ==========================================================================
   FAQ
   ========================================================================== */
.faq { background: var(--gradient-muted); }

.faq-list { display: grid; gap: 1rem; }

.faq details {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    transition: border-color var(--ease);
}

.faq details[open] { border-color: var(--brand-200); }

.faq summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 1.125rem 1.5rem;
    font-weight: 600;
    cursor: pointer;
    list-style: none;
}

.faq summary::-webkit-details-marker { display: none; }

.faq summary::after {
    content: "+";
    flex-shrink: 0;
    font-size: 1.5rem;
    line-height: 1;
    color: var(--brand-600);
    transition: transform var(--ease);
}

.faq details[open] summary::after { transform: rotate(45deg); }

.faq details p { padding: 0 1.5rem 1.25rem; color: var(--ink-600); }

/* ==========================================================================
   About
   ========================================================================== */
.about { background: var(--ink-800); color: #fff; }

.about h2, .about h3 { color: #fff; }
.about .section-intro { color: var(--ink-300); }

.about-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.5rem;
}

@media (max-width: 800px) {
    .about-grid { grid-template-columns: minmax(0, 1fr); max-width: 520px; margin: 0 auto; }
}

.mission-card {
    background: var(--ink-700);
    padding: 2rem;
    border-radius: var(--radius-lg);
    text-align: center;
    transition: transform var(--ease), box-shadow var(--ease);
}

.mission-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.mission-icon {
    width: 3rem;
    height: 3rem;
    margin: 0 auto 1rem;
    color: var(--brand-200);
}

.mission-card h3 { font-size: 1.375rem; margin-bottom: 0.75rem; }
.mission-card p { color: var(--ink-300); }

.about-link {
    display: inline-block;
    margin-top: 1rem;
    color: var(--brand-200);
    font-weight: 600;
    text-decoration: none;
}

.about-link:hover { color: #fff; text-decoration: underline; }
.about-link:focus-visible { outline-color: #fff; }

/* ==========================================================================
   Trial form + final CTA
   ========================================================================== */
.trial-section {
    background: var(--gradient-brand);
    color: #fff;
    overflow: hidden;
}

.trial-section::before {
    content: '';
    position: absolute;
    top: -40%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.12) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.trial-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    position: relative;
    z-index: 1;
}

.trial-copy h2 { color: #fff; font-size: clamp(2rem, 4.5vw, 3rem); }
.trial-copy p { font-size: 1.1875rem; color: var(--brand-100); margin-bottom: 1.25rem; }
.trial-copy .trial-alt { font-size: 1rem; }
.trial-copy a { color: #fff; font-weight: 600; }
.trial-copy a:focus-visible { outline-color: #fff; }

.trial-form {
    background: var(--surface);
    color: var(--ink-800);
    padding: 2rem;
    border-radius: var(--radius-lg);
    box-shadow: 0 30px 60px rgba(17, 24, 39, 0.25);
    display: grid;
    gap: 1.25rem;
}

.form-group { display: flex; flex-direction: column; }

.form-group label {
    font-weight: 600;
    margin-bottom: 0.375rem;
}

.form-group input,
.form-group select {
    min-height: 48px;
    padding: 0.75rem 0.875rem;
    border: 2px solid var(--line);
    border-radius: var(--radius);
    font: inherit;
    color: var(--ink-800);
    background-color: var(--surface);
    transition: border-color var(--ease), box-shadow var(--ease);
}

.form-group input::placeholder { color: #6b7280; }

.form-group select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%234f46e5' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.875rem center;
    background-size: 12px;
    padding-right: 2.5rem;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--brand-600);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.25);
}

.form-group input[aria-invalid="true"],
.form-group select[aria-invalid="true"] { border-color: var(--danger); }

.consent {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    font-size: 0.8125rem;
    color: var(--ink-600);
    line-height: 1.5;
}

.consent input {
    width: 18px;
    height: 18px;
    margin-top: 0.15rem;
    flex-shrink: 0;
    accent-color: var(--brand-600);
}

.consent input[aria-invalid="true"] { outline: 2px solid var(--danger); outline-offset: 2px; }

.trial-card {
    min-width: 0;
    background: var(--surface);
    color: var(--ink-800);
    border-radius: var(--radius-lg);
    box-shadow: 0 30px 60px rgba(17, 24, 39, 0.25);
    text-align: left;
}

.trial-card .trial-form { background: none; box-shadow: none; }

.trial-done { padding: 2rem; display: grid; gap: 1rem; }
.trial-done:focus { outline: none; }

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

@media (max-width: 480px) {
    .form-row { grid-template-columns: 1fr; gap: 1.25rem; }
}

.optional { font-weight: 400; color: var(--ink-600); font-size: 0.875rem; }

.field-hint { margin-top: 0.375rem; font-size: 0.8125rem; color: var(--ink-600); }

/* Honeypot field, hidden from people and assistive tech */
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.verify-title { font-size: 1.375rem; margin-bottom: 0.375rem; }
.verify-text { color: var(--ink-600); }

.verify-actions {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--ink-400);
}

.link-btn {
    background: none;
    border: none;
    padding: 0.25rem;
    font: inherit;
    font-weight: 600;
    color: var(--brand-600);
    text-decoration: underline;
    cursor: pointer;
}

.link-btn[disabled] { color: var(--ink-400); cursor: not-allowed; }

[hidden] { display: none !important; }

.form-status { min-height: 1.5rem; font-size: 0.9375rem; font-weight: 600; text-align: center; }
.form-status.is-success { color: var(--success); }
.form-status.is-error { color: var(--danger); }

@media (max-width: 860px) {
    .trial-grid { grid-template-columns: minmax(0, 1fr); text-align: center; }
    .trial-form { text-align: left; }
}

@media (max-width: 480px) {
    .trial-form { padding: 1.5rem; }
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
    background: var(--ink-900);
    color: var(--ink-400);
    padding: 3rem 0 1.5rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(180px, 100%), 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-brand { margin-bottom: 0.875rem; }
.footer-brand img { display: block; height: 30px; width: auto; }
.footer-tagline { font-size: 0.875rem; }

.footer-heading {
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.footer-col li { margin-bottom: 0.5rem; }

.footer-col a {
    display: inline-block;
    color: var(--ink-400);
    text-decoration: none;
    transition: color var(--ease), transform var(--ease);
}

.footer-col a:hover { color: #fff; transform: translateX(4px); }

.footer-bottom {
    border-top: 1px solid var(--ink-700);
    padding-top: 1.5rem;
    text-align: center;
    font-size: 0.875rem;
}

/* ==========================================================================
   Motion
   ========================================================================== */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Scroll reveal: JS adds .reveal-ready, then .is-visible when in view.
   Without JS nothing is hidden. Opacity-only so hover transforms still work. */
.reveal-ready [data-scroll] {
    opacity: 0;
    transition: opacity 0.6s ease-out;
}

.reveal-ready [data-scroll].is-visible { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }

    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .reveal-ready [data-scroll] { opacity: 1; }
}

/* ==========================================================================
   Document pages (privacy, terms, cookies, security)
   ========================================================================== */
.navbar.is-static { position: sticky; }

.doc { padding: 3rem 0 5rem; }

.doc h1 { font-size: clamp(2rem, 5vw, 2.75rem); margin-bottom: 0.5rem; }

.doc h2 {
    font-size: 1.375rem;
    margin: 2.5rem 0 0.75rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--line);
}

.doc h3 { font-size: 1.0625rem; margin: 1.5rem 0 0.5rem; }

.doc p, .doc li { color: var(--ink-700); }
.doc p + p { margin-top: 0.75rem; }

.doc ul { list-style: disc; padding-left: 1.5rem; margin: 0.5rem 0 0.75rem; }
.doc li { margin-bottom: 0.375rem; }

.doc-meta { color: var(--ink-600); font-size: 0.9375rem; }
.doc-lead { font-size: 1.1875rem; margin-top: 1.5rem; }

.draft-banner {
    background: var(--warning-bg);
    color: var(--warning);
    border: 1px solid #fcd34d;
    border-radius: var(--radius-sm);
    padding: 0.75rem 1rem;
    margin-bottom: 2rem;
    font-size: 0.9375rem;
}

.doc-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
    font-size: 0.9375rem;
}

.doc-table th,
.doc-table td {
    text-align: left;
    vertical-align: top;
    padding: 0.75rem;
    border-bottom: 1px solid var(--line);
}

.doc-table th { background: var(--surface-muted-2); font-weight: 600; }

@media (max-width: 640px) {
    .doc-table, .doc-table tbody, .doc-table tr, .doc-table td { display: block; width: 100%; }
    .doc-table thead { position: absolute; left: -10000px; }
    .doc-table tr { padding: 0.75rem 0; border-bottom: 1px solid var(--line); }
    .doc-table td { border: none; padding: 0.125rem 0; }
    .doc-table td:first-child { font-weight: 600; }
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem 1.5rem;
    margin-bottom: 1.5rem;
}

.footer-links a { color: var(--ink-400); text-decoration: none; }
.footer-links a:hover { color: #fff; }
