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

html { scroll-behavior: smooth; }

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

::selection {
    background: rgba(217, 82, 46, 0.15);
    color: #8e2f1d;
}

/* ─── Header ─── */
#header {
    background: transparent;
    border-bottom: 1px solid transparent;
}

#header.scrolled {
    background: rgba(250, 253, 251, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom-color: rgba(0,0,0,0.06);
    box-shadow: 0 1px 0 rgba(0,0,0,0.04);
}

.nav-link {
    position: relative;
}

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

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

/* ─── Mobile Menu ─── */
#mobile-menu.open {
    opacity: 1;
    pointer-events: all;
}

#mobile-menu.open .mobile-nav-link {
    animation: fadeUp 0.4s ease forwards;
    opacity: 0;
}

#mobile-menu.open .mobile-nav-link:nth-child(1) { animation-delay: 0.05s; }
#mobile-menu.open .mobile-nav-link:nth-child(2) { animation-delay: 0.1s; }
#mobile-menu.open .mobile-nav-link:nth-child(3) { animation-delay: 0.15s; }
#mobile-menu.open .mobile-nav-link:nth-child(4) { animation-delay: 0.2s; }

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

.menu-line {
    transition: transform 0.3s ease, opacity 0.3s ease;
}

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

#menu-btn.active .menu-line:nth-child(2) {
    transform: translateY(-45%) rotate(-45deg);
}

/* ─── Buttons ─── */
.btn-primary {
    background: #1c1917;
    transition: background 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
}

.btn-primary:hover {
    background: #d9522e;
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(217, 82, 46, 0.25);
}

.btn-secondary {
    transition: background 0.3s ease, transform 0.2s ease;
}

.btn-secondary:hover {
    background: rgba(217, 82, 46, 0.04);
    transform: translateY(-1px);
}

/* ─── Hero ─── */
.hero-tag {
    display: inline-block;
    position: relative;
    padding-left: 24px;
}

.hero-tag::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 1px;
    background: #d9522e;
}

.hero-headline {
    animation: heroIn 0.9s cubic-bezier(0.4, 0, 0.2, 1) both;
}

.hero-sub {
    animation: heroIn 0.9s cubic-bezier(0.4, 0, 0.2, 1) 0.15s both;
}

.hero-cta {
    animation: heroIn 0.9s cubic-bezier(0.4, 0, 0.2, 1) 0.3s both;
}

.hero-img-1 {
    animation: imgIn 1s cubic-bezier(0.4, 0, 0.2, 1) 0.2s both;
}

.hero-img-2 {
    animation: imgIn 1s cubic-bezier(0.4, 0, 0.2, 1) 0.35s both;
}

.hero-img-3 {
    animation: imgIn 1s cubic-bezier(0.4, 0, 0.2, 1) 0.5s both;
}

@keyframes heroIn {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes imgIn {
    from { opacity: 0; transform: scale(1.03); }
    to { opacity: 1; transform: scale(1); }
}

/* ─── Section Tags ─── */
.section-tag {
    position: relative;
}

/* ─── Reveal Animations ─── */
[data-reveal] {
    opacity: 1;
    transform: none;
}

@media (prefers-reduced-motion: no-preference) {
    [data-reveal] {
        opacity: 0;
        transform: translateY(28px);
        transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1), transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
    }

    [data-reveal="left"] {
        transform: translateX(-24px);
    }

    [data-reveal="right"] {
        transform: translateX(24px);
    }

    [data-reveal].revealed,
    [data-reveal="left"].revealed,
    [data-reveal="right"].revealed {
        opacity: 1;
        transform: none;
    }

    .reveal-card {
        opacity: 0;
        transform: translateY(20px);
        transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1), transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .reveal-card.revealed {
        opacity: 1;
        transform: none;
    }

    .reveal-card:nth-child(1).revealed { transition-delay: 0s; }
    .reveal-card:nth-child(2).revealed { transition-delay: 0.1s; }
    .reveal-card:nth-child(3).revealed { transition-delay: 0.2s; }
    .reveal-card:nth-child(4).revealed { transition-delay: 0.1s; }
    .reveal-card:nth-child(5).revealed { transition-delay: 0.2s; }
    .reveal-card:nth-child(6).revealed { transition-delay: 0.3s; }
}

/* ─── Scroll Top ─── */
#scroll-top.visible {
    opacity: 1;
    pointer-events: all;
}

#scroll-top:hover {
    transform: translateY(-2px);
}

/* ─── Form Focus States ─── */
input:focus, select:focus, textarea:focus {
    outline: none;
}

/* ─── Smooth image loading ─── */
img {
    display: block;
    max-width: 100%;
}

/* ─── Utility ─── */
.no-underline {
    text-decoration: none;
}

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

::-webkit-scrollbar-track {
    background: #fafaf9;
}

::-webkit-scrollbar-thumb {
    background: #d6d3d1;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a29e;
}
