/* =====================================================
   MedFOLIO - Sleek Modern Design 2026
   Glassmorphism + Soft UI + Purple Theme
   ===================================================== */

/* CSS Variables */
:root {
    /* Primary Purple Palette */
    --primary: #5134ee;
    --primary-dark: #4128c9;
    --primary-light: #7b61ff;
    --primary-glow: rgba(81, 52, 238, 0.5);

    /* Lavender Accents */
    --lavender: #dfdafa;
    --lavender-light: #f0ebff;
    --lavender-dark: #c4b8f3;

    /* Supporting Colors */
    --accent: #8b5cf6;
    --accent-cyan: #06b6d4;
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;

    /* Neutrals - Refined */
    --white: #ffffff;
    --gray-50: #fafafb;
    --gray-100: #f4f4f6;
    --gray-200: #e8e8ed;
    --gray-300: #d1d1db;
    --gray-400: #9898a8;
    --gray-500: #6b6b7b;
    --gray-600: #4a4a58;
    --gray-700: #333340;
    --gray-800: #1f1f28;
    --gray-900: #121218;
    --black: #0a0a0f;

    /* Glassmorphism */
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.5);
    --glass-shadow: 0 8px 32px rgba(81, 52, 238, 0.1);

    /* Dark Glass */
    --dark-glass-bg: rgba(18, 18, 24, 0.8);
    --dark-glass-border: rgba(255, 255, 255, 0.08);

    /* Shadows - Layered */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08), 0 2px 4px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 12px 40px rgba(81, 52, 238, 0.12), 0 4px 12px rgba(0, 0, 0, 0.06);
    --shadow-xl: 0 24px 60px rgba(81, 52, 238, 0.15), 0 8px 24px rgba(0, 0, 0, 0.08);
    --shadow-glow: 0 0 40px rgba(81, 52, 238, 0.3);
    --shadow-glow-sm: 0 0 20px rgba(81, 52, 238, 0.2);

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

    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition: 250ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: 500ms cubic-bezier(0.34, 1.56, 0.64, 1);

    /* Typography */
    --font-sans: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    /* Body background */
    --body-bg: var(--white);
    --card-bg: var(--white);
    --input-bg: var(--white);
}

/* Dark Mode Variables */
[data-theme="dark"] {
    --gray-50: #1a1a24;
    --gray-100: #22222e;
    --gray-200: #2d2d3a;
    --gray-300: #3d3d4d;
    --gray-400: #5c5c6e;
    --gray-500: #8888a0;
    --gray-600: #a8a8bc;
    --gray-700: #c8c8d8;
    --gray-800: #e4e4ec;
    --gray-900: #f4f4f8;

    --white: #0f0f15;
    --black: #ffffff;

    --glass-bg: rgba(30, 30, 42, 0.8);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.2);
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.3), 0 1px 2px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.3), 0 2px 4px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.4), 0 4px 12px rgba(0, 0, 0, 0.3);
    --shadow-xl: 0 24px 60px rgba(0, 0, 0, 0.5), 0 8px 24px rgba(0, 0, 0, 0.3);
    --shadow-2xl: 0 32px 80px rgba(0, 0, 0, 0.6);

    --body-bg: #0f0f15;
    --card-bg: #1a1a24;
    --input-bg: #22222e;

    --lavender: #2d2840;
    --lavender-light: #3d3850;
    --lavender-dark: #232030;
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-sans);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--gray-700);
    background-color: var(--body-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Selection */
::selection {
    background: var(--lavender);
    color: var(--primary-dark);
}

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

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

ul {
    list-style: none;
}

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

input {
    font-family: inherit;
}

/* Container */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* =====================================================
   Navigation - Glassmorphism
   ===================================================== */
/* =====================================================
   Navbar
   ===================================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: #5134EE;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    transition: box-shadow 0.3s ease;
}

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

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    height: 64px;
    max-width: 1280px;
    margin: 0 auto;
}

/* — Logo — */
.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 1.25rem;
    color: #fff;
    letter-spacing: -0.02em;
    text-decoration: none;
    flex-shrink: 0;
}

.navbar .logo {
    color: #fff;
}

.navbar .logo span {
    font-family: 'Beatrice', var(--font-sans);
}

.logo-icon {
    width: 2rem;
    height: 2rem;
    color: var(--primary);
    filter: drop-shadow(0 2px 4px var(--primary-glow));
}

.logo-img {
    height: 2.25rem;
    width: auto;
    display: block;
    border-radius: 8px;
}

.navbar .logo-img {
    height: 2.25rem;
}

/* — Hamburger (mobile only) — */
.nav-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    padding: 0.5rem;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1100;
}

.nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: #fff;
    border-radius: 2px;
    transition: transform 0.25s ease, opacity 0.25s ease;
}

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

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

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

/* — Nav menu: mobile drawer — */
.nav-menu {
    list-style: none;
    margin: 0;
    padding: 5rem 1.5rem 2rem;
    position: fixed;
    top: 0;
    right: -100%;
    width: min(320px, 85vw);
    height: 100dvh;
    background: #5134EE;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    box-shadow: -4px 0 32px rgba(0, 0, 0, 0.25);
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1050;
}

.nav-menu.active {
    right: 0;
}

/* — Nav links — */
.nav-link {
    display: block;
    padding: 0.875rem 1rem;
    font-size: 1rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.85);
    border-radius: 8px;
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease;
    white-space: nowrap;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

/* — Login button — */
.btn-login {
    margin-top: 0.75rem;
    background: #fff;
    color: #5134EE !important;
    font-weight: 600;
    text-align: center;
    border-radius: 8px;
}

.btn-login:hover {
    background: rgba(255, 255, 255, 0.92);
    color: #5134EE !important;
}

/* — Desktop nav (960px+) — */
@media (min-width: 960px) {
    .nav-toggle {
        display: none;
    }

    .nav-menu {
        /* Reset all mobile-drawer styles */
        position: static;
        width: auto;
        height: auto;
        padding: 0;
        background: transparent;
        box-shadow: none;
        transition: none;
        right: auto;
        z-index: auto;

        /* Horizontal row */
        flex-direction: row;
        align-items: center;
        gap: 0.125rem;
    }

    .nav-link {
        padding: 0.5rem 0.75rem;
        font-size: 0.9375rem;
        color: rgba(255, 255, 255, 0.85);
    }

    .nav-link:hover {
        background: rgba(255, 255, 255, 0.12);
        color: #fff;
    }

    .btn-login {
        margin-top: 0;
        margin-left: 0.5rem;
        padding: 0.5rem 1.25rem;
        background: #fff;
        color: #5134EE !important;
    }

    .btn-login:hover {
        background: rgba(255, 255, 255, 0.92);
        transform: none;
    }
}

/* =====================================================
   Buttons - Refined
   ===================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--radius-lg);
    transition: var(--transition);
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: var(--white);
    box-shadow: 0 4px 20px var(--primary-glow);
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: var(--transition-slow);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px var(--primary-glow);
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-secondary {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    color: var(--gray-700);
    border: 2px solid var(--lavender);
}

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

.btn-full {
    width: 100%;
}

/* =====================================================
   Hero Section - Mesh Gradient Background
   ===================================================== */
.hero {
    padding: 7rem 1.5rem 4rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

/* Mesh Gradient Background */
.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(ellipse 80% 50% at 20% 40%, var(--lavender) 0%, transparent 50%),
        radial-gradient(ellipse 60% 40% at 80% 20%, rgba(81, 52, 238, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse 50% 30% at 60% 80%, var(--lavender-light) 0%, transparent 50%),
        linear-gradient(180deg, var(--white) 0%, var(--gray-50) 100%);
    z-index: -1;
}

/* Floating Orbs */
.hero::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(81, 52, 238, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    top: 10%;
    right: -10%;
    filter: blur(40px);
    animation: float 8s ease-in-out infinite;
    z-index: -1;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-20px, 20px) scale(1.05); }
}

.hero-content {
    text-align: center;
    max-width: 640px;
    margin: 0 auto;
    position: relative;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--lavender);
    color: var(--primary);
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    margin-bottom: 1.75rem;
    box-shadow: var(--shadow);
}

.hero h1 {
    font-size: clamp(2.25rem, 8vw, 4rem);
    font-weight: 800;
    line-height: 1.08;
    color: var(--gray-900);
    margin-bottom: 1.5rem;
    letter-spacing: -0.03em;
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 50%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--gray-500);
    margin-bottom: 2.5rem;
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.7;
}

.hero-cta {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 3rem;
}

.hero-trust {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
}

.trust-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-500);
}

.trust-item svg {
    width: 1.25rem;
    height: 1.25rem;
    color: var(--success);
}

/* Phone Mockup - Enhanced */
.hero-visual {
    margin-top: 3rem;
    display: flex;
    justify-content: center;
    perspective: 1000px;
}

.phone-mockup {
    width: 280px;
    height: 560px;
    background: linear-gradient(145deg, var(--gray-800), var(--gray-900));
    border-radius: 3rem;
    padding: 0.5rem;
    position: relative;
    transform: rotateY(-5deg) rotateX(5deg);
    transition: var(--transition-slow);
}

.phone-mockup:hover {
    transform: rotateY(0) rotateX(0);
}

.phone-mockup::before {
    content: '';
    position: absolute;
    top: 1.25rem;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 28px;
    background: var(--black);
    border-radius: var(--radius-full);
}

/* Phone Screen - Apple Wallet Style */
.phone-screen {
    width: 100%;
    height: 100%;
    background: #1C1C1E;
    border-radius: 2.5rem;
    padding: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Status Bar */
.ps-status {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 20px 6px;
    flex-shrink: 0;
}

.ps-time {
    font-size: 15px;
    font-weight: 600;
    color: white;
    letter-spacing: -0.3px;
    font-variant-numeric: tabular-nums;
}

.ps-status-right {
    display: flex;
    align-items: center;
}

/* Wallet Header */
.ps-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2px 20px 14px;
    flex-shrink: 0;
}

.ps-logo {
    display: flex;
    align-items: center;
    gap: 7px;
}

.ps-logo-img {
    height: 26px;
    width: auto;
    display: block;
    border-radius: 6px;
}

.ps-logo-text {
    font-family: 'Beatrice', var(--font-sans);
    font-size: 18px;
    font-weight: 700;
    color: white;
    letter-spacing: -0.4px;
}

.ps-add {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    font-weight: 300;
    line-height: 30px;
    text-align: center;
    cursor: pointer;
}

/* Apple Wallet Card Stack */
.wallet-stack {
    position: relative;
    height: 220px; /* 148px card + 36px + 36px peeks */
    margin: 0 16px;
    flex-shrink: 0;
}

.wallet-card {
    position: absolute;
    left: 0;
    right: 0;
    height: 148px;
    border-radius: 16px;
    overflow: hidden;
    transition: transform 0.45s cubic-bezier(0.34, 1.2, 0.64, 1),
                filter 0.45s ease;
}

.card-1 {
    top: 0;
    z-index: 3;
    background: linear-gradient(135deg, #5134EE 0%, #7B61FF 100%);
    box-shadow: 0 10px 32px rgba(81, 52, 238, 0.55);
    animation: wCardIn 0.55s cubic-bezier(0.4, 0, 0.2, 1) 0.1s both;
}

.card-2 {
    top: 36px;
    z-index: 2;
    background: linear-gradient(135deg, #0369A1 0%, #06B6D4 100%);
    box-shadow: 0 6px 20px rgba(3, 105, 161, 0.4);
    transform: scaleX(0.95);
    filter: brightness(0.78);
    animation: wCardIn 0.55s cubic-bezier(0.4, 0, 0.2, 1) 0.2s both;
}

.card-3 {
    top: 72px;
    z-index: 1;
    background: linear-gradient(135deg, #BE185D 0%, #9333EA 100%);
    box-shadow: 0 4px 14px rgba(190, 24, 93, 0.35);
    transform: scaleX(0.90);
    filter: brightness(0.62);
    animation: wCardIn 0.55s cubic-bezier(0.4, 0, 0.2, 1) 0.3s both;
}

/* Fan out on hover */
.wallet-stack:hover .card-2 {
    filter: brightness(0.88);
}
.wallet-stack:hover .card-3 {
    filter: brightness(0.74);
}

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

/* Card decorative circles */
.wallet-card::before {
    content: '';
    position: absolute;
    width: 170px;
    height: 170px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 50%;
    top: -50px;
    right: -40px;
    pointer-events: none;
}

.wallet-card::after {
    content: '';
    position: absolute;
    width: 110px;
    height: 110px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    bottom: -35px;
    left: 16px;
    pointer-events: none;
}

/* Card inner layout */
.wcard-inner {
    position: absolute;
    inset: 0;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    color: white;
    z-index: 1;
}

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

.wcard-brand {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    opacity: 0.92;
}

.wcard-type {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    background: rgba(255, 255, 255, 0.18);
    padding: 3px 8px;
    border-radius: 20px;
    opacity: 0.9;
}

.wcard-mid {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.wcard-title {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: -0.3px;
    line-height: 1.2;
}

.wcard-sub {
    font-size: 10px;
    opacity: 0.7;
    letter-spacing: 0.2px;
}

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

.wcard-date {
    font-size: 10px;
    opacity: 0.72;
    letter-spacing: 0.2px;
}

.wcard-badge {
    font-size: 9.5px;
    font-weight: 700;
    color: #34D399;
    background: rgba(16, 185, 129, 0.2);
    border: 1px solid rgba(52, 211, 153, 0.35);
    padding: 2px 8px;
    border-radius: 20px;
}

/* Page indicator dots */
.ps-dots {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
    padding: 14px 0 10px;
    flex-shrink: 0;
}

.ps-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.28);
    transition: all 0.2s ease;
}

.ps-dot-active {
    background: rgba(255, 255, 255, 0.9);
    width: 18px;
    border-radius: 3px;
}

/* Card list below dots */
.ps-list {
    flex: 1;
    padding: 4px 16px 16px;
    display: flex;
    flex-direction: column;
    gap: 0;
    overflow: hidden;
}

.ps-list-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.ps-list-item:last-child {
    border-bottom: none;
}

.ps-list-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.ps-list-name {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.82);
    font-weight: 500;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ps-list-date {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.4);
    flex-shrink: 0;
}

/* =====================================================
   Section Styles
   ===================================================== */
.section-header {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 4rem;
}

.section-badge {
    display: inline-block;
    padding: 0.5rem 1.25rem;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: var(--white);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    border-radius: var(--radius-full);
    margin-bottom: 1.25rem;
    box-shadow: var(--shadow-glow-sm);
}

.section-header h2 {
    font-size: clamp(2rem, 5vw, 2.75rem);
    font-weight: 800;
    color: var(--gray-900);
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.section-header p {
    color: var(--gray-500);
    font-size: 1.125rem;
    line-height: 1.7;
}

/* =====================================================
   How It Works
   ===================================================== */
.how-it-works {
    padding: 6rem 0;
    background:
        linear-gradient(135deg, var(--gray-50) 0%, var(--white) 50%, var(--lavender-light) 100%);
    position: relative;
    overflow: hidden;
}

.how-it-works::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(var(--lavender) 1px, transparent 1px),
        linear-gradient(90deg, var(--lavender) 1px, transparent 1px);
    background-size: 48px 48px;
    opacity: 0.12;
    z-index: 0;
    pointer-events: none;
}

.how-it-works .container {
    position: relative;
    z-index: 1;
}

.steps-grid {
    display: grid;
    gap: 1.5rem;
}

.step-card {
    position: relative;
    padding: 2rem 1.75rem;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--lavender);
    border-radius: var(--radius-xl);
    transition: var(--transition);
    overflow: hidden;
}

.step-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    opacity: 0;
    transition: var(--transition);
}

.step-card:hover {
    border-color: transparent;
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

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

.step-number {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    font-size: 4rem;
    font-weight: 800;
    background: linear-gradient(180deg, var(--lavender) 0%, transparent 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
}

.step-icon {
    width: 3.5rem;
    height: 3.5rem;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-glow-sm);
}

.step-icon svg {
    width: 1.75rem;
    height: 1.75rem;
    color: var(--white);
}

.step-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 0.75rem;
}

.step-card p {
    color: var(--gray-500);
    font-size: 0.9375rem;
    line-height: 1.65;
}

/* =====================================================
   Features - Card Grid
   ===================================================== */
.features {
    padding: 6rem 0;
    background: linear-gradient(180deg, var(--gray-50) 0%, var(--lavender-light) 50%, var(--white) 100%);
    position: relative;
}

.features-grid {
    display: grid;
    gap: 1.25rem;
}

.feature-card {
    padding: 2rem 1.75rem;
    background: var(--white);
    border-radius: var(--radius-xl);
    border: 1px solid var(--gray-100);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.feature-card::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, var(--lavender) 0%, transparent 70%);
    opacity: 0;
    transition: var(--transition);
}

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

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

.feature-card.featured {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border: none;
    box-shadow: var(--shadow-glow);
}

.feature-card.featured::after {
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    opacity: 1;
}

.feature-card.featured .feature-icon {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

.feature-card.featured h3,
.feature-card.featured p {
    color: var(--white);
}

.feature-card.featured p {
    opacity: 0.85;
}

.feature-icon {
    width: 3.25rem;
    height: 3.25rem;
    background: var(--lavender-light);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
    transition: var(--transition);
}

.feature-card:hover .feature-icon {
    background: var(--lavender);
}

.feature-icon svg {
    width: 1.5rem;
    height: 1.5rem;
    color: var(--primary);
}

.feature-card.featured .feature-icon svg {
    color: var(--white);
}

.feature-card h3 {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 0.625rem;
}

.feature-card p {
    color: var(--gray-500);
    font-size: 0.9375rem;
    line-height: 1.65;
}

/* =====================================================
   Security Section - Dark Theme
   ===================================================== */
.security {
    padding: 6rem 0;
    background: var(--gray-900);
    color: var(--white);
    position: relative;
    overflow: hidden;
}

/* Background Glow */
.security::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -20%;
    width: 80%;
    height: 200%;
    background: radial-gradient(ellipse, rgba(81, 52, 238, 0.15) 0%, transparent 60%);
    pointer-events: none;
}

.security::after {
    content: '';
    position: absolute;
    bottom: -30%;
    right: -10%;
    width: 60%;
    height: 150%;
    background: radial-gradient(ellipse, rgba(139, 92, 246, 0.1) 0%, transparent 60%);
    pointer-events: none;
}

.security-content {
    display: flex;
    flex-direction: column;
    gap: 3rem;
    position: relative;
    z-index: 1;
}

.security-text .section-badge {
    background: rgba(81, 52, 238, 0.3);
    color: var(--lavender);
    box-shadow: none;
}

.security-text h2 {
    font-size: clamp(2rem, 5vw, 2.75rem);
    font-weight: 800;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.security-text > p {
    color: var(--gray-400);
    margin-bottom: 2.5rem;
    font-size: 1.125rem;
    line-height: 1.7;
}

.security-list {
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
}

.security-list li {
    display: flex;
    gap: 1rem;
}

.security-list svg {
    width: 1.5rem;
    height: 1.5rem;
    color: var(--success);
    flex-shrink: 0;
    margin-top: 0.125rem;
}

.security-list strong {
    display: block;
    font-weight: 600;
    margin-bottom: 0.375rem;
    color: var(--white);
}

.security-list span {
    color: var(--gray-400);
    font-size: 0.9375rem;
    line-height: 1.6;
}

.security-visual {
    display: flex;
    justify-content: center;
}

.shield-graphic {
    position: relative;
    width: 220px;
    height: 260px;
}

.shield-graphic svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 0 40px rgba(16, 185, 129, 0.3));
}

.security-badge {
    position: absolute;
    padding: 0.625rem 1rem;
    background: var(--dark-glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--dark-glass-border);
    border-radius: var(--radius);
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--white);
    box-shadow: var(--shadow-lg);
}

.security-badge.hipaa {
    top: 15%;
    left: -30px;
    background: linear-gradient(135deg, var(--success), #34d399);
    border: none;
}

.security-badge.soc {
    top: 50%;
    right: -40px;
}

.security-badge.encryption {
    bottom: 10%;
    left: -20px;
}

/* =====================================================
   FAQ Section
   ===================================================== */
.faq {
    padding: 6rem 0;
    background: var(--white);
}

.faq-grid {
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: var(--gray-50);
    border: 1px solid transparent;
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: var(--transition);
}

.faq-item:hover {
    border-color: var(--lavender);
}

.faq-item.active {
    background: var(--lavender-light);
    border-color: var(--lavender);
    box-shadow: var(--shadow-md);
}

.faq-question {
    width: 100%;
    padding: 1.375rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-align: left;
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-800);
    transition: var(--transition);
}

.faq-question:hover {
    color: var(--primary);
}

.faq-question svg {
    width: 1.25rem;
    height: 1.25rem;
    color: var(--gray-400);
    transition: var(--transition);
    flex-shrink: 0;
}

.faq-item.active .faq-question svg {
    transform: rotate(180deg);
    color: var(--primary);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition-slow);
}

.faq-item.active .faq-answer {
    max-height: 300px;
}

.faq-answer p {
    padding: 0 1.5rem 1.5rem;
    color: var(--gray-600);
    line-height: 1.7;
}

/* =====================================================
   Login Section
   ===================================================== */
.login-section {
    padding: 6rem 0;
    background:
        radial-gradient(ellipse 80% 60% at 30% 100%, var(--lavender) 0%, transparent 50%),
        radial-gradient(ellipse 60% 40% at 90% 50%, var(--lavender-light) 0%, transparent 50%),
        var(--gray-50);
}

.login-content {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

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

.login-text h2 {
    font-size: clamp(2rem, 5vw, 2.75rem);
    font-weight: 800;
    color: var(--gray-900);
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.login-text p {
    color: var(--gray-500);
    margin-bottom: 2rem;
    font-size: 1.125rem;
}

.app-badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
}

.app-badge {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 0.875rem 1.5rem;
    background: var(--gray-900);
    color: var(--white);
    border-radius: var(--radius-lg);
    transition: var(--transition);
    box-shadow: var(--shadow-md);
}

.app-badge:hover {
    background: var(--gray-800);
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.app-badge svg {
    width: 1.75rem;
    height: 1.75rem;
}

.app-badge div {
    text-align: left;
}

.app-badge span {
    display: block;
    font-size: 0.6875rem;
    opacity: 0.7;
}

.app-badge strong {
    font-size: 1rem;
}

/* Login Form - Glassmorphism */
.login-form-wrapper {
    display: flex;
    justify-content: center;
}

.login-card {
    width: 100%;
    max-width: 420px;
    padding: 2.5rem;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-xl);
}

.login-card h3 {
    font-size: 1.625rem;
    font-weight: 700;
    color: var(--gray-900);
    text-align: center;
    margin-bottom: 2rem;
}

.login-title-link {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

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

.login-card {
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.login-card .form-group input,
.login-card .btn-primary,
.login-card .btn-social {
    pointer-events: none;
}

.login-card .form-group input:focus {
    outline: none;
    border-color: var(--gray-200);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 0.5rem;
}

.form-group input {
    width: 100%;
    padding: 1rem 1.125rem;
    font-size: 1rem;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-md);
    transition: var(--transition);
    background: var(--white);
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(81, 52, 238, 0.1);
}

.form-group input::placeholder {
    color: var(--gray-400);
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.75rem;
    font-size: 0.875rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--gray-600);
    cursor: pointer;
}

.checkbox-label input {
    width: 1.125rem;
    height: 1.125rem;
    accent-color: var(--primary);
    border-radius: var(--radius-sm);
}

.forgot-link {
    color: var(--primary);
    font-weight: 600;
    transition: var(--transition);
}

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

.login-divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1.75rem 0;
    color: var(--gray-400);
    font-size: 0.875rem;
}

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

.social-login {
    display: flex;
    gap: 1rem;
}

.btn-social {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.625rem;
    padding: 0.875rem;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray-700);
    transition: var(--transition);
    background: var(--white);
}

.btn-social:hover {
    border-color: var(--primary);
    background: var(--lavender-light);
    color: var(--primary);
}

.btn-social svg {
    width: 1.25rem;
    height: 1.25rem;
}

.login-footer {
    text-align: center;
    margin-top: 1.75rem;
    font-size: 0.9375rem;
    color: var(--gray-600);
}

.login-footer a {
    color: var(--primary);
    font-weight: 600;
}

.login-footer a:hover {
    text-decoration: underline;
}

/* =====================================================
   Footer
   ===================================================== */
.footer {
    padding: 5rem 0 2rem;
    background: var(--gray-900);
    color: var(--gray-400);
}

.footer-grid {
    display: grid;
    gap: 3rem;
}

.footer-brand .logo {
    color: var(--white);
    margin-bottom: 1.25rem;
}

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

.footer-brand p {
    font-size: 0.9375rem;
    margin-bottom: 1.75rem;
    max-width: 280px;
    line-height: 1.7;
}

.social-links {
    display: flex;
    gap: 0.75rem;
}

.social-links a {
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gray-800);
    border-radius: var(--radius);
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--primary);
    color: var(--white);
    transform: translateY(-2px);
}

.social-links svg {
    width: 1.125rem;
    height: 1.125rem;
}

.footer-links h4 {
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--white);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 1.25rem;
}

.footer-links ul {
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
}

.footer-links a {
    font-size: 0.9375rem;
    transition: var(--transition);
}

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

.footer-bottom {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid var(--gray-800);
    display: flex;
    flex-wrap: wrap;
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
    text-align: center;
    font-size: 0.875rem;
}

.compliance-badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
}

.compliance-badges span {
    padding: 0.5rem 1rem;
    background: var(--gray-800);
    border-radius: var(--radius);
    font-size: 0.75rem;
    font-weight: 600;
}

/* =====================================================
   Tablet Styles (640px+)
   ===================================================== */
@media (min-width: 640px) {
    .container {
        padding: 0 2rem;
    }

    .hero {
        padding: 8rem 2rem 5rem;
    }

    .hero-cta {
        flex-direction: row;
        justify-content: center;
    }

    .phone-mockup {
        width: 320px;
        height: 640px;
    }

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

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

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

/* =====================================================
   Desktop Styles (1024px+)
   ===================================================== */
@media (min-width: 1024px) {
    .hero {
        flex-direction: row;
        min-height: auto;
        padding: 10rem 2rem 2.5rem;
        gap: 4rem;
    }

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

    .hero-subtitle {
        margin-left: 0;
    }

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

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

    .hero-visual {
        margin-top: 0;
        flex: 1;
        display: flex;
        justify-content: center;
    }

    .how-it-works {
        padding: 3rem 0 6rem;
    }

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

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

    .security-content {
        flex-direction: row;
        align-items: center;
        gap: 6rem;
    }

    .security-text {
        flex: 1;
    }

    .security-visual {
        flex: 0 0 auto;
    }

    .login-content {
        flex-direction: row;
        align-items: center;
        gap: 5rem;
    }

    .login-text {
        flex: 1;
        text-align: left;
    }

    .app-badges {
        justify-content: flex-start;
    }

    .login-form-wrapper {
        flex: 1;
        justify-content: flex-end;
    }

    .footer-grid {
        grid-template-columns: 2fr 1fr 1fr 1fr;
    }

    .footer-bottom {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        text-align: left;
    }

    .footer-bottom .theme-toggle {
        margin-left: 1rem;
    }
}

/* =====================================================
   Large Desktop Styles (1280px+)
   ===================================================== */
@media (min-width: 1280px) {
    .hero {
        max-width: 1400px;
        margin: 0 auto;
        overflow: visible;
    }

    /* Extend gradient background to full viewport so no seam on wide screens */
    .hero::before {
        width: 100vw;
        left: 50%;
        margin-left: -50vw;
        right: auto;
        /* Extend well below hero so no visible cut under the phone */
        bottom: -320px;
        /* Fade to white at bottom so transition to next section is invisible */
        background:
            radial-gradient(ellipse 80% 50% at 20% 40%, var(--lavender) 0%, transparent 50%),
            radial-gradient(ellipse 60% 40% at 80% 20%, rgba(81, 52, 238, 0.15) 0%, transparent 50%),
            radial-gradient(ellipse 50% 30% at 60% 80%, var(--lavender-light) 0%, transparent 50%),
            linear-gradient(180deg, var(--white) 0%, var(--gray-50) 60%, var(--white) 85%, var(--white) 100%);
    }

    .phone-mockup {
        width: 360px;
        height: 720px;
    }
}

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

.hero-content {
    animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.hero-visual {
    animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.2s both;
}

/* Scroll reveal animations */
.step-card,
.feature-card,
.faq-item {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.step-card.animate-in,
.feature-card.animate-in,
.faq-item.animate-in {
    opacity: 1;
    transform: translateY(0);
}

/* Card hover glow effect */
.feature-card::before,
.step-card::before,
.login-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(
        400px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
        rgba(81, 52, 238, 0.1),
        transparent 40%
    );
    border-radius: inherit;
    opacity: 0;
    transition: opacity var(--transition);
    pointer-events: none;
    z-index: 0;
}

.feature-card:hover::before,
.step-card:hover::before,
.login-card:hover::before {
    opacity: 1;
}

.feature-card.featured::before {
    background: radial-gradient(
        400px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
        rgba(255, 255, 255, 0.15),
        transparent 40%
    );
}

.feature-card > *,
.step-card > *,
.login-card > * {
    position: relative;
    z-index: 1;
}

/* Security list animations */
.security-list li {
    opacity: 0;
    transform: translateX(-20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.security-list li.animate-in {
    opacity: 1;
    transform: translateX(0);
}

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

    html {
        scroll-behavior: auto;
    }

    .step-card,
    .feature-card,
    .faq-item {
        opacity: 1;
        transform: none;
    }
}

/* ============================================================
   PRICING SECTION
   ============================================================ */

#medfolio-pricing {
  padding: 80px 20px;
  background: #f5f7ff;
}

.pricing-header {
  text-align: center;
  margin-bottom: 48px;
}
.pricing-badge {
    display: inline-block;
    padding: 0.5rem 1.25rem;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: var(--white);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    border-radius: var(--radius-full);
    margin-bottom: 1.25rem;
    box-shadow: var(--shadow-glow-sm);
}
.pricing-title {
  font-size: 38px;
  font-weight: 800;
  color: #1B2050;
  margin-bottom: 12px;
  line-height: 1.2;
}
.pricing-subtitle {
  font-size: 17px;
  color: #666;
  max-width: 480px;
  margin: 0 auto;
  line-height: 1.6;
}
.pricing-per-patient {
  display: inline-block;
  background: #EEF0FF;
  border: 1px solid #CCCCE8;
  border-radius: 10px;
  padding: 12px 24px;
  margin-top: 20px;
  font-size: 14px;
  color: #3A3A4A;
  line-height: 1.5;
}
.pricing-per-patient strong { color: #1B2050; }

.pricing-grid {
  display: flex;
  gap: 20px;
  max-width: 1020px;
  margin: 0 auto 32px;
  align-items: stretch;
  flex-wrap: wrap;
  justify-content: center;
}

.pricing-card {
  flex: 1 1 290px;
  max-width: 320px;
  background: #ffffff;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(0,0,0,0.08);
  display: flex;
  flex-direction: column;
  position: relative;
  transition: transform 0.2s, box-shadow 0.2s;
}
.pricing-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.13);
}
.pricing-card.featured {
  box-shadow: 0 8px 40px rgba(123,94,167,0.28);
  transform: scale(1.03);
}
.pricing-card.featured:hover {
  transform: scale(1.03) translateY(-4px);
}

.card-top-bar { height: 5px; width: 100%; }

.popular-badge {
  text-align: center;
  padding: 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: white;
}

.pricing-card .card-header { padding: 24px 24px 16px; }
.card-tier-name {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.card-tagline {
  font-size: 13px;
  color: #777;
  margin-bottom: 20px;
  line-height: 1.4;
}

.card-price-block { margin-bottom: 4px; }
.card-price {
  font-size: 52px;
  font-weight: 900;
  color: #1B2050;
  line-height: 1;
  display: inline-block;
}
.card-price-period {
  font-size: 15px;
  color: #888;
  margin-left: 4px;
  vertical-align: bottom;
  margin-bottom: 6px;
  display: inline-block;
}
.card-monthly {
  font-size: 12px;
  font-style: italic;
  margin: 4px 0 16px;
}
.card-price-note {
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 16px;
}

.card-cta {
  display: block;
  width: 100%;
  padding: 13px;
  border-radius: 10px;
  border: none;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: 0.3px;
  text-align: center;
  text-decoration: none;
  transition: opacity 0.15s, transform 0.15s;
}
.card-cta:hover { opacity: 0.88; transform: translateY(-1px); }
.card-cta.outline {
  background: transparent;
  border: 2px solid currentColor;
}

.card-divider { height: 1px; background: #f0f0f0; margin: 0 24px; }

.card-features { padding: 18px 24px; flex: 1; }
.feature-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 10px;
  font-size: 13.5px;
  color: #333;
  line-height: 1.4;
}
.feature-check {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
  font-size: 10px;
  font-weight: 900;
}
.feature-item.highlight { font-weight: 600; }

.card-bottom-note {
  margin: 0 24px 20px;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 12px;
  color: #555;
  line-height: 1.5;
}
.card-bottom-note strong { font-weight: 700; }

.pricing-footer-line {
  max-width: 1020px;
  margin: 0 auto 40px;
  background: #EEF0FF;
  border: 1px solid #CCCCE8;
  border-radius: 12px;
  padding: 16px 24px;
  text-align: center;
  font-size: 16px;
  font-weight: 700;
  color: #5B4FCE;
}
.pricing-footer-line span { font-size: 20px; margin-right: 8px; }

.trust-badges {
  max-width: 1020px;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
}
.trust-badge {
  font-size: 12px;
  color: #999;
  letter-spacing: 0.3px;
  display: flex;
  align-items: center;
  gap: 5px;
}
.trust-check { color: #1E8A8A; font-size: 13px; }

@media (max-width: 680px) {
  .pricing-title { font-size: 28px; }
  .pricing-card { max-width: 100%; }
  .pricing-card.featured { transform: scale(1); }
  .pricing-card.featured:hover { transform: translateY(-4px); }
}

/* =====================================================
   Legal Pages
   ===================================================== */
.legal-page {
    padding: 8rem 0 4rem;
    min-height: calc(100vh - 200px);
}

.legal-header {
    text-align: center;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--gray-200);
}

.legal-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
}

.legal-updated {
    color: var(--gray-500);
    font-size: 0.9375rem;
}

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

.legal-section {
    margin-bottom: 2.5rem;
}

.legal-section h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 1rem;
    padding-top: 1rem;
}

.legal-section h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--gray-800);
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.legal-section p {
    color: var(--gray-600);
    line-height: 1.7;
    margin-bottom: 1rem;
}

.legal-section ul {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.legal-section li {
    color: var(--gray-600);
    line-height: 1.7;
    margin-bottom: 0.5rem;
}

.legal-section strong {
    color: var(--gray-800);
}

.legal-highlight {
    background: var(--gray-50);
    border-left: 4px solid var(--primary);
    padding: 1.5rem;
    margin-bottom: 2rem;
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.legal-highlight p {
    margin-bottom: 0;
    color: var(--gray-700);
}

.cookie-table {
    overflow-x: auto;
    margin: 1.5rem 0;
}

.cookie-table table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.cookie-table th,
.cookie-table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--gray-200);
}

.cookie-table th {
    background: var(--gray-50);
    font-weight: 600;
    color: var(--gray-700);
}

.cookie-table td {
    color: var(--gray-600);
}

.cookie-table tr:hover td {
    background: var(--gray-50);
}

@media (min-width: 768px) {
    .legal-header h1 {
        font-size: 3rem;
    }

    .legal-page {
        padding: 10rem 0 5rem;
    }
}

@media (max-width: 640px) {
    .cookie-table {
        font-size: 0.8125rem;
    }

    .cookie-table th,
    .cookie-table td {
        padding: 0.5rem 0.75rem;
    }
}

/* =====================================================
   Dark Mode Toggle
   ===================================================== */
.theme-toggle {
    background: var(--gray-200);
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--radius);
    color: var(--gray-600);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.theme-toggle:hover {
    background: var(--gray-300);
    color: var(--gray-800);
}

.footer-bottom .theme-toggle {
    margin-left: auto;
}

.theme-toggle svg {
    width: 1.25rem;
    height: 1.25rem;
}

.theme-toggle .icon-sun,
.theme-toggle .icon-moon {
    display: none;
}

.theme-toggle .icon-moon {
    display: block;
}

[data-theme="dark"] .theme-toggle .icon-moon {
    display: none;
}

[data-theme="dark"] .theme-toggle .icon-sun {
    display: block;
}

/* =====================================================
   Dark Mode Component Overrides
   ===================================================== */
[data-theme="dark"] .hero {
    background: linear-gradient(135deg, #0f0f15 0%, #1a1a28 50%, #0f0f15 100%);
}

[data-theme="dark"] .hero::before {
    background: radial-gradient(ellipse at 20% 20%, rgba(81, 52, 238, 0.15) 0%, transparent 50%),
                radial-gradient(ellipse at 80% 80%, rgba(139, 92, 246, 0.1) 0%, transparent 50%);
}

[data-theme="dark"] .step-card,
[data-theme="dark"] .feature-card,
[data-theme="dark"] .faq-item,
[data-theme="dark"] .login-card {
    background: var(--card-bg);
    border-color: var(--gray-200);
}

[data-theme="dark"] .wallet-card {
    /* gradient backgrounds are explicit per-card, no override needed */
}

[data-theme="dark"] .form-group input {
    background: var(--input-bg);
    border-color: var(--gray-200);
    color: var(--gray-900);
}

[data-theme="dark"] .form-group input::placeholder {
    color: var(--gray-500);
}

[data-theme="dark"] .btn-secondary {
    background: var(--gray-100);
    color: var(--gray-900);
    border-color: var(--gray-200);
}

[data-theme="dark"] .btn-secondary:hover {
    background: var(--gray-200);
}

[data-theme="dark"] .btn-social {
    background: var(--gray-100);
    border-color: var(--gray-200);
    color: var(--gray-800);
}

[data-theme="dark"] .btn-social:hover {
    background: var(--gray-200);
}

[data-theme="dark"] .section-badge {
    background: rgba(81, 52, 238, 0.2);
}

[data-theme="dark"] .footer {
    background: var(--gray-100);
    border-top-color: var(--gray-200);
}

[data-theme="dark"] .how-it-works {
    background: linear-gradient(180deg, var(--body-bg) 0%, var(--gray-100) 100%);
}

[data-theme="dark"] .security {
    background: linear-gradient(180deg, var(--gray-100) 0%, var(--body-bg) 100%);
}

[data-theme="dark"] .faq {
    background: var(--body-bg);
}

[data-theme="dark"] .login-section {
    background: linear-gradient(180deg, var(--body-bg) 0%, var(--gray-100) 50%, var(--body-bg) 100%);
}

[data-theme="dark"] .phone-screen {
    background: #0A0A0F;
}

[data-theme="dark"] .faq-question {
    color: var(--gray-800);
}

[data-theme="dark"] .faq-answer p {
    color: var(--gray-600);
}

[data-theme="dark"] .checkbox-label span {
    color: var(--gray-700);
}

[data-theme="dark"] .forgot-link {
    color: var(--primary-light);
}

[data-theme="dark"] .login-divider span {
    background: var(--card-bg);
    color: var(--gray-500);
}

[data-theme="dark"] .login-divider::before {
    background: var(--gray-200);
}

[data-theme="dark"] .legal-page {
    background: var(--body-bg);
}

[data-theme="dark"] .legal-header {
    border-bottom-color: var(--gray-200);
}

[data-theme="dark"] .cookie-table th {
    background: var(--gray-100);
}
