/* ========================================
   RTO Lapalco — Custom Styles
   ======================================== */

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

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

body {
    overflow-x: hidden;
}

/* Smooth scroll offset for fixed nav */
section[id] {
    scroll-margin-top: 80px;
}

/* ========================================
   Hero Background Shapes
   ======================================== */
.hero-shape {
    position: absolute;
    opacity: 0.15;
    pointer-events: none;
}

.shape-circle-1 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, #F5B093 0%, transparent 70%);
    border-radius: 50%;
    top: -100px;
    right: -100px;
    animation: float-slow 20s ease-in-out infinite;
}

.shape-circle-2 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, #ec6c90 0%, transparent 70%);
    border-radius: 50%;
    bottom: 10%;
    left: 5%;
    animation: float-slow 15s ease-in-out infinite reverse;
}

.shape-rect-1 {
    width: 200px;
    height: 200px;
    background: #F5B093;
    top: 20%;
    left: 40%;
    transform: rotate(45deg);
    opacity: 0.08;
    animation: spin-slow 30s linear infinite;
}

.shape-rect-2 {
    width: 120px;
    height: 120px;
    background: #ec6c90;
    bottom: 30%;
    right: 15%;
    transform: rotate(20deg);
    opacity: 0.1;
    animation: float-slow 12s ease-in-out infinite;
}

.shape-triangle {
    width: 0;
    height: 0;
    border-left: 80px solid transparent;
    border-right: 80px solid transparent;
    border-bottom: 140px solid #F5B093;
    top: 60%;
    left: 10%;
    opacity: 0.07;
    transform: rotate(-15deg);
    animation: float-slow 18s ease-in-out infinite;
}

/* ========================================
   Animations
   ======================================== */
@keyframes float-slow {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-30px) rotate(5deg); }
}

@keyframes spin-slow {
    from { transform: rotate(45deg); }
    to { transform: rotate(405deg); }
}

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

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ========================================
   Scroll Reveal (progressive enhancement)
   ======================================== */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.reveal-left {
    transform: translateX(0);
}

.reveal.reveal-right {
    transform: translateX(0);
}

.reveal.reveal-scale {
    transform: scale(1);
}

/* When JS is enabled and reduced motion is preferred, keep elements visible */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(40px);
    }
    .reveal.reveal-left {
        transform: translateX(-40px);
    }
    .reveal.reveal-right {
        transform: translateX(40px);
    }
    .reveal.reveal-scale {
        transform: scale(0.95);
    }
    .reveal.visible {
        opacity: 1;
        transform: translateY(0) translateX(0) scale(1);
    }
}

/* ========================================
   Product Cards
   ======================================== */
.product-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 1.5rem;
    border: 2px solid transparent;
    transition: border-color 0.4s ease;
    pointer-events: none;
}

.product-card:hover::after {
    border-color: rgba(245, 176, 147, 0.4);
}

/* ========================================
   Navbar
   ======================================== */
#navbar {
    background: rgba(253, 248, 244, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(132, 22, 50, 0.08);
}

#navbar.scrolled {
    box-shadow: 0 4px 30px rgba(132, 22, 50, 0.1);
}

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

#mobileMenu.closed {
    opacity: 0;
    pointer-events: none;
}

.menu-line {
    display: block;
}

.menu-btn.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

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

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

/* ========================================
   Step Cards
   ======================================== */
.step-card {
    position: relative;
}

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

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

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

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

/* ========================================
   Selection
   ======================================== */
::selection {
    background: #F5B093;
    color: #3b0510;
}

/* ========================================
   Focus Styles
   ======================================== */
a:focus-visible,
button:focus-visible {
    outline: 3px solid #F5B093;
    outline-offset: 2px;
    border-radius: 4px;
}

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

/* ========================================
   Print Styles
   ======================================== */
@media print {
    nav, .hero-shape, #navbar {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
    
    section {
        page-break-inside: avoid;
    }
}
