/* ============================================
   TRACE Protocol Finance - Main Styles
   ============================================ */

:root {
    /* Vertical Theme Colors */
    --vertical-primary: #d4af37;
    --vertical-secondary: #fbbf24;
    --vertical-accent: #0271FC;

    /* TRACE Protocol Signature Colors */
    --trace-gold: #d4af37;
    --trace-gold-light: #e8c547;
    --trace-gold-dark: #b8960c;
    --trace-gold-glow: rgba(212, 175, 55, 0.4);
    --trace-gold-subtle: rgba(212, 175, 55, 0.1);

    /* XDRIP Brand Colors */
    --xdrip-blue: #0271FC;
    --xdrip-black: #0a0a0a;
    --xdrip-dark: #141414;
    --xdrip-gray: #1a1a1c;
    --xdrip-gray-light: #262628;
    --xdrip-white: #F9F9F9;

    /* Functional Colors */
    --text-primary: #F9F9F9;
    --text-secondary: #E8D9A0;
    --text-muted: #6D7D92;
    --success: #00ff88;
    --success-dark: #00cc6a;
    --warning: #fbbf24;
    --danger: #ef4444;

    /* Glass Effects */
    --glass-bg: rgba(26, 26, 28, 0.85);
    --glass-border: rgba(212, 175, 55, 0.15);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--xdrip-black);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* ============================================
   BACKGROUND EFFECTS
============================================ */
.bg-gradient {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(ellipse at 50% 0%, rgba(212, 175, 55, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 20% 30%, rgba(212, 175, 55, 0.08) 0%, transparent 40%),
        radial-gradient(ellipse at 80% 70%, rgba(212, 175, 55, 0.06) 0%, transparent 40%);
    pointer-events: none;
    z-index: 0;
}

.grid-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        linear-gradient(rgba(212, 175, 55, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(212, 175, 55, 0.02) 1px, transparent 1px);
    background-size: 80px 80px;
    pointer-events: none;
    z-index: 0;
}

/* ============================================
   HEADER
============================================ */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(10, 10, 10, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
}

.header-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 16px;
    text-decoration: none;
}

.logo-icon {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--vertical-primary), var(--trace-gold-dark));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px var(--trace-gold-glow);
    position: relative;
    overflow: hidden;
}

.logo-icon::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent 40%, rgba(255,255,255,0.2) 50%, transparent 60%);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.logo-icon svg {
    width: 26px;
    height: 26px;
    fill: var(--xdrip-black);
    position: relative;
    z-index: 1;
}

.logo-text {
    font-family: 'Montserrat', sans-serif;
}

.logo-text .brand {
    font-size: 22px;
    letter-spacing: 0.02em;
}

.logo-text .brand-bold {
    font-weight: 700;
    color: var(--text-primary);
}

.logo-text .brand-light {
    font-weight: 300;
    color: var(--vertical-primary);
}

.logo-text .sub {
    font-size: 10px;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link {
    padding: 10px 18px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.nav-link:hover {
    color: var(--vertical-primary);
    background: var(--trace-gold-subtle);
}

.header-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--trace-gold-subtle);
    border: 1px solid rgba(212, 175, 55, 0.25);
    border-radius: 100px;
    margin-left: 20px;
}

.header-badge .dot {
    width: 8px;
    height: 8px;
    background: var(--success);
    border-radius: 50%;
    animation: pulse 2s infinite;
    box-shadow: 0 0 8px var(--success);
}

.header-badge span {
    font-size: 11px;
    font-weight: 600;
    color: var(--vertical-primary);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(0.95); }
}

/* ============================================
   BUTTONS
============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 28px;
    font-family: 'Montserrat', sans-serif;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    border-radius: 10px;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.btn-primary {
    background: linear-gradient(135deg, var(--vertical-primary), var(--trace-gold-dark));
    color: var(--xdrip-black);
    box-shadow: 0 4px 20px var(--trace-gold-glow);
}

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

.btn-outline {
    background: transparent;
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
}

.btn-outline:hover {
    border-color: var(--vertical-primary);
    color: var(--vertical-primary);
    background: var(--trace-gold-subtle);
}

.btn-glass {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
}

.btn-glass:hover {
    border-color: var(--vertical-primary);
    box-shadow: 0 0 20px var(--trace-gold-subtle);
}

.btn-dark {
    background: var(--xdrip-black);
    color: var(--xdrip-white);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.btn-dark:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

.btn svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

/* ============================================
   CONTAINER
============================================ */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
}

.container-narrow {
    max-width: 900px;
}

/* ============================================
   MAIN CONTENT
============================================ */
main {
    position: relative;
    z-index: 1;
    padding-top: 72px;
}

/* ============================================
   GLASS CARDS
============================================ */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    box-shadow:
        0 4px 40px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.glass-card-sm {
    border-radius: 14px;
}

/* ============================================
   SECTION TITLES
============================================ */
.section-label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    background: var(--xdrip-gray);
    border: 1px solid var(--glass-border);
    border-radius: 100px;
    margin-bottom: 24px;
}

.section-label svg {
    width: 16px;
    height: 16px;
    fill: var(--vertical-primary);
}

.section-label span {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-secondary);
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.section-title {
    font-family: 'Montserrat', sans-serif;
    font-size: clamp(36px, 5vw, 52px);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.section-title span {
    font-weight: 300;
    color: var(--vertical-primary);
}

.section-subtitle {
    font-size: 17px;
    color: var(--text-muted);
    max-width: 600px;
    line-height: 1.7;
}

/* ============================================
   TYPOGRAPHY
============================================ */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Montserrat', sans-serif;
}

.text-gold {
    color: var(--vertical-primary);
}

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

.font-mono {
    font-family: 'JetBrains Mono', monospace;
}

.tagline {
    font-family: 'Saira', sans-serif;
    font-style: italic;
    color: var(--vertical-primary);
}

.bold {
    font-weight: 700;
}

.light {
    font-weight: 300;
    color: var(--trace-gold);
}

/* ============================================
   FOOTER
============================================ */
.footer {
    position: relative;
    z-index: 1;
    padding: 60px 40px;
    border-top: 1px solid var(--glass-border);
    margin-top: 100px;
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.footer-brand-text {
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
}

.footer-brand-text .powered {
    color: var(--text-muted);
    font-weight: 400;
}

.footer-brand-text .trace {
    font-weight: 700;
    color: var(--vertical-primary);
}

.footer-brand-text .xdrip {
    font-weight: 700;
    color: var(--xdrip-blue);
}

.footer-left p {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.8;
}

.footer-right {
    text-align: right;
}

.footer-tagline {
    font-family: 'Saira', sans-serif;
    font-size: 13px;
    font-style: italic;
    color: rgba(212, 175, 55, 0.6);
    line-height: 1.8;
}

.footer-links {
    display: flex;
    gap: 30px;
    margin-top: 16px;
}

.footer-links a {
    font-size: 12px;
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.3s ease;
}

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

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

.animate-fade-in {
    animation: fadeInUp 0.6s ease-out forwards;
}

.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }
.delay-400 { animation-delay: 0.4s; }

/* ============================================
   RESPONSIVE
============================================ */
@media (max-width: 900px) {
    .header-inner {
        padding: 0 20px;
    }

    .header-badge {
        display: none;
    }

    .container {
        padding: 0 20px;
    }

    .nav-links {
        gap: 4px;
    }

    .nav-link {
        padding: 8px 12px;
        font-size: 12px;
    }

    .footer-inner {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 30px;
    }

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

@media (max-width: 600px) {
    .logo-text .brand {
        font-size: 18px;
    }

    .btn {
        padding: 10px 20px;
        font-size: 12px;
    }
}
