/* === CSS Custom Properties === */
:root {
    --terra-500: #e04525;
    --terra-400: #ee6545;
    --clay-900: #7f1a16;
    --sand-50: #fdfbf7;
    --sand-200: #f5ebd0;
}

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

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

body {
    overflow-x: hidden;
}

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

/* === Geometric Background Shapes === */
.geo-shape {
    position: absolute;
    pointer-events: none;
}

.geo-circle-1 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(224, 69, 37, 0.06) 0%, transparent 70%);
    border-radius: 50%;
    top: -200px;
    right: -150px;
}

.geo-circle-2 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(228, 180, 104, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    bottom: -100px;
    left: -100px;
}

.geo-square-1 {
    width: 120px;
    height: 120px;
    background: rgba(224, 69, 37, 0.05);
    border-radius: 24px;
    top: 30%;
    left: 5%;
    transform: rotate(15deg);
}

.geo-triangle {
    width: 0;
    height: 0;
    border-left: 60px solid transparent;
    border-right: 60px solid transparent;
    border-bottom: 100px solid rgba(228, 180, 104, 0.08);
    top: 20%;
    right: 10%;
    transform: rotate(-20deg);
}

.geo-dots {
    width: 80px;
    height: 80px;
    background-image: radial-gradient(circle, rgba(224, 69, 37, 0.15) 2px, transparent 2px);
    background-size: 12px 12px;
    bottom: 20%;
    right: 30%;
}

/* === Navbar === */
#navbar {
    transition: background-color 0.4s ease, box-shadow 0.4s ease, padding 0.4s ease;
}

#navbar.scrolled {
    background-color: rgba(253, 251, 247, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(127, 26, 22, 0.08);
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--terra-500);
    transition: width 0.3s ease;
}

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

/* === Mobile Menu === */
#mobileMenu.open {
    opacity: 1;
    pointer-events: all;
}

#mobileMenu.closed {
    opacity: 0;
    pointer-events: none;
}

.menu-line {
    display: block;
}

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

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

#menuToggle.active .menu-line:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
    width: 24px;
}

/* === Scroll Reveal === */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

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

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
    html {
        scroll-behavior: auto;
    }
    img {
        transition: none;
    }
}

/* === Selection === */
::selection {
    background: rgba(224, 69, 37, 0.2);
    color: var(--clay-900);
}

/* === Focus === */
a:focus-visible, button:focus-visible {
    outline: 3px solid var(--terra-500);
    outline-offset: 2px;
    border-radius: 4px;
}

/* === Custom scrollbar === */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--sand-50);
}
::-webkit-scrollbar-thumb {
    background: rgba(224, 69, 37, 0.3);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(224, 69, 37, 0.5);
}
