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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    overflow-x: hidden;
}

::selection {
    background: #1a5c2a;
    color: #faf8f4;
}

/* ── Hero Geometric Shapes ── */
.hero-shape {
    position: absolute;
    pointer-events: none;
}

.shape-circle-1 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(26, 92, 42, 0.06) 0%, transparent 70%);
    border-radius: 50%;
    top: -100px;
    left: -150px;
    animation: float-slow 20s ease-in-out infinite;
}

.shape-circle-2 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(224, 122, 79, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    bottom: 10%;
    right: 5%;
    animation: float-slow 15s ease-in-out infinite reverse;
}

.shape-square-1 {
    width: 80px;
    height: 80px;
    background: rgba(26, 92, 42, 0.05);
    border-radius: 16px;
    top: 25%;
    right: 12%;
    transform: rotate(45deg);
    animation: spin-slow 25s linear infinite;
}

.shape-square-2 {
    width: 50px;
    height: 50px;
    background: rgba(224, 122, 79, 0.1);
    border-radius: 10px;
    bottom: 30%;
    left: 8%;
    transform: rotate(20deg);
    animation: spin-slow 18s linear infinite reverse;
}

.shape-triangle {
    width: 0;
    height: 0;
    border-left: 40px solid transparent;
    border-right: 40px solid transparent;
    border-bottom: 70px solid rgba(26, 92, 42, 0.05);
    top: 40%;
    left: 5%;
    animation: float-slow 12s ease-in-out infinite;
}

@keyframes float-slow {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-30px) rotate(5deg); }
}

@keyframes spin-slow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.animate-float {
    animation: float 4s ease-in-out infinite;
}

/* ── Navigation ── */
#navbar {
    background: transparent;
    transition: background 0.4s ease, box-shadow 0.4s ease, backdrop-filter 0.4s ease;
}

#navbar.scrolled {
    background: rgba(250, 248, 244, 0.92);
    backdrop-filter: blur(20px);
    box-shadow: 0 1px 20px rgba(26, 92, 42, 0.08);
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: #1a5c2a;
    transition: all 0.3s ease;
    transform: translateX(-50%);
    border-radius: 1px;
}

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

/* ── Scroll Animations ── */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ── Back to Top ── */
#back-to-top.active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* ── Mobile Menu Transition ── */
#mobile-menu {
    animation: slideDown 0.3s ease;
}

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

/* ── Image Hover ── */
img {
    max-width: 100%;
    height: auto;
}

/* ── Focus Styles ── */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid #1a5c2a;
    outline-offset: 2px;
    border-radius: 8px;
}

/* ── Responsive Tweaks ── */
@media (max-width: 640px) {
    .font-display {
        word-break: break-word;
    }
}

@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; }
}
