/* ============================================
   Physical Grafitti Tattoo — Custom Styles
   ============================================ */

/* --- 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;
}

::selection {
    background-color: rgba(29, 67, 50, 0.15);
    color: #1B4332;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #8fb88e;
}

/* --- Animations --- */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes floatCard {
    0% {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    60% {
        transform: translateY(-5px) scale(1.01);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

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

.animate-fade-in {
    animation: fadeIn 0.8s ease-out forwards;
}

.animate-float-card {
    animation: floatCard 1s ease-out forwards;
}

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

#navbar.scrolled {
    background-color: rgba(250, 248, 245, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(27, 67, 50, 0.06);
}

.nav-link {
    position: relative;
}

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

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

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

.mobile-link {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

#mobile-menu.open .mobile-link {
    opacity: 1;
    transform: translateY(0);
}

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

/* --- Menu Button --- */
.menu-btn.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(2px, 2px);
}

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

.menu-btn.active .menu-line:nth-child(3) {
    transform: rotate(-45deg) translate(2px, -2px);
    width: 1.25rem;
}

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

.reveal[data-revealed="false"] {
    opacity: 0;
    transform: translateY(30px);
}

/* --- Gallery Hover --- */
.reveal img {
    transition: transform 0.7s ease;
}

/* --- Form Styles --- */
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238fb88e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

/* --- Button Focus --- */
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid #1B4332;
    outline-offset: 2px;
}

/* --- Reduced Motion --- */
@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;
    }
}

/* --- Responsive --- */
@media (max-width: 767px) {
    .font-serif {
        font-size: clamp(2rem, 8vw, 3rem);
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .font-serif {
        font-size: clamp(2.5rem, 6vw, 3.5rem);
    }
}
