/* ============================================
   Bobby's - Bakery & Grocers Website
   Vibrant Modern | Charcoal + Coral Palette
   ============================================ */

/* CSS Variables */
:root {
    --color-charcoal: #374151;
    --color-charcoal-dark: #1f2937;
    --color-charcoal-light: #4b5563;
    --color-coral: #FF6B6B;
    --color-coral-dark: #ee5a5a;
    --color-coral-light: #ff8787;
    --color-bg: #FAFAF9;
    --color-bg-alt: #F5F5F4;
    --color-white: #FFFFFF;
    --color-text: #1F2937;
    --color-text-light: #6B7280;
    
    --font-heading: 'Playfair Display', Georgia, serif;
    --font-body: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
    
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 6rem;
    
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    
    --shadow-sm: 0 2px 8px rgba(55, 65, 81, 0.08);
    --shadow-md: 0 8px 30px rgba(55, 65, 81, 0.12);
    --shadow-lg: 0 20px 60px rgba(55, 65, 81, 0.15);
    
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    color: var(--color-text);
    background-color: var(--color-bg);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

button {
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit;
}

/* Container */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

/* ============================================
   Background Blobs
   ============================================ */
.page-wrapper {
    position: relative;
    min-height: 100vh;
}

.bg-blob {
    position: fixed;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.15;
    pointer-events: none;
    z-index: 0;
}

.blob-coral {
    width: 600px;
    height: 600px;
    background: var(--color-coral);
    top: -200px;
    right: -200px;
}

.blob-charcoal {
    width: 500px;
    height: 500px;
    background: var(--color-charcoal);
    bottom: 20%;
    left: -150px;
}

.blob-light {
    width: 400px;
    height: 400px;
    background: #E5E7EB;
    top: 50%;
    right: 10%;
}

/* ============================================
   Header / Navigation
   ============================================ */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(250, 250, 249, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(55, 65, 81, 0.08);
    transition: var(--transition);
}

.site-header.scrolled {
    background: rgba(250, 250, 249, 0.95);
    box-shadow: var(--shadow-sm);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1.5rem;
    color: var(--color-charcoal);
}

.logo-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: var(--color-coral);
    color: var(--color-white);
    border-radius: var(--radius-sm);
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 600;
}

.logo-text {
    letter-spacing: -0.02em;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.nav-list {
    display: flex;
    list-style: none;
    gap: var(--spacing-md);
}

.nav-link {
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--color-charcoal);
    position: relative;
    padding: 0.25rem 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-coral);
    transition: var(--transition);
}

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

.nav-link:hover {
    color: var(--color-coral);
}

.mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 8px;
    z-index: 1001;
}

.hamburger {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--color-charcoal);
    transition: var(--transition);
    position: relative;
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    width: 24px;
    height: 2px;
    background: var(--color-charcoal);
    transition: var(--transition);
}

.hamburger::before { top: -7px; }
.hamburger::after { top: 7px; }

.mobile-toggle[aria-expanded="true"] .hamburger {
    background: transparent;
}

.mobile-toggle[aria-expanded="true"] .hamburger::before {
    top: 0;
    transform: rotate(45deg);
}

.mobile-toggle[aria-expanded="true"] .hamburger::after {
    top: 0;
    transform: rotate(-45deg);
}

.mobile-only {
    display: none;
}

/* ============================================
   Buttons
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.75rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: var(--transition);
    white-space: nowrap;
}

.btn-primary, .btn-coral {
    background: var(--color-coral);
    color: var(--color-white);
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.35);
}

.btn-coral:hover {
    background: var(--color-coral-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.45);
}

.btn-outline-light {
    background: transparent;
    color: var(--color-white);
    border: 2px solid rgba(255, 255, 255, 0.5);
}

.btn-outline-light:hover {
    background: var(--color-white);
    color: var(--color-charcoal);
    border-color: var(--color-white);
}

.btn-outline-dark {
    background: transparent;
    color: var(--color-charcoal);
    border: 2px solid var(--color-charcoal);
}

.btn-outline-dark:hover {
    background: var(--color-charcoal);
    color: var(--color-white);
}

.link-arrow {
    width: 16px;
    height: 16px;
    transition: var(--transition);
}

.btn:hover .link-arrow {
    transform: translate(3px, -3px);
}

/* ============================================
   Hero Section
   ============================================ */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: -2;
}

.hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(31, 41, 55, 0.88) 0%,
        rgba(55, 65, 81, 0.75) 50%,
        rgba(31, 41, 55, 0.6) 100%
    );
    z-index: -1;
}

.hero-content {
    position: relative;
    z-index: 1;
    padding-top: var(--spacing-xl);
    padding-bottom: var(--spacing-xl);
    max-width: 720px;
}

.hero-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: rgba(255, 107, 107, 0.2);
    border: 1px solid rgba(255, 107, 107, 0.4);
    color: var(--color-coral-light);
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: var(--spacing-md);
}

.hero-headline {
    font-family: var(--font-heading);
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 600;
    line-height: 1.1;
    color: var(--color-white);
    margin-bottom: var(--spacing-md);
    letter-spacing: -0.02em;
}

.hero-headline .text-coral {
    color: var(--color-coral);
}

.hero-sub {
    font-size: clamp(1.1rem, 2vw, 1.35rem);
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.7;
    margin-bottom: var(--spacing-lg);
    max-width: 560px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
}

.hero-scroll-indicator {
    position: absolute;
    bottom: var(--spacing-md);
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.scroll-line {
    width: 1px;
    height: 40px;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.5), 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); }
}

/* ============================================
   Sections
   ============================================ */
.section {
    padding: var(--spacing-xl) 0;
    position: relative;
    z-index: 1;
}

.section-header {
    text-align: center;
    margin-bottom: var(--spacing-lg);
}

.section-label {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--color-coral);
    margin-bottom: var(--spacing-xs);
}

.section-title {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 600;
    color: var(--color-charcoal);
    letter-spacing: -0.02em;
    line-height: 1.2;
}

/* ============================================
   Products Section
   ============================================ */
.products {
    background: var(--color-bg);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-md);
}

.product-card {
    background: var(--color-white);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.card-image {
    position: relative;
    height: 240px;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.product-card:hover .card-image img {
    transform: scale(1.08);
}

.card-tag {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--color-coral);
    color: var(--color-white);
    padding: 0.35rem 0.875rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.card-content {
    padding: var(--spacing-md);
}

.card-content h3 {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    font-weight: 600;
    color: var(--color-charcoal);
    margin-bottom: 0.5rem;
}

.card-content p {
    color: var(--color-text-light);
    font-size: 0.95rem;
    line-height: 1.65;
}

/* ============================================
   About Section
   ============================================ */
.about {
    background: var(--color-bg-alt);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-lg);
    align-items: center;
}

.image-stack {
    position: relative;
}

.img-main {
    width: 100%;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.accent-shape {
    position: absolute;
    width: 120px;
    height: 120px;
    background: var(--color-coral);
    border-radius: var(--radius-md);
    bottom: -30px;
    right: -30px;
    z-index: -1;
    opacity: 0.6;
}

.about-content {
    padding: var(--spacing-md) 0;
}

.about-content .section-title {
    text-align: left;
    margin-bottom: var(--spacing-md);
}

.about-content .lead {
    font-size: 1.15rem;
    color: var(--color-charcoal);
    line-height: 1.75;
    margin-bottom: var(--spacing-sm);
}

.about-content p {
    color: var(--color-text-light);
    line-height: 1.75;
    margin-bottom: var(--spacing-md);
}

.about-features {
    display: flex;
    gap: var(--spacing-md);
    flex-wrap: wrap;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 600;
    color: var(--color-charcoal);
}

.feature-icon {
    width: 24px;
    height: 24px;
    color: var(--color-coral);
    flex-shrink: 0;
}

/* ============================================
   Visit Section
   ============================================ */
.visit {
    background: var(--color-charcoal);
    color: var(--color-white);
}

.visit .section-label {
    color: var(--color-coral);
}

.visit .section-title {
    color: var(--color-white);
}

.visit-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-lg);
    align-items: stretch;
}

.visit-info {
    padding: var(--spacing-lg) var(--spacing-md);
}

.visit-desc {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.75;
    margin-bottom: var(--spacing-lg);
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-sm);
}

.contact-icon {
    width: 48px;
    height: 48px;
    background: rgba(255, 107, 107, 0.15);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.contact-icon svg {
    width: 22px;
    height: 22px;
    color: var(--color-coral);
}

.contact-text strong {
    display: block;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 0.25rem;
}

.contact-text p {
    font-size: 1.05rem;
    color: var(--color-white);
    line-height: 1.6;
}

.contact-text a {
    color: var(--color-white);
}

.contact-text a:hover {
    color: var(--color-coral);
}

.visit-map {
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.map-placeholder {
    background: var(--color-charcoal-dark);
    border-radius: var(--radius-lg);
    height: 100%;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px dashed rgba(255, 255, 255, 0.1);
}

.map-content {
    text-align: center;
    padding: var(--spacing-lg);
}

.map-icon {
    width: 56px;
    height: 56px;
    color: var(--color-coral);
    margin: 0 auto var(--spacing-sm);
}

.map-content p {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.7;
    margin-bottom: var(--spacing-md);
}

/* ============================================
   Footer
   ============================================ */
.site-footer {
    background: var(--color-charcoal-dark);
    color: rgba(255, 255, 255, 0.6);
    padding: var(--spacing-lg) 0;
}

.footer-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-md);
    text-align: center;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.footer-brand .logo-mark {
    width: 48px;
    height: 48px;
    font-size: 1.6rem;
}

.footer-brand .logo-text {
    color: var(--color-white);
    font-size: 1.4rem;
}

.footer-tagline {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.5);
}

.footer-links {
    display: flex;
    gap: var(--spacing-md);
    flex-wrap: wrap;
    justify-content: center;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.6);
    font-weight: 500;
    font-size: 0.95rem;
}

.footer-links a:hover {
    color: var(--color-coral);
}

.footer-copy {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.4);
    line-height: 1.8;
}

/* ============================================
   Scroll Reveal Animations
   (Progressive enhancement — content visible without JS)
   ============================================ */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1), transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }

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

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 1024px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    :root {
        --spacing-xl: 4rem;
        --spacing-lg: 3rem;
    }

    .mobile-toggle {
        display: flex;
    }

    .main-nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 320px;
        height: 100vh;
        background: var(--color-bg);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: var(--spacing-md);
        box-shadow: var(--shadow-lg);
        transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 1000;
    }

    .main-nav.open {
        right: 0;
    }

    .nav-list {
        flex-direction: column;
        align-items: center;
        gap: var(--spacing-sm);
    }

    .nav-link {
        font-size: 1.2rem;
    }

    .mobile-only {
        display: inline-flex;
        margin-top: var(--spacing-sm);
    }

    .hero-content {
        text-align: center;
        padding-top: calc(80px + var(--spacing-md));
    }

    .hero-sub {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-actions {
        justify-content: center;
    }

    .products-grid {
        grid-template-columns: 1fr;
        max-width: 500px;
        margin: 0 auto;
    }

    .about-grid {
        grid-template-columns: 1fr;
    }

    .about-content .section-title {
        text-align: center;
    }

    .about-content {
        text-align: center;
    }

    .about-features {
        justify-content: center;
    }

    .visit-wrapper {
        grid-template-columns: 1fr;
    }

    .visit-map {
        min-height: 300px;
    }

    .map-placeholder {
        min-height: 300px;
    }
}

@media (max-width: 480px) {
    .hero-headline {
        font-size: 2.25rem;
    }

    .btn {
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
    }

    .hero-actions {
        flex-direction: column;
        width: 100%;
    }

    .hero-actions .btn {
        width: 100%;
    }
}

/* Mobile nav overlay */
.nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

.nav-overlay.active {
    display: block;
}
