/* ========================================
   Main Street Mercantile — Custom Styles
   ======================================== */

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

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

body {
    overflow-x: hidden;
}

/* ---- Geometric Background Shapes ---- */
.geo-shape {
    position: absolute;
    pointer-events: none;
}

.geo-circle-1 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(13, 148, 136, 0.06) 0%, transparent 70%);
    top: -200px;
    right: -150px;
    border-radius: 50%;
}

.geo-circle-2 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(13, 148, 136, 0.08) 0%, transparent 70%);
    bottom: 10%;
    left: -80px;
    border-radius: 50%;
}

.geo-square-1 {
    width: 120px;
    height: 120px;
    background: rgba(13, 148, 136, 0.05);
    border: 2px solid rgba(13, 148, 136, 0.1);
    top: 25%;
    right: 5%;
    border-radius: 20px;
    transform: rotate(45deg);
}

.geo-triangle-1 {
    width: 0;
    height: 0;
    border-left: 60px solid transparent;
    border-right: 60px solid transparent;
    border-bottom: 100px solid rgba(13, 148, 136, 0.04);
    top: 40%;
    left: 3%;
    transform: rotate(-15deg);
}

.geo-dots {
    width: 80px;
    height: 80px;
    background-image: radial-gradient(circle, rgba(13, 148, 136, 0.15) 1.5px, transparent 1.5px);
    background-size: 12px 12px;
    bottom: 15%;
    right: 10%;
    border-radius: 50%;
}

/* ---- Buttons ---- */
.btn-primary {
    background: linear-gradient(135deg, #0d9488 0%, #0f766e 100%);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 14px 28px;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(13, 148, 136, 0.3);
    cursor: pointer;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(13, 148, 136, 0.4);
    background: linear-gradient(135deg, #14b8a6 0%, #0d9488 100%);
}

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

.btn-secondary {
    background: white;
    color: #1e293b;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 12px 26px;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.btn-secondary:hover {
    border-color: #0d9488;
    color: #0d9488;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

/* ---- Navigation ---- */
.nav-fixed {
    transition: box-shadow 0.3s ease;
}

.nav-link {
    position: relative;
}

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

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

/* ---- Mobile Menu ---- */
.mobile-menu {
    animation: slideDown 0.3s ease;
}

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

.mobile-link {
    display: block;
}

/* ---- Floating Card ---- */
.floating-card {
    animation: float 4s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* ---- Scroll Indicator ---- */
.scroll-line {
    width: 2px;
    height: 40px;
    background: linear-gradient(to bottom, #94a3b8, transparent);
    animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
    0%, 100% {
        opacity: 1;
        transform: scaleY(1);
    }
    50% {
        opacity: 0.5;
        transform: scaleY(0.7);
    }
}

/* ---- Reveal Animations (below fold only, progressive enhancement) ---- */
@media (prefers-reduced-motion: no-preference) {
    .reveal-up {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.7s ease, transform 0.7s ease;
    }
    
    .reveal-left {
        opacity: 0;
        transform: translateX(-40px);
        transition: opacity 0.7s ease, transform 0.7s ease;
    }
    
    .reveal-right {
        opacity: 0;
        transform: translateX(40px);
        transition: opacity 0.7s ease, transform 0.7s ease;
    }
    
    .reveal-up.revealed,
    .reveal-left.revealed,
    .reveal-right.revealed {
        opacity: 1;
        transform: translate(0);
    }
}

/* Default visible state (no-JS fallback) */
.reveal-up,
.reveal-left,
.reveal-right {
    opacity: 1;
    transform: none;
}

@media (prefers-reduced-motion: no-preference) {
    .reveal-up,
    .reveal-left,
    .reveal-right {
        opacity: 0;
        transform: translateY(30px);
    }
    
    .reveal-left {
        transform: translateX(-40px);
    }
    
    .reveal-right {
        transform: translateX(40px);
    }
}

/* ---- Visit Cards ---- */
.visit-card {
    border-radius: 16px;
    padding: 4px;
    transition: all 0.3s ease;
}

.visit-card:hover {
    background: rgba(255, 255, 255, 0.05);
}

/* ---- Product Card Hover ---- */
.group:hover .group-hover\:scale-110 {
    transform: scale(1.1);
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
    .geo-circle-1 {
        width: 300px;
        height: 300px;
    }
    
    .geo-circle-2 {
        width: 150px;
        height: 150px;
    }
    
    .geo-square-1 {
        width: 60px;
        height: 60px;
    }
    
    .floating-card {
        position: relative;
        margin-top: 16px;
        margin-left: 0;
        margin-bottom: 16px;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .floating-card {
        position: absolute;
        bottom: -40px;
        left: 20px;
    }
}

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

/* ---- Selection ---- */
::selection {
    background: rgba(13, 148, 136, 0.2);
    color: #1e293b;
}

/* ---- Print ---- */
@media print {
    .geo-shape,
    .floating-card,
    .scroll-line {
        display: none;
    }
}
