/* ============================================
   LibertyX Bitcoin ATM — Custom Styles
   Classic & Elegant | Burgundy + Blush
   ============================================ */

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

body {
    overflow-x: hidden;
}

::selection {
    background: #7B2D3B;
    color: #FDF8F5;
}

/* --- Navigation --- */
.nav {
    background: transparent;
    transition: background 0.4s ease, box-shadow 0.4s ease, backdrop-filter 0.4s ease;
}

.nav.scrolled {
    background: rgba(250, 246, 241, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(28, 25, 23, 0.08);
}

.nav.scrolled .nav-logo-text,
.nav.scrolled .nav-link,
.nav.scrolled .menu-line {
    color: #1C1917;
}

.nav-link {
    color: rgba(28, 25, 23, 0.7);
}

.nav.scrolled .nav-link:hover {
    color: #7B2D3B;
}

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

#mobile-menu.open .mobile-link {
    animation: fadeDown 0.4s ease forwards;
}

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

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

/* Hamburger */
.menu-line {
    transition: transform 0.3s ease, width 0.3s ease, opacity 0.3s ease;
    transform-origin: center;
}

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

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

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

#menu-btn.active + .nav-logo-text,
#menu-btn.active ~ .nav-link {
    color: #1C1917 !important;
}

/* --- Hero --- */
.hero-title {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    line-height: 1.05;
}

.hero-eyebrow {
    opacity: 0;
    animation: heroReveal 0.8s ease forwards 0.2s;
}

.hero-title {
    opacity: 0;
    animation: heroReveal 0.8s ease forwards 0.4s;
}

.hero-subtitle {
    opacity: 0;
    animation: heroReveal 0.8s ease forwards 0.6s;
}

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

/* --- Service Cards --- */
.service-card {
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.service-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 60px rgba(123, 45, 59, 0.1);
}

/* --- Scroll Reveal (progressive enhancement) --- */
.reveal {
    /* Default: visible — JS adds is-visible for animation */
}

.js .reveal {
    opacity: 0;
    transform: translateY(32px);
    transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

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

.js .reveal:nth-child(2) { transition-delay: 0.1s; }
.js .reveal:nth-child(3) { transition-delay: 0.2s; }
.js .reveal:nth-child(4) { transition-delay: 0.3s; }

/* Staggered reveals for grid children */
.js .service-card.reveal {
    transition-delay: calc(var(--i, 0) * 0.08s);
}

/* --- Reduced motion --- */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
    .hero-eyebrow, .hero-title, .hero-subtitle { opacity: 1 !important; animation: none !important; }
    .service-card { transition: none !important; }
    .service-card:hover { transform: none !important; }
}

/* --- Image hover effects --- */
.service-card img,
section img {
    transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

/* --- Button focus states --- */
a:focus-visible,
button:focus-visible {
    outline: 2px solid #7B2D3B;
    outline-offset: 3px;
    border-radius: 2px;
}

/* --- Map container --- */
iframe {
    filter: saturate(0.7) contrast(1.05);
    transition: filter 0.4s ease;
}

iframe:hover {
    filter: saturate(1) contrast(1);
}

/* --- Utility --- */
.text-burgundy-100\/70 { color: rgba(249, 212, 217, 0.7); }
.text-burgundy-200\/70 { color: rgba(240, 163, 175, 0.7); }
