/* =====================================================
   0G Storage - Main Styles
   ===================================================== */

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

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-primary);
    font-size: var(--text-base);
    font-weight: var(--font-normal);
    line-height: var(--leading-normal);
    color: var(--text-primary);
    background-color: var(--bg-primary);
    overflow-x: hidden;
    position: relative;
}

/* ==================== Live Gradient Background ==================== */
.bg-gradient-live {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.bg-gradient-live::before,
.bg-gradient-live::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
}

.bg-gradient-live::before {
    width: 700px;
    height: 700px;
    background: rgba(183, 95, 255, 0.12);
    top: -200px;
    right: -150px;
    animation: bg-drift-1 25s ease-in-out infinite;
}

.bg-gradient-live::after {
    width: 600px;
    height: 600px;
    background: rgba(146, 0, 225, 0.1);
    bottom: -100px;
    left: -200px;
    animation: bg-drift-2 30s ease-in-out infinite;
}

.bg-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
}

.bg-orb-1 {
    width: 500px;
    height: 500px;
    background: rgba(203, 138, 255, 0.08);
    top: 30%;
    right: 5%;
    animation: bg-drift-3 20s ease-in-out infinite;
}

.bg-orb-2 {
    width: 450px;
    height: 450px;
    background: rgba(213, 163, 255, 0.07);
    bottom: 20%;
    left: 20%;
    animation: bg-drift-1 22s ease-in-out infinite reverse;
}

@keyframes bg-drift-1 {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    33% {
        transform: translate(30px, 50px) scale(1.05);
    }
    66% {
        transform: translate(-20px, 30px) scale(0.95);
    }
}

@keyframes bg-drift-2 {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    33% {
        transform: translate(40px, -30px) scale(1.08);
    }
    66% {
        transform: translate(-30px, -50px) scale(0.98);
    }
}

@keyframes bg-drift-3 {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    50% {
        transform: translate(-40px, 40px) scale(1.1);
    }
}

/* ==================== Typography ==================== */
h1, h2, h3, h4, h5, h6 {
    font-weight: var(--font-bold);
    line-height: var(--leading-tight);
    letter-spacing: var(--tracking-tight);
    color: var(--text-primary);
}

h1 {
    font-size: var(--text-5xl);
}

h2 {
    font-size: var(--text-4xl);
}

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

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

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

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

p {
    margin-bottom: var(--space-4);
}

p:last-child {
    margin-bottom: 0;
}

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

a:hover {
    color: var(--color-purple-700);
}

strong {
    font-weight: var(--font-semibold);
}

/* ==================== Utility Classes ==================== */
.container {
    width: 100%;
    max-width: var(--container-xl);
    margin: 0 auto;
    padding: 0 var(--space-6);
}

.text-lg {
    font-size: var(--text-lg);
    line-height: var(--leading-relaxed);
}

.text-body {
    font-size: var(--text-base);
    line-height: var(--leading-relaxed);
}

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

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

.gradient-text {
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ==================== Sections ==================== */
.section {
    padding: var(--section-padding) 0;
    position: relative;
    z-index: 1;
    background-color: var(--bg-primary);
    background-image: radial-gradient(circle, rgba(0, 0, 0, 0.15) 1px, transparent 1px);
    background-size: 20px 20px;
}

.section-alt {
    background-color: var(--bg-secondary);
    background-image: none;
}

.section-header {
    text-align: center;
    max-width: 800px;
    margin: 0 auto var(--space-16);
}

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

.section-subtitle {
    font-size: var(--text-lg);
    color: var(--text-secondary);
    line-height: var(--leading-relaxed);
}

.section-cta {
    text-align: center;
    margin-top: var(--space-12);
}

/* ==================== Buttons ==================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-6);
    font-family: var(--font-primary);
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    line-height: 1;
    text-decoration: none;
    border: var(--border-width-2) solid transparent;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: var(--transition-normal);
    white-space: nowrap;
}

.btn i {
    font-size: 0.875em;
}

.btn-lg {
    padding: var(--space-4) var(--space-8);
    font-size: var(--text-base);
    border-radius: var(--radius-full);
}

.btn-primary {
    background: var(--color-black);
    color: var(--text-inverse);
    border-color: var(--color-black);
    border-radius: var(--radius-full);
}

.btn-primary:hover {
    background: var(--color-gray-800);
    border-color: var(--color-gray-800);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    color: var(--text-inverse);
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border-color: var(--color-black);
    border-radius: var(--radius-full);
}

.btn-secondary:hover {
    background: var(--color-black);
    color: var(--text-inverse);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-tertiary {
    background: transparent;
    color: var(--text-secondary);
    border-color: transparent;
}

.btn-tertiary:hover {
    color: var(--text-primary);
    background: var(--color-gray-100);
}

/* ==================== Cards ==================== */
.card {
    background: var(--bg-card);
    border: var(--border-width) solid var(--border-light);
    border-radius: var(--radius-xl);
    padding: var(--space-6);
    transition: var(--transition-normal);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-card-hover);
}

/* ==================== Labels & Tags ==================== */
.label-tag {
    display: inline-block;
    padding: var(--space-1) var(--space-3);
    font-size: var(--text-xs);
    font-weight: var(--font-medium);
    text-transform: uppercase;
    letter-spacing: var(--tracking-wide);
    background: var(--gradient-subtle);
    color: var(--color-purple-900);
    border-radius: var(--radius-full);
}

/* ==================== Selection ==================== */
::selection {
    background: var(--color-purple-200);
    color: var(--color-purple-900);
}

/* ==================== Scrollbar ==================== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

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

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

/* ==================== Focus States ==================== */
:focus-visible {
    outline: 2px solid var(--color-purple-500);
    outline-offset: 2px;
}

/* ==================== Reduced Motion ==================== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }
}
