/* ============================================
   Going Merry Tattoos — Custom Styles
   Classic & Elegant | Terracotta + Sand
   ============================================ */

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

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

body {
    margin: 0;
    overflow-x: hidden;
}

/* --- Selection --- */
::selection {
    background-color: #B8544A;
    color: #FDFCFA;
}

/* --- Smooth Scroll Offset for Fixed Nav --- */
section[id] {
    scroll-margin-top: 80px;
}

/* --- Navbar Transition States --- */
.navbar-scrolled .nav-logo-text,
.navbar-scrolled .nav-logo-sub,
.navbar-scrolled .nav-link {
    color: #1c1917 !important;
}

.navbar-scrolled #navbar {
    background-color: rgba(253, 252, 250, 0.97) !important;
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
}

.navbar-scrolled .menu-line {
    background-color: #1c1917 !important;
}

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

#mobile-menu.active .mobile-link {
    animation: fadeInUp 0.4s ease forwards;
}

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

/* --- Mobile Menu Toggle Animation --- */
#menu-toggle.active .menu-line:nth-child(1) {
    transform: translateY(5px) rotate(45deg);
}

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

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

/* --- Scroll Reveal --- */
.reveal {
    opacity: 1;
    transform: none;
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal[data-reveal-delay="1"] { transition-delay: 0.1s; }
.reveal[data-reveal-delay="2"] { transition-delay: 0.2s; }
.reveal[data-reveal-delay="3"] { transition-delay: 0.3s; }
.reveal[data-reveal-delay="4"] { transition-delay: 0.4s; }

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

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(20px, -30px) scale(1.05); }
}

@keyframes floatDelayed {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-15px, 20px) scale(1.03); }
}

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

.animate-float-delayed {
    animation: floatDelayed 10s ease-in-out infinite;
}

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

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

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

::-webkit-scrollbar-thumb {
    background: #DDB2A5;
    border-radius: 4px;
}

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

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

/* --- Image Lazy Load Fallback --- */
img[loading="lazy"] {
    transition: opacity 0.3s ease;
}

img[loading="lazy"].loaded {
    opacity: 1;
}

img[loading="lazy"]:not(.loaded) {
    opacity: 0;
}

/* --- Mobile Menu Link Animation (Progressive Enhancement) --- */
@media (prefers-reduced-motion: no-preference) {
    .mobile-link {
        opacity: 0;
        transform: translateY(10px);
    }
}

/* --- Form Select Arrow --- */
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='%2378716c' 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;
}
