/* === 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 {
    min-height: 100vh;
    overflow-x: hidden;
}

::selection {
    background: rgba(201, 168, 76, 0.3);
    color: #faf8f4;
}

/* === Scrollbar === */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #0d1f16;
}
::-webkit-scrollbar-thumb {
    background: rgba(201, 168, 76, 0.3);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(201, 168, 76, 0.5);
}

/* === Navigation === */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: #c9a84c;
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* === Mobile Menu === */
.menu-line {
    display: block;
}

#menu-toggle.active .menu-line:nth-child(1) {
    transform: translateY(5px) rotate(45deg);
}

#menu-toggle.active .menu-line:nth-child(2) {
    opacity: 0;
}

#menu-toggle.active .menu-line:nth-child(3) {
    transform: translateY(-5px) rotate(-45deg);
    width: 1.25rem;
}

#mobile-menu.open {
    opacity: 1;
    pointer-events: all;
}

.mobile-link {
    position: relative;
}

/* === Hero === */
.hero-subtitle {
    opacity: 0;
    animation: fadeDown 0.8s ease forwards 0.3s;
}

.hero-subtitle span {
    display: inline-block;
}

#hero h1 {
    opacity: 0;
    animation: fadeUp 1s ease forwards 0.5s;
}

#hero p {
    opacity: 0;
    animation: fadeUp 1s ease forwards 0.7s;
}

#hero .flex {
    opacity: 0;
    animation: fadeUp 1s ease forwards 0.9s;
}

/* === Scroll Indicator === */
@keyframes scrollDot {
    0% { top: -12px; opacity: 1; }
    100% { top: 24px; opacity: 0; }
}

.scroll-dot {
    animation: scrollDot 1.5s ease-in-out infinite;
}

/* === Reveal Animations === */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* === Keyframes === */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* === Navbar Scrolled State === */
nav.scrolled {
    background: rgba(13, 31, 22, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(201, 168, 76, 0.1);
}

nav.scrolled .nav-link {
    color: rgba(250, 248, 244, 0.8);
}

/* === Focus Styles === */
input:focus, textarea:focus, button:focus {
    outline: none;
}

/* === Button Hover Glow === */
button[type="submit"]:hover {
    box-shadow: 0 0 30px rgba(201, 168, 76, 0.3);
}

/* === Image Loading === */
img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* === Responsive === */
@media (max-width: 640px) {
    .font-display {
        line-height: 1.1;
    }
}

@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;
    }
    .reveal {
        opacity: 1;
        transform: none;
    }
}
