/* DeckEngine - Visual Design Language Implementation

   Color Palette:
   - Deep Navy: #1e3a5f (headlines, primary buttons, key text)
   - Bright Blue: #3b82f6 (CTAs, links, interactive elements)
   - Slate: #64748b (body text, secondary content)
   - Dark Slate: #334155 (footer, dark sections)
   - White: #ffffff (primary backgrounds)
   - Off-white: #f8fafc (section backgrounds, cards)
   - Light grey: #e2e8f0 (borders, dividers)
   - Success: #10b981 (checkmarks, positive states)
   - Warning: #f59e0b (caution indicators)
   - Error: #ef4444 (errors, critical alerts)

   Typography:
   - Display/Headlines: Playfair Display (serif) - 600-700
   - Body/UI: Inter (sans-serif) - 400-600
   - Code: JetBrains Mono (monospace) - 400
*/

/* ============================================
   CSS Custom Properties
   ============================================ */
:root {
    /* Primary Palette */
    --navy: #1e3a5f;
    --blue: #3b82f6;
    --blue-hover: #2563eb;
    --slate: #64748b;
    --dark-slate: #334155;

    /* Backgrounds */
    --white: #ffffff;
    --off-white: #f8fafc;
    --light-grey: #e2e8f0;
    --border: #e2e8f0;

    /* Semantic */
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;

    /* Typography */
    --font-display: 'Playfair Display', Georgia, serif;
    --font-body: 'Inter', system-ui, -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', 'Monaco', 'Menlo', monospace;

    /* Spacing (8px grid) */
    --space-1: 0.5rem;   /* 8px */
    --space-2: 1rem;     /* 16px */
    --space-3: 1.5rem;   /* 24px */
    --space-4: 2rem;     /* 32px */
    --space-6: 3rem;     /* 48px */
    --space-8: 4rem;     /* 64px */
    --space-12: 6rem;    /* 96px */
    --space-16: 8rem;    /* 128px */

    /* Sizing */
    --container-max: 1200px;
    --container-narrow: 800px;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);

    /* Border Radius */
    --radius-sm: 4px;
    --radius: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition: 200ms ease;
    --transition-slow: 300ms ease;
}

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

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--slate);
    background: var(--white);
    min-height: 100vh;
}

/* Text shouldn't be pure black - use slate */
h1, h2, h3, h4, h5, h6 {
    color: var(--navy);
    line-height: 1.2;
}

a {
    color: var(--blue);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--blue-hover);
}

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

/* Visually hidden utility - accessible to screen readers */
.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;
}

/* Skip link for keyboard navigation */
.skip-link {
    position: absolute;
    top: -100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.75rem 1.5rem;
    background: var(--navy);
    color: var(--white);
    border-radius: var(--radius);
    font-weight: 500;
    z-index: 1001;
    transition: top 0.2s ease;
}

.skip-link:focus {
    top: var(--space-2);
    outline: 2px solid var(--blue);
    outline-offset: 2px;
}

/* ============================================
   Container
   ============================================ */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--space-3);
}

/* ============================================
   Navigation
   ============================================ */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border);
}

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

.nav-logo {
    display: flex;
    align-items: center;
    gap: var(--space-1);
    color: var(--navy);
    font-weight: 600;
    font-size: 1.25rem;
    text-decoration: none;
}

.nav-logo:hover {
    color: var(--navy);
}

.logo-icon {
    display: flex;
    align-items: center;
    color: var(--blue);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: var(--space-4);
}

.nav-links a {
    color: var(--slate);
    font-size: 0.9375rem;
    font-weight: 500;
    transition: color var(--transition-fast);
}

.nav-links a:hover {
    color: var(--navy);
}

.nav-cta {
    padding: 0.625rem 1.25rem;
    background: var(--blue);
    color: var(--white) !important;
    font-weight: 500;
    font-size: 0.9375rem;
    border-radius: var(--radius);
    transition: background var(--transition-fast);
}

.nav-cta:hover {
    background: var(--blue-hover);
}

/* ============================================
   Buttons
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-1);
    padding: 0.75rem 1.5rem;
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 500;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
}

.btn-primary {
    background: var(--blue);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--blue-hover);
    color: var(--white);
}

.btn-secondary {
    background: var(--white);
    color: var(--navy);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--off-white);
    border-color: #cbd5e1;
    color: var(--navy);
}

.btn-ghost {
    background: transparent;
    color: var(--slate);
    border: none;
}

.btn-ghost:hover {
    color: var(--navy);
    background: var(--off-white);
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.0625rem;
}

.btn-block {
    display: flex;
    width: 100%;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Button spinner */
.btn-spinner {
    display: none;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.btn.loading .btn-text {
    display: none;
}

.btn.loading .btn-spinner {
    display: block;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ============================================
   Hero Section
   ============================================ */
.hero {
    padding-top: calc(72px + var(--space-8));
    padding-bottom: var(--space-6);
    background: linear-gradient(180deg, var(--white) 0%, var(--off-white) 100%);
}

.hero-container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--space-3);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-8);
    align-items: center;
}

.hero-headline {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 700;
    line-height: 1.1;
    color: var(--navy);
    margin-bottom: var(--space-3);
}

.hero-highlight {
    color: var(--blue);
}

.hero-subheadline {
    font-size: 1.25rem;
    color: var(--slate);
    margin-bottom: var(--space-4);
    max-width: 540px;
}

.hero-subheadline code {
    font-family: var(--font-mono);
    font-size: 1.1rem;
    background: var(--off-white);
    padding: 0.125rem 0.375rem;
    border-radius: var(--radius-sm);
    color: var(--navy);
}

.hero-actions {
    display: flex;
    gap: var(--space-2);
    margin-bottom: var(--space-3);
    flex-wrap: wrap;
}

.hero-microcopy {
    font-size: 0.875rem;
    color: var(--slate);
}

/* Hero Demo Visual */
.hero-visual {
    display: flex;
    justify-content: center;
}

.hero-demo {
    width: 100%;
    max-width: 560px;
}

.demo-window {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    overflow: hidden;
    border: 1px solid var(--border);
}

.demo-header {
    display: flex;
    gap: 8px;
    padding: 12px 16px;
    background: var(--off-white);
    border-bottom: 1px solid var(--border);
}

.demo-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--light-grey);
}

.demo-dot:first-child { background: #ff5f57; }
.demo-dot:nth-child(2) { background: #ffbd2e; }
.demo-dot:nth-child(3) { background: #28c840; }

.demo-content {
    padding: var(--space-3);
}

.demo-split {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: var(--space-2);
    align-items: center;
}

.demo-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--slate);
    margin-bottom: var(--space-1);
}

.demo-markdown {
    background: var(--off-white);
    border-radius: var(--radius);
    padding: var(--space-2);
    font-size: 0.75rem;
}

.demo-markdown pre {
    margin: 0;
    background: transparent;
}

.demo-markdown code {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    line-height: 1.5;
    color: var(--dark-slate);
}

.demo-arrow {
    color: var(--slate);
    animation: pulse-right 2s ease-in-out infinite;
}

@keyframes pulse-right {
    0%, 100% { transform: translateX(0); opacity: 0.5; }
    50% { transform: translateX(4px); opacity: 1; }
}

.demo-slide {
    background: transparent;
}

.demo-pptx {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: var(--space-2);
    box-shadow: var(--shadow);
}

.pptx-title {
    font-family: var(--font-display);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--navy);
    margin-bottom: var(--space-1);
    padding-bottom: var(--space-1);
    border-bottom: 2px solid var(--blue);
}

.pptx-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-2);
}

.pptx-col {
    font-size: 0.625rem;
}

.pptx-col-header {
    font-weight: 600;
    font-size: 0.6875rem;
    margin-bottom: 4px;
    padding: 2px 6px;
    border-radius: var(--radius-sm);
}

.pptx-col-green .pptx-col-header {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
}

.pptx-col-amber .pptx-col-header {
    background: rgba(245, 158, 11, 0.1);
    color: #d97706;
}

.pptx-col ul {
    list-style: none;
    padding-left: 0;
}

.pptx-col li {
    color: var(--slate);
    padding-left: 12px;
    position: relative;
    margin-bottom: 2px;
}

.pptx-col li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.4em;
    width: 4px;
    height: 4px;
    background: var(--slate);
    border-radius: 50%;
}

/* Trust Strip */
.trust-strip {
    margin-top: var(--space-6);
    padding-top: var(--space-4);
    border-top: 1px solid var(--border);
}

.trust-container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--space-3);
    display: flex;
    justify-content: center;
    gap: var(--space-6);
    flex-wrap: wrap;
}

.trust-badge {
    display: flex;
    align-items: center;
    gap: var(--space-1);
    color: var(--slate);
    font-size: 0.875rem;
}

.trust-badge svg {
    color: var(--navy);
    opacity: 0.7;
}

/* ============================================
   Sections
   ============================================ */
.section {
    padding: var(--space-12) 0;
}

/* Ensure anchored sections aren't hidden under the fixed nav on deep links */
.section[id] {
    scroll-margin-top: calc(72px + 20px);
}

.section-header {
    text-align: center;
    max-width: var(--container-narrow);
    margin: 0 auto var(--space-8);
}

.section-headline {
    font-family: var(--font-display);
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 600;
    color: var(--navy);
    margin-bottom: var(--space-2);
}

.section-subheadline {
    font-size: 1.125rem;
    color: var(--slate);
}

/* ============================================
   Problem Section
   ============================================ */
.section-problem {
    background: var(--white);
}

.problem-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-4);
}

.problem-card {
    background: var(--off-white);
    border-radius: var(--radius-md);
    padding: var(--space-4);
    border: 1px solid transparent;
    transition: all var(--transition);
}

.problem-card:hover {
    border-color: var(--border);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.problem-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--white);
    border-radius: var(--radius);
    margin-bottom: var(--space-3);
    color: var(--navy);
}

.problem-card h3 {
    font-family: var(--font-body);
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: var(--space-1);
}

.problem-card p {
    font-size: 0.9375rem;
    line-height: 1.6;
}

/* ============================================
   Solution / How It Works Section
   ============================================ */
.section-solution {
    background: var(--off-white);
}

.steps-grid {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: var(--space-2);
}

.step {
    flex: 1;
    max-width: 280px;
    text-align: center;
    padding: var(--space-3);
}

.step-number {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--navy);
    color: var(--white);
    font-weight: 700;
    font-size: 1.125rem;
    border-radius: 50%;
    margin: 0 auto var(--space-3);
}

.step-content h3 {
    font-family: var(--font-body);
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: var(--space-1);
}

.step-content p {
    font-size: 0.9375rem;
    color: var(--slate);
}

.step-visual {
    margin-top: var(--space-3);
}

.step-icon-wrapper {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--white);
    border-radius: var(--radius-lg);
    margin: 0 auto;
    color: var(--navy);
    box-shadow: var(--shadow);
}

.step-icon-primary {
    background: var(--blue);
    color: var(--white);
}

.step-icon-success {
    background: var(--success);
    color: var(--white);
}

.step-connector {
    display: flex;
    align-items: center;
    padding-top: 48px;
    color: var(--light-grey);
}

/* ============================================
   Features Section
   ============================================ */
.section-features {
    background: var(--white);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-4);
}

.feature-card {
    background: var(--off-white);
    border-radius: var(--radius-md);
    padding: var(--space-4);
    border: 1px solid transparent;
    transition: all var(--transition);
    position: relative;
}

.feature-card:hover {
    border-color: var(--border);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.feature-card-primary {
    grid-column: span 2;
    background: linear-gradient(135deg, var(--navy) 0%, #2d4a6f 100%);
    color: var(--white);
}

.feature-card-primary h3 {
    color: var(--white);
}

.feature-card-primary p {
    color: rgba(255, 255, 255, 0.8);
}

.feature-card-primary .feature-icon {
    color: var(--blue);
}

.feature-badge {
    position: absolute;
    top: var(--space-3);
    right: var(--space-3);
    background: var(--blue);
    color: var(--white);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: var(--radius);
}

.feature-icon {
    color: var(--navy);
    margin-bottom: var(--space-3);
}

.feature-card h3 {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: var(--space-1);
}

.feature-card p {
    font-size: 0.9375rem;
    line-height: 1.6;
}

.feature-tag {
    display: inline-block;
    margin-top: var(--space-2);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 8px;
    background: var(--blue);
    color: var(--white);
    border-radius: var(--radius-sm);
}

.feature-tag-soon {
    background: var(--slate);
}

/* ============================================
   Comparison Section
   ============================================ */
.section-compare {
    background: var(--off-white);
}

.compare-table-wrapper {
    overflow-x: auto;
    margin-bottom: var(--space-6);
}

.compare-table {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    border-collapse: collapse;
    background: var(--white);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.compare-table th,
.compare-table td {
    padding: var(--space-2) var(--space-3);
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.compare-table th {
    background: var(--off-white);
    font-weight: 600;
    color: var(--navy);
    font-size: 0.875rem;
}

.compare-table tbody tr:last-child td {
    border-bottom: none;
}

.compare-table tbody tr:nth-child(even) {
    background: var(--off-white);
}

.compare-highlight {
    background: rgba(59, 130, 246, 0.05) !important;
}

.compare-table th.compare-highlight {
    background: rgba(59, 130, 246, 0.1) !important;
    color: var(--blue);
}

.check {
    color: var(--success);
    font-weight: 600;
}

.check::before {
    content: '✓ ';
}

.cross {
    color: var(--slate);
}

.cross::before {
    content: '✗ ';
    color: var(--error);
}

.partial {
    color: var(--warning);
}

.partial::before {
    content: '⚠ ';
}

.compare-quote {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
    font-style: italic;
    position: relative;
}

.compare-quote p {
    font-family: var(--font-display);
    font-size: 1.25rem;
    color: var(--navy);
    line-height: 1.5;
}

.compare-quote::before {
    content: '"';
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    font-family: var(--font-display);
    font-size: 4rem;
    color: var(--blue);
    opacity: 0.2;
    line-height: 1;
}

/* ============================================
   Use Cases Section
   ============================================ */
.section-usecases {
    background: var(--white);
}

.usecases-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-3);
}

.usecase-card {
    background: var(--off-white);
    border-radius: var(--radius-md);
    padding: var(--space-3);
    border: 1px solid transparent;
    transition: all var(--transition);
}

.usecase-card:hover {
    border-color: var(--border);
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}

.usecase-icon {
    color: var(--blue);
    margin-bottom: var(--space-2);
}

.usecase-card h3 {
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: var(--space-1);
}

.usecase-card p {
    font-size: 0.875rem;
    color: var(--slate);
}

/* ============================================
   Generator Section
   ============================================ */
.section-generator {
    background: var(--off-white);
}

.generator-wrapper {
    max-width: 800px;
    margin: 0 auto;
}

.generator-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: var(--space-4);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
}

.generator-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-3);
    flex-wrap: wrap;
    gap: var(--space-2);
}

.generator-header h3 {
    font-family: var(--font-body);
    font-size: 1.125rem;
    font-weight: 600;
}

.generator-options {
    display: flex;
    gap: var(--space-3);
}

/* Toggle switches */
.option-toggle {
    display: flex;
    align-items: center;
    gap: var(--space-1);
    cursor: pointer;
    user-select: none;
}

/* Visually hidden but accessible to screen readers */
.option-toggle input {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.toggle-slider {
    width: 36px;
    height: 20px;
    background: var(--light-grey);
    border-radius: 10px;
    position: relative;
    transition: background var(--transition-fast), outline var(--transition-fast);
    pointer-events: none; /* Allow clicks to pass through to label */
}

.toggle-slider::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    background: var(--white);
    border-radius: 50%;
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition-fast);
}

/* Focus visible styling for keyboard navigation */
.option-toggle input:focus-visible + .toggle-slider {
    outline: 2px solid var(--blue);
    outline-offset: 2px;
}

.option-toggle input:checked + .toggle-slider {
    background: var(--blue);
}

.option-toggle input:checked + .toggle-slider::after {
    transform: translateX(16px);
}

.toggle-label {
    font-size: 0.875rem;
    color: var(--slate);
}

/* Image Library Panel */
.image-library-panel {
    margin-bottom: var(--space-3);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.image-library-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    gap: var(--space-1);
    padding: var(--space-2);
    background: var(--off-white);
    border: none;
    cursor: pointer;
    font-size: 0.875rem;
    color: var(--slate);
    transition: background var(--transition-fast);
}

.image-library-toggle:hover {
    background: var(--light-grey);
}

.image-library-toggle:focus-visible {
    outline: 2px solid var(--blue);
    outline-offset: -2px;
}

.image-library-icon {
    flex-shrink: 0;
}

.image-library-arrow {
    margin-left: auto;
    transition: transform var(--transition-fast);
}

.image-library-toggle[aria-expanded="true"] .image-library-arrow {
    transform: rotate(180deg);
}

.image-library-content {
    padding: var(--space-2);
    background: var(--white);
    border-top: 1px solid var(--border);
}

.image-library-loading {
    text-align: center;
    padding: var(--space-3);
    color: var(--slate);
    font-size: 0.875rem;
}

.image-library-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: var(--space-2);
}

.image-library-category {
    grid-column: 1 / -1;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--slate);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: var(--space-1) 0;
    border-bottom: 1px solid var(--border);
    margin-top: var(--space-2);
}

.image-library-category:first-child {
    margin-top: 0;
}

.image-library-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-1);
    padding: var(--space-1);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
    background: var(--white);
}

.image-library-item:hover {
    border-color: var(--blue);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}

.image-library-item:focus-visible {
    outline: 2px solid var(--blue);
    outline-offset: 2px;
}

.image-library-item img {
    width: 48px;
    height: 48px;
    object-fit: contain;
}

.image-library-item span {
    font-size: 0.625rem;
    color: var(--slate);
    text-align: center;
    word-break: break-word;
    max-width: 100%;
}

/* Editor */
.generator-editor {
    margin-bottom: var(--space-3);
}

#markdown-input {
    width: 100%;
    min-height: 280px;
    padding: var(--space-2);
    font-family: var(--font-mono);
    font-size: 0.9rem;
    line-height: 1.6;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    resize: vertical;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

#markdown-input:focus {
    outline: none;
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

#markdown-input::placeholder {
    color: #64748b; /* slate-500: WCAG 4.5:1 contrast ratio */
}

.editor-footer {
    display: flex;
    justify-content: flex-end;
    margin-top: var(--space-1);
}

.editor-hint {
    font-size: 0.75rem;
    color: var(--slate);
    display: flex;
    align-items: center;
    gap: 4px;
}

kbd {
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    background: var(--off-white);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 2px 6px;
    box-shadow: 0 1px 0 var(--border);
}

.generator-actions {
    display: flex;
    gap: var(--space-2);
    align-items: center;
    flex-wrap: wrap;
}

/* ============================================
   Pricing Section
   ============================================ */
.section-pricing {
    background: var(--white);
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-3);
    margin-bottom: var(--space-4);
}

.pricing-card {
    background: var(--off-white);
    border-radius: var(--radius-lg);
    padding: var(--space-4);
    border: 1px solid var(--border);
    position: relative;
    transition: all var(--transition);
}

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

.pricing-card-featured {
    background: var(--white);
    border-color: var(--blue);
    box-shadow: var(--shadow-lg);
}

.pricing-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--blue);
    color: var(--white);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: var(--radius);
    white-space: nowrap;
}

.pricing-header {
    text-align: center;
    margin-bottom: var(--space-3);
    padding-bottom: var(--space-3);
    border-bottom: 1px solid var(--border);
}

.pricing-header h3 {
    font-family: var(--font-body);
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: var(--space-1);
}

.pricing-price {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 2px;
}

.price-amount {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--navy);
}

.price-period {
    font-size: 0.9375rem;
    color: var(--slate);
}

.pricing-desc {
    font-size: 0.875rem;
    color: var(--slate);
    margin-top: var(--space-1);
}

.pricing-features {
    list-style: none;
    margin-bottom: var(--space-4);
}

.pricing-features li {
    display: flex;
    align-items: center;
    gap: var(--space-1);
    padding: var(--space-1) 0;
    font-size: 0.9375rem;
}

.pricing-features .check-icon::before {
    content: '✓';
    color: var(--success);
    font-weight: 700;
}

.pricing-features .muted {
    color: var(--slate);
    opacity: 0.7;
}

.tag-soon {
    font-size: 0.625rem;
    font-weight: 600;
    background: var(--slate);
    color: var(--white);
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    margin-left: 4px;
}

.pricing-footer {
    text-align: center;
    font-size: 0.875rem;
    color: var(--slate);
}

/* ============================================
   FAQ Section
   ============================================ */
.section-faq {
    background: var(--off-white);
}

.faq-grid {
    max-width: var(--container-narrow);
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.faq-item {
    background: var(--white);
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    overflow: hidden;
}

.faq-item summary {
    padding: var(--space-3);
    font-weight: 600;
    color: var(--navy);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    list-style: none;
}

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

.faq-item summary::after {
    content: '+';
    font-size: 1.25rem;
    font-weight: 400;
    color: var(--slate);
    transition: transform var(--transition-fast);
}

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

.faq-item[open] summary {
    border-bottom: 1px solid var(--border);
}

.faq-content {
    padding: var(--space-3);
}

.faq-content p {
    font-size: 0.9375rem;
    line-height: 1.7;
}

/* ============================================
   Final CTA Section
   ============================================ */
.section-final-cta {
    background: linear-gradient(135deg, var(--navy) 0%, #2d4a6f 100%);
    color: var(--white);
    padding: var(--space-12) 0;
}

.final-cta-content {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.section-final-cta .section-headline {
    color: var(--white);
    margin-bottom: var(--space-2);
}

.final-cta-text {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: var(--space-4);
}

.final-cta-actions {
    margin-bottom: var(--space-3);
}

.section-final-cta .btn-primary {
    background: var(--white);
    color: var(--navy);
}

.section-final-cta .btn-primary:hover {
    background: var(--off-white);
}

.final-cta-note {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.6);
}

/* ============================================
   Footer
   ============================================ */
.footer {
    background: var(--navy);
    color: var(--light-grey);
    padding: var(--space-8) 0 var(--space-4);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 3fr;
    gap: var(--space-8);
    margin-bottom: var(--space-6);
    padding-bottom: var(--space-6);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: var(--space-1);
    color: var(--white);
    font-weight: 600;
    font-size: 1.125rem;
    text-decoration: none;
    margin-bottom: var(--space-2);
}

.footer-logo:hover {
    color: var(--white);
}

.footer-tagline {
    font-size: 0.875rem;
    color: #cbd5e1; /* Lighter color for WCAG AA contrast on dark background */
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-4);
}

.footer-col h4 {
    color: var(--white);
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: var(--space-2);
}

.footer-col ul {
    list-style: none;
}

.footer-col li {
    margin-bottom: var(--space-1);
}

.footer-col a {
    color: #cbd5e1; /* Lighter color for WCAG AA contrast on dark background */
    font-size: 0.875rem;
    transition: color var(--transition-fast);
}

.footer-col a:hover {
    color: var(--white);
}

/* Placeholder footer links (not yet linked) */
.footer-link-placeholder {
    color: #64748b; /* slate-500: WCAG 4.5:1 contrast ratio */
    font-size: 0.875rem;
    cursor: default;
}

.footer-bottom {
    text-align: center;
    font-size: 0.875rem;
    color: #cbd5e1; /* Lighter color for WCAG AA contrast on dark background */
}

/* ============================================
   Loading Overlay
   ============================================ */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(4px);
}

.loading-overlay.hidden {
    display: none;
}

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

.loading-spinner {
    width: 48px;
    height: 48px;
    border: 3px solid var(--border);
    border-top-color: var(--blue);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto var(--space-2);
}

.loading-content p {
    color: var(--slate);
    font-size: 0.9375rem;
}

/* ============================================
   Animations
   ============================================ */
[data-animate] {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

[data-animate="fade-in"] {
    transform: none;
}

[data-animate].animated {
    opacity: 1;
    transform: none;
}

/* Delay variants */
[data-delay="50"] { transition-delay: 50ms; }
[data-delay="75"] { transition-delay: 75ms; }
[data-delay="100"] { transition-delay: 100ms; }
[data-delay="150"] { transition-delay: 150ms; }
[data-delay="200"] { transition-delay: 200ms; }
[data-delay="250"] { transition-delay: 250ms; }
[data-delay="300"] { transition-delay: 300ms; }
[data-delay="350"] { transition-delay: 350ms; }
[data-delay="400"] { transition-delay: 400ms; }

/* ============================================
   Reduced Motion
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }

    [data-animate] {
        opacity: 1;
        transform: none;
    }
}

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

/* Tablets */
@media (max-width: 1024px) {
    .hero-container {
        grid-template-columns: 1fr;
        gap: var(--space-6);
    }

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

    .hero-subheadline {
        max-width: none;
    }

    .hero-actions {
        justify-content: center;
    }

    .hero-visual {
        order: -1;
    }

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

    .feature-card-primary {
        grid-column: span 2;
    }

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

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

    .footer-grid {
        grid-template-columns: 1fr;
        gap: var(--space-6);
    }
}

/* Mobile */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .hero-headline {
        font-size: 2rem;
    }

    .hero-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .hero-actions .btn {
        width: 100%;
    }

    .demo-split {
        grid-template-columns: 1fr;
        gap: var(--space-3);
    }

    .demo-arrow {
        transform: rotate(90deg);
        justify-self: center;
    }

    .trust-container {
        flex-direction: column;
        gap: var(--space-2);
        align-items: center;
    }

    .problem-grid {
        grid-template-columns: 1fr;
    }

    .steps-grid {
        flex-direction: column;
        align-items: center;
    }

    .step-connector {
        transform: rotate(90deg);
        padding: 0;
        margin: var(--space-1) 0;
    }

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

    .feature-card-primary {
        grid-column: span 1;
    }

    .usecases-grid {
        grid-template-columns: 1fr;
    }

    .pricing-grid {
        grid-template-columns: 1fr;
    }

    .generator-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .generator-options {
        flex-direction: column;
        gap: var(--space-2);
    }

    .generator-actions {
        flex-direction: column;
    }

    .generator-actions .btn {
        width: 100%;
    }

    .image-library-grid {
        grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
    }

    .section {
        padding: var(--space-8) 0;
    }

    .section-headline {
        font-size: 1.5rem;
    }

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

/* Small mobile */
@media (max-width: 480px) {
    .container {
        padding: 0 var(--space-2);
    }

    .section-header {
        margin-bottom: var(--space-6);
    }

    .compare-table {
        font-size: 0.875rem;
    }

    .compare-table th,
    .compare-table td {
        padding: var(--space-1) var(--space-2);
    }

    .footer-links {
        grid-template-columns: 1fr;
        gap: var(--space-3);
    }
}

/* ============================================
   Examples Dropdown
   ============================================ */
.example-dropdown {
    position: relative;
    display: inline-block;
}

#example-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
}

.example-arrow {
    transition: transform var(--transition-fast);
}

#example-btn[aria-expanded="true"] .example-arrow {
    transform: rotate(180deg);
}

.example-menu {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 100;
    min-width: 180px;
    margin-top: 4px;
    padding: 4px 0;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    list-style: none;
}

.example-menu[hidden] {
    display: none;
}

.example-menu li {
    padding: 0;
}

.example-menu button {
    display: block;
    width: 100%;
    padding: 10px 16px;
    font-family: var(--font-mono);
    font-size: 0.875rem;
    color: var(--slate);
    text-align: left;
    background: none;
    border: none;
    cursor: pointer;
    transition: background var(--transition-fast), color var(--transition-fast);
}

.example-menu button:hover,
.example-menu button:focus {
    background: var(--off-white);
    color: var(--navy);
    outline: none;
}

.example-menu button:focus-visible {
    box-shadow: inset 0 0 0 2px var(--blue);
}

/* Mobile: full-width dropdown */
@media (max-width: 640px) {
    .example-dropdown {
        width: 100%;
    }

    #example-btn {
        width: 100%;
        justify-content: center;
    }

    .example-menu {
        width: 100%;
        left: 0;
        right: 0;
    }
}

/* ============================================
   Notifications
   ============================================ */
.notification {
    position: fixed;
    top: 88px;
    right: 24px;
    padding: 16px 48px 16px 20px;
    border-radius: 8px;
    font-size: 0.9375rem;
    font-weight: 500;
    z-index: 200;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    animation: slideIn 0.3s ease;
    max-width: 400px;
}

.notification-success {
    background: var(--success);
    color: white;
}

.notification-error {
    background: var(--error);
    color: white;
}

.notification-warning {
    background: var(--warning);
    color: white;
}

.notification-info {
    background: var(--blue);
    color: white;
}

.notification-close {
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: inherit;
    font-size: 1.25rem;
    cursor: pointer;
    opacity: 0.8;
    padding: 4px 8px;
}

.notification-close:hover {
    opacity: 1;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}
