/* =============================================
   WMTX PORTFOLIO — Professional Gradient Theme
   Main Aesthetic: Deep Crystal Black & Emerald Gold
   ============================================= */

:root {
  /* === Brand Colors === */
  --brand-green:      #2CAE24; 
  --brand-yellow:     #fffd11; 
  --brand-accent:     var(--brand-yellow);
  --brand-navy:       #000000;
  --brand-gold:       #fffd11;
  --brand-emerald:    #2CAE24;
  
  /* World Mobile Foundation (Light) */
  --brand-midnight:   #0F172A;
  --brand-dark:       #64748B;
  --bg-color-1:       #F8FAFC;
  --bg-color-2:       #FFFFFF;
  --bg-orb-green:     rgba(44, 174, 36, 0.05);
  --bg-orb-yellow:    rgba(255, 253, 17, 0.08);
  
  /* === LIGHT CARDS UI (on Dark Bg) === */
  --bg-page:        var(--bg-color-1);
  --bg-card:        rgba(255, 255, 255, 0.96);
  --bg-nav:         rgba(255, 255, 255, 0.9);

  /* === Typography === */
  --text-on-bg:     #1E293B; 
  --text-primary:   #0F172A; 
  --text-secondary: #475569; 
  --text-muted:     #94A3B8; 
  --text-on-dark:   #FFFFFF;

  /* === Borders & Shadows === */
  --border-subtle:  rgba(15, 23, 42, 0.08);
  --border-glass:   rgba(15, 23, 42, 0.04);
  --shadow-premium: 0 10px 25px rgba(0, 0, 0, 0.05), 0 5px 10px rgba(0, 0, 0, 0.02);
  --shadow-hover:   0 20px 40px rgba(0, 0, 0, 0.1);

  --font-ui: "Be Vietnam Pro", "Segoe UI", system-ui, sans-serif;
  --font-display: "Space Grotesk", "Be Vietnam Pro", "Segoe UI", system-ui, sans-serif;
  --font-numeric: "Space Grotesk", "Be Vietnam Pro", "Segoe UI", sans-serif;
}

/* === BASE === */
html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
    background-color: var(--bg-page);
    background-image: linear-gradient(180deg, var(--bg-color-1) 0%, var(--bg-color-2) 100%);
    color: var(--text-primary);
    font-family: var(--font-ui);
    font-weight: 500;
    letter-spacing: -0.005em;
    line-height: 1.58;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

h1, h2, h3, h4, h5, h6 {
    line-height: 1.18;
}

/* === ANIMATED AMBIENT NODES === */
body::before,
body::after {
    content: "";
    position: fixed;
    top: 50%;
    left: 50%;
    width: 150vmax;
    height: 150vmax;
    transform: translate(-50%, -50%);
    z-index: -1;
    pointer-events: none;
    background: radial-gradient(circle, var(--bg-orb-green) 0%, transparent 40%);
    animation: float-node 40s infinite linear;
    opacity: 0.6;
}

body::after {
    background: radial-gradient(circle, var(--bg-orb-yellow) 0%, transparent 40%);
    animation: float-node 60s infinite linear reverse;
    opacity: 0.4;
    width: 120vmax;
    height: 120vmax;
}

@keyframes float-node {
    0% { transform: translate(-50%, -50%) rotate(0deg) scale(1); }
    50% { transform: translate(-45%, -55%) rotate(180deg) scale(1.1); }
    100% { transform: translate(-50%, -50%) rotate(360deg) scale(1); }
}

main {
    position: relative;
    z-index: 10;
}

/* === GLASSMORPHISM (LIGHT VERSION) === */
.glass-panel {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-subtle);
    border-radius: 1.5rem;
    box-shadow: var(--shadow-premium);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 1;
    color: var(--text-primary);
}

.glass-panel::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(135deg, rgba(255,255,255,1) 0%, transparent 100%);
    pointer-events: none;
    z-index: -1;
    opacity: 0.1;
}

.glass-panel:hover {
    transform: translateY(-4px);
    border-color: var(--brand-green);
    background: #FFFFFF;
    box-shadow: var(--shadow-hover);
}

/* === BUTTONS === */
.btn-premium {
    background: var(--brand-yellow);
    color: #000000;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.8rem 2rem;
    min-height: 3rem;
    border-radius: 12px;
    font-weight: 800;
    font-size: 0.9rem;
    line-height: 1.25;
    text-align: center;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(255, 253, 17, 0.3);
}

.btn-premium:hover {
    background: #000000;
    color: #FFFFFF;
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #000000;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.8rem 2rem;
    min-height: 3rem;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    cursor: pointer;
}

.btn-secondary:hover {
    background: #000000;
    color: #FFFFFF;
    border-color: #000000;
    transform: translateY(-1px);
}

/* === UTILITY === */
.text-gradient {
    background: linear-gradient(to right, #fffd11, #FFFFFF);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.card-yellow {
    background: var(--brand-yellow);
    color: #000000;
    border: 1px solid rgba(0,0,0,0.05);
}

/* === DASHBOARD TYPOGRAPHY SYSTEM === */
.dashboard-page {
    --dash-title-color: var(--text-on-bg);
}

.dashboard-page .dash-hero-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 3.2vw, 3.35rem);
    line-height: 1.06;
    letter-spacing: -0.025em;
    font-weight: 800;
    color: var(--dash-title-color);
}

.dashboard-page .dash-hero-subtitle {
    max-width: 56ch;
    margin-top: 0.8rem;
    font-size: clamp(0.93rem, 1.3vw, 1.04rem);
    line-height: 1.6;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.6);
}

.dashboard-page .dash-section-title {
    font-size: clamp(1.32rem, 2.2vw, 1.72rem);
    font-weight: 700;
}

.dashboard-page .dash-metric-xl {
    font-size: clamp(1.85rem, 3vw, 2.3rem);
    font-weight: 800;
    font-family: var(--font-numeric);
}

.dashboard-page .dash-label {
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.075em;
    color: var(--text-muted);
}

/* === METRIC POSTER SECTIONS (ADA / WMTx) === */
.metric-poster-section {
    position: relative;
    border-radius: 1.8rem;
    padding: 1.5rem;
    border: 1px solid var(--border-subtle);
    background: #FFFFFF;
    box-shadow: var(--shadow-premium);
}

.metric-poster-card {
    border-radius: 1rem;
    background: var(--brand-ghost, #F8FAFC);
    border: 1px dashed var(--brand-green);
    padding: 1rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
}

.metric-poster-card .metric-label {
    color: var(--text-secondary) !important;
}

.metric-poster-card .metric-primary-number {
    color: var(--text-primary) !important;
}

.metric-poster-card .metric-unit {
    color: var(--brand-green) !important;
}

/* Improve contrast for white-text utilities when used over light blocks */
main [class*="bg-white"] {
    color: #11352b;
}

/* === FORMS === */
input {
    background: #FFFFFF;
    border: 1px solid var(--border-subtle);
    border-radius: 0.75rem;
    padding: 0.8rem 1rem;
    color: var(--text-primary);
    transition: all 0.2s ease;
}

input:focus {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--brand-green);
    outline: none;
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.1);
}

/* === NAVIGATION === */
.nav-link {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    border-radius: 0.75rem;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-secondary);
    transition: all 0.3s ease;
    text-decoration: none !important;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--brand-accent);
}

.nav-dropdown {
    position: relative;
    display: flex;
}

.nav-dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    background: #0D1629;
    backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 1.25rem;
    padding: 0.75rem;
    margin-top: 0.75rem;
    z-index: 100;
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
}

.nav-dropdown:hover .nav-dropdown-content {
    display: block;
    animation: slideDown 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-dropdown-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    color: var(--text-primary);
    font-size: 0.85rem;
    font-weight: 700;
    border-radius: 0.75rem;
    transition: all 0.2s ease;
    text-decoration: none !important;
}

.nav-dropdown-item:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--brand-green);
    transform: translateX(4px);
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* === MOBILE BOTTOM NAVIGATION === */
.mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 50;
    background: rgba(5, 8, 15, 0.95);
    backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: space-around;
    padding-bottom: env(safe-area-inset-bottom);
    min-height: 4.5rem;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.8);
}

.mobile-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-muted) !important;
    text-decoration: none !important;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.5rem 0;
}

.mobile-nav-item.active {
    color: var(--brand-accent) !important;
}

/* === RESPONSIVE HELPERS === */
@media (max-width: 768px) {
    .glass-panel {
        border-radius: 1.25rem;
    }
}
