:root {
    --bg-color: #f7f9fa;
    --text-color: #111111;
    --accent-gold: #b8860b;
    --accent-gold-light: #d4af37;
    --accent-purple: #6c3483;
    --accent-blue: #1f618d;
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(0, 0, 0, 0.1);
    --font-primary: 'Inter', system-ui, -apple-system, sans-serif;
    --font-heading: 'Outfit', 'Inter', system-ui, sans-serif;
    --transition: all 0.3s ease-in-out;
    --hero-overlay-start: rgba(255, 255, 255, 0.7);
    --hero-overlay-end: #f7f9fa;
    --header-bg: rgba(247, 249, 250, 0.9);
    --btn-text: #ffffff;
    --footer-bg: #e1e5e8;
    --card-hover: rgba(184, 134, 11, 0.2);
    --card-shadow: rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] {
    --bg-color: #0b0512;
    --text-color: #f0f0f5;
    --accent-gold: #d4af37;
    --accent-gold-light: #f3d778;
    --accent-purple: #8e44ad;
    --accent-blue: #2980b9;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --hero-overlay-start: rgba(11, 5, 18, 0.4);
    --hero-overlay-end: #0b0512;
    --header-bg: rgba(11, 5, 18, 0.7);
    --btn-text: #000000;
    --footer-bg: #05020a;
    --card-hover: rgba(212, 175, 55, 0.3);
    --card-shadow: rgba(0, 0, 0, 0.5);
}

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

body {
    font-family: var(--font-primary);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: radial-gradient(circle at 50% 10%, rgba(142, 68, 173, 0.15) 0%, transparent 60%),
        radial-gradient(circle at 90% 90%, rgba(41, 128, 185, 0.15) 0%, transparent 60%);
    z-index: -1;
    pointer-events: none;
}

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

ul {
    list-style-type: none;
}

/* Typography */
h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    letter-spacing: -0.02em;
}

.text-gradient {
    background: linear-gradient(135deg, var(--accent-gold), var(--accent-gold-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-gradient-purple {
    background: linear-gradient(135deg, var(--accent-purple), #c39bd3);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Header & Nav */
header {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 1.5rem 5%;
    z-index: 1000;
    background: var(--header-bg);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition);
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    font-family: var(--font-heading);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo span {
    color: var(--accent-gold);
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links li a {
    font-size: 0.95rem;
    font-weight: 500;
    position: relative;
}

.nav-links li a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent-gold);
    transition: var(--transition);
}

.nav-links li a:hover::after,
.nav-links li a.active::after {
    width: 100%;
}

.header-btn {
    background: linear-gradient(135deg, var(--accent-gold), #b8860b);
    color: var(--btn-text);
    padding: 0.6rem 1.5rem;
    border-radius: 30px;
    font-weight: 600;
    font-size: 0.9rem;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
}

.header-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.5);
    color: var(--btn-text);
}

/* Sections */
section {
    padding: 6rem 5%;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.section-header p {
    color: #a0a0b0;
    max-width: 600px;
    margin: 0 auto;
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    text-align: center;
    padding-top: 5rem;
    background-image: url('../assets/hero-bg.png');
    background-size: cover;
    background-position: center;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, var(--hero-overlay-start) 0%, var(--hero-overlay-end) 80%);
}

.hero-content {
    position: relative;
    z-index: 10;
    max-width: 800px;
}

.hero h1 {
    font-size: 4.5rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    animation: fadeUp 1s ease-out;
}

.hero p {
    font-size: 1.25rem;
    color: #c0c0d0;
    margin-bottom: 2.5rem;
    animation: fadeUp 1s ease-out 0.2s backwards;
}

.btn-group {
    display: flex;
    gap: 1rem;
    justify-content: center;
    animation: fadeUp 1s ease-out 0.4s backwards;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-gold), #b8860b);
    color: var(--btn-text);
    padding: 1rem 2.5rem;
    border-radius: 30px;
    font-weight: 600;
    font-size: 1.1rem;
    box-shadow: 0 4px 20px rgba(212, 175, 55, 0.4);
    display: inline-block;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.6);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-color);
    padding: 1rem 2.5rem;
    border-radius: 30px;
    font-weight: 500;
    font-size: 1.1rem;
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(5px);
    display: inline-block;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-3px);
}

/* Glass Cards (Calculators, Features, Services) */
.glass-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

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

.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent);
    transform: skewX(-20deg);
    transition: 0.5s;
}

.glass-card:hover {
    transform: translateY(-10px);
    border-color: var(--card-hover);
    box-shadow: 0 10px 30px var(--card-shadow), inset 0 0 20px rgba(212, 175, 55, 0.05);
}

.glass-card:hover::before {
    left: 200%;
}

.card-icon {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: var(--accent-gold);
}

.glass-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.glass-card p {
    color: #a0a0b0;
    margin-bottom: 1.5rem;
}

.card-link {
    color: var(--accent-gold);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.card-link:hover {
    gap: 0.8rem;
}

/* Knowledge Base Preview */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.article-card {
    border-radius: 15px;
    overflow: hidden;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.article-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.2);
}

.article-img {
    width: 100%;
    height: 200px;
    background: var(--glass-bg);
    position: relative;
}

.article-img::after {
    content: '✦';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--accent-purple);
    font-size: 3rem;
    opacity: 0.3;
}

.article-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.article-tag {
    background: rgba(142, 68, 173, 0.2);
    color: #c39bd3;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    align-self: flex-start;
    margin-bottom: 1rem;
}

.article-content h3 {
    font-size: 1.25rem;
    margin-bottom: 0.8rem;
}

.article-content p {
    color: #a0a0b0;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

/* Calculator Forms */
.calc-container {
    max-width: 600px;
    margin: 0 auto;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 3rem;
    backdrop-filter: blur(10px);
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #d0d0e0;
}

.form-control {
    width: 100%;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    color: var(--text-color);
    font-family: var(--font-primary);
    font-size: 1rem;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-gold);
    background: rgba(212, 175, 55, 0.05);
}

.calc-result {
    margin-top: 2rem;
    padding: 2rem;
    background: rgba(212, 175, 55, 0.1);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 15px;
    text-align: center;
    display: none;
    animation: fadeIn 0.5s ease;
}

.calc-result h3 {
    color: var(--accent-gold);
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.calc-result p {
    color: #e0e0e0;
}

/* Footer */
footer {
    background: var(--footer-bg);
    padding: 4rem 5% 2rem;
    border-top: 1px solid var(--glass-border);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
    max-width: 1200px;
    margin: 0 auto 3rem;
}

.footer-col h4 {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    color: var(--accent-gold);
}

.footer-col p {
    color: #a0a0b0;
    margin-bottom: 1.5rem;
}

.footer-links li {
    margin-bottom: 0.8rem;
}

.footer-links a {
    color: #a0a0b0;
}

.footer-links a:hover {
    color: var(--accent-gold);
}

.copyright {
    text-align: center;
    color: #707080;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.9rem;
}

/* Animations */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Responsive */
@media (max-width: 900px) {
    .hero h1 {
        font-size: 3rem;
    }

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

    .nav-links {
        display: none;
        /* Mobile menu needed */
    }
}

@media (max-width: 600px) {
    .hero h1 {
        font-size: 2.5rem;
    }

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

    .btn-group {
        flex-direction: column;
    }

    .calc-container {
        padding: 1.5rem;
    }
}

/* Theme Switch */
.theme-switch {
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 1.2rem;
    cursor: pointer;
    margin-left: 1rem;
    transition: var(--transition);
}

.theme-switch:hover {
    transform: scale(1.1);
}