/* ============================================================
   TaskFlow — Landing Page Stylesheet
   Modern SaaS gradient design system, token-driven, mobile-first.
   ============================================================ */

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--nav-height) + 8px);
}

body {
    font-family: var(--font-sans);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text);
    background: var(--light);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    transition: background-color .45s ease, color .45s ease;
}

img, svg { display: block; max-width: 100%; }

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

ul { list-style: none; }

button {
    font-family: inherit;
    font-size: inherit;
    background: none;
    border: none;
    cursor: pointer;
}

/* ---------- 2. Design Tokens ---------- */
:root {
    /* Brand */
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --secondary: #8b5cf6;
    --accent: #d946ef;
    --cyan: #22d3ee;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;

    /* Neutrals */
    --dark: #0f172a;
    --light: #f8fafc;
    --gray: #64748b;
    --text: #0f172a;
    --text-muted: #64748b;
    --border: rgba(100, 116, 139, .18);
    --white-glass: rgba(255, 255, 255, .72);
    --white-glass-strong: rgba(255, 255, 255, .88);

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    --gradient-hero: linear-gradient(135deg, #312e81 0%, #4f46e5 45%, #7c3aed 100%);
    --gradient-text: linear-gradient(90deg, #c7d2fe, #a5b4fc, #e9d5ff);

    /* Shadows */
    --shadow-sm: 0 2px 12px rgba(2, 6, 23, .06);
    --shadow-md: 0 10px 30px rgba(2, 6, 23, .10);
    --shadow-lg: 0 24px 60px rgba(2, 6, 23, .16);

    /* Radii */
    --radius-sm: 10px;
    --radius: 16px;
    --radius-lg: 24px;

    /* Layout */
    --container: 1200px;
    --nav-height: 72px;
    --section-pad: clamp(4rem, 9vw, 6.5rem);
    --transition: .25s ease;

    /* Type */
    --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
}

/* ---------- 3. Typography ---------- */
h1, h2, h3, h4 {
    line-height: 1.15;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text);
}

h1 { font-size: clamp(2.5rem, 6vw, 4rem); letter-spacing: -0.03em; }
h2 { font-size: clamp(1.9rem, 4vw, 2.75rem); }
h3 { font-size: 1.15rem; }

p { color: var(--text-muted); }

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

/* ---------- 4. Layout & Utilities ---------- */
.container {
    width: min(100% - 2rem, var(--container));
    margin-inline: auto;
    position: relative;
    z-index: 1;
}

.section {
    padding-block: var(--section-pad);
    position: relative;
}

.section-header {
    text-align: center;
    max-width: 640px;
    margin: 0 auto clamp(2.5rem, 6vw, 4rem);
}

.section-header p {
    margin-top: 1rem;
    font-size: 1.05rem;
}

.section-badge {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .4rem 1rem;
    border-radius: 999px;
    background: var(--gradient-primary);
    color: #fff;
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    box-shadow: 0 4px 18px rgba(99, 102, 241, .35);
}

.section-badge.light {
    background: var(--white-glass-strong);
    color: var(--primary-dark);
    box-shadow: none;
}

.glass {
    background: var(--white-glass);
    backdrop-filter: blur(14px) saturate(1.3);
    -webkit-backdrop-filter: blur(14px) saturate(1.3);
    border: 1px solid rgba(255, 255, 255, .5);
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

/* ---------- 5. Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .6rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    padding: .75rem 1.4rem;
    border: 1px solid transparent;
    transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
}

.btn-lg { padding: .95rem 1.8rem; font-size: 1.05rem; }
.btn-block { width: 100%; }

.btn-primary {
    background: var(--gradient-primary);
    color: #fff;
    box-shadow: 0 8px 24px rgba(99, 102, 241, .35);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 34px rgba(99, 102, 241, .45);
}

.btn-light {
    background: #fff;
    color: var(--primary-dark);
    box-shadow: 0 8px 24px rgba(2, 6, 23, .18);
}

.btn-light:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 34px rgba(2, 6, 23, .28);
}

.btn-ghost {
    background: rgba(255, 255, 255, .1);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, .35);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.btn-ghost:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, .18);
}

.btn-google {
    width: 100%;
    background: #fff;
    color: var(--text);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    font-weight: 600;
}

.btn-google:hover {
    border-color: rgba(99, 102, 241, .5);
    box-shadow: var(--shadow-md);
}

.btn-nav {
    padding: .55rem 1.2rem;
    font-size: .9rem;
}

/* ---------- 6. Animations ---------- */
@keyframes blob-drift {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33%      { transform: translate(40px, -30px) scale(1.08); }
    66%      { transform: translate(-30px, 20px) scale(.95); }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-12px); }
}

@keyframes modal-in {
    from { opacity: 0; transform: translateY(18px) scale(.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes icon-pop {
    0%   { transform: rotate(-120deg) scale(.4); opacity: 0; }
    60%  { transform: rotate(10deg) scale(1.1); }
    100% { transform: rotate(0deg) scale(1); opacity: 1; }
}

/* Scroll reveal */
.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity .7s ease var(--reveal-delay, 0s), transform .7s ease var(--reveal-delay, 0s);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ---------- 7. Navbar ---------- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 900;
    height: var(--nav-height);
    display: flex;
    align-items: center;
    background: rgba(248, 250, 252, .8);
    backdrop-filter: blur(14px) saturate(1.3);
    -webkit-backdrop-filter: blur(14px) saturate(1.3);
    border-bottom: 1px solid transparent;
    transition: box-shadow var(--transition), background var(--transition);
}

.navbar.scrolled {
    background: rgba(248, 250, 252, .95);
    box-shadow: var(--shadow-md);
    border-bottom-color: var(--border);
}

.nav-container {
    width: min(100% - 2rem, var(--container));
    margin-inline: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    position: relative;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text);
}

.logo i {
    color: var(--primary);
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-links {
    display: none;
    flex-direction: column;
    gap: .25rem;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    padding: 1rem;
    background: var(--light);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-md);
}

.nav-links.open {
    display: flex;
}

.nav-links > a {
    padding: .65rem .9rem;
    border-radius: var(--radius-sm);
    font-weight: 500;
    color: var(--text);
    transition: color var(--transition), background var(--transition);
}

.nav-links > a:hover {
    color: var(--primary-dark);
    background: rgba(99, 102, 241, .08);
}

.nav-links > a.active {
    color: var(--primary-dark);
    font-weight: 600;
}

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

.nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin-left: auto;
    font-size: 1.25rem;
    color: var(--text);
    border-radius: var(--radius-sm);
    transition: background var(--transition);
}

.nav-toggle:hover {
    background: rgba(99, 102, 241, .1);
}

.theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    color: var(--text);
    background: var(--white-glass);
    border: 1px solid var(--border);
    font-size: 1rem;
    transition: color var(--transition), background var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.theme-toggle:hover {
    color: var(--primary);
    border-color: rgba(99, 102, 241, .5);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, .12);
}

.theme-toggle i {
    display: inline-block;
    line-height: 1;
}

.theme-toggle i.icon-pop {
    animation: icon-pop .55s cubic-bezier(.34, 1.56, .64, 1);
}

/* ---------- 8. Hero ---------- */
.hero {
    position: relative;
    overflow: hidden;
    background: var(--gradient-hero);
    color: #fff;
    padding: calc(var(--nav-height) + clamp(3rem, 8vw, 6rem)) 0 clamp(3.5rem, 8vw, 6rem);
    min-height: 100svh;
    display: flex;
    align-items: center;
}

.hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 50% 120%, rgba(99, 102, 241, .35), transparent 60%);
    pointer-events: none;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(70px);
    opacity: .55;
    pointer-events: none;
    z-index: 0;
}

.blob-1 {
    width: 520px;
    height: 520px;
    background: radial-gradient(circle at 30% 30%, var(--primary-light), transparent 70%);
    top: -10%;
    left: -8%;
    animation: blob-drift 16s ease-in-out infinite;
}

.blob-2 {
    width: 460px;
    height: 460px;
    background: radial-gradient(circle, var(--accent), transparent 70%);
    bottom: -12%;
    right: -6%;
    animation: blob-drift 19s ease-in-out infinite reverse;
}

.blob-3 {
    width: 360px;
    height: 360px;
    background: radial-gradient(circle, var(--cyan), transparent 70%);
    top: 35%;
    left: 45%;
    animation: blob-drift 22s ease-in-out infinite;
    animation-delay: -8s;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: clamp(2.5rem, 6vw, 4rem);
    align-items: center;
}

.hero-content {
    text-align: center;
}

.hero h1 {
    color: #fff;
    margin-top: 1.4rem;
}

.hero-sub {
    color: rgba(226, 232, 240, .9);
    font-size: clamp(1.05rem, 2vw, 1.25rem);
    max-width: 52ch;
    margin: 1.25rem auto 0;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .5rem 1.1rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, .12);
    border: 1px solid rgba(255, 255, 255, .25);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    font-size: .85rem;
    font-weight: 600;
    color: #e0e7ff;
}

.hero-badge i {
    color: var(--warning);
}

.hero-buttons {
    display: flex;
    flex-direction: column;
    gap: .9rem;
    align-items: center;
    justify-content: center;
    margin-top: 2rem;
}

.hero-stats {
    display: flex;
    flex-direction: column;
    gap: .75rem;
    align-items: center;
    justify-content: center;
    margin-top: 2.5rem;
    padding-top: 1.75rem;
    border-top: 1px solid rgba(255, 255, 255, .18);
}

.stat-item {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    color: #e0e7ff;
    font-size: .9rem;
    font-weight: 500;
}

.stat-item i {
    color: var(--primary-light);
}

/* Hero preview cards */
.task-preview {
    position: relative;
    height: 340px;
    max-width: 460px;
    margin-inline: auto;
}

.preview-card {
    position: absolute;
    width: min(300px, 82%);
    padding: 1.25rem;
    border-radius: var(--radius);
    background: rgba(255, 255, 255, .12);
    backdrop-filter: blur(12px) saturate(1.2);
    -webkit-backdrop-filter: blur(12px) saturate(1.2);
    border: 1px solid rgba(255, 255, 255, .22);
    color: #fff;
    box-shadow: 0 24px 60px rgba(2, 6, 23, .35);
    animation: float 5s ease-in-out infinite;
}

.card-1 { top: 0; left: 0; animation-delay: 0s; }
.card-2 { top: 60px; right: 0; animation-delay: 1.6s; }
.card-3 { top: 210px; left: 15%; animation-delay: 3.1s; }

.card-header {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-size: .85rem;
    font-weight: 600;
    color: #e0e7ff;
    margin-bottom: .8rem;
}

.card-header i { color: var(--success); }
.card-2 .card-header i { color: var(--warning); }

.card-body {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: .9rem;
}

.card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: .8rem;
    color: #cbd5e1;
}

.card-footer i { margin-right: .3rem; }

.priority.high { color: #fda4af; }
.priority.medium { color: #fcd34d; }
.priority.low { color: #86efac; }

/* ---------- 9. How It Works ---------- */
.how-it-works {
    background: var(--light);
}

.steps-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.step {
    position: relative;
    text-align: center;
    padding: 2rem 1.75rem;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition), box-shadow var(--transition);
}

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

.step-number {
    position: absolute;
    top: 1.25rem;
    right: 1.5rem;
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: rgba(99, 102, 241, .12);
}

.step-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: #fff;
    background: var(--gradient-primary);
    border-radius: 18px;
    box-shadow: 0 8px 20px rgba(99, 102, 241, .35);
}

.step p {
    margin-top: .6rem;
    font-size: .95rem;
}

/* ---------- 10. Features ---------- */
.features {
    background: linear-gradient(180deg, #eef2ff 0%, var(--light) 100%);
}

.features-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.feature-card {
    padding: 2rem;
    background: var(--white-glass);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.feature-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(99, 102, 241, .4);
}

.feature-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: #fff;
    background: var(--gradient-primary);
    border-radius: 18px;
    margin-bottom: 1.25rem;
    box-shadow: 0 8px 20px rgba(99, 102, 241, .35);
}

.feature-card h3 { margin-bottom: .6rem; }
.feature-card p { font-size: .95rem; }

/* ---------- 11. About ---------- */
.about {
    background: linear-gradient(135deg, #312e81 0%, #4f46e5 55%, #6d28d9 100%);
}

.about .section-badge.light { background: rgba(255, 255, 255, .14); color: #e0e7ff; }
.about h2 { color: #fff; }
.about .about-text > p { color: #c7d2fe; }

.about-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    align-items: center;
}

.about-text h2 { margin: 1.25rem 0 1rem; }

.about-list {
    margin-top: 1.75rem;
    display: grid;
    gap: .9rem;
}

.about-list li {
    display: flex;
    align-items: center;
    gap: .7rem;
    color: #e0e7ff;
    font-weight: 500;
}

.about-list i { color: var(--success); }

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

.stat-card {
    text-align: center;
    padding: 1.75rem 1rem;
    background: rgba(255, 255, 255, .1);
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: var(--radius);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: transform var(--transition), background var(--transition);
}

.stat-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, .16);
}

.stat-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto .9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: #fff;
    background: rgba(255, 255, 255, .18);
    border-radius: 14px;
}

.stat-number {
    font-size: 1.6rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.02em;
}

.stat-label {
    font-size: .8rem;
    color: #c7d2fe;
    margin-top: .25rem;
}

/* ---------- 12. Testimonials ---------- */
.testimonials {
    background: var(--light);
}

.testimonials-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.testimonial-card {
    position: relative;
    padding: 2rem;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.testimonial-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(99, 102, 241, .4);
}

.quote-icon {
    position: absolute;
    top: 1.75rem;
    right: 1.75rem;
    font-size: 1.6rem;
    color: rgba(99, 102, 241, .18);
}

.stars {
    display: flex;
    gap: .2rem;
    color: var(--warning);
    margin-bottom: 1.1rem;
    font-size: .9rem;
}

.quote {
    font-size: 1rem;
    line-height: 1.65;
    color: var(--text);
    margin-bottom: 1.5rem;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: .9rem;
}

.avatar {
    width: 46px;
    height: 46px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .9rem;
    font-weight: 700;
    color: #fff;
    background: var(--gradient-primary);
    border-radius: 50%;
}

.author-name {
    font-weight: 600;
    color: var(--text);
}

.author-role {
    font-size: .85rem;
    color: var(--text-muted);
}

/* ---------- 13. FAQ ---------- */
.faq {
    background: linear-gradient(180deg, #eef2ff 0%, var(--light) 100%);
}

.faq-list {
    display: grid;
    gap: 1rem;
    max-width: 760px;
    margin-inline: auto;
}

.faq-item {
    background: var(--white-glass);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: box-shadow var(--transition), border-color var(--transition);
}

.faq-item[open] {
    box-shadow: var(--shadow-md);
    border-color: rgba(99, 102, 241, .35);
}

.faq-item summary {
    list-style: none;
    cursor: pointer;
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    font-weight: 600;
    color: var(--text);
}

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

.faq-item summary:hover { color: var(--primary-dark); }

.faq-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    flex-shrink: 0;
    border-radius: 50%;
    background: rgba(99, 102, 241, .1);
    color: var(--primary);
    font-size: .85rem;
    transition: transform .3s ease, background .3s ease;
}

.faq-item[open] .faq-icon {
    transform: rotate(45deg);
    background: var(--primary);
    color: #fff;
}

.faq-answer {
    padding: 0 1.5rem 1.4rem;
}

.faq-answer p {
    font-size: .95rem;
}

/* ---------- 14. CTA ---------- */
.cta {
    background: var(--light);
    padding-top: 0;
}

.cta-card {
    position: relative;
    overflow: hidden;
    text-align: center;
    padding: clamp(3rem, 7vw, 4.5rem) 2rem;
    background: var(--gradient-primary);
    border-radius: var(--radius-lg);
    box-shadow: 0 30px 70px rgba(99, 102, 241, .4);
}

.cta-card h2 { color: #fff; }
.cta-card p { color: #e0e7ff; margin: 1rem auto 2rem; max-width: 46ch; }

.cta-card .blob {
    filter: blur(60px);
    opacity: .4;
}

.blob-4 {
    width: 320px;
    height: 320px;
    background: radial-gradient(circle, var(--accent), transparent 70%);
    top: -20%;
    left: -10%;
}

.blob-5 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, var(--cyan), transparent 70%);
    bottom: -25%;
    right: -8%;
}

/* ---------- 15. Footer ---------- */
.footer {
    background: var(--dark);
    color: #94a3b8;
    padding: var(--section-pad) 0 2rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-bottom: 2.5rem;
}

.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    font-size: 1.3rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: .75rem;
}

.footer-logo i { color: var(--primary-light); }

.footer-section h4 {
    color: #fff;
    font-size: .95rem;
    margin-bottom: 1rem;
}

.footer-section a,
.footer-section p {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin-bottom: .6rem;
    font-size: .9rem;
    color: #94a3b8;
    transition: color var(--transition);
}

.footer-section a:hover { color: var(--primary-light); }
.footer-section i { font-size: .75rem; color: var(--primary-light); }

.footer-cta {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    font-size: .9rem;
    color: #94a3b8;
    transition: color var(--transition);
}

.footer-cta:hover { color: var(--primary-light); }

.footer-bottom {
    border-top: 1px solid rgba(148, 163, 184, .15);
    padding-top: 1.5rem;
    text-align: center;
    font-size: .85rem;
}

/* ---------- 16. Modals & Forms ---------- */
.modal {
    position: fixed;
    inset: 0;
    display: none;
    background: rgba(15, 23, 42, .55);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 1000;
    overflow-y: auto;
}

.modal-content {
    margin: clamp(1rem, 4vh, 3rem) auto;
    width: min(94%, 430px);
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 30px 80px rgba(2, 6, 23, .35);
    animation: modal-in .3s ease;
    position: relative;
    padding: 2.25rem 2rem 2rem;
}

.modal .close {
    position: absolute;
    top: 1rem;
    right: 1.1rem;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    color: var(--text-muted);
    border-radius: 50%;
    background: var(--light);
    line-height: 1;
    transition: background var(--transition), color var(--transition);
}

.modal .close:hover {
    background: rgba(99, 102, 241, .12);
    color: var(--primary-dark);
}

.modal-header {
    text-align: center;
    margin-bottom: 1.75rem;
}

.modal-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    color: #fff;
    background: var(--gradient-primary);
    border-radius: 18px;
    box-shadow: 0 8px 20px rgba(99, 102, 241, .35);
}

.modal-header h2 { font-size: 1.5rem; }
.modal-header p { font-size: .9rem; margin-top: .4rem; }

.modal-body {
    display: grid;
    gap: 1.1rem;
}

.field { display: grid; gap: .35rem; }

.input-wrap { position: relative; }

.input-wrap input {
    width: 100%;
    padding: .85rem 1rem .85rem 2.6rem;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--light);
    font-size: .95rem;
    font-family: inherit;
    color: var(--text);
    transition: border-color var(--transition), box-shadow var(--transition);
}

.input-wrap input::placeholder { color: var(--text-muted); }

.input-wrap input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, .15);
}

.input-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray);
    font-size: .9rem;
    pointer-events: none;
}

.password-toggle {
    position: absolute;
    right: .6rem;
    top: 50%;
    transform: translateY(-50%);
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray);
    border-radius: 8px;
    transition: color var(--transition), background var(--transition);
}

.password-toggle:hover {
    color: var(--primary-dark);
    background: rgba(99, 102, 241, .08);
}

.input-error {
    border-color: var(--danger) !important;
    box-shadow: 0 0 0 4px rgba(239, 68, 68, .12) !important;
}

.error-msg {
    color: var(--danger);
    font-size: .8rem;
    min-height: 1rem;
}

.form-error {
    color: var(--danger);
    font-size: .85rem;
    text-align: center;
}

.divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--text-muted);
    font-size: .8rem;
    margin: .25rem 0;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

.switch-auth {
    text-align: center;
    font-size: .9rem;
    margin-top: .25rem;
}

.switch-auth a {
    color: var(--primary);
    font-weight: 600;
}

.switch-auth a:hover { text-decoration: underline; }

/* ---------- 17. Responsive (mobile-first) ---------- */
@media (min-width: 640px) {
    .hero-buttons {
        flex-direction: row;
    }

    .hero-stats {
        flex-direction: row;
        gap: 2.5rem;
    }

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

@media (min-width: 768px) {
    .nav-links {
        display: flex;
        flex-direction: row;
        align-items: center;
        margin-left: auto;
        gap: .4rem;
        position: static;
        padding: 0;
        background: transparent;
        border: none;
        box-shadow: none;
    }

    .nav-links > a {
        padding: .55rem .85rem;
    }

    .nav-links .btn-nav {
        margin-top: 0;
        margin-left: .6rem;
    }

    .nav-toggle {
        display: none;
    }

    .hero-grid {
        grid-template-columns: 1.05fr .95fr;
    }

    .hero-content {
        text-align: left;
    }

    .hero-sub {
        margin-inline: 0;
    }

    .hero-buttons {
        justify-content: flex-start;
    }

    .hero-stats {
        justify-content: flex-start;
    }

    .steps-grid {
        grid-template-columns: repeat(3, 1fr);
        position: relative;
    }

    .steps-grid::before {
        content: '';
        position: absolute;
        top: 96px;
        left: 12%;
        right: 12%;
        height: 2px;
        background: linear-gradient(90deg, rgba(99, 102, 241, 0), rgba(99, 102, 241, .35), rgba(99, 102, 241, 0));
    }

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

    .about-content {
        grid-template-columns: 1.05fr .95fr;
        gap: 3.5rem;
    }

    .footer-content {
        grid-template-columns: 1.4fr 1fr 1fr 1fr;
        gap: 2.5rem;
    }
}

@media (min-width: 1024px) {
    .features-grid,
    .testimonials-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ---------- 18. Dark Mode ---------- */
body.dark-mode {
    color-scheme: dark;
    --dark: #020617;
    --light: #0f172a;
    --text: #f1f5f9;
    --text-muted: #94a3b8;
    --gray: #94a3b8;
    --border: rgba(148, 163, 184, .22);
    --white-glass: rgba(30, 41, 59, .72);
    --white-glass-strong: rgba(30, 41, 59, .92);
    --shadow-sm: 0 2px 12px rgba(0, 0, 0, .35);
    --shadow-md: 0 10px 30px rgba(0, 0, 0, .45);
    --shadow-lg: 0 24px 60px rgba(0, 0, 0, .55);
}

/* Navbar */
body.dark-mode .navbar { background: rgba(15, 23, 42, .8); }
body.dark-mode .navbar.scrolled { background: rgba(15, 23, 42, .95); }

body.dark-mode .nav-links > a:hover,
body.dark-mode .nav-links > a.active { color: var(--primary-light); }

/* Gradient section backdrops */
body.dark-mode .features,
body.dark-mode .faq {
    background: linear-gradient(180deg, #1e1b4b 0%, #0f172a 100%);
}

/* Solid white cards */
body.dark-mode .step,
body.dark-mode .testimonial-card {
    background: #1e293b;
}

body.dark-mode .step-number { color: rgba(129, 140, 248, .18); }

/* Buttons that were solid white */
body.dark-mode .btn-light { background: #e0e7ff; }

body.dark-mode .btn-google {
    background: #1e293b;
}

body.dark-mode .btn-google:hover { border-color: rgba(129, 140, 248, .6); }

/* Modals & forms */
body.dark-mode .modal-content { background: #1e293b; }

body.dark-mode .modal .close:hover {
    background: rgba(129, 140, 248, .14);
    color: var(--primary-light);
}

body.dark-mode .faq-item summary:hover,
body.dark-mode .password-toggle:hover { color: var(--primary-light); }

/* Theme toggle (dark state) */
body.dark-mode .theme-toggle:hover {
    color: var(--primary-light);
    border-color: rgba(129, 140, 248, .5);
    box-shadow: 0 0 0 4px rgba(129, 140, 248, .14);
}

/* Animated theme switch — View Transitions API cross-fade */
::view-transition-old(root),
::view-transition-new(root) {
    animation-duration: .45s;
    animation-timing-function: ease;
}

/* ---------- 19. Accessibility ---------- */
:focus-visible {
    outline: 3px solid var(--primary);
    outline-offset: 2px;
    border-radius: 4px;
}

@media (prefers-contrast: high) {
    .hero, .about, .cta-card {
        background: var(--dark);
    }

    .glass, .feature-card, .testimonial-card, .faq-item, .step {
        background: #fff;
    }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
        scroll-behavior: auto !important;
    }

    .blob, .preview-card {
        animation: none;
    }

    .reveal {
        opacity: 1;
        transform: none;
    }
}
