:root {
    /* Color System - Refined Dark Theme */
    --bg-body: #050505;
    --bg-surface: #0f0f0f;
    --bg-surface-hover: #1a1a1a;

    --border-color: rgba(255, 255, 255, 0.08);
    --border-color-hover: rgba(255, 255, 255, 0.2);

    --text-primary: #ededed;
    --text-secondary: #888888;

    /* Keeping RapidVal's Primary Color (Indigo) as Accent */
    --accent: #6366f1;
    --accent-glow: rgba(99, 102, 241, 0.5);

    --font-sans: "Inter", sans-serif;
    --font-display: "Space Grotesk", sans-serif;

    --container-width: 1200px;
    --transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-body);
    color: var(--text-primary);
    font-family: var(--font-sans);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

/* Layout Utilities */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 2rem;
}

.section-padding {
    padding: 8rem 0;
}

/* Typography */
h1,
h2,
h3,
h4,
h5 {
    font-family: var(--font-display);
    color: var(--text-primary);
    line-height: 1.1;
    font-weight: 700;
}

.text-gradient {
    background: linear-gradient(to right, #fff, #94a3b8);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    letter-spacing: -0.03em;
}

.section-subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
    max-width: 600px;
    margin-bottom: 4rem;
}

/* Navigation */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(5, 5, 5, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.5rem;
    letter-spacing: -0.05em;
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo i {
    color: var(--accent);
}

.nav-links {
    display: flex;
    gap: 2.5rem;
}

.nav-links a {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--text-primary);
}

.mobile-toggle {
    display: none;
    cursor: pointer;
    color: var(--text-primary);
    font-size: 1.2rem;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 80px;
    position: relative;
    overflow: hidden;
}

/* Background Gradients */
.hero::before {
    content: '';
    position: absolute;
    top: -20%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.15) 0%, rgba(5, 5, 5, 0) 70%);
    border-radius: 50%;
    filter: blur(80px);
    z-index: -1;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 4rem;
    align-items: center;
}

.hero h1 {
    font-size: 4.5rem;
    font-weight: 700;
    letter-spacing: -0.04em;
    margin-bottom: 1.5rem;
    line-height: 1;
}

.hero p {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    max-width: 500px;
}

.hero-stats {
    display: flex;
    gap: 3rem;
    margin-bottom: 3rem;
    border-top: 1px solid var(--border-color);
    padding-top: 2rem;
}

.stat h4 {
    font-size: 2.5rem;
    margin-bottom: 0.25rem;
}

.stat span {
    font-size: 0.85rem;
    text-transform: uppercase;
    color: var(--text-secondary);
    letter-spacing: 1px;
}

.btn-group {
    display: flex;
    gap: 1rem;
}

.btn {
    padding: 0.8rem 2rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--text-primary);
    color: var(--bg-body);
}

.btn-primary:hover {
    background: #fff;
    transform: translateY(-2px);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

.btn-secondary {
    border: 1px solid var(--border-color);
    background: transparent;
    color: var(--text-primary);
}

.btn-secondary:hover {
    border-color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

/* App Mockup CSS Only */
.app-mockup {
    position: relative;
    perspective: 1000px;
}

.mockup-frame {
    background: #000;
    border-radius: 40px;
    padding: 12px;
    box-shadow: 0 40px 80px -20px rgba(0, 0, 0, 0.8);
    border: 2px solid #333;
    aspect-ratio: 9/19;
    width: 320px;
    margin: 0 auto;
    overflow: hidden;
    position: relative;
    transform: rotateY(-10deg) rotateX(5deg);
    transition: var(--transition);
}

.mockup-frame:hover {
    transform: rotateY(0deg) rotateX(0deg);
}

.mockup-screen {
    width: 100%;
    height: 100%;
    background: var(--bg-surface);
    border-radius: 30px;
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
}

/* Simple UI representation inside mockup */
.ui-header {
    height: 60px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
}

.ui-bar {
    width: 120px;
    height: 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
}

.ui-circle {
    width: 30px;
    height: 30px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

.ui-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.ui-card {
    height: 100px;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 12px;
}

.ui-card-sm {
    height: 60px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
}

/* Grid Systems */
.grid-3-col {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.grid-2-col {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

/* Cards */
.card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2.5rem;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.card:hover {
    border-color: var(--border-color-hover);
    transform: translateY(-5px);
}

.card-icon {
    font-size: 2rem;
    color: var(--accent);
    margin-bottom: 1.5rem;
    width: 50px;
    height: 50px;
    background: rgba(99, 102, 241, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
}

.card h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Steps/How it works */
.step-list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.step-card {
    display: flex;
    align-items: flex-start;
    gap: 2rem;
    padding: 2rem;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    transition: var(--transition);
}

.step-card:hover {
    border-color: var(--accent);
}

.step-number {
    font-size: 4rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.05);
    line-height: 1;
    font-family: var(--font-display);
}

.step-content h3 {
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
}

.step-content p {
    color: var(--text-secondary);
}

/* Footer */
footer {
    padding: 4rem 0 2rem;
    border-top: 1px solid var(--border-color);
    margin-top: 6rem;
    background: var(--bg-surface);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-bio p {
    color: var(--text-secondary);
    max-width: 300px;
    margin-top: 1rem;
}

.footer-links h4 {
    font-size: 1rem;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer-links ul li {
    margin-bottom: 0.8rem;
}

.footer-links a {
    color: var(--text-secondary);
}

.footer-links a:hover {
    color: var(--text-primary);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* Animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Legal Pages Specific */
.legal-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 120px 20px 60px;
}

.legal-section {
    margin-bottom: 3rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 2rem;
}

.legal-section:last-child {
    border-bottom: none;
}

.legal-section h2 {
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
}

.legal-section p,
.legal-section li {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.legal-section ul {
    list-style: disc;
    padding-left: 1.5rem;
}

/* Mobile Responsive */
@media (max-width: 968px) {
    .container {
        padding: 0 1.5rem;
    }

    .hero-grid {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 3rem;
    }

    .hero h1 {
        font-size: 3rem;
    }

    .hero p {
        margin: 0 auto 2rem;
    }

    .hero-stats {
        justify-content: center;
    }

    .btn-group {
        justify-content: center;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 80px;
        left: 0;
        width: 100%;
        background: var(--bg-surface);
        flex-direction: column;
        padding: 2rem;
        border-bottom: 1px solid var(--border-color);
    }

    .nav-links.active {
        display: flex;
    }

    .mobile-toggle {
        display: block;
    }

    .grid-3-col,
    .grid-2-col {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}