/* Reset & Base */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: var(--font-primary);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-normal);
    line-height: var(--line-height-normal);
    color: var(--color-gray-800);
    background-color: var(--color-white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-primary);
    font-weight: var(--font-weight-bold);
    line-height: var(--line-height-tight);
    color: var(--color-black);
}

h1 {
    font-size: var(--font-size-hero);
    font-weight: var(--font-weight-extrabold);
    letter-spacing: -0.02em;
}

h2 {
    font-size: var(--font-size-4xl);
    font-weight: var(--font-weight-bold);
    letter-spacing: -0.01em;
}

h3 {
    font-size: var(--font-size-2xl);
    font-weight: var(--font-weight-semibold);
}

h4 {
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-semibold);
}

h5 {
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-medium);
}

h6 {
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-medium);
}

p {
    font-size: var(--font-size-base);
    line-height: var(--line-height-relaxed);
    color: var(--color-gray-600);
}

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

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

ul, ol {
    list-style: none;
}

/* Selection */
::selection {
    background: var(--color-red);
    color: var(--color-white);
}

::-moz-selection {
    background: var(--color-red);
    color: var(--color-white);
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 4px;
}

::-webkit-scrollbar-track {
    background: var(--color-gray-100);
}

::-webkit-scrollbar-thumb {
    background: var(--color-gray-400);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-red);
}

/* Focus Styles */
:focus-visible {
    outline: 2px solid var(--color-red);
    outline-offset: 2px;
}

/* Section spacing */
.section {
    padding: var(--space-section) 0;
    position: relative;
}

.section--dark {
    background: #0e0e0e;
    color: var(--color-white);
    overflow: hidden;
}

.section--dark::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(ellipse 60% 50% at 20% 40%, rgba(183, 28, 28, 0.06) 0%, transparent 70%),
        radial-gradient(ellipse 40% 60% at 80% 60%, rgba(183, 28, 28, 0.04) 0%, transparent 70%);
    pointer-events: none;
}

.section--dark > * {
    position: relative;
    z-index: 1;
}

.section--dark h2,
.section--dark h3,
.section--dark h4 {
    color: var(--color-white);
}

.section--dark p {
    color: rgba(255, 255, 255, 0.65);
}

.section--gray {
    background: #f8f8fa;
}

/* Section with particle canvas background */
.section--has-particles {
    position: relative;
    overflow: hidden;
}

.section--has-particles > .container {
    position: relative;
    z-index: 1;
}

.section-particles {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: auto;
    z-index: 0;
}

/* Page Header Banner — unified for all inner pages */
.page-header {
    padding: calc(var(--navbar-height) + 80px) 0 70px;
    background: #0a0a0a;
    position: relative;
    overflow: hidden;
    text-align: center;
}

/* Animated flowing gradient overlay */
.page-header::before {
    content: '';
    position: absolute;
    inset: -50%;
    background:
        conic-gradient(
            from 0deg at 30% 40%,
            rgba(183, 28, 28, 0.18) 0deg,
            transparent 60deg,
            rgba(183, 28, 28, 0.12) 120deg,
            transparent 180deg,
            rgba(120, 20, 20, 0.14) 240deg,
            transparent 300deg,
            rgba(183, 28, 28, 0.1) 360deg
        ),
        conic-gradient(
            from 180deg at 70% 60%,
            rgba(255, 255, 255, 0.06) 0deg,
            transparent 90deg,
            rgba(183, 28, 28, 0.1) 180deg,
            transparent 270deg,
            rgba(255, 255, 255, 0.04) 360deg
        );
    animation: headerGradientRotate 20s linear infinite;
}

@keyframes headerGradientRotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Animated dot/mesh pattern */
.page-header::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle 1.5px at center, rgba(255, 255, 255, 0.15) 0%, transparent 100%);
    background-size: 40px 40px;
    animation: patternPulse 4s ease-in-out infinite alternate;
    pointer-events: none;
}

@keyframes patternPulse {
    0% { opacity: 0.5; transform: scale(1); }
    100% { opacity: 0.9; transform: scale(1.02); }
}

.page-header > * {
    position: relative;
    z-index: 2;
}

.page-header h1 {
    color: var(--color-white);
    font-size: var(--font-size-4xl);
    margin-top: var(--space-4);
}

.page-header p {
    color: rgba(255, 255, 255, 0.6);
    font-size: var(--font-size-lg);
    max-width: 600px;
    margin: var(--space-4) auto 0;
}

/* Section Headers */
.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto var(--space-16);
}

.section-header h2 {
    margin-bottom: var(--space-4);
}

.section-header p {
    font-size: var(--font-size-lg);
}

.section-label {
    display: inline-block;
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-bold);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--color-red);
    margin-bottom: var(--space-3);
}

/* Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.text-white { color: var(--color-white); }
.text-red { color: var(--color-red); }
.text-muted { color: var(--color-gray-500); }

.font-medium { font-weight: var(--font-weight-medium); }
.font-semibold { font-weight: var(--font-weight-semibold); }
.font-bold { font-weight: var(--font-weight-bold); }
