/**
 * Æj Æj Legal - Nordic Warmth Design System
 * A distinctive blend of Scandinavian warmth and legal authority
 * Avoiding generic "AI slop" aesthetics with intentional design choices
 */

/* =============================================================================
   WEB FONTS - Distinctive Typography
   ============================================================================= */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,100..900;1,9..144,100..900&family=DM+Sans:ital,opsz,wght@0,9..40,100..1000;1,9..40,100..1000&display=swap');

/* =============================================================================
   DESIGN TOKENS - Nordic Warmth Palette
   ============================================================================= */

:root {
    /* Core Palette - Warm Earth Tones */
    --cream: #FAF7F2;
    --cream-dark: #F0EBE3;
    --parchment: #E8E0D5;
    --ink: #1A1A1A;
    --ink-soft: #2D2D2D;
    --ink-muted: #4A4A4A;

    /* Accent Colors - Organic & Warm */
    --terracotta: #C4704B;
    --terracotta-light: #D4886A;
    --terracotta-dark: #A85A38;

    /* Brand Colors - Logo Palette */
    --maroon: #5C2028;
    --maroon-light: #7A3038;
    --amber: #D4A84B;
    --amber-light: #E8C678;
    --amber-glow: rgba(212, 168, 75, 0.15);
    --sage: #7A9E7E;
    --sage-light: #A5C4A9;
    --sage-dark: #5B7F5F;

    /* Semantic Colors */
    --success: #5D8A61;
    --error: #C45B5B;
    --info: #5B7F9E;
    --warning: var(--amber);

    /* Surface Layers */
    --surface-base: var(--cream);
    --surface-elevated: #FFFFFF;
    --surface-sunken: var(--cream-dark);
    --surface-overlay: rgba(26, 26, 26, 0.03);

    /* Typography */
    --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
    --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    /* Fluid Typography Scale */
    --text-xs: clamp(0.7rem, 0.65rem + 0.25vw, 0.8rem);
    --text-sm: clamp(0.8rem, 0.75rem + 0.25vw, 0.9rem);
    --text-base: clamp(0.95rem, 0.9rem + 0.25vw, 1.05rem);
    --text-lg: clamp(1.1rem, 1rem + 0.5vw, 1.25rem);
    --text-xl: clamp(1.25rem, 1.1rem + 0.75vw, 1.5rem);
    --text-2xl: clamp(1.5rem, 1.25rem + 1.25vw, 2rem);
    --text-3xl: clamp(1.875rem, 1.5rem + 1.875vw, 2.5rem);
    --text-4xl: clamp(2.25rem, 1.75rem + 2.5vw, 3.25rem);
    --text-5xl: clamp(2.75rem, 2rem + 3.75vw, 4.5rem);
    --text-6xl: clamp(3.5rem, 2.5rem + 5vw, 6rem);

    /* Spacing */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.5rem;
    --space-6: 2rem;
    --space-8: 3rem;
    --space-10: 4rem;
    --space-12: 6rem;
    --space-16: 8rem;
    --space-20: 10rem;

    /* Border Radius - Organic shapes */
    --radius-sm: 6px;
    --radius: 12px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-xl: 32px;
    --radius-blob: 60% 40% 50% 50% / 50% 60% 40% 50%;

    /* Shadows - Warm & Soft */
    --shadow-sm:
        0 1px 2px rgba(26, 26, 26, 0.04),
        0 2px 4px rgba(26, 26, 26, 0.02);
    --shadow:
        0 4px 6px rgba(26, 26, 26, 0.05),
        0 8px 15px rgba(26, 26, 26, 0.03);
    --shadow-md:
        0 8px 20px rgba(26, 26, 26, 0.06),
        0 16px 30px rgba(26, 26, 26, 0.04);
    --shadow-lg:
        0 12px 28px rgba(26, 26, 26, 0.08),
        0 24px 50px rgba(26, 26, 26, 0.05);
    --shadow-xl:
        0 20px 40px rgba(26, 26, 26, 0.1),
        0 30px 60px rgba(26, 26, 26, 0.06);
    --shadow-glow: 0 0 40px var(--amber-glow);
    --shadow-inset: inset 0 2px 4px rgba(26, 26, 26, 0.04);

    /* Transitions */
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-out-back: cubic-bezier(0.34, 1.56, 0.64, 1);
    --ease-spring: cubic-bezier(0.175, 0.885, 0.32, 1.275);

    /* Container Widths */
    --container-wide: 1400px;
    --container: 1200px;
    --container-narrow: 800px;
}

/* =============================================================================
   ANIMATIONS
   ============================================================================= */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes blob {
    0%, 100% {
        border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    }
    50% {
        border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%;
    }
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(2deg); }
}

@keyframes pulse-soft {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.05); }
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

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

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes typingBounce {
    0%, 60%, 100% { transform: translateY(0); }
    30% { transform: translateY(-8px); }
}

/* =============================================================================
   RESET & BASE STYLES
   ============================================================================= */

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

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

body {
    font-family: var(--font-body);
    font-size: var(--text-base);
    line-height: 1.7;
    color: var(--ink);
    background: var(--cream);
    overflow-x: hidden;
}

/* Selection styling */
::selection {
    background: var(--amber-light);
    color: var(--ink);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 500;
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: var(--ink);
}

a {
    color: var(--terracotta);
    text-decoration: none;
    transition: color 0.3s var(--ease-out-expo);
}

a:hover {
    color: var(--terracotta-dark);
}

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

ul, ol {
    list-style: none;
}

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

/* =============================================================================
   LAYOUT CONTAINERS
   ============================================================================= */

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

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

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

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

.bg-light {
    background: var(--surface-sunken);
}

.bg-dark {
    background: var(--ink);
    color: var(--cream);
}

.bg-accent {
    background: var(--terracotta);
    color: var(--cream);
}

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

/* =============================================================================
   NAVIGATION - Floating Glass Style
   ============================================================================= */

.navbar {
    position: fixed;
    top: var(--space-4);
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - var(--space-8));
    max-width: var(--container-wide);
    z-index: 1000;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: var(--radius-xl);
    border: 1px solid rgba(26, 26, 26, 0.06);
    box-shadow: var(--shadow-md);
    padding: var(--space-3) var(--space-5);
    animation: fadeInUp 0.8s var(--ease-out-expo);
}

.navbar .container-wide {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0;
    max-width: none;
}

.nav-brand a {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    font-family: var(--font-display);
    font-weight: 600;
    font-size: var(--text-xl);
    color: var(--ink);
    text-decoration: none;
}

.logo-img {
    height: 44px;
    width: auto;
}

.logo-text {
    color: var(--maroon);
    font-weight: 600;
    font-style: italic;
    letter-spacing: -0.02em;
}

/* Logo with icon - for when we add the scales */
.logo-icon {
    color: var(--terracotta);
    margin-left: var(--space-2);
}

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

.nav-menu a {
    font-weight: 500;
    color: var(--ink-muted);
    font-size: var(--text-sm);
    position: relative;
    padding: var(--space-2) 0;
    transition: color 0.3s var(--ease-out-expo);
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--terracotta);
    transition: width 0.3s var(--ease-out-expo);
}

.nav-menu a:hover {
    color: var(--ink);
}

.nav-menu a:hover::after {
    width: 100%;
}

.nav-login {
    display: inline-flex !important;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-4) !important;
    background: var(--cream-dark);
    border-radius: var(--radius);
    font-weight: 500;
    transition: all 0.3s var(--ease-out-expo);
}

.nav-login:hover {
    background: var(--amber-glow);
    color: var(--ink) !important;
}

.nav-login::after {
    display: none !important;
}

.nav-phone {
    background: var(--terracotta) !important;
    color: var(--cream) !important;
    padding: var(--space-2) var(--space-5) !important;
    border-radius: var(--radius);
    font-weight: 600;
    transition: all 0.3s var(--ease-out-expo);
}

.nav-phone:hover {
    background: var(--terracotta-dark) !important;
    transform: translateY(-2px);
}

.nav-phone::after {
    display: none !important;
}

/* Mobile login icon - always visible on mobile next to hamburger */
.mobile-login-icon {
    display: none;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    color: var(--terracotta);
    border-radius: 50%;
    background: rgba(193, 127, 89, 0.1);
    transition: all 0.2s ease;
    margin-right: var(--space-1);
}

.mobile-login-icon:hover {
    background: rgba(193, 127, 89, 0.2);
}

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

.mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: var(--space-2);
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 1001;
}

.mobile-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--ink);
    border-radius: 2px;
    transition: all 0.3s var(--ease-out-expo);
}

/* Mobile menu hamburger animation */
.mobile-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile menu overlay - full screen */
.nav-menu.mobile-open {
    display: flex !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background: rgba(250, 247, 242, 0.98) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    gap: var(--space-6) !important;
    z-index: 9999 !important;
    animation: fadeIn 0.3s ease;
    padding: var(--space-8) !important;
}

.nav-menu.mobile-open a {
    font-size: var(--text-2xl) !important;
    font-family: var(--font-display) !important;
    color: var(--ink) !important;
    text-decoration: none !important;
    padding: var(--space-3) var(--space-6) !important;
    border-radius: var(--radius-md) !important;
    transition: all 0.2s ease !important;
    display: flex !important;
    align-items: center !important;
    gap: var(--space-2) !important;
}

.nav-menu.mobile-open a:hover,
.nav-menu.mobile-open a:active {
    background: var(--terracotta) !important;
    color: white !important;
}

.nav-menu.mobile-open .nav-login {
    margin-top: var(--space-4) !important;
    padding: var(--space-4) var(--space-8) !important;
    background: var(--terracotta) !important;
    color: white !important;
    border-radius: var(--radius-lg) !important;
    font-size: var(--text-xl) !important;
}

.nav-menu.mobile-open .nav-login:hover {
    background: var(--terracotta-dark) !important;
}

/* Hide login icon inside menu on mobile overlay */
.nav-menu.mobile-open .nav-login svg {
    display: none;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* =============================================================================
   HERO SECTION - Organic & Warm
   ============================================================================= */

.hero-modern {
    min-height: 100vh;
    padding: calc(var(--space-20) + 80px) 0 var(--space-16);
    background: var(--cream);
    position: relative;
    overflow: hidden;
}

/* Gradient mesh background */
.hero-modern::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 80%;
    height: 120%;
    background: radial-gradient(ellipse at center, var(--amber-glow) 0%, transparent 70%);
    animation: float 20s ease-in-out infinite;
    pointer-events: none;
}

.hero-modern::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 60%;
    height: 80%;
    background: radial-gradient(ellipse at center, rgba(122, 158, 126, 0.1) 0%, transparent 70%);
    animation: float 25s ease-in-out infinite reverse;
    pointer-events: none;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: var(--space-12);
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-content {
    animation: fadeInUp 1s var(--ease-out-expo);
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    background: var(--surface-elevated);
    padding: var(--space-2) var(--space-4);
    border-radius: 999px;
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--ink-muted);
    margin-bottom: var(--space-6);
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(26, 26, 26, 0.04);
}

.badge-dot {
    width: 8px;
    height: 8px;
    background: var(--sage);
    border-radius: 50%;
    animation: pulse-soft 2s infinite;
}

.hero-title {
    font-size: var(--text-6xl);
    font-weight: 400;
    line-height: 1.05;
    color: var(--ink);
    margin-bottom: var(--space-6);
    letter-spacing: -0.03em;
}

.hero-title .highlight {
    color: var(--terracotta);
    font-style: italic;
}

.hero-lead {
    font-size: var(--text-xl);
    line-height: 1.8;
    color: var(--ink-muted);
    margin-bottom: var(--space-8);
    max-width: 520px;
}

/* Info Tiles Grid */
.info-tiles-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-4);
    margin-bottom: var(--space-8);
}

.info-tile {
    background: var(--surface-elevated);
    border: 1px solid rgba(26, 26, 26, 0.04);
    border-radius: var(--radius-lg);
    padding: var(--space-5);
    display: flex;
    align-items: flex-start;
    gap: var(--space-4);
    transition: all 0.4s var(--ease-out-expo);
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.info-tile::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--amber-light), transparent);
    opacity: 0;
    transition: opacity 0.4s var(--ease-out-expo);
}

.info-tile:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: rgba(212, 168, 75, 0.2);
}

.info-tile:hover::before {
    opacity: 1;
}

.info-tile-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--amber-glow);
    border-radius: var(--radius);
    color: var(--terracotta);
}

.info-tile-content h4 {
    font-family: var(--font-display);
    font-size: var(--text-base);
    font-weight: 500;
    color: var(--ink);
    margin-bottom: var(--space-1);
}

.info-tile-content p {
    font-size: var(--text-sm);
    color: var(--ink-muted);
}

.info-tile-highlight {
    background: linear-gradient(135deg, var(--terracotta) 0%, var(--terracotta-light) 100%);
    border: none;
    color: var(--cream);
}

.info-tile-highlight .info-tile-icon {
    background: rgba(255, 255, 255, 0.2);
    color: var(--cream);
}

.info-tile-highlight .info-tile-content h4,
.info-tile-highlight .info-tile-content p {
    color: var(--cream);
}

.info-tile-highlight .info-tile-content p {
    opacity: 0.9;
}

.hero-trust {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-6);
    margin-bottom: var(--space-8);
}

.trust-item {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--text-sm);
    color: var(--ink-muted);
}

.trust-item svg {
    color: var(--sage);
}

.cta-row {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.cta-note {
    font-size: var(--text-sm);
    color: var(--ink-muted);
    font-style: italic;
}

/* =============================================================================
   HERO CENTERED (Chat Layout)
   ============================================================================= */

.hero-centered {
    min-height: 100vh;
    padding: 80px 0 var(--space-6);
    background: var(--cream);
    display: flex;
    align-items: center;
    position: relative;
    overflow: visible;
    box-sizing: border-box;
}

.hero-centered::before {
    content: '';
    position: absolute;
    top: -30%;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    height: 80%;
    background: radial-gradient(ellipse at center, var(--amber-glow) 0%, transparent 60%);
    pointer-events: none;
}

.hero-centered-content {
    max-width: var(--container);
    margin: 0 auto;
    text-align: center;
    position: relative;
    z-index: 1;
}

.hero-title-centered {
    font-size: var(--text-4xl);
    font-weight: 400;
    line-height: 1.1;
    color: var(--ink);
    margin-top: 0;
    margin-bottom: var(--space-6); /* Increased bottom margin for more space to chat */
    letter-spacing: -0.03em;
    animation: fadeInUp 0.8s var(--ease-out-expo);
}

.hero-title-centered .highlight {
    color: var(--terracotta);
    font-style: italic;
}

.hero-form-centered {
    width: 100%;
    animation: fadeInUp 1s var(--ease-out-expo) 0.2s both;
}

.form-card-wide {
    background: var(--surface-elevated);
    border-radius: var(--radius-xl);
    padding: var(--space-8);
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(26, 26, 26, 0.04);
    max-width: 900px;
    margin: 0 auto;
    position: relative;
}

.form-card-wide::before {
    content: '';
    position: absolute;
    top: 0;
    left: var(--space-8);
    right: var(--space-8);
    height: 3px;
    background: linear-gradient(90deg, var(--terracotta), var(--amber), var(--sage));
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

/* =============================================================================
   FORM CARD (Hero Sidebar)
   ============================================================================= */

.hero-form {
    position: sticky;
    top: 120px;
    animation: fadeInUp 1s var(--ease-out-expo) 0.3s both;
}

.form-card {
    background: var(--surface-elevated);
    border-radius: var(--radius-xl);
    padding: var(--space-8);
    box-shadow: var(--shadow-xl);
    border: 1px solid rgba(26, 26, 26, 0.04);
    position: relative;
}

.form-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: var(--space-6);
    right: var(--space-6);
    height: 4px;
    background: linear-gradient(90deg, var(--terracotta), var(--amber));
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

.form-card h3 {
    font-size: var(--text-2xl);
    font-weight: 500;
    margin-bottom: var(--space-2);
}

.form-subtitle {
    font-size: var(--text-sm);
    color: var(--ink-muted);
    margin-bottom: var(--space-6);
}

/* =============================================================================
   FORMS
   ============================================================================= */

.form-group {
    margin-bottom: var(--space-5);
}

.form-group label {
    display: block;
    font-family: var(--font-display);
    font-weight: 500;
    font-size: var(--text-lg);
    margin-bottom: var(--space-2);
    color: var(--ink);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: var(--space-4);
    border: 2px solid var(--parchment);
    border-radius: var(--radius);
    font-family: var(--font-body);
    font-size: var(--text-base);
    color: var(--ink);
    background: var(--cream);
    transition: all 0.3s var(--ease-out-expo);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--terracotta);
    background: var(--surface-elevated);
    box-shadow: 0 0 0 4px var(--amber-glow);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--ink-muted);
    opacity: 0.6;
}

.form-group textarea {
    resize: vertical;
    min-height: 140px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4);
}

.char-count {
    text-align: right;
    font-size: var(--text-xs);
    color: var(--ink-muted);
    margin-top: var(--space-1);
}

.privacy-note {
    text-align: center;
    font-size: var(--text-xs);
    color: var(--ink-muted);
    margin-top: var(--space-4);
}

/* =============================================================================
   BUTTONS - Organic & Distinctive
   ============================================================================= */

.btn-primary,
.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-4) var(--space-6);
    border-radius: var(--radius);
    font-family: var(--font-body);
    font-weight: 600;
    font-size: var(--text-base);
    text-decoration: none;
    transition: all 0.4s var(--ease-out-expo);
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--ink);
    color: var(--cream);
    box-shadow: var(--shadow);
}

.btn-primary:hover {
    background: var(--ink-soft);
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    color: var(--cream);
}

.btn-primary:active {
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--cream-dark);
    color: var(--ink);
}

.btn-secondary:hover {
    background: var(--parchment);
    transform: translateY(-2px);
}

.btn-large {
    padding: var(--space-4) var(--space-8);
    font-size: var(--text-lg);
}

.btn-xl {
    padding: var(--space-5) var(--space-10);
    font-size: var(--text-xl);
    border-radius: var(--radius-md);
}

.btn-block {
    width: 100%;
}

/* Accent button variant */
.btn-accent {
    background: var(--terracotta);
    color: var(--cream);
}

.btn-accent:hover {
    background: var(--terracotta-dark);
    color: var(--cream);
}

/* =============================================================================
   SECTION HEADERS
   ============================================================================= */

.section-header-center {
    text-align: center;
    max-width: 720px;
    margin: 0 auto var(--space-12);
}

.section-header-center.light {
    color: var(--cream);
}

.section-title {
    font-size: var(--text-4xl);
    font-weight: 400;
    margin-bottom: var(--space-4);
    letter-spacing: -0.02em;
}

.section-title-large {
    font-size: var(--text-5xl);
    font-weight: 400;
    margin-bottom: var(--space-4);
}

.section-lead {
    font-size: var(--text-xl);
    color: var(--ink-muted);
    line-height: 1.7;
}

.section-header-center.light .section-lead {
    color: rgba(250, 247, 242, 0.8);
}

/* =============================================================================
   FEATURE CARDS
   ============================================================================= */

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

.feature-card {
    background: var(--surface-elevated);
    padding: var(--space-8);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(26, 26, 26, 0.04);
    transition: all 0.4s var(--ease-out-expo);
    position: relative;
}

.feature-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: var(--space-6);
    right: var(--space-6);
    height: 3px;
    background: linear-gradient(90deg, var(--terracotta), var(--amber));
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    opacity: 0;
    transition: opacity 0.4s var(--ease-out-expo);
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.feature-card:hover::after {
    opacity: 1;
}

.feature-icon {
    width: 72px;
    height: 72px;
    background: var(--amber-glow);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--space-5);
}

.feature-icon svg {
    color: var(--terracotta);
    width: 32px;
    height: 32px;
}

.feature-card h3 {
    font-size: var(--text-xl);
    font-weight: 500;
    margin-bottom: var(--space-3);
}

.feature-card p {
    color: var(--ink-muted);
    line-height: 1.7;
}

/* =============================================================================
   ACCIDENT TYPE CARDS
   ============================================================================= */

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

.accident-card {
    background: var(--surface-elevated);
    padding: var(--space-6);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(26, 26, 26, 0.04);
    text-align: center;
    transition: all 0.4s var(--ease-out-expo);
    position: relative;
    overflow: hidden;
}

.accident-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--amber-glow) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.4s var(--ease-out-expo);
}

.accident-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-md);
    border-color: var(--amber-light);
}

.accident-card:hover::before {
    opacity: 1;
}

.accident-icon {
    font-size: 52px;
    margin-bottom: var(--space-4);
    position: relative;
}

.accident-card h3 {
    font-size: var(--text-lg);
    font-weight: 500;
    margin-bottom: var(--space-2);
    position: relative;
}

.accident-card p {
    font-size: var(--text-sm);
    color: var(--ink-muted);
    margin-bottom: var(--space-3);
    position: relative;
}

.accident-range {
    font-family: var(--font-display);
    font-weight: 600;
    color: var(--terracotta);
    font-size: var(--text-lg);
    position: relative;
}

.centered-cta {
    text-align: center;
    margin-top: var(--space-12);
}

.cta-text {
    font-size: var(--text-lg);
    color: var(--ink-muted);
    margin-bottom: var(--space-4);
}

/* =============================================================================
   TIMELINE
   ============================================================================= */

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

.timeline-item {
    display: grid;
    grid-template-columns: 70px 1fr;
    gap: var(--space-6);
    position: relative;
    padding-bottom: var(--space-10);
}

.timeline-item:not(:last-child)::before {
    content: '';
    position: absolute;
    left: 35px;
    top: 70px;
    bottom: 0;
    width: 2px;
    background: rgba(250, 247, 242, 0.2);
}

.timeline-marker {
    width: 70px;
    height: 70px;
    background: var(--amber);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: var(--text-2xl);
    color: var(--ink);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.timeline-content h3 {
    font-size: var(--text-xl);
    font-weight: 500;
    margin-bottom: var(--space-2);
    color: var(--cream);
}

.timeline-content p {
    color: rgba(250, 247, 242, 0.8);
    margin-bottom: var(--space-3);
    line-height: 1.7;
}

.timeline-tag {
    display: inline-block;
    background: rgba(212, 168, 75, 0.2);
    color: var(--amber);
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius);
    font-size: var(--text-sm);
    font-weight: 600;
}

/* =============================================================================
   FAQ ACCORDION
   ============================================================================= */

.faq-accordion {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.faq-item {
    background: var(--surface-elevated);
    border: 1px solid rgba(26, 26, 26, 0.04);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all 0.4s var(--ease-out-expo);
}

.faq-item:hover {
    box-shadow: var(--shadow);
}

.faq-item summary {
    padding: var(--space-5) var(--space-6);
    font-family: var(--font-display);
    font-weight: 500;
    font-size: var(--text-lg);
    cursor: pointer;
    user-select: none;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--ink);
}

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

.faq-item summary::after {
    content: '+';
    font-size: var(--text-2xl);
    color: var(--terracotta);
    transition: transform 0.4s var(--ease-out-expo);
    font-weight: 300;
}

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

.faq-content {
    padding: 0 var(--space-6) var(--space-5);
    color: var(--ink-muted);
    line-height: 1.8;
}

/* =============================================================================
   FOOTER
   ============================================================================= */

.footer {
    background: var(--ink);
    color: var(--cream);
    padding: var(--space-2) 0 var(--space-1);
    position: relative;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--terracotta), var(--amber), var(--sage));
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: var(--space-2);
    margin-bottom: var(--space-1);
}

.footer-logo {
    height: 48px;
    width: auto;
    margin-bottom: var(--space-4);
}

.footer-logo-row {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    margin-bottom: var(--space-3);
}

.footer-tagline {
    color: rgba(250, 247, 242, 0.7);
    margin-bottom: 0;
    line-height: 1.4;
    max-width: 300px;
    font-size: var(--text-xs);
}

.footer-trust {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    font-size: var(--text-sm);
    color: rgba(250, 247, 242, 0.5);
}

.footer-col h4 {
    font-family: var(--font-display);
    font-size: var(--text-xs);
    font-weight: 500;
    margin-bottom: var(--space-1);
    color: var(--cream);
}

.footer-col ul {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
}

.footer-col ul a {
    color: rgba(250, 247, 242, 0.7);
    font-size: var(--text-xs);
    transition: color 0.3s var(--ease-out-expo);
}

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

.footer-col p {
    font-size: var(--text-xs);
    color: rgba(250, 247, 242, 0.7);
    line-height: 1.5;
    margin-bottom: var(--space-1);
}

.footer-bottom {
    border-top: 1px solid rgba(250, 247, 242, 0.1);
    padding-top: var(--space-1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: var(--text-xs);
    color: rgba(250, 247, 242, 0.5);
}

/* =============================================================================
   LOGIN PAGE
   ============================================================================= */

.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--cream);
    padding: var(--space-6);
    position: relative;
}

.login-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at 30% 20%, var(--amber-glow) 0%, transparent 50%),
                radial-gradient(ellipse at 70% 80%, rgba(122, 158, 126, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.login-card {
    background: var(--surface-elevated);
    border-radius: var(--radius-xl);
    padding: var(--space-8) var(--space-10);
    box-shadow: var(--shadow-xl);
    border: 1px solid rgba(26, 26, 26, 0.04);
    max-width: 460px;
    width: 100%;
    position: relative;
    animation: fadeInUp 0.8s var(--ease-out-expo);
}

.login-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: var(--space-8);
    right: var(--space-8);
    height: 4px;
    background: linear-gradient(90deg, var(--terracotta), var(--amber));
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

.login-close {
    position: absolute;
    top: var(--space-5);
    right: var(--space-5);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--ink-muted);
    border-radius: 50%;
    transition: all 0.3s var(--ease-out-expo);
}

.login-close:hover {
    background: var(--cream-dark);
    color: var(--ink);
}

.login-logo {
    text-align: center;
    margin-bottom: var(--space-5);
}

.login-logo-img {
    height: 50px;
    width: auto;
}

.login-header {
    text-align: center;
    margin-bottom: var(--space-6);
}

.login-header h1 {
    font-size: var(--text-3xl);
    font-weight: 500;
    color: var(--ink);
    margin-bottom: var(--space-2);
}

.login-subtitle {
    font-size: var(--text-sm);
    color: var(--ink-muted);
}

.login-form {
    margin-bottom: var(--space-5);
}

.login-form-group {
    margin-bottom: var(--space-4);
}

.login-form-group label {
    display: block;
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--ink);
    margin-bottom: var(--space-2);
}

.login-form-group input {
    width: 100%;
    padding: var(--space-3) var(--space-4);
    border: 2px solid var(--parchment);
    border-radius: var(--radius);
    font-family: var(--font-body);
    font-size: var(--text-base);
    background: var(--cream);
    transition: all 0.3s var(--ease-out-expo);
}

.login-form-group input:focus {
    outline: none;
    border-color: var(--terracotta);
    background: var(--surface-elevated);
    box-shadow: 0 0 0 4px var(--amber-glow);
}

.login-checkbox {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    margin-bottom: var(--space-5);
}

.login-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--terracotta);
}

.login-checkbox label {
    font-size: var(--text-sm);
    color: var(--ink-muted);
    cursor: pointer;
}

.btn-login {
    width: 100%;
    padding: var(--space-4);
    background: var(--ink);
    color: var(--cream);
    border: none;
    border-radius: var(--radius);
    font-size: var(--text-base);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.4s var(--ease-out-expo);
    box-shadow: var(--shadow);
}

.btn-login:hover {
    background: var(--ink-soft);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.login-error {
    margin-top: var(--space-4);
    padding: var(--space-3);
    background: rgba(196, 91, 91, 0.1);
    border: 1px solid rgba(196, 91, 91, 0.3);
    border-radius: var(--radius);
    color: var(--error);
    font-size: var(--text-sm);
}

.login-divider {
    text-align: center;
    position: relative;
    margin: var(--space-6) 0;
}

.login-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--parchment);
}

.login-divider span {
    position: relative;
    background: var(--surface-elevated);
    padding: 0 var(--space-4);
    color: var(--ink-muted);
    font-size: var(--text-sm);
}

.login-alternatives {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    margin-bottom: var(--space-5);
}

.btn-alt-login {
    width: 100%;
    padding: var(--space-3) var(--space-4);
    background: var(--cream);
    border: 2px solid var(--parchment);
    border-radius: var(--radius);
    font-size: var(--text-base);
    font-weight: 500;
    color: var(--ink);
    cursor: pointer;
    transition: all 0.3s var(--ease-out-expo);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-3);
}

.btn-alt-login:hover {
    background: var(--cream-dark);
    border-color: var(--terracotta);
    color: var(--terracotta);
}

.login-footer {
    text-align: center;
    padding-top: var(--space-5);
    border-top: 1px solid var(--parchment);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-3);
    flex-wrap: wrap;
}

.login-footer a {
    color: var(--ink-muted);
    font-size: var(--text-sm);
}

.login-footer a:hover {
    color: var(--terracotta);
}

.login-footer span {
    color: var(--parchment);
}

/* =============================================================================
   CHAT INTERFACE - Modern & Warm
   ============================================================================= */

.chat-container {
    background: var(--surface-elevated);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    max-width: 920px; /* 15% bigger than 800px */
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(26, 26, 26, 0.04);
}

.chat-header {
    background: var(--ink);
    color: var(--cream);
    padding: var(--space-5);
    position: relative;
}

.chat-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--terracotta), var(--amber), var(--sage));
}

.chat-header-content {
    display: flex;
    align-items: center;
    gap: var(--space-4);
}

.chat-avatar {
    font-size: 2.5rem;
    line-height: 1;
}

.chat-header-info h3 {
    margin: 0;
    font-family: var(--font-display);
    font-size: var(--text-lg);
    font-weight: 500;
}

.chat-status {
    margin: 0;
    font-size: var(--text-sm);
    color: var(--sage-light);
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.chat-status::before {
    content: '';
    width: 8px;
    height: 8px;
    background: var(--sage);
    border-radius: 50%;
    animation: pulse-soft 2s infinite;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: var(--space-4);
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
    background: var(--cream);
    min-height: 230px; /* 15% bigger */
    max-height: 368px; /* 15% bigger than 320px */
}

.message {
    display: flex;
    gap: var(--space-3);
    align-items: flex-end;
    animation: slideIn 0.4s var(--ease-out-expo);
}

.bot-message {
    justify-content: flex-start;
}

.user-message {
    justify-content: flex-end;
    flex-direction: row-reverse;
}

.message-avatar {
    font-size: 1.75rem;
    line-height: 1;
    flex-shrink: 0;
}

.message-content {
    background: var(--surface-elevated);
    padding: var(--space-4) var(--space-5);
    border-radius: var(--radius-lg);
    max-width: 75%;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(26, 26, 26, 0.04);
}

.bot-message .message-content {
    border-bottom-left-radius: var(--radius-sm);
}

.user-message .message-content {
    background: var(--terracotta);
    color: var(--cream);
    border-bottom-right-radius: var(--radius-sm);
    border: none;
}

.message-content p {
    margin: 0;
    margin-bottom: var(--space-2);
    line-height: 1.6;
}

.message-content p:last-child {
    margin-bottom: 0;
}

/* =============================================================================
   SMART QUESTION OPTIONS - Clickable Answer Buttons
   ============================================================================= */

.smart-question .message-content {
    max-width: 400px;
}

.question-options {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    margin-top: var(--space-3);
}

.option-btn {
    padding: var(--space-2) var(--space-4);
    background: var(--cream);
    border: 2px solid var(--parchment);
    border-radius: 20px;
    font-family: var(--font-body);
    font-size: var(--text-sm);
    color: var(--ink);
    cursor: pointer;
    transition: all 0.2s var(--ease-out-expo);
}

.option-btn:hover:not(:disabled) {
    background: var(--amber-glow);
    border-color: var(--amber);
    transform: translateY(-1px);
}

.option-btn:active:not(:disabled) {
    transform: translateY(0);
}

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

.option-btn.selected {
    background: var(--terracotta);
    border-color: var(--terracotta);
    color: var(--cream);
    opacity: 1;
}

.impact-hint {
    font-size: var(--text-xs);
    color: var(--ink-muted);
    margin-top: var(--space-3);
    padding: var(--space-2) var(--space-3);
    background: var(--amber-glow);
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--amber);
}

/* "Other" option button - slightly different style */
.option-btn.option-other {
    background: transparent;
    border-style: dashed;
    color: var(--ink-muted);
}

.option-btn.option-other:hover:not(:disabled) {
    background: var(--cream);
    border-color: var(--terracotta);
    color: var(--terracotta);
}

/* Free text input container for "Other" option */
.freetext-container {
    margin-top: var(--space-3);
    animation: fadeInUp 0.3s var(--ease-out-expo);
}

.freetext-wrapper {
    display: flex;
    gap: var(--space-2);
    align-items: center;
}

.freetext-input {
    flex: 1;
    padding: var(--space-3) var(--space-4);
    border: 2px solid var(--parchment);
    border-radius: 20px;
    font-family: var(--font-body);
    font-size: var(--text-sm);
    color: var(--ink);
    background: var(--cream);
    transition: all 0.2s var(--ease-out-expo);
}

.freetext-input:focus {
    outline: none;
    border-color: var(--terracotta);
    box-shadow: 0 0 0 3px var(--amber-glow);
}

.freetext-input::placeholder {
    color: var(--ink-muted);
    opacity: 0.6;
}

.freetext-input:disabled {
    background: var(--parchment);
    cursor: not-allowed;
}

.freetext-submit {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--terracotta);
    color: var(--cream);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s var(--ease-out-expo);
}

.freetext-submit:hover:not(:disabled) {
    background: var(--terracotta-dark);
    transform: scale(1.05);
}

.freetext-submit:disabled {
    background: var(--parchment);
    color: var(--ink-muted);
    cursor: not-allowed;
}

.freetext-hint {
    font-size: var(--text-xs);
    color: var(--ink-muted);
    margin-top: var(--space-2);
    margin-bottom: 0;
    opacity: 0.7;
}

/* =============================================================================
   ESTIMATE NARROWING ANIMATION - Shows progress
   ============================================================================= */

.estimate-narrowing {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-3);
    background: linear-gradient(90deg, var(--sage-light), var(--cream));
    border-radius: var(--radius-sm);
    margin-top: var(--space-2);
    font-size: var(--text-sm);
    color: var(--sage-dark);
    animation: narrowPulse 2s ease-in-out infinite;
}

@keyframes narrowPulse {
    0%, 100% { opacity: 0.8; }
    50% { opacity: 1; }
}

.estimate-narrowing::before {
    content: '📊';
}

.chat-input-container {
    padding: var(--space-5);
    background: var(--surface-elevated);
    border-top: 1px solid var(--parchment);
}

.chat-input-form {
    display: flex;
    gap: var(--space-3);
    margin-bottom: var(--space-2);
}

.chat-input {
    flex: 1;
    padding: var(--space-4);
    border: 2px solid var(--parchment);
    border-radius: var(--radius-md);
    font-family: var(--font-body);
    font-size: var(--text-base);
    resize: none;
    background: var(--cream);
    color: var(--ink);
    transition: all 0.3s var(--ease-out-expo);
}

.chat-input:focus {
    outline: none;
    border-color: var(--terracotta);
    background: var(--surface-elevated);
    box-shadow: 0 0 0 4px var(--amber-glow);
}

.chat-input::placeholder {
    color: var(--ink-muted);
    opacity: 0.6;
}

.chat-send-btn {
    background: var(--terracotta);
    color: var(--cream);
    padding: var(--space-4) var(--space-6);
    border-radius: var(--radius-md);
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s var(--ease-out-expo);
}

.chat-send-btn:hover {
    background: var(--terracotta-dark);
    transform: translateY(-2px);
}

.chat-send-btn:active {
    transform: translateY(0);
}

.chat-send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* =============================================================================
   CHATGPT-STYLE INPUT - Expanding Pill Design
   ============================================================================= */

.chat-input-form-gpt {
    width: 100%;
    margin-bottom: var(--space-3);
}

.input-wrapper-gpt {
    display: flex;
    align-items: flex-end;
    gap: var(--space-2);
    background: var(--cream);
    border: 2px solid var(--parchment);
    border-radius: 24px;
    padding: var(--space-3) var(--space-4);
    transition: all 0.3s var(--ease-out-expo);
    box-shadow: var(--shadow-sm);
}

.input-wrapper-gpt:focus-within {
    border-color: var(--terracotta);
    background: var(--surface-elevated);
    box-shadow: 0 0 0 4px var(--amber-glow), var(--shadow);
}

.chat-input-gpt {
    flex: 1;
    border: none;
    background: transparent;
    font-family: var(--font-body);
    font-size: var(--text-lg); /* Bigger text for better readability */
    color: var(--ink);
    resize: none;
    outline: none;
    line-height: 1.5;
    min-height: 28px;
    max-height: 200px;
    overflow-y: auto;
    padding: 0;
}

.chat-input-gpt::placeholder {
    color: var(--ink-muted);
    opacity: 0.6;
}

.chat-send-btn-gpt {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--ink);
    color: var(--cream);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s var(--ease-out-expo);
    cursor: pointer;
    border: none;
}

.chat-send-btn-gpt:hover:not(:disabled) {
    background: var(--ink-soft);
    transform: scale(1.05);
}

.chat-send-btn-gpt:disabled {
    background: var(--parchment);
    color: var(--ink-muted);
    cursor: not-allowed;
}

.chat-send-btn-gpt:not(:disabled) {
    background: var(--terracotta);
}

.chat-disclaimer {
    text-align: center;
    font-size: var(--text-xs);
    color: var(--ink-muted);
    margin: 0;
    opacity: 0.7;
}

.typing-indicator {
    display: flex;
    gap: var(--space-2);
    padding: var(--space-3);
}

.typing-dot {
    width: 8px;
    height: 8px;
    background: var(--ink-muted);
    border-radius: 50%;
    animation: typingBounce 1.4s infinite;
}

.typing-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-dot:nth-child(3) {
    animation-delay: 0.4s;
}

/* =============================================================================
   RESULTS PAGE STYLES
   ============================================================================= */

.results-loading {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-12) 0;
}

.loading-card {
    background: var(--surface-elevated);
    border-radius: var(--radius-xl);
    padding: var(--space-12);
    text-align: center;
    box-shadow: var(--shadow-lg);
    max-width: 480px;
    border: 1px solid rgba(26, 26, 26, 0.04);
}

.loading-spinner-large {
    width: 64px;
    height: 64px;
    border: 4px solid var(--parchment);
    border-top-color: var(--terracotta);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto var(--space-6);
}

.loading-card h2 {
    font-family: var(--font-display);
    font-size: var(--text-3xl);
    font-weight: 500;
    margin-bottom: var(--space-3);
    color: var(--ink);
}

.loading-card p {
    color: var(--ink-muted);
    margin-bottom: var(--space-6);
}

.loading-progress {
    width: 100%;
    height: 4px;
    background: var(--cream-dark);
    border-radius: 999px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--terracotta), var(--amber));
    animation: shimmer 2s ease-in-out infinite;
    background-size: 200% 100%;
}

/* Error State */
.results-error {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-12) 0;
}

.error-card {
    background: var(--surface-elevated);
    border-radius: var(--radius-xl);
    padding: var(--space-12);
    text-align: center;
    box-shadow: var(--shadow-lg);
    max-width: 480px;
}

.error-icon {
    color: var(--error);
    margin-bottom: var(--space-5);
}

.error-card h2 {
    font-family: var(--font-display);
    font-size: var(--text-3xl);
    font-weight: 500;
    margin-bottom: var(--space-3);
    color: var(--ink);
}

.error-card p {
    color: var(--ink-muted);
    margin-bottom: var(--space-6);
}

/* Results Content */
.results-content {
    padding: calc(var(--space-16) + 80px) 0 var(--space-12);
}

.results-header {
    text-align: center;
    margin-bottom: var(--space-12);
}

.results-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-4);
    margin-bottom: var(--space-6);
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-4);
    border-radius: 999px;
    font-size: var(--text-sm);
    font-weight: 600;
}

.status-badge.success {
    background: rgba(93, 138, 97, 0.1);
    color: var(--success);
}

.analysis-id {
    font-size: var(--text-sm);
    color: var(--ink-muted);
}

.results-header h1 {
    font-size: var(--text-5xl);
    font-weight: 400;
    margin-bottom: var(--space-4);
    color: var(--ink);
}

.results-subtitle {
    font-size: var(--text-xl);
    color: var(--ink-muted);
}

/* User Query Display */
.user-query-display {
    max-width: 800px;
    margin: var(--space-8) auto 0;
    padding: var(--space-6);
    background: var(--surface-elevated);
    border-left: 4px solid var(--terracotta);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.query-label {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--ink-muted);
    margin-bottom: var(--space-2);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.query-text {
    font-family: var(--font-display);
    font-size: var(--text-lg);
    color: var(--ink);
    font-style: italic;
    line-height: 1.6;
    margin: 0;
}

/* Results Grid */
.results-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-6);
    margin-bottom: var(--space-12);
}

.result-card {
    background: var(--surface-elevated);
    border-radius: var(--radius-xl);
    border: 1px solid rgba(26, 26, 26, 0.04);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.4s var(--ease-out-expo);
}

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

.result-card.featured {
    grid-column: span 2;
}

.result-card.full-width {
    grid-column: span 2;
}

.card-header {
    padding: var(--space-5);
    background: var(--cream-dark);
    border-bottom: 1px solid rgba(26, 26, 26, 0.04);
}

.card-header h2 {
    font-family: var(--font-display);
    font-size: var(--text-xl);
    font-weight: 500;
    color: var(--ink);
    margin: 0;
}

.card-subtitle {
    font-size: var(--text-sm);
    color: var(--ink-muted);
    margin-top: var(--space-2);
}

.card-content {
    padding: var(--space-6);
}

/* Incident Display */
.incident-display {
    text-align: center;
}

.incident-icon-large {
    font-size: 4rem;
    margin-bottom: var(--space-4);
}

.incident-display h3 {
    font-family: var(--font-display);
    font-size: var(--text-2xl);
    font-weight: 500;
    margin-bottom: var(--space-2);
    color: var(--ink);
}

.text-secondary {
    color: var(--ink-muted);
}

.confidence-badge {
    display: inline-block;
    margin-top: var(--space-4);
    padding: var(--space-2) var(--space-4);
    background: var(--amber-glow);
    border-radius: 999px;
    font-size: var(--text-sm);
    color: var(--terracotta);
    font-weight: 600;
}

/* CTA Section */
.results-cta {
    margin-top: var(--space-12);
}

.cta-card-large {
    background: var(--ink);
    color: var(--cream);
    padding: var(--space-12);
    border-radius: var(--radius-xl);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta-card-large::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--terracotta), var(--amber), var(--sage));
}

.cta-card-large h2 {
    font-family: var(--font-display);
    font-size: var(--text-3xl);
    font-weight: 500;
    margin-bottom: var(--space-4);
    color: var(--cream);
}

.cta-card-large > p {
    font-size: var(--text-lg);
    color: rgba(250, 247, 242, 0.8);
    margin-bottom: var(--space-8);
}

.cta-buttons {
    display: flex;
    gap: var(--space-4);
    justify-content: center;
    margin-bottom: var(--space-5);
}

.cta-card-large .btn-xl {
    background: var(--terracotta);
    color: var(--cream);
}

.cta-card-large .btn-xl:hover {
    background: var(--terracotta-dark);
}

.cta-card-large .cta-note {
    color: rgba(250, 247, 242, 0.6);
}

/* =============================================================================
   UTILITY CLASSES
   ============================================================================= */

.hidden {
    display: none !important;
}

.error-message {
    background: rgba(196, 91, 91, 0.1);
    border: 1px solid rgba(196, 91, 91, 0.3);
    color: var(--error);
    padding: var(--space-4);
    border-radius: var(--radius);
    margin-top: var(--space-4);
    font-size: var(--text-sm);
}

.spinner {
    border: 2px solid var(--parchment);
    border-top-color: var(--terracotta);
    border-radius: 50%;
    width: 16px;
    height: 16px;
    animation: spin 0.6s linear infinite;
}

/* =============================================================================
   RESPONSIVE DESIGN
   ============================================================================= */

@media (max-width: 1200px) {
    .hero-grid {
        grid-template-columns: 1fr;
        gap: var(--space-10);
    }

    .hero-form {
        position: relative;
        top: 0;
        max-width: 500px;
        margin: 0 auto;
    }

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

    .accident-types-grid {
        grid-template-columns: repeat(3, 1fr);
    }

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

@media (max-width: 1024px) {
    .navbar {
        top: var(--space-3);
        width: calc(100% - var(--space-6));
    }

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

    .result-card.featured,
    .result-card.full-width {
        grid-column: span 1;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }

    .mobile-toggle {
        display: flex;
    }

    .hero-modern {
        padding-top: calc(var(--space-12) + 80px);
    }

    .hero-title {
        font-size: var(--text-4xl);
    }

    .hero-title-centered {
        font-size: var(--text-3xl);
    }

    .hero-centered {
        padding-top: calc(var(--space-10) + 80px);
        min-height: auto;
    }

    .form-card-wide {
        padding: var(--space-6);
    }

    .info-tiles-grid {
        grid-template-columns: 1fr;
    }

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

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

    .timeline-item {
        grid-template-columns: 50px 1fr;
        gap: var(--space-4);
    }

    .timeline-marker {
        width: 50px;
        height: 50px;
        font-size: var(--text-lg);
    }

    .timeline-item:not(:last-child)::before {
        left: 25px;
        top: 50px;
    }

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

    .footer-bottom {
        flex-direction: column;
        gap: var(--space-4);
        text-align: center;
    }

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

    .cta-buttons {
        flex-direction: column;
    }

    .chat-container {
        height: auto; /* Let content determine height */
        max-height: 70vh; /* But don't exceed 70% viewport */
        border-radius: var(--radius-lg);
    }

    .chat-messages {
        min-height: 250px;
        max-height: 400px; /* More room on mobile too */
    }

    .login-card {
        padding: var(--space-6);
    }
}

@media (max-width: 480px) {
    .navbar {
        padding: var(--space-2) var(--space-4);
    }

    .container-wide,
    .container,
    .container-narrow {
        padding: 0 var(--space-4);
    }

    .hero-modern {
        padding-top: calc(var(--space-10) + 70px);
    }

    .hero-badge {
        font-size: var(--text-xs);
        padding: var(--space-1) var(--space-3);
    }

    .form-card {
        padding: var(--space-5);
    }

    .btn-large {
        padding: var(--space-3) var(--space-5);
    }

    .btn-xl {
        padding: var(--space-4) var(--space-6);
        font-size: var(--text-lg);
    }

    .cta-card-large {
        padding: var(--space-8);
    }
}

/* =============================================================================
   ADDITIONAL RESULTS PAGE COMPONENTS
   ============================================================================= */

/* Info Card */
.results-info {
    min-height: 80vh;
    padding: var(--space-12) 0;
}

.info-card-modern {
    background: var(--surface-elevated);
    border-radius: var(--radius-xl);
    padding: var(--space-10);
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(26, 26, 26, 0.04);
}

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

.info-icon-large {
    color: var(--info);
    margin-bottom: var(--space-5);
}

.info-header h1 {
    font-family: var(--font-display);
    font-size: var(--text-4xl);
    font-weight: 500;
    margin-bottom: var(--space-4);
    color: var(--ink);
}

.info-lead {
    font-size: var(--text-lg);
    line-height: 1.7;
    color: var(--ink-muted);
}

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

.info-section.bg-light {
    background: var(--cream-dark);
    padding: var(--space-6);
    border-radius: var(--radius-lg);
    margin: var(--space-6) 0;
}

.info-section h3 {
    font-family: var(--font-display);
    font-size: var(--text-xl);
    font-weight: 500;
    margin-bottom: var(--space-4);
    color: var(--ink);
}

.info-suggestion-text {
    color: var(--ink-muted);
    line-height: 1.7;
}

.examples-list {
    display: grid;
    gap: var(--space-4);
}

.example-item {
    display: flex;
    align-items: flex-start;
    gap: var(--space-4);
    padding: var(--space-4);
    background: var(--surface-elevated);
    border-radius: var(--radius);
    border: 1px solid rgba(26, 26, 26, 0.04);
}

.example-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.example-item strong {
    display: block;
    color: var(--ink);
    margin-bottom: var(--space-1);
}

.example-item p {
    color: var(--ink-muted);
    font-size: var(--text-sm);
    margin: 0;
}

.info-actions {
    text-align: center;
    margin-top: var(--space-8);
    padding-top: var(--space-8);
    border-top: 1px solid var(--parchment);
}

.info-note {
    margin-top: var(--space-4);
    font-size: var(--text-sm);
    color: var(--ink-muted);
}

/* Category Items */
.single-category-legal-basis,
.category-item-legal-basis {
    margin-top: var(--space-5);
    padding-top: var(--space-5);
    border-top: 1px solid var(--parchment);
    text-align: left;
}

.single-category-legal-basis h4,
.category-item-legal-basis h4 {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--ink-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: var(--space-3);
}

.incident-category-label {
    display: inline-block;
    margin-bottom: var(--space-3);
    padding: var(--space-2) var(--space-4);
    background: var(--terracotta);
    color: var(--cream);
    border-radius: var(--radius);
    font-size: var(--text-sm);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.breadcrumb-path {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.breadcrumb-is {
    font-family: var(--font-display);
    font-size: var(--text-2xl);
    font-weight: 500;
    color: var(--ink);
    line-height: 1.3;
}

.breadcrumb-en {
    font-size: var(--text-base);
    color: var(--ink-muted);
    font-style: italic;
}

/* Multi-Category Display */
.multi-category-header {
    text-align: center;
    margin-bottom: var(--space-6);
}

.badge-warning {
    background: var(--amber-glow);
    color: var(--terracotta);
    border: 1px solid var(--amber-light);
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius);
    font-size: var(--text-sm);
    font-weight: 600;
}

.categories-list {
    display: grid;
    gap: var(--space-5);
    margin-top: var(--space-6);
}

.category-item {
    padding: var(--space-5);
    background: var(--cream);
    border-radius: var(--radius-lg);
    border: 2px solid var(--parchment);
    transition: all 0.3s var(--ease-out-expo);
}

.category-item:hover {
    border-color: var(--terracotta);
    box-shadow: var(--shadow);
}

.category-item-header {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    margin-bottom: var(--space-4);
}

.category-item-icon {
    font-size: 2.5rem;
}

.category-item-labels {
    flex: 1;
}

.category-item-category {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--terracotta);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: var(--space-1);
}

.category-item-name {
    font-family: var(--font-display);
    font-size: var(--text-xl);
    font-weight: 500;
    color: var(--ink);
    margin: 0;
}

.category-item-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: var(--space-4);
    padding-top: var(--space-4);
    border-top: 1px solid var(--parchment);
}

.category-item-confidence {
    font-size: var(--text-sm);
    color: var(--ink-muted);
}

.category-item-compensation {
    font-family: var(--font-display);
    font-size: var(--text-base);
    font-weight: 600;
    color: var(--terracotta);
}

.laws-list-inline {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.laws-list-inline li {
    font-size: var(--text-sm);
    color: var(--ink);
    background: var(--surface-elevated);
    padding: var(--space-2) var(--space-3);
    border-radius: var(--radius);
    border-left: 3px solid var(--terracotta);
}

/* Compensation Display */
.compensation-display {
    text-align: center;
}

.compensation-range-display {
    margin-bottom: var(--space-5);
}

.amount-large {
    font-family: var(--font-display);
    font-size: var(--text-4xl);
    font-weight: 500;
    color: var(--ink);
}

.compensation-median {
    padding: var(--space-4);
    background: var(--cream-dark);
    border-radius: var(--radius);
    margin-bottom: var(--space-4);
}

.compensation-note {
    font-size: var(--text-sm);
    color: var(--ink-muted);
    line-height: 1.6;
}

.sample-cases {
    margin-top: var(--space-6);
    padding-top: var(--space-6);
    border-top: 1px solid var(--parchment);
}

.sample-cases h4 {
    font-family: var(--font-display);
    font-size: var(--text-base);
    font-weight: 500;
    margin-bottom: var(--space-3);
    color: var(--ink);
}

.cases-list {
    list-style: none;
    padding: 0;
}

.cases-list li {
    padding: var(--space-2) 0;
    font-size: var(--text-sm);
    color: var(--ink-muted);
}

/* Timeline Display */
.timeline-display {
    text-align: center;
}

.timeline-range-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-3);
    margin-bottom: var(--space-5);
    font-family: var(--font-display);
    font-size: var(--text-2xl);
    font-weight: 500;
    color: var(--ink);
}

.timeline-typical {
    padding: var(--space-4);
    background: var(--cream-dark);
    border-radius: var(--radius);
    margin-bottom: var(--space-4);
}

.timeline-note {
    font-size: var(--text-sm);
    color: var(--ink-muted);
    line-height: 1.6;
}

/* Legal Basis */
.legal-summary {
    font-size: var(--text-base);
    line-height: 1.8;
    color: var(--ink-muted);
    margin-bottom: var(--space-6);
}

.legal-lists {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-6);
}

.legal-list h4 {
    font-family: var(--font-display);
    font-size: var(--text-base);
    font-weight: 500;
    margin-bottom: var(--space-3);
    color: var(--ink);
}

.laws-list,
.principles-list {
    list-style: none;
    padding: 0;
}

.laws-list li,
.principles-list li {
    padding: var(--space-2) 0;
    font-size: var(--text-sm);
    color: var(--ink-muted);
    line-height: 1.6;
}

/* Next Steps */
.steps-list {
    display: grid;
    gap: var(--space-4);
}

.next-step-item {
    display: flex;
    gap: var(--space-4);
    padding: var(--space-5);
    background: var(--cream-dark);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(26, 26, 26, 0.04);
}

.next-step-item.critical {
    background: rgba(196, 91, 91, 0.1);
    border-color: rgba(196, 91, 91, 0.2);
}

.step-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.step-content h4 {
    font-family: var(--font-display);
    font-size: var(--text-base);
    font-weight: 500;
    margin-bottom: var(--space-2);
    color: var(--ink);
}

.step-content p {
    font-size: var(--text-sm);
    color: var(--ink-muted);
    line-height: 1.6;
    margin: 0;
}

/* Similar Cases */
.similar-cases-grid {
    display: grid;
    gap: var(--space-5);
}

.case-item {
    padding: var(--space-5);
    background: var(--cream-dark);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(26, 26, 26, 0.04);
}

.case-item h4 {
    font-family: var(--font-display);
    font-size: var(--text-lg);
    font-weight: 500;
    margin-bottom: var(--space-3);
    color: var(--ink);
}

.case-item p {
    font-size: var(--text-sm);
    color: var(--ink-muted);
    margin-bottom: var(--space-2);
    line-height: 1.6;
}

.case-item p:last-child {
    margin-bottom: 0;
}

@media (max-width: 768px) {
    .legal-lists {
        grid-template-columns: 1fr;
    }
}

/* =============================================================================
   COMPACT PRELIMINARY RESULTS PAGE - Single Viewport Layout
   ============================================================================= */

/* Results page body - single viewport, no scroll */
.results-page-body {
    height: 100vh;
    max-height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.results-page-body .footer {
    margin-top: auto;
    padding: var(--space-6) 0 var(--space-4);
}

.results-page-body .footer-grid {
    gap: var(--space-6);
}

.results-page-body .footer-tagline {
    font-size: var(--text-sm);
    max-width: 350px;
}

.results-page-body .footer-col h4 {
    font-size: var(--text-sm);
    margin-bottom: var(--space-2);
}

.results-page-body .footer-col ul a,
.results-page-body .footer-col p {
    font-size: var(--text-sm);
}

/* User description quote box - compact to fit viewport */
.user-description-box {
    display: none;
    background: var(--cream-dark);
    border-left: 4px solid var(--terracotta);
    padding: var(--space-3) var(--space-5); /* Reduced padding */
    margin-bottom: var(--space-3); /* Reduced margin */
    border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.user-description-box p {
    font-family: var(--font-body);
    font-style: italic;
    font-size: var(--text-lg);
    color: var(--ink);
    margin: 0;
    line-height: 1.7;
    overflow: visible;
    white-space: normal;
    transition: max-height 0.3s ease;
}

/* Collapsed state - limit to ~3 lines */
.user-description-box p.description-text.collapsed {
    max-height: 5.1em; /* 3 lines at line-height 1.7 */
    overflow: hidden;
    position: relative;
}

/* Fade effect at bottom when collapsed */
.user-description-box p.description-text.collapsed::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1.7em;
    background: linear-gradient(to bottom, transparent, var(--cream-dark));
}

/* Expanded state */
.user-description-box p.description-text:not(.collapsed) {
    max-height: none;
}

/* Show more button */
.btn-show-more {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    margin-top: var(--space-2);
    padding: var(--space-2) var(--space-3);
    background: transparent;
    border: none;
    color: var(--terracotta);
    font-family: var(--font-body);
    font-size: var(--text-base);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-show-more:hover {
    color: var(--terracotta-dark);
    gap: var(--space-3);
}

.btn-show-more .chevron-icon {
    transition: transform 0.3s ease;
}

/* Results grid container - centered */
.results-grid-compact {
    max-width: 700px;
    margin: 0 auto;
    padding: 0 var(--space-4);
}

/* Main results card - compact to fit viewport */
.result-card-compact {
    background: var(--surface-elevated);
    border-radius: var(--radius-xl);
    padding: var(--space-5) var(--space-8); /* Reduced padding */
    box-shadow: var(--shadow-lg);
    display: grid;
    grid-template-columns: 1fr auto;
    gap: var(--space-5);
    align-items: center;
    border: 1px solid rgba(26, 26, 26, 0.06);
}

.compact-section h3 {
    font-family: var(--font-display);
    font-size: var(--text-xl);
    font-weight: 500;
    color: var(--ink);
    margin-bottom: var(--space-4);
}

/* Category chips - bigger */
.categories-display-compact {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-3);
}

.category-chip {
    display: inline-flex;
    align-items: center;
    gap: var(--space-3);
    background: var(--cream-dark);
    padding: var(--space-3) var(--space-5);
    border-radius: var(--radius-lg);
    font-size: var(--text-base);
    color: var(--ink);
    border: 1px solid rgba(26, 26, 26, 0.05);
}

.chip-icon {
    font-size: var(--text-2xl);
}

.chip-text {
    font-weight: 600;
}

/* Estimates sidebar with inline CTA */
.compact-estimates-with-cta {
    display: flex;
    align-items: center;
    gap: var(--space-6);
    padding-left: var(--space-6);
    border-left: 2px solid var(--parchment);
}

.compact-estimates {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
    min-width: 180px;
}

/* Inline CTA button next to estimate */
.btn-cta-inline {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-4) var(--space-6);
    font-size: var(--text-lg);
    font-weight: 600;
    white-space: nowrap;
    animation: pulse-glow 2s ease-in-out infinite;
}

.btn-cta-inline svg {
    transition: transform 0.2s ease;
}

.btn-cta-inline:hover svg {
    transform: translateX(4px);
}

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 4px 20px rgba(196, 77, 55, 0.3);
    }
    50% {
        box-shadow: 0 4px 30px rgba(196, 77, 55, 0.5);
    }
}

.estimate-item {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.estimate-label {
    font-size: var(--text-sm);
    color: var(--ink-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 500;
}

.estimate-value {
    font-family: var(--font-display);
    font-size: var(--text-3xl);
    font-weight: 600;
    color: var(--terracotta);
}

.estimate-value-small {
    font-family: var(--font-display);
    font-size: var(--text-xl);
    font-weight: 500;
    color: var(--ink);
}

/* Secondary CTA link (Byrja aftur) */
.cta-secondary {
    display: flex;
    justify-content: center;
    margin-top: var(--space-4);
    margin-bottom: var(--space-4);
}

.btn-text {
    font-size: var(--text-base);
    color: var(--ink-muted);
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color 0.2s ease;
}

.btn-text:hover {
    color: var(--ink);
}

/* =============================================================================
   FLOATING CTA - Always visible at bottom of viewport
   ============================================================================= */

.floating-cta {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, var(--surface-elevated) 80%, transparent);
    padding: var(--space-4) var(--space-6);
    padding-bottom: max(var(--space-4), env(safe-area-inset-bottom));
    z-index: 100;
    opacity: 0;
    transform: translateY(100%);
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
}

.floating-cta.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.floating-cta-content {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
    background: var(--surface-elevated);
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--parchment);
}

.floating-cta-info {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
}

.floating-estimate {
    font-family: var(--font-display);
    font-size: var(--text-lg);
    font-weight: 600;
    color: var(--terracotta);
}

.floating-label {
    font-size: var(--text-xs);
    color: var(--ink-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.btn-floating {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-5);
    font-size: var(--text-base);
    white-space: nowrap;
    animation: pulse-subtle 2s ease-in-out infinite;
}

.btn-floating svg {
    flex-shrink: 0;
}

@keyframes pulse-subtle {
    0%, 100% {
        box-shadow: 0 4px 14px rgba(196, 112, 75, 0.25);
    }
    50% {
        box-shadow: 0 6px 20px rgba(196, 112, 75, 0.4);
    }
}

/* Mobile: stack vertically */
@media (max-width: 480px) {
    .floating-cta-content {
        flex-direction: column;
        text-align: center;
        gap: var(--space-3);
    }

    .floating-cta-info {
        align-items: center;
    }

    .btn-floating {
        width: 100%;
        justify-content: center;
    }
}

/* Small disclaimer */
.disclaimer-small {
    font-size: var(--text-sm);
    color: var(--ink-muted);
    text-align: center;
    margin: 0;
    padding-bottom: var(--space-4);
}

/* Results content - fit viewport with footer at bottom */
.results-content {
    padding-top: calc(80px + var(--space-8)); /* navbar height + spacing */
    padding-bottom: var(--space-6);
    flex: 1;
    display: flex;
    flex-direction: column;
}

.results-content .container {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

/* =============================================================================
   PROCESS TIMELINE - Horizontal Step Indicator with Dates & Descriptions
   ============================================================================= */

.process-timeline {
    margin-bottom: var(--space-4); /* Reduced from space-8 */
    padding: var(--space-8) 0 var(--space-6) 0; /* Reduced padding */
    overflow: visible;
}

.timeline-track {
    display: flex !important;
    flex-direction: row !important;
    align-items: center;
    justify-content: center;
    position: relative;
    min-width: max-content;
}

/* Timeline step container */
.timeline-step {
    display: flex !important;
    flex-direction: column !important;
    align-items: center;
    position: relative;
    z-index: 2;
    flex-shrink: 0;
}

/* Circle with number */
.step-circle {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 3px solid var(--parchment);
    background: var(--surface-elevated);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.step-number {
    font-family: var(--font-display);
    font-size: var(--text-base);
    font-weight: 600;
    color: var(--ink-muted);
}

/* Step labels - date above circle, title below */
.step-date-wrapper {
    position: absolute;
    bottom: 100%;
    margin-bottom: var(--space-3);
    white-space: nowrap;
    text-align: center;
}

.step-title-wrapper {
    position: absolute;
    top: 100%;
    margin-top: var(--space-3);
    white-space: nowrap;
    text-align: center;
}

/* Legacy support for old structure */
.step-content {
    position: absolute;
    white-space: nowrap;
}

.step-content.above {
    bottom: 100%;
    margin-bottom: var(--space-3);
}

.step-content.below {
    top: 100%;
    margin-top: var(--space-3);
}

.step-title {
    font-family: var(--font-body);
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--ink);
    display: block;
}

.step-date {
    font-family: var(--font-body);
    font-size: var(--text-sm);
    color: var(--terracotta);
    font-weight: 500;
    display: block;
}

/* Connector line between steps - 1.5x larger */
.timeline-connector {
    width: 80px;
    height: 5px;
    background: var(--parchment);
    margin: 0 var(--space-2);
    border-radius: 3px;
    z-index: 1;
}

/* Completed state */
.timeline-step.completed .step-circle {
    border-color: var(--sage);
    background: var(--sage);
}

.timeline-step.completed .step-number {
    color: white;
}

.timeline-step.completed .step-title {
    color: var(--sage-dark);
}

.timeline-connector.completed {
    background: var(--sage);
}

/* Active state */
.timeline-step.active .step-circle {
    border-color: var(--terracotta);
    background: var(--terracotta);
    box-shadow: 0 0 0 4px rgba(196, 112, 75, 0.2);
}

.timeline-step.active .step-number {
    color: white;
}

.timeline-step.active .step-title {
    color: var(--terracotta);
    font-weight: 600;
}

/* Mobile responsive - stack vertically or compress */
@media (max-width: 600px) {
    .timeline-connector {
        width: 30px;
    }

    .step-circle {
        width: 36px;
        height: 36px;
    }

    .step-title {
        font-size: var(--text-xs);
    }

    .step-content.above {
        margin-bottom: var(--space-2);
    }

    .step-content.below {
        margin-top: var(--space-2);
    }
}

/* Mobile responsive */
@media (max-width: 768px) {
    .result-card-compact {
        grid-template-columns: 1fr;
        gap: var(--space-5);
    }

    .compact-estimates-with-cta {
        flex-direction: column;
        gap: var(--space-5);
        padding-left: 0;
        padding-top: var(--space-4);
        border-left: none;
        border-top: 1px solid var(--parchment);
        align-items: stretch;
    }

    .compact-estimates {
        flex-direction: row;
        justify-content: space-around;
    }

    .estimate-item {
        align-items: center;
        text-align: center;
    }

    .btn-cta-inline {
        justify-content: center;
        width: 100%;
    }
}

/* =============================================================================
   MOBILE CONVERSION-FOCUSED REDESIGN (480px and below)
   Priority: Compensation → Timeline → CTA Button (all above the fold)
   ============================================================================= */
@media (max-width: 480px) {

    /* -------------------------------------------------------------------------
       RESULTS PAGE - COMPLETE MOBILE OVERHAUL
       ------------------------------------------------------------------------- */

    /* Results container - tight padding for maximum content */
    .results-content .container {
        padding: var(--space-3) !important;
        max-width: 100% !important;
    }

    /* Hide user description on mobile - focus on conversion */
    .user-description-box {
        display: none !important;
    }

    /* -------------------------------------------------------------------------
       TIMELINE: Collapse into compact horizontal progress indicator
       ------------------------------------------------------------------------- */
    .process-timeline {
        margin: var(--space-2) 0 var(--space-3) !important;
        padding: 0 var(--space-2) !important;
        overflow: hidden;
    }

    .timeline-track {
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: flex-start !important;
        gap: 0 !important;
        min-width: unset !important;
        padding: 0 !important;
        overflow: visible;
    }

    /* Tiny step circles - compact */
    .timeline-step {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        gap: 4px !important;
        padding: 0 !important;
        min-width: unset !important;
        flex: 1;
        max-width: 60px;
    }

    .step-circle {
        width: 28px !important;
        height: 28px !important;
        flex-shrink: 0;
    }

    .step-number {
        font-size: 12px !important;
    }

    /* Hide dates on mobile - not important for conversion */
    .step-date-wrapper {
        display: none !important;
    }

    /* Tiny titles below circles */
    .step-title-wrapper {
        position: static !important;
        text-align: center !important;
        margin: 0 !important;
    }

    .step-title {
        font-size: 8px !important;
        font-weight: 500;
        white-space: nowrap;
        color: var(--ink-muted);
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 55px;
    }

    /* Completed/active step styling */
    .timeline-step.completed .step-title,
    .timeline-step.active .step-title {
        color: var(--ink);
        font-weight: 600;
    }

    /* Small connecting lines */
    .timeline-connector {
        display: block !important;
        flex: 1 !important;
        height: 2px !important;
        background: var(--parchment) !important;
        border-radius: 1px;
        margin-top: 13px !important; /* Align with center of circles */
        min-width: 8px !important;
        max-width: 20px !important;
    }

    .timeline-connector.completed {
        background: var(--terracotta) !important;
    }

    /* -------------------------------------------------------------------------
       RESULTS CARD: Hero compensation display - FULL WIDTH
       ------------------------------------------------------------------------- */
    .results-grid-compact {
        margin: var(--space-3) calc(-1 * var(--space-3)) 0 !important;
        width: calc(100% + var(--space-6)) !important;
    }

    .result-card-compact {
        padding: var(--space-5) var(--space-4) !important;
        display: flex !important;
        flex-direction: column !important;
        gap: var(--space-4) !important;
        background: linear-gradient(135deg, #FFF9F5 0%, #FFFFFF 100%);
        border: 2px solid var(--terracotta);
        border-radius: var(--radius-lg);
    }

    /* Category chips - make them subtle */
    .compact-section {
        order: 3; /* Move categories to bottom */
    }

    .compact-section h3 {
        font-size: var(--text-xs) !important;
        color: var(--ink-muted);
        margin-bottom: var(--space-2);
    }

    .categories-display-compact {
        display: flex;
        flex-wrap: wrap;
        gap: var(--space-1);
    }

    .category-chip {
        font-size: 11px !important;
        padding: 4px 8px !important;
    }

    /* Estimates section - HERO TREATMENT */
    .compact-estimates-with-cta {
        flex-direction: column !important;
        gap: var(--space-4) !important;
        padding: 0 !important;
        border: none !important;
        order: 1; /* Move to top! */
    }

    .compact-estimates {
        display: flex !important;
        flex-direction: column !important;
        gap: var(--space-2) !important;
        align-items: center !important;
        text-align: center;
    }

    .estimate-item {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        gap: 2px !important;
        padding: 0 !important;
        border: none !important;
    }

    .estimate-label {
        font-size: var(--text-xs) !important;
        color: var(--ink-muted);
        text-transform: uppercase;
        letter-spacing: 0.05em;
    }

    /* THE BIG NUMBER - Compensation */
    .estimate-value {
        font-family: var(--font-display) !important;
        font-size: 1.75rem !important;
        font-weight: 600 !important;
        color: var(--terracotta) !important;
        line-height: 1.1;
    }

    .estimate-value-small {
        font-family: var(--font-display) !important;
        font-size: var(--text-lg) !important;
        font-weight: 500 !important;
        color: var(--ink) !important;
    }

    /* CTA Button - PROMINENT */
    .btn-cta-inline {
        order: 2;
        min-height: 56px !important;
        font-size: var(--text-lg) !important;
        font-weight: 600 !important;
        border-radius: var(--radius-lg) !important;
        background: var(--terracotta) !important;
        box-shadow: 0 4px 14px rgba(168, 103, 75, 0.4) !important;
        justify-content: center;
        width: 100%;
        animation: pulse-cta 2s ease-in-out infinite;
    }

    .btn-cta-inline:hover,
    .btn-cta-inline:active {
        transform: translateY(-1px);
        box-shadow: 0 6px 20px rgba(168, 103, 75, 0.5) !important;
    }

    @keyframes pulse-cta {
        0%, 100% {
            box-shadow: 0 4px 14px rgba(168, 103, 75, 0.4);
        }
        50% {
            box-shadow: 0 4px 20px rgba(168, 103, 75, 0.6);
        }
    }

    /* Secondary link - smaller */
    .cta-secondary {
        margin-top: var(--space-3) !important;
    }

    .cta-secondary .btn-text {
        font-size: var(--text-sm);
    }

    /* Disclaimer - very small */
    .disclaimer-small {
        font-size: 10px !important;
        margin-top: var(--space-2) !important;
        text-align: center;
    }

    /* -------------------------------------------------------------------------
       LOADING & ERROR STATES
       ------------------------------------------------------------------------- */
    .loading-card,
    .error-card {
        padding: var(--space-6) var(--space-4) !important;
    }

    .loading-spinner-large {
        width: 48px !important;
        height: 48px !important;
    }

    /* -------------------------------------------------------------------------
       CHATGPT INPUT AREA
       ------------------------------------------------------------------------- */
    .chatgpt-initial {
        padding: var(--space-4);
    }

    .chatgpt-brand {
        flex-direction: column;
        align-items: center;
        gap: var(--space-1);
    }

    .chatgpt-title {
        font-size: 1.25rem !important;
        margin-bottom: var(--space-6) !important;
    }
}


/* =============================================================================
   CHATGPT-STYLE INTERFACE
   Clean, minimal, centered input that expands into full-page conversation
   ============================================================================= */

.chatgpt-hero {
    height: 100vh;
    background: #FFFFFF;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

/* Initial centered state */
.chatgpt-initial {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: var(--space-6);
    max-width: 800px;
    margin: 0 auto;
    width: 100%;
}

.chatgpt-brand {
    display: flex;
    align-items: baseline;
    gap: 6px;
    margin-bottom: var(--space-2);
    opacity: 0.6;
}

.chatgpt-brand-text {
    font-family: var(--font-display);
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--ink);
    letter-spacing: 0.02em;
}

.chatgpt-brand-legal {
    font-family: var(--font-display);
    font-size: var(--text-xs);
    font-weight: 400;
    color: var(--ink-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.chatgpt-title {
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 4vw, 2.25rem);
    font-weight: 400;
    color: var(--ink);
    text-align: center;
    margin-bottom: var(--space-8);
    line-height: 1.3;
}

.chatgpt-title .highlight {
    color: var(--terracotta);
    font-style: italic;
}

/* ChatGPT-style input wrapper */
.chatgpt-input-centered {
    width: 100%;
    max-width: 680px;
}

.chatgpt-form {
    width: 100%;
}

.chatgpt-input-wrapper {
    display: flex;
    align-items: flex-end;
    gap: 0;
    background: #F4F4F4;
    border-radius: 26px;
    padding: 8px 8px 8px 16px;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.chatgpt-input-wrapper:focus-within {
    background: #EFEFEF;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.chatgpt-textarea {
    flex: 1;
    border: none;
    background: transparent;
    font-family: var(--font-body);
    font-size: var(--text-base);
    color: var(--ink);
    padding: 8px 0;
    resize: none;
    min-height: 24px;
    max-height: 200px;
    line-height: 1.5;
    outline: none;
    overflow-y: hidden; /* Hide scrollbar - textarea expands via JS */
}

.chatgpt-textarea::placeholder {
    color: #999;
}

.chatgpt-attach-btn,
.chatgpt-mic-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    color: #666;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.15s ease;
    flex-shrink: 0;
}

.chatgpt-attach-btn:hover,
.chatgpt-mic-btn:hover {
    background: rgba(0, 0, 0, 0.05);
    color: var(--ink);
}

.chatgpt-send-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: var(--ink);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.15s ease;
    flex-shrink: 0;
    opacity: 0.3;
}

.chatgpt-send-btn:not(:disabled) {
    opacity: 1;
}

.chatgpt-send-btn:not(:disabled):hover {
    background: #333;
    transform: scale(1.05);
}

.chatgpt-send-btn:disabled {
    cursor: not-allowed;
}

/* Conversation view */
.chatgpt-conversation {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100vh;
}

/* Handle hidden attribute properly */
.chatgpt-conversation[hidden] {
    display: none !important;
}

.chatgpt-initial[hidden] {
    display: none !important;
}

.chatgpt-messages-area {
    flex: 1;
    overflow-y: auto;
    padding: 80px var(--space-4) var(--space-4);
}

.chatgpt-messages {
    max-width: 680px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

/* Message bubbles - ChatGPT style */
.chatgpt-message {
    display: flex;
    gap: var(--space-3);
    animation: messageSlideIn 0.3s ease-out;
}

@keyframes messageSlideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chatgpt-message.user {
    justify-content: flex-end;
}

.chatgpt-message.user .chatgpt-message-content {
    background: #F4F4F4;
    color: var(--ink);
    border-radius: 20px 20px 4px 20px;
    max-width: 85%;
}

.chatgpt-message.bot .chatgpt-message-content {
    background: transparent;
    color: var(--ink);
    max-width: 100%;
}

.chatgpt-message-content {
    padding: var(--space-3) var(--space-4);
    font-size: var(--text-base);
    line-height: 1.6;
}

.chatgpt-message-content p {
    margin: 0;
}

.chatgpt-message-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
    background: var(--cream);
}

.chatgpt-message.user .chatgpt-message-avatar {
    display: none;
}

/* Bottom input area */
.chatgpt-input-bottom {
    padding: var(--space-4);
    background: linear-gradient(to top, #FFFFFF 80%, transparent);
    position: sticky;
    bottom: 0;
}

.chatgpt-input-bottom .chatgpt-form {
    max-width: 680px;
    margin: 0 auto;
}

.chatgpt-disclaimer {
    text-align: center;
    font-size: var(--text-xs);
    color: #999;
    margin-top: var(--space-2);
}

/* Typing indicator */
.chatgpt-typing {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: var(--space-3);
}

.chatgpt-typing-dot {
    width: 8px;
    height: 8px;
    background: #999;
    border-radius: 50%;
    animation: typingBounce 1.4s infinite ease-in-out both;
}

.chatgpt-typing-dot:nth-child(1) { animation-delay: -0.32s; }
.chatgpt-typing-dot:nth-child(2) { animation-delay: -0.16s; }
.chatgpt-typing-dot:nth-child(3) { animation-delay: 0s; }

@keyframes typingBounce {
    0%, 80%, 100% {
        transform: scale(0.6);
        opacity: 0.4;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Hide navbar on chatgpt page when scrolled */
.chatgpt-hero .navbar {
    background: transparent;
}

/* Responsive */
@media (max-width: 768px) {
    .chatgpt-initial {
        padding: var(--space-4);
    }

    .chatgpt-title {
        font-size: 1.5rem;
    }

    .chatgpt-input-wrapper {
        padding: 6px 6px 6px 12px;
    }

    .chatgpt-attach-btn,
    .chatgpt-mic-btn,
    .chatgpt-send-btn {
        width: 32px;
        height: 32px;
    }

    .chatgpt-messages-area {
        padding: 70px var(--space-3) var(--space-3);
    }
}
