/* ============================================
   SoFi Coffee — Custom Styles
   Bold editorial · Burgundy + Blush palette
   ============================================ */

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

body {
    overflow-x: hidden;
}

/* Selection */
::selection {
    background: #781F2E;
    color: #FEFDFB;
}

/* ============================================
   Navbar
   ============================================ */
#navbar {
    background: transparent;
    transition: background 0.4s ease, box-shadow 0.4s ease, backdrop-filter 0.4s ease;
}

#navbar.scrolled {
    background: rgba(254, 253, 251, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(120, 31, 46, 0.08);
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1.5px;
    background: #781F2E;
    transition: width 0.3s ease;
}

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

/* ============================================
   Mobile Menu
   ============================================ */
#mobile-menu.open {
    transform: translateX(0);
}

#mobile-menu:not(.open) {
    transform: translateX(100%);
}

.mobile-link {
    position: relative;
}

/* Hamburger animation */
#menu-btn.active #bar1 {
    transform: rotate(45deg) translate(5px, 5px);
}

#menu-btn.active #bar2 {
    opacity: 0;
}

#menu-btn.active #bar3 {
    transform: rotate(-45deg) translate(5px, -5px);
    width: 1.5rem;
}

/* ============================================
   Scroll Reveal (progressive enhancement)
   ============================================ */
.js-scroll .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-scroll .reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

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

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .reveal {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
    .animate-marquee { animation: none; }
}

/* ============================================
   Marquee Animation
   ============================================ */
@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.animate-marquee {
    animation: marquee 30s linear infinite;
}

.animate-marquee:hover {
    animation-play-state: paused;
}

/* ============================================
   Typography refinements
   ============================================ */
font-serif {
    letter-spacing: -0.01em;
}

/* ============================================
   Button focus states
   ============================================ */
button:focus-visible,
a:focus-visible {
    outline: 2px solid #781F2E;
    outline-offset: 2px;
    border-radius: 4px;
}

/* ============================================
   Input autofill styling
   ============================================ */
input:-webkit-autofill,
textarea:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 30px #FEFDFB inset !important;
    -webkit-text-fill-color: #2C1810 !important;
}

/* ============================================
   Smooth image loading
   ============================================ */
img {
    transition: opacity 0.3s ease;
}

img[loading="lazy"] {
    opacity: 0;
}

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

/* ============================================
   Responsive adjustments
   ============================================ */
@media (max-width: 767px) {
    .reveal {
        opacity: 1 !important;
        transform: none !important;
    }
}

/* ============================================
   Print styles
   ============================================ */
@media print {
    #navbar, .animate-marquee, #mobile-menu { display: none; }
    body { background: white; color: black; }
    a { color: black; text-decoration: underline; }
}
