/* ═══════════════════════════════════════════════
   Base Styles — Reset, Typography, Layout
   ═══════════════════════════════════════════════ */

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

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    font-size: 16px;
}

body {
    font-family: var(--font-sans);
    font-weight: var(--fw-regular);
    font-size: var(--fs-base);
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-primary);
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ─── Background Ambient Effect ─── */
body::before {
    content: '';
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(139, 34, 82, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(15, 52, 96, 0.12) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 80%, rgba(212, 160, 23, 0.06) 0%, transparent 50%);
    animation: ambientDrift 25s ease-in-out infinite alternate;
    pointer-events: none;
    z-index: 0;
}

@keyframes ambientDrift {
    0% {
        transform: translate(0, 0) rotate(0deg);
    }

    100% {
        transform: translate(30px, -20px) rotate(3deg);
    }
}

/* ─── Typography ─── */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-serif);
    font-weight: var(--fw-semibold);
    line-height: 1.3;
    color: var(--text-primary);
}

h1 {
    font-size: var(--fs-3xl);
}

h2 {
    font-size: var(--fs-2xl);
}

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

h4 {
    font-size: var(--fs-lg);
}

p {
    margin-bottom: var(--sp-md);
}

a {
    color: var(--gold-light);
    text-decoration: none;
    transition: color var(--duration-fast) var(--ease-out);
}

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

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

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* ─── Selection ─── */
::selection {
    background: rgba(212, 160, 23, 0.3);
    color: var(--text-primary);
}

/* ─── Utility Classes ─── */
.hidden {
    display: none !important;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

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

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

.text-accent {
    color: var(--text-accent);
}

.fade-in {
    animation: fadeIn var(--duration-slow) var(--ease-out) forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.6;
    }
}

@keyframes shimmer {
    0% {
        background-position: -200% center;
    }

    100% {
        background-position: 200% center;
    }
}

/* ─── Content Container ─── */
.app-container {
    position: relative;
    z-index: var(--z-base);
    min-height: 100vh;
}