/* ============================================
   PillBeep - Complete Theming System
   ============================================
   All colors and visual properties are defined as CSS variables.
   To change the entire theme, modify the variables in :root or add new theme classes.
*/

/* ============================================
   WHITE THEME (Default)
   ============================================ */
:root,
.theme-white {
    /* Primary Colors */
    --color-primary: #6366f1;
    --color-primary-dark: #4f46e5;
    --color-primary-light: #818cf8;
    --color-primary-rgb: 99, 102, 241;

    /* Secondary Colors */
    --color-secondary: #8b5cf6;
    --color-secondary-light: #a78bfa;
    --color-secondary-rgb: 139, 92, 246;

    /* Accent Colors */
    --color-accent: #06b6d4;
    --color-accent-light: #22d3ee;
    --color-accent-rgb: 6, 182, 212;

    /* Semantic Colors */
    --color-success: #10b981;
    --color-success-light: #34d399;
    --color-warning: #f59e0b;
    --color-warning-light: #fbbf24;
    --color-error: #dc2626;
    --color-error-light: #fef2f2;
    --color-info: #3b82f6;
    --color-info-light: #60a5fa;

    /* Background Colors */
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    --bg-elevated: #ffffff;
    --bg-overlay: rgba(15, 23, 42, 0.5);

    /* Surface Colors */
    --surface-card: #ffffff;
    --surface-card-hover: #f8fafc;
    --surface-input: #ffffff;
    --surface-highlight: rgba(99, 102, 241, 0.08);

    /* Text Colors */
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --text-on-primary: #ffffff;
    --text-on-dark: #ffffff;
    --text-link: #6366f1;
    --text-link-hover: #4f46e5;

    /* Border Colors */
    --border-default: #e2e8f0;
    --border-light: #f1f5f9;
    --border-focus: #6366f1;
    --border-error: #ef4444;

    /* Shadow Colors */
    --shadow-sm: 0 1px 2px 0 rgba(15, 23, 42, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.08), 0 2px 4px -2px rgba(15, 23, 42, 0.05);
    --shadow-lg: 0 10px 15px -3px rgba(15, 23, 42, 0.08), 0 4px 6px -4px rgba(15, 23, 42, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(15, 23, 42, 0.1), 0 8px 10px -6px rgba(15, 23, 42, 0.05);
    --shadow-glow: 0 0 30px rgba(99, 102, 241, 0.3);
    --shadow-glow-lg: 0 0 60px rgba(99, 102, 241, 0.4);

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    --gradient-accent: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #06b6d4 100%);
    --gradient-hero: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
    --gradient-card: linear-gradient(135deg, rgba(99, 102, 241, 0.05) 0%, rgba(139, 92, 246, 0.05) 100%);
    --gradient-shine: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.4) 50%, transparent 100%);

    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;
    --space-4xl: 6rem;

    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
    --radius-full: 9999px;

    /* Typography */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 1.875rem;
    --font-size-4xl: 2.25rem;
    --font-size-5xl: 3rem;
    --font-size-6xl: 3.75rem;

    /* Line Heights */
    --line-height-tight: 1.25;
    --line-height-normal: 1.5;
    --line-height-relaxed: 1.75;

    /* Font Weights */
    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
    --font-weight-extrabold: 800;

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-normal: 250ms ease;
    --transition-slow: 350ms ease;

    /* Z-Index Scale */
    --z-dropdown: 100;
    --z-sticky: 200;
    --z-fixed: 300;
    --z-modal-backdrop: 400;
    --z-modal: 500;
    --z-popover: 600;
    --z-tooltip: 700;
}

/* ============================================
   RESET & BASE STYLES
   ============================================ */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

h1, h2, h3, h4, h5, h6, p, span, div, section, li, ul, ol, img {
    outline: none;
    -webkit-user-select: none;
    user-select: none;
}

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

body {
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    line-height: var(--line-height-normal);
    color: var(--text-primary);
    background-color: var(--bg-primary);
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

input, textarea, select, [contenteditable] {
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}

/* ============================================
   LAYOUT
   ============================================ */
.app-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.main-content {
    flex: 1;
}

.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

.container-sm {
    max-width: 640px;
}

.container-md {
    max-width: 768px;
}

.container-lg {
    max-width: 1024px;
}

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

.section-sm {
    padding: var(--space-2xl) 0;
}

.section-lg {
    padding: calc(var(--space-4xl) * 1.5) 0;
}

/* ============================================
   TYPOGRAPHY
   ============================================ */
h1, h2, h3, h4, h5, h6 {
    color: var(--text-primary);
    font-weight: var(--font-weight-bold);
    line-height: var(--line-height-tight);
}

h1 {
    font-size: var(--font-size-5xl);
}

h2 {
    font-size: var(--font-size-4xl);
}

h3 {
    font-size: var(--font-size-2xl);
}

h4 {
    font-size: var(--font-size-xl);
}

h5 {
    font-size: var(--font-size-lg);
}

h6 {
    font-size: var(--font-size-base);
}

p {
    color: var(--text-secondary);
    line-height: var(--line-height-relaxed);
}

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

a:hover {
    color: var(--text-link-hover);
}

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

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

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

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-xl);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-semibold);
    line-height: 1;
    border: none;
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--transition-normal);
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary {
    background: var(--gradient-primary);
    color: var(--text-on-primary);
    box-shadow: var(--shadow-md), var(--shadow-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg), var(--shadow-glow-lg);
}

.btn-secondary {
    background: var(--surface-card);
    color: var(--text-primary);
    border: 2px solid var(--border-default);
}

.btn-secondary:hover {
    border-color: var(--color-primary);
    background: var(--surface-highlight);
}

.btn-accent {
    background: var(--color-accent);
    color: var(--text-on-primary);
}

.btn-accent:hover {
    background: var(--color-accent-light);
}

.btn-outline {
    background: transparent;
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
}

.btn-outline:hover {
    background: var(--color-primary);
    color: var(--text-on-primary);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
}

.btn-ghost:hover {
    background: var(--surface-highlight);
    color: var(--text-primary);
}

.btn-lg {
    padding: var(--space-lg) var(--space-2xl);
    font-size: var(--font-size-lg);
    border-radius: var(--radius-xl);
}

.btn-sm {
    padding: var(--space-sm) var(--space-md);
    font-size: var(--font-size-sm);
    border-radius: var(--radius-md);
}

.btn-icon {
    width: 2.5rem;
    height: 2.5rem;
    padding: 0;
    border-radius: var(--radius-lg);
}

.login-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
}

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

/* ============================================
   CARDS
   ============================================ */
.card {
    background: var(--surface-card);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-xl);
    padding: var(--space-xl);
    transition: all var(--transition-normal);
}

.card:hover {
    box-shadow: var(--shadow-lg);
    border-color: transparent;
}

.card-elevated {
    box-shadow: var(--shadow-md);
    border: none;
}

.card-glass {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.card-gradient {
    background: var(--gradient-card);
    border: 1px solid rgba(99, 102, 241, 0.1);
}

.card-feature {
    padding: var(--space-2xl);
    text-align: center;
}

.card-feature .icon {
    width: 4rem;
    height: 4rem;
    margin: 0 auto var(--space-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-primary);
    border-radius: var(--radius-xl);
    font-size: 1.75rem;
}

.card-feature h3 {
    margin-bottom: var(--space-md);
}

/* ============================================
   NAVIGATION
   ============================================ */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: var(--z-fixed);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-light);
    transition: all var(--transition-normal);
}

.navbar-scrolled {
    box-shadow: var(--shadow-md);
}

.navbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 4.5rem;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.navbar-logo {
    height: 2.5rem;
    width: auto;
}

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

.navbar-link {
    color: var(--text-secondary);
    font-weight: var(--font-weight-medium);
    transition: color var(--transition-fast);
    padding: var(--space-sm) 0;
    position: relative;
}

.navbar-link:hover,
.navbar-link.active {
    color: var(--color-primary);
}

.navbar-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: width var(--transition-normal);
}

.navbar-link:hover::after,
.navbar-link.active::after {
    width: 100%;
}

.navbar-actions {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.navbar-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--space-sm);
}

.navbar-toggle span {
    display: block;
    width: 1.5rem;
    height: 2px;
    background: var(--text-primary);
    margin: 5px 0;
    transition: all var(--transition-fast);
}

/* Mobile menu container - hidden on desktop */
.navbar-mobile-menu {
    display: none;
}

/* Mobile Navigation
   Breakpoint bumped from 768px → 1024px so portrait-mode tablets (iPad, common
   Android tablets at 800–1024px wide) get the hamburger drawer instead of the
   full nav row. With 6 links + login + Start-free + language selector + the
   pharmacy CTA, the desktop row overflows on anything narrower than ~1100px. */
@media (max-width: 1024px) {
    .navbar-toggle {
        display: block;
    }

    .navbar-links,
    .navbar-actions {
        display: none !important;
    }

    .navbar-mobile-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        background: var(--bg-primary);
        padding: var(--space-md) var(--space-lg) var(--space-lg);
        gap: var(--space-xs);
        box-shadow: 0 8px 24px rgba(0,0,0,0.1);
        max-height: calc(100vh - 4.5rem);
        overflow-y: auto;
        z-index: 100;
    }

    .navbar-mobile-menu.open {
        display: flex;
    }

    .navbar-mobile-menu .navbar-link {
        padding: var(--space-sm) var(--space-md);
        border-radius: var(--radius-md);
    }

    .navbar-mobile-menu .navbar-link:hover {
        background: var(--bg-secondary);
    }

    .navbar-mobile-actions {
        display: flex;
        flex-direction: column;
        gap: var(--space-sm);
        padding-top: var(--space-md);
        margin-top: var(--space-sm);
        border-top: 1px solid var(--border-default);
    }
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
    padding: calc(var(--space-4xl) * 2) 0 var(--space-4xl);
    background: var(--gradient-hero);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 80%;
    height: 150%;
    background: radial-gradient(ellipse, rgba(99, 102, 241, 0.08) 0%, transparent 70%);
    pointer-events: none;
}

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

.hero-text {
    max-width: 600px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    background: var(--surface-highlight);
    border-radius: var(--radius-full);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    color: var(--color-primary);
    margin-bottom: var(--space-lg);
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, var(--font-size-6xl));
    font-weight: var(--font-weight-extrabold);
    margin-bottom: var(--space-lg);
    line-height: 1.1;
    outline: none;
}

.hero-title:focus,
.hero-title *:focus,
.text-gradient:focus {
    outline: none;
}

.hero-subtitle {
    font-size: var(--font-size-xl);
    color: var(--text-secondary);
    margin-bottom: var(--space-2xl);
    line-height: var(--line-height-relaxed);
}

.hero-actions {
    display: flex;
    gap: var(--space-md);
    flex-wrap: wrap;
}

.hero-image {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-phone {
    max-width: 320px;
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-xl), var(--shadow-glow-lg);
}

.hero-floating {
    position: absolute;
    padding: var(--space-md) var(--space-lg);
    background: var(--surface-card);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: var(--space-md);
    animation: float 3s ease-in-out infinite;
}

.hero-floating-1 {
    top: 10%;
    right: -10%;
}

.hero-floating-2 {
    bottom: 15%;
    left: -5%;
    animation-delay: -1.5s;
}

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

@media (max-width: 968px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-text {
        max-width: 100%;
    }

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

    .hero-image {
        display: none;
    }
}

/* Mobile spacing reductions */
@media (max-width: 768px) {
    .hero {
        padding: 5rem 0 var(--space-sm) !important;
    }

    .hero .section-header {
        margin-bottom: 0;
    }

    .hero .section-header h1 {
        font-size: var(--font-size-3xl);
        margin-bottom: var(--space-sm);
    }

    .hero .section-header p {
        font-size: var(--font-size-base);
    }

    .section {
        padding-top: var(--space-lg);
        padding-bottom: var(--space-lg);
    }

    .section[style*="padding-top: 0"] {
        padding-top: 0 !important;
    }

    .section[style*="padding-bottom"] {
        padding-bottom: var(--space-md) !important;
    }

    .section-sm {
        padding: var(--space-lg) 0 !important;
    }

    .section-lg {
        padding: var(--space-2xl) 0 !important;
    }

    .hero-title {
        font-size: clamp(1.8rem, 6vw, 2.5rem);
        margin-bottom: var(--space-md);
    }

    .hero-subtitle {
        font-size: var(--font-size-lg);
        margin-bottom: var(--space-xl);
    }

    .hero-badge {
        margin-bottom: var(--space-md);
    }

    .section-header {
        margin: 0 auto var(--space-lg);
    }

    .section-header h2 {
        font-size: var(--font-size-2xl);
    }

    .feature-showcase {
        gap: var(--space-lg);
    }

    .feature-showcase-content h2 {
        font-size: var(--font-size-2xl);
        margin-bottom: var(--space-sm);
    }

    .feature-list {
        gap: var(--space-sm);
    }

    .pharmacy-steps-grid {
        grid-template-columns: 1fr !important;
    }
}

/* ============================================
   FEATURE SECTIONS
   ============================================ */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-xl);
}

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

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

@media (max-width: 968px) {
    .features-grid-3,
    .features-grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .features-grid,
    .features-grid-3,
    .features-grid-4 {
        grid-template-columns: 1fr;
    }
}

.feature-showcase {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4xl);
    align-items: center;
}

.feature-showcase.reverse {
    direction: rtl;
}

.feature-showcase.reverse > * {
    direction: ltr;
}

.feature-showcase-content h2 {
    margin-bottom: var(--space-lg);
}

.feature-showcase-content p {
    margin-bottom: var(--space-xl);
}

.feature-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.feature-list li {
    display: flex;
    align-items: flex-start;
    gap: var(--space-md);
    color: var(--text-secondary);
}

.feature-list li::before {
    content: '✓';
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
    background: var(--color-success);
    color: white;
    border-radius: var(--radius-full);
    font-size: var(--font-size-xs);
    flex-shrink: 0;
}

.feature-showcase-image {
    position: relative;
}

.feature-showcase-image img {
    width: 100%;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
}

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

    .feature-showcase.reverse {
        direction: ltr;
    }
}

/* ============================================
   PRICING
   ============================================ */
.pricing-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
    gap: var(--space-xl);
    max-width: 1400px;
    margin: 0 auto;
}

.pricing-card {
    position: relative;
    padding: var(--space-2xl);
}

.pricing-card.featured {
    background: var(--gradient-primary);
    color: var(--text-on-primary);
    transform: scale(1.05);
}

.pricing-card.featured p,
.pricing-card.featured .pricing-feature {
    color: rgba(255, 255, 255, 0.9);
}

.pricing-card.featured .pricing-price {
    color: var(--text-on-primary);
}

.pricing-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    padding: var(--space-xs) var(--space-md);
    background: var(--color-accent);
    color: var(--text-on-primary);
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-semibold);
    border-radius: var(--radius-full);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

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

.pricing-title {
    font-size: var(--font-size-xl);
    margin-bottom: var(--space-sm);
}

.pricing-price {
    font-size: var(--font-size-5xl);
    font-weight: var(--font-weight-extrabold);
    color: var(--text-primary);
}

.pricing-price span {
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-normal);
    opacity: 0.7;
}

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

.pricing-feature {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md) 0;
    border-bottom: 1px solid var(--border-light);
    color: var(--text-secondary);
}

.pricing-feature svg {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
}

.pricing-feature:last-child {
    border-bottom: none;
}

.pricing-feature .icon {
    color: var(--color-success);
}

.pricing-card.featured .pricing-feature {
    border-bottom-color: rgba(255, 255, 255, 0.2);
}

.pricing-card.featured .btn {
    background: var(--bg-primary);
    color: var(--color-primary);
}

/* ============================================
   TESTIMONIALS
   ============================================ */
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: var(--space-xl);
}

.testimonial-card {
    padding: var(--space-2xl);
}

.testimonial-content {
    font-size: var(--font-size-lg);
    font-style: italic;
    color: var(--text-secondary);
    margin-bottom: var(--space-xl);
    line-height: var(--line-height-relaxed);
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.testimonial-avatar {
    width: 3rem;
    height: 3rem;
    border-radius: var(--radius-full);
    object-fit: cover;
}

.testimonial-name {
    font-weight: var(--font-weight-semibold);
    color: var(--text-primary);
}

.testimonial-role {
    font-size: var(--font-size-sm);
    color: var(--text-muted);
}

/* ============================================
   STATS
   ============================================ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-xl);
}

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

.stat-value {
    font-size: var(--font-size-5xl);
    font-weight: var(--font-weight-extrabold);
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    margin-bottom: var(--space-sm);
}

.stat-label {
    color: var(--text-muted);
    font-weight: var(--font-weight-medium);
}

@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ============================================
   CTA SECTION
   ============================================ */
.cta-section {
    background: var(--gradient-primary);
    color: var(--text-on-primary);
    text-align: center;
    padding: var(--space-4xl);
    border-radius: var(--radius-2xl);
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.cta-content {
    position: relative;
    z-index: 1;
}

.cta-section h2 {
    color: var(--text-on-primary);
    margin-bottom: var(--space-md);
}

.cta-section p {
    color: rgba(255, 255, 255, 0.9);
    max-width: 600px;
    margin: 0 auto var(--space-xl);
}

.cta-section .btn {
    background: var(--bg-primary);
    color: var(--color-primary);
}

.cta-section .btn:hover {
    background: var(--bg-secondary);
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-default);
    padding: var(--space-4xl) 0 var(--space-xl);
}

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

.footer-brand p {
    margin-top: var(--space-md);
    max-width: 300px;
}

.footer-title {
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-semibold);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-primary);
    margin-bottom: var(--space-lg);
}

.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.footer-link {
    color: var(--text-muted);
    font-size: var(--font-size-sm);
    transition: color var(--transition-fast);
}

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

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: var(--space-xl);
    border-top: 1px solid var(--border-default);
}

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

.footer-social {
    display: flex;
    gap: var(--space-md);
}

.footer-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    background: var(--surface-highlight);
    border-radius: var(--radius-lg);
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}

.footer-social a:hover {
    background: var(--color-primary);
    color: var(--text-on-primary);
}

@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: var(--space-2xl);
    }

    .footer-brand {
        grid-column: span 2;
    }

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

/* ============================================
   LANGUAGE SELECTOR
   ============================================ */
.language-selector {
    position: relative;
}

.language-btn {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    background: transparent;
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}

.language-btn:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.language-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: var(--space-sm);
    background: var(--surface-card);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    min-width: 150px;
    z-index: var(--z-dropdown);
    display: none;
}

.language-dropdown.open {
    display: block;
}

.language-option {
    display: block;
    width: 100%;
    padding: var(--space-md);
    text-align: left;
    background: none;
    border: none;
    cursor: pointer;
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}

.language-option:hover {
    background: var(--surface-highlight);
    color: var(--color-primary);
}

.language-option.active {
    color: var(--color-primary);
    font-weight: var(--font-weight-medium);
}

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

.hidden {
    display: none !important;
}

.flex {
    display: flex;
}

.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.flex-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.grid {
    display: grid;
}

.gap-sm {
    gap: var(--space-sm);
}

.gap-md {
    gap: var(--space-md);
}

.gap-lg {
    gap: var(--space-lg);
}

.gap-xl {
    gap: var(--space-xl);
}

.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }
.mt-2xl { margin-top: var(--space-2xl); }
.mt-3xl { margin-top: var(--space-3xl); }

.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }
.mb-2xl { margin-bottom: var(--space-2xl); }
.mb-3xl { margin-bottom: var(--space-3xl); }

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

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

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

.animate-fade-in {
    animation: fadeIn 0.5s ease forwards;
}

.animate-slide-in {
    animation: slideIn 0.5s ease forwards;
}

/* ============================================
   SECTION HEADERS
   ============================================ */
.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto var(--space-3xl);
}

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

.section-header p {
    font-size: var(--font-size-lg);
}

/* ============================================
   RESPONSIVE VISIBILITY
   ============================================ */
@media (max-width: 640px) {
    .hide-mobile {
        display: none !important;
    }
}

@media (min-width: 641px) {
    .show-mobile {
        display: none !important;
    }
}

/* ============================================
   SCROLL EFFECTS
   ============================================ */
/* Elements visible by default - JS enhances with animation if available */
.scroll-reveal {
    opacity: 1;
    transform: translateY(0);
    transition: all 0.6s ease;
}

/* When JS is ready and element hasn't been revealed yet */
.js-ready .scroll-reveal:not(.revealed) {
    opacity: 0;
    transform: translateY(30px);
}

.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   PRICE STRIKETHROUGH
   ============================================ */
.price-strikethrough {
    position: relative;
    display: inline-block;
    color: rgba(255, 255, 255, 0.7);
}

.price-strikethrough::before {
    content: '';
    position: absolute;
    top: 50%;
    left: -5%;
    width: 110%;
    height: 4px;
    background: linear-gradient(90deg, transparent 0%, #ef4444 10%, #ef4444 90%, transparent 100%);
    transform: rotate(-12deg);
    transform-origin: center;
}

/* ============================================
   LEGAL CONTENT STYLING
   ============================================ */
.legal-content {
    color: var(--text-secondary);
    line-height: 1.8;
    font-size: var(--font-size-base);
}

.legal-content h2 {
    color: var(--text-primary);
    font-size: var(--font-size-2xl);
    font-weight: 700;
    margin-top: var(--space-2xl);
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-sm);
    border-bottom: 2px solid var(--color-secondary);
}

.legal-content h2:first-child {
    margin-top: 0;
}

.legal-content h3 {
    color: var(--text-primary);
    font-size: var(--font-size-xl);
    font-weight: 600;
    margin-top: var(--space-xl);
    margin-bottom: var(--space-md);
}

.legal-content p {
    margin-bottom: var(--space-md);
    color: var(--text-secondary);
}

.legal-content ul,
.legal-content ol {
    margin-bottom: var(--space-lg);
    padding-left: var(--space-xl);
}

.legal-content li {
    margin-bottom: var(--space-sm);
    color: var(--text-secondary);
}

.legal-content li::marker {
    color: var(--color-secondary);
}

.legal-content strong {
    color: var(--text-primary);
    font-weight: 600;
}

.legal-content a {
    color: var(--color-primary);
    text-decoration: underline;
    transition: color var(--transition-fast);
}

.legal-content a:hover {
    color: var(--color-primary-dark);
}

.legal-content table {
    width: 100%;
    border-collapse: collapse;
    margin: var(--space-lg) 0;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.legal-content th,
.legal-content td {
    padding: var(--space-md);
    text-align: left;
    border-bottom: 1px solid var(--border-default);
}

.legal-content th {
    background: rgba(139, 92, 246, 0.1);
    color: var(--text-primary);
    font-weight: 600;
}

.legal-content tr:last-child td {
    border-bottom: none;
}

.legal-content tr:hover td {
    background: rgba(139, 92, 246, 0.05);
}

/* Non-English notice styling */
.legal-content .non-english-notice {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(139, 92, 246, 0.05));
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    margin-bottom: var(--space-2xl);
}

.legal-content .non-english-notice h3 {
    margin-top: 0;
    color: var(--color-secondary);
}

/* Protected email links */
.protected-email {
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.protected-email:hover {
    color: var(--color-primary-dark);
    text-decoration: underline;
}

/* ============================================
   DEMO / KIOSK PAGE
   ============================================ */

/* Hide nav and footer in demo mode */
.demo-mode .navbar,
.demo-mode .footer {
    display: none !important;
}
.demo-mode .main-content {
    padding: 0;
}

/* Full-screen overlay wrapper */
.demo-overlay {
    position: relative;
    overflow-x: hidden;
    background: var(--bg-primary);
    -webkit-user-select: none;
    user-select: none;
}

/* Prevent focus outlines on all demo elements */
.demo-overlay *:focus,
.demo-overlay *:focus-visible {
    outline: none !important;
    box-shadow: none !important;
    -webkit-tap-highlight-color: transparent;
}

/* Floating pill background decorations */
.demo-pills-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}
.demo-pill {
    position: absolute;
    width: 30px;
    height: 14px;
    border-radius: 7px;
    opacity: 0.12;
}
.demo-pill-1 { background: #8b5cf6; top: 8%; left: 5%; animation: demoFloat 7s ease-in-out infinite; }
.demo-pill-2 { background: #6366f1; top: 25%; right: 8%; animation: demoFloat 9s ease-in-out infinite 1s; width: 24px; height: 11px; border-radius: 6px; }
.demo-pill-3 { background: #a78bfa; top: 45%; left: 3%; animation: demoFloat 8s ease-in-out infinite 2s; width: 36px; height: 16px; border-radius: 8px; }
.demo-pill-4 { background: #6366f1; top: 60%; right: 4%; animation: demoFloat 10s ease-in-out infinite 0.5s; }
.demo-pill-5 { background: #8b5cf6; top: 78%; left: 7%; animation: demoFloat 7.5s ease-in-out infinite 3s; width: 22px; height: 10px; border-radius: 5px; }
.demo-pill-6 { background: #a78bfa; top: 90%; right: 10%; animation: demoFloat 8.5s ease-in-out infinite 1.5s; width: 28px; height: 12px; border-radius: 6px; }

@keyframes demoFloat {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    25% { transform: translateY(-30px) rotate(15deg); }
    50% { transform: translateY(-10px) rotate(-10deg); }
    75% { transform: translateY(-25px) rotate(5deg); }
}

/* Demo sections - full viewport */
.demo-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
    padding: var(--space-3xl) var(--space-xl);
}

.demo-section-inner {
    max-width: 900px;
    width: 100%;
    text-align: center;
    animation: demoFadeUp 0.8s ease-out both;
}

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

/* Hero Section */
.demo-hero {
    background: linear-gradient(135deg, #f0f0ff 0%, #e8e0ff 30%, #f0f8ff 60%, #f8f0ff 100%);
    background-size: 300% 300%;
    animation: demoGradientShift 12s ease infinite;
    flex-direction: column;
    overflow: hidden;
}

@keyframes demoGradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.demo-hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    animation: demoFadeUp 1s ease-out both;
}

.demo-logo {
    width: 320px;
    max-width: 80vw;
    height: auto;
    margin-bottom: var(--space-2xl);
    filter: drop-shadow(0 10px 30px rgba(99, 102, 241, 0.3));
    animation: demoLogoBounce 3s ease-in-out infinite;
}

@keyframes demoLogoBounce {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-12px) scale(1.02); }
}

/* Pulse rings behind logo */
.demo-pulse-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 200px;
    height: 200px;
    margin: -100px 0 0 -100px;
    border-radius: 50%;
    border: 3px solid rgba(99, 102, 241, 0.25);
    animation: demoPulseRing 3s ease-out infinite;
    z-index: 1;
}
.demo-pulse-ring-2 {
    animation-delay: 1s;
}
.demo-pulse-ring-3 {
    animation-delay: 2s;
}

@keyframes demoPulseRing {
    0% { transform: scale(0.8); opacity: 0.7; }
    100% { transform: scale(3.5); opacity: 0; }
}

.demo-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: var(--space-lg);
    line-height: 1.1;
}

.demo-subtitle {
    font-size: clamp(1.3rem, 3vw, 1.75rem);
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Worry Section */
.demo-worry {
    background: var(--bg-secondary);
}

.demo-worry-icon {
    margin-bottom: var(--space-xl);
    animation: demoShake 4s ease-in-out infinite;
}

@keyframes demoShake {
    0%, 80%, 100% { transform: rotate(0deg); }
    85% { transform: rotate(-5deg); }
    90% { transform: rotate(5deg); }
    95% { transform: rotate(-3deg); }
}

.demo-section-title {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: var(--space-lg);
    line-height: 1.2;
}

.demo-section-text {
    font-size: clamp(1.25rem, 2.5vw, 1.6rem);
    color: var(--text-secondary);
    max-width: 800px;
    margin: 0 auto var(--space-2xl);
    line-height: 1.7;
}

.demo-stats-row {
    display: flex;
    justify-content: center;
    gap: var(--space-3xl);
    flex-wrap: wrap;
}

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

.demo-stat-number {
    display: block;
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    margin-bottom: var(--space-sm);
}

.demo-stat-label {
    display: block;
    font-size: var(--font-size-xl);
    color: var(--text-muted);
    font-weight: 500;
}

/* Photo Frame Section */
.demo-photoframe {
    background: var(--bg-primary);
}

.demo-tablet-wide {
    width: 420px;
    height: 280px;
}

.demo-screen-photos {
    flex-direction: column;
    padding: 10px;
    gap: 6px;
}

.demo-photo-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 6px;
    width: 100%;
    flex: 1;
    min-height: 0;
}

.demo-photo {
    border-radius: 6px;
    overflow: hidden;
    animation: demoPhotoFade 12s ease-in-out infinite;
}

.demo-photo svg {
    width: 100%;
    height: 100%;
    display: block;
}

.demo-photo-a {
    grid-column: 1 / 3;
    animation-delay: 0s;
}

.demo-photo-b {
    animation-delay: 4s;
}

.demo-photo-c {
    animation-delay: 8s;
}

@keyframes demoPhotoFade {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.85; transform: scale(1.02); }
}

.demo-photoframe-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: var(--font-size-base);
    color: var(--text-muted);
    font-weight: 500;
    padding: 4px 0 0;
}

/* Reminder Section */
.demo-reminder {
    background: var(--bg-secondary);
}

.demo-screen-reminder {
    flex-direction: column;
    gap: 10px;
    padding: 16px;
    background: linear-gradient(180deg, #f0ecff 0%, #ffffff 100%) !important;
}

.demo-reminder-bell {
    animation: demoReminderShake 1.5s ease-in-out infinite;
}

@keyframes demoReminderShake {
    0%, 70%, 100% { transform: rotate(0deg); }
    75% { transform: rotate(-12deg); }
    80% { transform: rotate(12deg); }
    85% { transform: rotate(-8deg); }
    90% { transform: rotate(8deg); }
    95% { transform: rotate(-4deg); }
}

.demo-reminder-time {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--color-primary);
    line-height: 1;
}

.demo-reminder-pill-row {
    display: flex;
    align-items: center;
    gap: 12px;
    background: white;
    padding: 10px 18px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.demo-reminder-pill-info {
    text-align: left;
}

.demo-reminder-pill-info strong {
    display: block;
    font-size: var(--font-size-lg);
    color: var(--text-primary);
}

.demo-reminder-pill-info span {
    font-size: var(--font-size-base);
    color: var(--text-muted);
}

.demo-reminder-confirm-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--gradient-primary);
    color: white;
    font-weight: 700;
    font-size: var(--font-size-lg);
    padding: 10px 32px;
    border-radius: var(--radius-full);
    animation: demoGlow 2s ease-in-out infinite;
}

/* Confirmed Section */
.demo-confirmed {
    background: var(--bg-primary);
}

.demo-confirmed-visual {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2xl);
    margin-top: var(--space-2xl);
    flex-wrap: wrap;
}

.demo-confirmed-tablet,
.demo-confirmed-phone {
    text-align: center;
}

.demo-confirmed-device-label {
    margin-top: var(--space-md);
    font-size: var(--font-size-xl) !important;
    font-weight: 600;
    color: var(--text-secondary) !important;
}

.demo-screen-success {
    flex-direction: column;
    gap: 12px;
    background: linear-gradient(180deg, #ecfdf5 0%, #ffffff 100%) !important;
}

.demo-success-check {
    animation: demoCheckBounce 2s ease-in-out infinite;
}

@keyframes demoCheckBounce {
    0%, 100% { transform: scale(1); }
    10% { transform: scale(1.15); }
    20% { transform: scale(1); }
}

.demo-success-text {
    font-size: var(--font-size-xl);
    font-weight: 700;
    color: #10b981;
}

.demo-confirmed-arrow {
    animation: demoArrowPulse 2s ease-in-out infinite;
}

@keyframes demoArrowPulse {
    0%, 100% { transform: translateX(0); opacity: 0.6; }
    50% { transform: translateX(8px); opacity: 1; }
}

/* Phone device mockup */
.demo-phone-device {
    width: 180px;
    height: 320px;
    background: #1a1a2e;
    border-radius: 28px;
    padding: 12px 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2), inset 0 0 0 2px rgba(255,255,255,0.1);
}

.demo-phone-screen {
    width: 100%;
    height: 100%;
    background: white;
    border-radius: 18px;
    display: flex;
    flex-direction: column;
    padding: 40px 10px 10px;
    overflow: hidden;
}

.demo-phone-notif {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 12px;
    padding: 12px;
    animation: demoNotifSlide 3s ease-in-out infinite;
}

@keyframes demoNotifSlide {
    0%, 100% { transform: translateY(0); opacity: 1; }
    50% { transform: translateY(-4px); opacity: 0.9; }
}

.demo-phone-notif-icon {
    flex-shrink: 0;
    margin-top: 2px;
}

.demo-phone-notif-text {
    text-align: left;
}

.demo-phone-notif-text strong {
    display: block;
    font-size: 0.8rem;
    color: var(--text-primary);
    margin-bottom: 3px;
}

.demo-phone-notif-text span {
    font-size: 0.75rem;
    color: var(--text-secondary);
    line-height: 1.3;
    display: block;
}

/* Family Section */
.demo-family {
    background: linear-gradient(180deg, #f8f0ff 0%, #f0f0ff 100%);
}

.demo-family-features {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-xl);
    max-width: 700px;
    margin: 0 auto;
}

.demo-family-feature {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    background: white;
    padding: var(--space-lg) var(--space-xl);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
}

.demo-family-feature:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.demo-family-feature span {
    font-size: var(--font-size-xl);
    font-weight: 600;
    color: var(--text-primary);
}

/* Shared tablet/device styles */
.demo-tablet-visual {
    margin: var(--space-2xl) auto;
    display: flex;
    justify-content: center;
}

.demo-tablet-device {
    width: 320px;
    height: 220px;
    background: #1a1a2e;
    border-radius: 18px;
    padding: 14px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2), inset 0 0 0 2px rgba(255,255,255,0.1);
    animation: demoFloat 5s ease-in-out infinite;
}

.demo-tablet-screen {
    width: 100%;
    height: 100%;
    background: white;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    overflow: hidden;
}

@keyframes demoGlow {
    0%, 100% { box-shadow: 0 0 10px rgba(99, 102, 241, 0.3); }
    50% { box-shadow: 0 0 25px rgba(99, 102, 241, 0.6); }
}

/* CTA / QR Section */
.demo-cta {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 40%, #a78bfa 100%);
    background-size: 200% 200%;
    animation: demoGradientShift 8s ease infinite;
    color: white;
}

.demo-cta .demo-section-title {
    color: white;
}

.demo-cta-logo {
    width: 200px;
    max-width: 60vw;
    height: auto;
    margin-bottom: var(--space-xl);
    filter: drop-shadow(0 5px 20px rgba(0, 0, 0, 0.3)) brightness(1.1);
}

.demo-qr-area {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2xl);
    margin: var(--space-2xl) 0;
    flex-wrap: wrap;
}

.demo-qr-box {
    width: 180px;
    height: 180px;
    background: white;
    border-radius: var(--radius-xl);
    padding: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    animation: demoGlow 3s ease-in-out infinite;
}

.demo-qr-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.demo-qr-info {
    text-align: left;
}

.demo-url {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    font-weight: 800;
    color: white !important;
    letter-spacing: -0.02em;
    margin-bottom: var(--space-sm);
}

.demo-scan-text {
    font-size: var(--font-size-xl);
    color: rgba(255, 255, 255, 0.85) !important;
    font-weight: 500;
}

.demo-photo-prompt {
    display: inline-flex;
    align-items: center;
    gap: var(--space-md);
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    padding: var(--space-md) var(--space-xl);
    border-radius: var(--radius-full);
    margin: var(--space-xl) auto;
    font-size: var(--font-size-xl);
    font-weight: 600;
    color: white;
    animation: demoPhotoPulse 3s ease-in-out infinite;
}

@keyframes demoPhotoPulse {
    0%, 100% { transform: scale(1); background: rgba(255, 255, 255, 0.2); }
    50% { transform: scale(1.03); background: rgba(255, 255, 255, 0.3); }
}

.demo-ask-counter {
    display: inline-flex;
    align-items: center;
    gap: var(--space-md);
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.4);
    padding: var(--space-lg) var(--space-2xl);
    border-radius: var(--radius-xl);
    margin-top: var(--space-xl);
    font-size: clamp(1.3rem, 3vw, 1.7rem);
    font-weight: 700;
    color: white;
    animation: demoPhotoPulse 3s ease-in-out infinite;
}

.demo-ask-pharmacist {
    font-size: clamp(1.1rem, 2.5vw, 1.4rem);
    color: rgba(255, 255, 255, 0.9) !important;
    font-weight: 600;
    margin-top: var(--space-xl);
}

/* ---- Demo Responsive ---- */
@media (max-width: 768px) {
    .demo-family-features {
        grid-template-columns: 1fr;
    }
    .demo-qr-area {
        flex-direction: column;
        text-align: center;
    }
    .demo-qr-info {
        text-align: center;
    }
    .demo-confirmed-visual {
        flex-direction: column;
    }
    .demo-confirmed-arrow {
        transform: rotate(90deg);
    }
    .demo-tablet-wide {
        width: 90vw;
        height: 60vw;
    }
}

/* Demo scroll-reveal animation via IntersectionObserver */
.demo-section-inner {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}
.demo-section-inner.demo-visible {
    opacity: 1;
    transform: translateY(0);
}
