/* ========================================
   FOR METAL — Custom Styles
   ======================================== */

/* === BASE RESETS === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

::selection {
    background-color: rgba(220, 20, 60, 0.3);
    color: white;
}

::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: #0a0a0a;
}

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

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

html {
    scroll-behavior: smooth;
}

body {
    background: #0a0a0a;
    overflow-x: hidden;
}

/* === GRAIN OVERLAY === */
.grain-overlay {
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    animation: grain 0.5s steps(1) infinite;
}

@keyframes grain {
    0%, 100% { transform: translate(0, 0); }
    10% { transform: translate(-5%, -10%); }
    20% { transform: translate(-15%, 5%); }
    30% { transform: translate(7%, -25%); }
    40% { transform: translate(-5%, 25%); }
    50% { transform: translate(-15%, 10%); }
    60% { transform: translate(15%, 0%); }
    70% { transform: translate(0%, 15%); }
    80% { transform: translate(3%, 35%); }
    90% { transform: translate(-10%, 10%); }
}

/* === NAVIGATION === */
#navbar {
    background: rgba(10, 10, 10, 0.88);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

#navbar.scrolled {
    background: rgba(10, 10, 10, 0.96);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

/* Logo Row — stands on its own, centered above the nav */
.logo-row {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1.25rem 0 0.5rem;
    transition: padding 0.4s ease;
}

#navbar.scrolled .logo-row {
    padding: 0.5rem 0 0.25rem;
}

.logo-standalone {
    display: inline-block;
    position: relative;
    z-index: 50;
    transition: all 0.4s ease;
}

.logo-standalone img {
    height: 7rem;
    width: auto;
    filter: brightness(1.1);
    transition: all 0.4s ease;
}

@media (min-width: 768px) {
    .logo-standalone img {
        height: 8.5rem;
    }
}

.logo-standalone:hover img {
    opacity: 0.85;
    transform: scale(1.02);
}

#navbar.scrolled .logo-standalone img {
    height: 3.5rem;
}

@media (min-width: 768px) {
    #navbar.scrolled .logo-standalone img {
        height: 4.25rem;
    }
}

/* Navigation Bar — independent bar below logo */
.nav-bar {
    display: flex;
    justify-content: center;
    padding: 0.25rem 1.5rem 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    transition: all 0.4s ease;
}

#navbar.scrolled .nav-bar {
    padding: 0.125rem 1.5rem 0.5rem;
}

.nav-link {
    position: relative;
    padding: 0.5rem 1rem;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    transition: color 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    color: white;
}

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

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

/* Mobile menu button — positioned top-right overlay */
.mobile-menu-btn {
    position: fixed;
    top: 1rem;
    right: 1.5rem;
    z-index: 60;
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
}

@media (min-width: 768px) {
    .mobile-menu-btn {
        display: none;
    }
}

/* Mobile Menu */
.mobile-menu {
    position: fixed;
    inset: 0;
    background: rgba(10, 10, 10, 0.98);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    z-index: 40;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-menu.open {
    opacity: 1;
    visibility: visible;
}

.mobile-nav-link {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 3rem;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: all 0.3s ease;
    line-height: 1.2;
}

.mobile-nav-link:hover {
    color: #DC143C;
    transform: translateX(10px);
}

/* Menu Toggle Animation */
.mobile-menu-btn.open .menu-bar:nth-child(1) {
    transform: rotate(45deg) translate(4px, 4px);
}

.mobile-menu-btn.open .menu-bar:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.open .menu-bar:nth-child(3) {
    transform: rotate(-45deg) translate(4px, -4px);
    width: 1.5rem;
}

/* === HERO SECTION === */
#home {
    padding-top: 10rem;
}

@media (min-width: 768px) {
    #home {
        padding-top: 12rem;
    }
}

.hero-bg-effect {
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(ellipse at 50% 50%, rgba(139, 0, 0, 0.08) 0%, transparent 60%),
        radial-gradient(ellipse at 20% 80%, rgba(107, 0, 0, 0.05) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(220, 20, 60, 0.03) 0%, transparent 50%);
    animation: heroPulse 8s ease-in-out infinite;
}

@keyframes heroPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.hero-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(10, 10, 10, 0.3) 0%,
        transparent 30%,
        transparent 70%,
        rgba(10, 10, 10, 1) 100%
    );
}

.hero-lines {
    position: absolute;
    inset: 0;
    background-image: 
        repeating-linear-gradient(
            90deg,
            rgba(255, 255, 255, 0.01) 0px,
            rgba(255, 255, 255, 0.01) 1px,
            transparent 1px,
            transparent 120px
        );
    pointer-events: none;
}

/* Melty Death Metal Text Effect */
.melty-text {
    filter: url(#melty) drop-shadow(0 0 40px rgba(220, 20, 60, 0.5)) drop-shadow(0 0 80px rgba(139, 0, 0, 0.25));
}

.hero-title {
    text-shadow: 
        0 0 50px rgba(220, 20, 60, 0.4),
        0 0 100px rgba(139, 0, 0, 0.2),
        0 8px 25px rgba(0, 0, 0, 0.8),
        0 3px 6px rgba(0, 0, 0, 0.9);
}

/* Dripping Blood/Melt Drops */
.drips {
    position: relative;
    height: 60px;
    margin-top: -5px;
    overflow: visible;
    pointer-events: none;
}

.drip {
    position: absolute;
    top: 0;
    width: 3px;
    background: linear-gradient(to bottom, rgba(255,255,255,0.8), rgba(220,20,60,0.6), transparent);
    border-radius: 0 0 50% 50%;
    animation: dripDown 4s ease-in infinite;
    transform-origin: top;
}

@keyframes dripDown {
    0% { transform: scaleY(0); opacity: 0; }
    20% { transform: scaleY(0.5); opacity: 0.8; }
    50% { transform: scaleY(1); opacity: 0.6; }
    100% { transform: scaleY(1.2); opacity: 0; }
}

/* Hero Content Animation */
.hero-content {
    animation: heroFadeIn 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    opacity: 0;
    transform: translateY(30px);
}

@keyframes heroFadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Particles */
.particles-container {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: rgba(220, 20, 60, 0.3);
    border-radius: 50%;
    animation: particleFloat linear infinite;
}

@keyframes particleFloat {
    0% {
        transform: translateY(100vh) translateX(0);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-10vh) translateX(50px);
        opacity: 0;
    }
}

/* Scroll Pulse */
@keyframes pulseSlow {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.6; }
}

.animate-pulse-slow {
    animation: pulseSlow 3s ease-in-out infinite;
}

/* === BUTTONS === */
.fm-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 2rem;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.fm-btn-primary {
    background: #DC143C;
    color: white;
}

.fm-btn-primary:hover {
    background: #8B0000;
    transform: translateY(-2px);
    box-shadow: 0 10px 40px rgba(220, 20, 60, 0.2);
}

.fm-btn-primary:active {
    transform: translateY(0);
}

.fm-btn-secondary {
    background: transparent;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.fm-btn-secondary:hover {
    border-color: #DC143C;
    color: #DC143C;
    transform: translateY(-2px);
}

.fm-btn-secondary:active {
    transform: translateY(0);
}

/* === MISSION SECTION === */
.mission-divider {
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, #DC143C, transparent);
    margin: 2rem 0;
}

/* === COMMUNITY CARDS === */
.community-cat-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1.5rem 1rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.community-cat-card:hover {
    background: rgba(220, 20, 60, 0.05);
    border-color: rgba(220, 20, 60, 0.2);
    transform: translateY(-3px);
}

.artist-card {
    transition: transform 0.3s ease;
}

.artist-card:hover {
    transform: translateY(-5px);
}

/* === PRODUCT CARDS === */
.product-card {
    transition: transform 0.3s ease;
}

.product-card:hover {
    transform: translateY(-5px);
}

/* === FORM ELEMENTS === */
.fm-label {
    display: block;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.4);
    margin-bottom: 0.5rem;
}

.fm-input {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: white;
    padding: 0.875rem 1rem;
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    border-radius: 2px;
    outline: none;
    transition: all 0.3s ease;
}

.fm-input::placeholder {
    color: rgba(255, 255, 255, 0.2);
}

.fm-input:focus {
    border-color: rgba(220, 20, 60, 0.5);
    background: rgba(220, 20, 60, 0.03);
    box-shadow: 0 0 0 3px rgba(220, 20, 60, 0.05);
}

/* === SOCIAL ICONS === */
.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.5);
    border-radius: 2px;
    transition: all 0.3s ease;
    text-decoration: none;
}

.social-icon:hover {
    color: white;
    border-color: #DC143C;
    background: rgba(220, 20, 60, 0.1);
    transform: translateY(-3px);
}

.social-icon-sm {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    transition: all 0.3s ease;
    text-decoration: none;
}

.social-icon-sm:hover {
    color: white;
    border-color: rgba(220, 20, 60, 0.4);
    background: rgba(220, 20, 60, 0.08);
}

/* === FOOTER LINKS === */
.footer-link {
    display: block;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.85rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.35);
    text-decoration: none;
    padding: 0.25rem 0;
    transition: all 0.3s ease;
}

.footer-link:hover {
    color: #DC143C;
    transform: translateX(3px);
}

/* === REVEAL ANIMATIONS === */
/* Content is visible by default. Only hidden when JS adds .js-ready class. */
html.js-ready .reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

html.js-ready .reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* === RESPONSIVE ADJUSTMENTS === */
@media (max-width: 768px) {
    .melty-text {
        filter: url(#melty) drop-shadow(0 0 25px rgba(220, 20, 60, 0.4)) drop-shadow(0 0 50px rgba(139, 0, 0, 0.2));
    }
    
    .hero-title {
        text-shadow: 
            0 0 30px rgba(220, 20, 60, 0.3),
            0 0 60px rgba(139, 0, 0, 0.15),
            0 4px 12px rgba(0, 0, 0, 0.7),
            0 1px 3px rgba(0, 0, 0, 0.8);
    }
    
    .drips {
        height: 40px;
    }
    
    .drip {
        width: 2px;
    }
    
    .community-cat-card {
        padding: 1rem 0.75rem;
    }
    
    .mission-highlight {
        padding: 1.5rem 0;
    }
}



/* === LOGO STYLING === */
/* Footer logo styling */
footer img[alt="For Metal Logo"] {
    filter: brightness(1.1);
    transition: opacity 0.3s ease;
}

footer a:hover img[alt="For Metal Logo"] {
    opacity: 0.85;
}

/* === SECTION TRANSITIONS === */
section {
    position: relative;
}

/* Smooth section backgrounds */
#mission,
#services,
#about,
#contact {
    background: #0a0a0a;
}

#community,
#shop {
    background: #1a1a1a;
}

/* === TESTIMONIAL CARDS === */
.testimonial-card:hover {
    background: rgba(220, 20, 60, 0.03);
}

/* === PORTFOLIO CAROUSEL === */
.portfolio-carousel {
    position: relative;
    margin-bottom: 3rem;
}

.carousel-viewport {
    position: relative;
    overflow: hidden;
}

.carousel-track {
    display: flex;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.carousel-slide {
    min-width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-img {
    max-width: 100%;
    max-height: 75vh;
    width: auto;
    height: auto;
    display: block;
    filter: grayscale(100%) contrast(1.1);
    transition: filter 0.7s ease;
}

.carousel-slide:hover .carousel-img {
    filter: grayscale(0%) contrast(1);
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(10, 10, 10, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.carousel-btn:hover {
    background: rgba(220, 20, 60, 0.8);
    border-color: rgba(220, 20, 60, 0.5);
}

.carousel-prev {
    left: 16px;
}

.carousel-next {
    right: 16px;
}

.carousel-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.carousel-dots {
    display: flex;
    align-items: center;
    gap: 8px;
}

.carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    padding: 0;
}

.carousel-dot:hover {
    background: rgba(255, 255, 255, 0.4);
}

.carousel-dot.active {
    background: #DC143C;
    transform: scale(1.3);
}

.carousel-counter {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    color: rgba(255, 255, 255, 0.3);
}

.carousel-counter-sep {
    margin: 0 0.15rem;
}

@media (max-width: 768px) {
    .carousel-btn {
        width: 40px;
        height: 40px;
    }

    .carousel-prev {
        left: 8px;
    }

    .carousel-next {
        right: 8px;
    }

    .carousel-img {
        max-height: 50vh;
    }
}

/* === SERVICE LIST ITEMS === */
.service-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.125rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    cursor: default;
    transition: all 0.3s ease;
}

.service-list-item:hover {
    border-bottom-color: rgba(220, 20, 60, 0.15);
    padding-left: 0.5rem;
}

/* === DATE INPUT STYLING === */
input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(0.5);
    cursor: pointer;
}

/* === CUSTOM FOCUS STYLES === */
*:focus-visible {
    outline: 2px solid rgba(220, 20, 60, 0.5);
    outline-offset: 2px;
}

/* === LOADING ANIMATION === */
@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}