/* ============================================
   BASE STYLES - Reset & Foundation
   ============================================ */

/* CSS Reset */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    scrollbar-width: thin;
    scrollbar-color: var(--cyan-glow) var(--bg-primary);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--cyan-glow), var(--purple-glow));
    border-radius: var(--border-radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--cyan-light), var(--purple-light));
}

/* Body */
body {
    font-family: var(--font-primary);
    font-size: var(--text-base);
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    overflow-x: hidden;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Noise Texture Overlay */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1000;
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

h1 {
    font-size: var(--text-5xl);
}

h2 {
    font-size: var(--text-4xl);
}

h3 {
    font-size: var(--text-3xl);
}

h4 {
    font-size: var(--text-2xl);
}

h5 {
    font-size: var(--text-xl);
}

h6 {
    font-size: var(--text-lg);
}

p {
    color: var(--text-secondary);
    margin-bottom: var(--space-md);
}

a {
    color: var(--cyan-glow);
    text-decoration: none;
    transition: color var(--duration-normal) var(--ease-out);
}

a:hover {
    color: var(--pink-glow);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

ul,
ol {
    list-style: none;
}

/* Selection Color */
::selection {
    background: var(--cyan-glow);
    color: var(--bg-primary);
}

/* Focus States */
:focus-visible {
    outline: 2px solid var(--cyan-glow);
    outline-offset: 2px;
}

/* Container */
.container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

/* Section Base */
.section {
    position: relative;
    padding: var(--space-3xl) 0;
}

.section-title {
    text-align: center;
    margin-bottom: var(--space-2xl);
}

.section-title h2 {
    display: inline-block;
    background: var(--gradient-energy);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    position: relative;
}

.section-title h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--gradient-energy);
    border-radius: var(--border-radius-full);
    box-shadow: var(--glow-cyan);
}

/* Utility Classes */
.text-gradient {
    background: var(--gradient-energy);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.glow-text {
    text-shadow: var(--glow-text);
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Hidden class for scroll animations */
.hidden {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity var(--duration-slower) var(--ease-out),
        transform var(--duration-slower) var(--ease-out);
}

.hidden.show {
    opacity: 1;
    transform: translateY(0);
}

/* Engagement Widget */
.engagement-widget {
    position: fixed;
    bottom: 2rem;
    left: 2rem;
    z-index: 1000;
    display: flex;
    align-items: center;
    padding: 0.5rem;
    gap: 0.5rem;
    background: rgba(10, 10, 15, 0.8);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    transform: translateY(100px);
    animation: slideUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards 1s;
}

@keyframes slideUp {
    to {
        transform: translateY(0);
    }
}

.engage-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 0.5rem 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    border-radius: 20px;
}

.engage-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
}

.engage-btn svg {
    transition: transform 0.3s ease, fill 0.3s ease;
    stroke: currentColor;
    stroke-width: 2;
}

/* Like Active State */
.engage-btn.active.like {
    color: #ff4d6d;
}

.engage-btn.active.like svg {
    fill: #ff4d6d;
    stroke: none;
    transform: scale(1.2);
    animation: heartBeat 0.4s ease-in-out;
}

/* Dislike Active State */
.engage-btn.active.dislike {
    color: #aeb9cc;
}

.engage-btn.active.dislike svg {
    fill: #aeb9cc;
    stroke: none;
    transform: rotate(-10deg);
}

.divider {
    width: 1px;
    height: 24px;
    background: rgba(255, 255, 255, 0.1);
}

@keyframes heartBeat {
    0% {
        transform: scale(1);
    }

    25% {
        transform: scale(1.3);
    }

    50% {
        transform: scale(1);
    }

    75% {
        transform: scale(1.3);
    }

    100% {
        transform: scale(1.2);
    }
}

/* Mobile Position */
@media (max-width: 768px) {
    .engagement-widget {
        bottom: 1.5rem;
        left: 1.5rem;
        padding: 0.4rem;
    }
}