/**
 * Elevate Metrics Digital — Core Stylesheet
 */

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

html {
    font-size: 14.5px; /* Replicates sleek 90% zoom scale on 100% desktop browsers */
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
}

@media (max-width: 991px) {
    html {
        font-size: 15.5px;
    }
}

@media (max-width: 768px) {
    html {
        font-size: 16px; /* Native 16px scale on mobile for optimal tap targets and zero auto-zoom */
    }
}

body {
    font-family: var(--font-primary);
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
    position: relative;
    transition: background-color var(--transition-normal), color var(--transition-normal);
}

/* Typography with Clamp */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--text-main);
    line-height: 1.2;
    font-weight: 700;
    letter-spacing: -0.02em;
}

h1 { font-size: clamp(2rem, 4.5vw + 0.8rem, 3.85rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 2.8vw + 0.8rem, 2.75rem); font-weight: 800; }
h3 { font-size: clamp(1.25rem, 1.8vw + 0.6rem, 1.85rem); font-weight: 700; }
h4 { font-size: 1.25rem; font-weight: 600; }
h5 { font-size: 1.1rem; font-weight: 600; }
h6 { font-size: 0.95rem; font-weight: 600; }

p {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 1rem;
}

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

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

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

/* Main Content Wrapper */
#main-content {
    position: relative;
    z-index: 1;
    width: 100%;
}

/* Container & Layout */
.container {
    width: 100%;
    max-width: 1240px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

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

.container-wide {
    max-width: 1380px;
}

@media (max-width: 768px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

.section {
    padding-top: clamp(3.5rem, 6.5vw, 6.5rem);
    padding-bottom: clamp(3.5rem, 6.5vw, 6.5rem);
    position: relative;
}

.section-alt {
    background-color: var(--bg-surface);
}

.section-dark {
    background-color: var(--primary-dark);
    color: #FFFFFF;
}

.section-dark h1, .section-dark h2, .section-dark h3, .section-dark h4 {
    color: #FFFFFF;
}

.section-dark p {
    color: #94A3B8;
}

/* Section Header */
.section-header {
    text-align: center;
    max-width: 760px;
    margin: 0 auto clamp(2.5rem, 5vw, 4.5rem) auto;
}

.section-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 1rem;
    background: rgba(25, 120, 56, 0.08);
    color: #197838;
    border: 1px solid rgba(25, 120, 56, 0.25);
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 1rem;
}

[data-theme="dark"] .section-eyebrow {
    background: rgba(25, 120, 56, 0.18);
    color: #34D399;
    border-color: rgba(52, 211, 153, 0.3);
}

.section-title {
    margin-bottom: 1.25rem;
}

.section-desc {
    font-size: clamp(1rem, 1.2vw, 1.2rem);
    color: var(--text-muted);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    font-family: var(--font-primary);
    font-size: 1rem;
    font-weight: 600;
    padding: 0.85rem 1.75rem;
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    cursor: pointer;
    transition: all var(--transition-normal);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(135deg, var(--logo-blue) 0%, #0066FF 100%);
    color: #FFFFFF;
    box-shadow: 0 4px 14px rgba(0, 142, 254, 0.35);
}

.btn-primary:hover {
    color: #FFFFFF;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 142, 254, 0.55);
}

.btn-accent {
    background: linear-gradient(135deg, var(--accent) 0%, var(--logo-blue) 100%);
    color: #0A1128;
    font-weight: 700;
    box-shadow: 0 4px 14px var(--accent-glow);
}

.btn-accent:hover {
    color: #0A1128;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 229, 255, 0.6);
}

.btn-outline {
    background: transparent;
    color: var(--text-main);
    border-color: var(--border-color);
}

.btn-outline:hover {
    background: var(--bg-card-hover);
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-2px);
}

.btn-outline-white {
    background: rgba(255, 255, 255, 0.08);
    color: #FFFFFF;
    border-color: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(10px);
}

.btn-outline-white:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: #FFFFFF;
    color: #FFFFFF;
    transform: translateY(-2px);
}

.btn-sm {
    padding: 0.5rem 1.15rem;
    font-size: 0.875rem;
}

.btn-lg {
    padding: 1.1rem 2.25rem;
    font-size: 1.1rem;
    border-radius: var(--radius-lg);
}

/* Grids */
.grid {
    display: grid;
    gap: 2rem;
}

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

@media (max-width: 1024px) {
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
    .grid-2 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
    .grid-4, .grid-3 { grid-template-columns: 1fr; }
}

@media (max-width: 576px) {
    .grid-2 { grid-template-columns: 1fr; }
}

/* Flex Utilities */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }
.gap-4 { gap: 2rem; }

/* Logo Spectrum Text Gradient */
.text-gradient {
    background: linear-gradient(135deg, #197838 0%, #008EFE 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Glow effects */
.glow-primary {
    position: absolute;
    width: 380px;
    height: 380px;
    background: radial-gradient(circle, rgba(0, 142, 254, 0.28) 0%, rgba(0,0,0,0) 70%);
    filter: blur(55px);
    pointer-events: none;
    z-index: 0;
}

.glow-accent {
    position: absolute;
    width: 320px;
    height: 320px;
    background: radial-gradient(circle, var(--accent-glow) 0%, rgba(0,0,0,0) 70%);
    filter: blur(50px);
    pointer-events: none;
    z-index: 0;
}
