/* ========================================
   Macguffins — Artisan Bakery & Grocers
   Terracotta + Sand Palette
   ======================================== */

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

:root {
    --terracotta: #C85A3C;
    --terracotta-dark: #A84830;
    --terracotta-light: #E8856A;
    --sand: #F5F0E8;
    --sand-dark: #E8DFD0;
    --sand-medium: #D4C8B8;
    --charcoal: #2A2520;
    --charcoal-light: #4A423A;
    --warm-gray: #6B635B;
    --cream: #FDF9F3;
    --white: #FFFFFF;
    
    --font-display: 'Playfair Display', Georgia, serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    
    --shadow-sm: 0 1px 3px rgba(42, 37, 32, 0.08);
    --shadow-md: 0 4px 16px rgba(42, 37, 32, 0.10);
    --shadow-lg: 0 8px 32px rgba(42, 37, 32, 0.12);
    
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
}

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

body {
    font-family: var(--font-body);
    color: var(--charcoal);
    background-color: var(--cream);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

a {
    color: inherit;
    text-decoration: none;
}

ul {
    list-style: none;
}

/* --- Container --- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* --- Typography --- */
h1, h2, h3 {
    font-family: var(--font-display);
    font-weight: 600;
    line-height: 1.2;
}

.section-label {
    display: inline-block;
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--terracotta);
    margin-bottom: 16px;
}

.section-title {
    font-size: clamp(1.75rem, 4vw, 2.75rem);
    color: var(--charcoal);
    margin-bottom: 24px;
}

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

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

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: var(--font-body);
    font-size: 0.9375rem;
    font-weight: 500;
    padding: 14px 28px;
    border-radius: var(--radius-sm);
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.25s ease;
    white-space: nowrap;
}

.btn-primary {
    background-color: var(--terracotta);
    color: var(--white);
    border-color: var(--terracotta);
}

.btn-primary:hover {
    background-color: var(--terracotta-dark);
    border-color: var(--terracotta-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-outline {
    background-color: transparent;
    color: var(--white);
    border-color: rgba(255, 255, 255, 0.6);
}

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

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

.btn-light:hover {
    background-color: var(--sand);
    border-color: var(--sand);
    transform: translateY(-1px);
}

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

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

/* --- Header --- */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background-color: rgba(253, 249, 243, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--sand-dark);
    transition: box-shadow 0.3s ease;
}

.header.scrolled {
    box-shadow: var(--shadow-sm);
}

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

.logo {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--charcoal);
    letter-spacing: -0.02em;
}

.logo--light {
    color: var(--white);
}

.nav-list {
    display: flex;
    gap: 32px;
}

.nav-link {
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--charcoal-light);
    position: relative;
    transition: color 0.2s ease;
}

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

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

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

.nav-cta {
    display: none;
}

.mobile-menu-btn {
    display: flex;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.mobile-menu-btn span {
    display: block;
    width: 24px;
    height: 2px;
    background-color: var(--charcoal);
    transition: all 0.3s ease;
    border-radius: 2px;
}

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

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

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

/* --- Mobile Menu --- */
.mobile-menu-overlay {
    position: fixed;
    inset: 0;
    z-index: 999;
    background-color: rgba(42, 37, 32, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-nav {
    position: absolute;
    top: 0;
    right: 0;
    width: min(320px, 85vw);
    height: 100%;
    background-color: var(--cream);
    padding: 100px 32px 40px;
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

.mobile-menu-overlay.active .mobile-nav {
    transform: translateX(0);
}

.mobile-nav-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mobile-nav-link {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--charcoal);
    padding: 12px 0;
    border-bottom: 1px solid var(--sand-dark);
    transition: color 0.2s ease;
}

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

/* --- Hero --- */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--charcoal);
    overflow: hidden;
    margin-top: 0;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background-image: url('https://images.pexels.com/photos/17301616/pexels-photo-17301616.jpeg?auto=compress&cs=tinysrgb&fit=crop&w=1920&h=1080');
    background-size: cover;
    background-position: center;
    opacity: 0.45;
}

.hero-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(42, 37, 32, 0.6) 0%,
        rgba(42, 37, 32, 0.75) 100%
    );
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 800px;
    padding-top: 72px;
}

.hero-headline {
    font-size: clamp(2.25rem, 6vw, 4.5rem);
    font-weight: 700;
    color: var(--white);
    line-height: 1.1;
    margin-bottom: 24px;
    letter-spacing: -0.02em;
}

.hero-sub {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 40px;
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

.hero-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

/* --- Intro --- */
.intro {
    padding: 120px 0;
    background-color: var(--cream);
}

.intro-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 48px;
    align-items: center;
}

.intro-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

.intro-text p {
    font-size: 1.0625rem;
    color: var(--warm-gray);
    line-height: 1.75;
    margin-bottom: 16px;
}

/* --- Offerings --- */
.offerings {
    padding: 120px 0;
    background-color: var(--sand);
}

.offerings-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 32px;
    margin-top: 56px;
}

.offering-card {
    background-color: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.offering-card-image img {
    width: 100%;
    height: 260px;
    object-fit: cover;
}

.offering-card-content {
    padding: 32px;
}

.offering-card-content h3 {
    font-size: 1.375rem;
    color: var(--charcoal);
    margin-bottom: 12px;
}

.offering-card-content p {
    font-size: 0.9375rem;
    color: var(--warm-gray);
    line-height: 1.7;
}

/* --- Sourcing --- */
.sourcing {
    padding: 120px 0;
    background-color: var(--cream);
}

.sourcing-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 48px;
    align-items: center;
}

.sourcing-text p {
    font-size: 1.0625rem;
    color: var(--warm-gray);
    line-height: 1.75;
    margin-bottom: 40px;
}

.sourcing-stats {
    display: flex;
    gap: 40px;
    flex-wrap: wrap;
}

.stat {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stat-number {
    font-family: var(--font-display);
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--terracotta);
    line-height: 1;
}

.stat-label {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--warm-gray);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.sourcing-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

/* --- CTA Section --- */
.cta-section {
    padding: 120px 0;
    background-color: var(--charcoal);
    position: relative;
}

.cta-content {
    text-align: center;
    max-width: 680px;
    margin: 0 auto;
}

.cta-content .section-title {
    margin-bottom: 20px;
}

.cta-text {
    font-size: 1.0625rem;
    color: rgba(255, 255, 255, 0.75);
    line-height: 1.75;
    margin-bottom: 40px;
}

.cta-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

/* --- Visit --- */
.visit {
    padding: 120px 0;
    background-color: var(--sand);
}

.visit-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 48px;
    align-items: start;
}

.visit-detail {
    display: flex;
    gap: 16px;
    margin-bottom: 32px;
}

.detail-icon {
    flex-shrink: 0;
    color: var(--terracotta);
    margin-top: 2px;
}

.visit-detail strong {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--charcoal);
    margin-bottom: 4px;
}

.visit-detail p {
    font-size: 0.9375rem;
    color: var(--warm-gray);
    line-height: 1.6;
}

.visit-detail a {
    color: var(--terracotta);
    transition: color 0.2s ease;
}

.visit-detail a:hover {
    color: var(--terracotta-dark);
    text-decoration: underline;
}

.visit-map {
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    min-height: 400px;
}

/* --- Footer --- */
.footer {
    background-color: var(--charcoal);
    padding: 64px 0 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    padding-bottom: 48px;
}

.footer-brand p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9375rem;
    margin-top: 12px;
    max-width: 280px;
}

.footer-links strong,
.footer-contact strong {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(255, 255, 255, 0.4);
    margin-bottom: 16px;
}

.footer-links ul,
.footer-contact ul {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-links a,
.footer-contact a {
    font-size: 0.9375rem;
    color: rgba(255, 255, 255, 0.7);
    transition: color 0.2s ease;
}

.footer-links a:hover,
.footer-contact a:hover {
    color: var(--terracotta-light);
}

.footer-contact li {
    font-size: 0.9375rem;
    color: rgba(255, 255, 255, 0.7);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 24px 0;
    text-align: center;
}

.footer-bottom p {
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.4);
}

/* --- Scroll Reveal (progressive enhancement) --- */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(24px);
        transition: opacity 0.6s ease, transform 0.6s ease;
    }

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

/* --- Responsive --- */
@media (min-width: 640px) {
    .offerings-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .offerings-grid .offering-card:last-child {
        grid-column: 1 / -1;
        max-width: 50%;
        justify-self: center;
    }
}

@media (min-width: 768px) {
    .container {
        padding: 0 40px;
    }

    .intro-grid {
        grid-template-columns: 1fr 1fr;
        gap: 64px;
    }

    .sourcing-grid {
        grid-template-columns: 1fr 1fr;
        gap: 64px;
    }

    .visit-grid {
        grid-template-columns: 1fr 1fr;
        gap: 48px;
    }

    .footer-grid {
        grid-template-columns: 2fr 1fr 1fr;
    }
}

@media (min-width: 1024px) {
    .nav-cta {
        display: inline-flex;
    }

    .mobile-menu-btn {
        display: none;
    }

    .offerings-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .offerings-grid .offering-card:last-child {
        grid-column: auto;
        max-width: none;
        justify-self: auto;
    }
}

@media (max-width: 639px) {
    .hero-headline {
        padding: 0 8px;
    }

    .hero-actions {
        padding: 0 16px;
    }
}
