/* ============================================
   Protein Fix — Artisan Bakery & Grocer
   Clean minimalist · Emerald + Cream
   ============================================ */

/* ---------- RESET ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { font-size: 16px; line-height: 1.7; }
img, svg { display: block; max-width: 100%; height: auto; }
button { font: inherit; cursor: pointer; border: none; background: none; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
h1, h2, h3 { line-height: 1.15; font-weight: 400; }
p { color: inherit; }

/* ---------- CUSTOM PROPERTIES ---------- */
:root {
    --color-emerald-950: #042f2e;
    --color-emerald-900: #064e3b;
    --color-emerald-800: #065f46;
    --color-emerald-700: #047857;
    --color-emerald-600: #059669;
    --color-emerald-500: #10b981;
    --color-cream-50:  #fafaf5;
    --color-cream-100: #f5f5ee;
    --color-cream-200: #ebe8db;
    --color-cream-300: #e0dbcc;
    --color-text-dark: #1a1a1a;
    --color-text-mid:  #3a3a3a;
    --color-text-light:#6b6b6b;
    --color-text-on-dark: #f0f0ea;
    --color-text-on-dark-muted: #a8a89e;
    --font-serif: 'Instrument Serif', Georgia, 'Times New Roman', serif;
    --font-sans: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --container-max: 1200px;
    --container-padding: clamp(1.25rem, 4vw, 3rem);
    --transition-fast: 0.2s ease;
    --transition-base: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---------- BASE ---------- */
body {
    font-family: var(--font-sans);
    color: var(--color-text-dark);
    background: var(--color-cream-50);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding-left: var(--container-padding);
    padding-right: var(--container-padding);
}

.skip-link {
    position: absolute;
    top: -100%;
    left: 1rem;
    background: var(--color-emerald-800);
    color: var(--color-cream-50);
    padding: 0.5rem 1rem;
    border-radius: 0 0 4px 4px;
    z-index: 9999;
    font-size: 0.875rem;
    font-weight: 500;
}
.skip-link:focus {
    top: 0;
}

/* ---------- SECTION UTILITIES ---------- */
.section-eyebrow {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--color-emerald-700);
    margin-bottom: 1rem;
}
.section-eyebrow--light { color: var(--color-emerald-500); }

.section-title {
    font-family: var(--font-serif);
    font-size: clamp(2rem, 4.5vw, 3.5rem);
    color: var(--color-emerald-950);
    margin-bottom: 1.5rem;
    font-style: italic;
}
.section-title em { font-style: italic; color: var(--color-emerald-700); }
.section-title--light { color: var(--color-cream-50); }
.section-title--light em { color: var(--color-emerald-400); }

.section-body {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--color-text-mid);
    max-width: 64ch;
}
.section-body--narrow { max-width: 52ch; }
.section-body--wide { max-width: 60ch; }
.section-body--light { color: var(--color-text-on-dark-muted); }

/* ---------- HEADER ---------- */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 1.25rem 0;
    transition: background var(--transition-base), padding var(--transition-base), box-shadow var(--transition-base);
}
.site-header.scrolled {
    background: rgba(250, 250, 245, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 0.75rem 0;
    box-shadow: 0 1px 0 var(--color-cream-300);
}
.site-header.scrolled .logo-text,
.site-header.scrolled .nav-link { color: var(--color-emerald-950); }
.site-header.scrolled .logo-mark { stroke: var(--color-emerald-950); fill: var(--color-emerald-950); }

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    z-index: 101;
}
.logo-mark {
    stroke: var(--color-cream-50);
    fill: var(--color-cream-50);
    transition: stroke var(--transition-base), fill var(--transition-base);
}
.logo-text {
    font-family: var(--font-serif);
    font-size: 1.2rem;
    color: var(--color-cream-50);
    letter-spacing: 0.02em;
    transition: color var(--transition-base);
}
.logo--light .logo-mark { stroke: var(--color-emerald-950); fill: var(--color-emerald-950); }
.logo--light .logo-text { color: var(--color-emerald-950); }

/* Nav */
.nav-list {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}
.nav-link {
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-cream-50);
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    transition: background var(--transition-fast), color var(--transition-fast);
}
.nav-link:hover { background: rgba(255,255,255,0.1); }
.nav-cta {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--color-cream-50) !important;
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 100px;
    padding: 0.45rem 1rem !important;
    margin-left: 0.5rem;
    transition: border-color var(--transition-fast), background var(--transition-fast) !important;
}
.nav-cta:hover { border-color: rgba(255,255,255,0.6); background: rgba(255,255,255,0.1) !important; }

/* Mobile nav toggle */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 0.5rem;
    z-index: 101;
}
.nav-toggle-line {
    display: block;
    width: 22px;
    height: 1.5px;
    background: var(--color-cream-50);
    border-radius: 2px;
    transition: transform var(--transition-base), opacity var(--transition-fast);
}
.nav-toggle[aria-expanded="true"] .nav-toggle-line:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-line:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-line:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }
.site-header.scrolled .nav-toggle-line { background: var(--color-emerald-950); }

/* ---------- HERO ---------- */
.hero {
    position: relative;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    overflow: hidden;
    background: var(--color-emerald-950);
}
.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}
.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(4, 47, 46, 0.45) 0%,
        rgba(4, 47, 46, 0.6) 50%,
        rgba(4, 47, 46, 0.88) 100%
    );
}
.hero-content {
    position: relative;
    z-index: 1;
    padding-bottom: clamp(4rem, 10vh, 8rem);
    max-width: 720px;
}
.hero-eyebrow {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--color-emerald-400);
    margin-bottom: 1.25rem;
}
.hero-headline {
    font-family: var(--font-serif);
    font-size: clamp(2.75rem, 7vw, 5.5rem);
    color: var(--color-cream-50);
    line-height: 1.05;
    margin-bottom: 1.5rem;
    font-style: italic;
}
.hero-headline em { font-style: italic; color: var(--color-emerald-300); }
.hero-sub {
    font-size: clamp(1rem, 1.5vw, 1.2rem);
    color: var(--color-text-on-dark-muted);
    max-width: 50ch;
    line-height: 1.7;
    margin-bottom: 2.5rem;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; }

/* Scroll indicator */
.hero-scroll {
    position: absolute;
    bottom: 2rem;
    right: 3rem;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--color-text-on-dark-muted);
    font-size: 0.65rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}
.scroll-line {
    width: 1px;
    height: 60px;
    background: linear-gradient(to bottom, var(--color-text-on-dark-muted), transparent);
    animation: scrollPulse 2s ease-in-out infinite;
}
@keyframes scrollPulse {
    0%, 100% { opacity: 0.3; transform: scaleY(0.7); }
    50% { opacity: 1; transform: scaleY(1); }
}

/* ---------- BUTTONS ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-sans);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 0.9rem 2rem;
    border-radius: 100px;
    transition: background var(--transition-fast), transform var(--transition-fast), box-shadow var(--transition-fast);
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
    background: var(--color-emerald-700);
    color: var(--color-cream-50);
    border: 1.5px solid var(--color-emerald-700);
}
.btn-primary:hover { background: var(--color-emerald-800); border-color: var(--color-emerald-800); box-shadow: 0 8px 24px rgba(4, 95, 70, 0.3); }

.btn-ghost {
    background: transparent;
    color: var(--color-cream-50);
    border: 1.5px solid rgba(255,255,255,0.35);
}
.btn-ghost:hover { border-color: rgba(255,255,255,0.7); background: rgba(255,255,255,0.06); }
.btn--light { color: var(--color-emerald-950); border-color: var(--color-emerald-950); }
.btn--light:hover { background: var(--color-emerald-950); color: var(--color-cream-50); }
.btn--lg { padding: 1.1rem 2.25rem; font-size: 0.85rem; }

/* ---------- INTRO STRIP ---------- */
.intro-strip {
    background: var(--color-cream-100);
    border-top: 1px solid var(--color-cream-200);
    border-bottom: 1px solid var(--color-cream-200);
}
.intro-strip-inner {
    display: flex;
    align-items: center;
    gap: 2rem;
    padding: 2rem 0;
}
.intro-divider {
    flex: 0 0 auto;
    width: 40px;
    height: 1px;
    background: var(--color-emerald-600);
}
.intro-text {
    font-size: 0.95rem;
    color: var(--color-text-mid);
    line-height: 1.8;
}
.intro-text strong { color: var(--color-emerald-800); font-weight: 600; }
.intro-text a { color: var(--color-emerald-700); text-decoration: underline; text-underline-offset: 3px; }
.intro-text a:hover { color: var(--color-emerald-900); }

/* ---------- ABOUT ---------- */
.about {
    padding: clamp(5rem, 10vw, 8rem) 0;
}
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(2rem, 5vw, 5rem);
    align-items: center;
}
.about-image {
    position: relative;
    overflow: hidden;
    border-radius: 4px;
}
.about-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    aspect-ratio: 4/5;
    transition: transform var(--transition-slow);
}
.about-image:hover img { transform: scale(1.02); }
.about-image::after {
    content: '';
    position: absolute;
    inset: 0;
    border: 1px solid rgba(6, 95, 70, 0.15);
    border-radius: 4px;
    pointer-events: none;
}

.about-content { padding: 1rem 0; }
.about-content .section-body { margin-bottom: 1.25rem; }
.about-details {
    margin-top: 2.5rem;
    border-top: 1px solid var(--color-cream-200);
    padding-top: 2rem;
}
.detail-row {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: 0.4rem 2rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--color-cream-200);
}
.detail-row dt {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--color-emerald-700);
}
.detail-row dd {
    font-size: 0.95rem;
    color: var(--color-text-mid);
    line-height: 1.6;
}
.detail-row dd a { color: var(--color-emerald-700); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- SPECIALTIES ---------- */
.specialties {
    padding: clamp(5rem, 10vw, 8rem) 0;
    background: var(--color-cream-100);
}
.section-header {
    text-align: center;
    margin-bottom: clamp(3rem, 6vw, 5rem);
}
.section-header .section-body { margin: 0 auto; }
.specialties-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}
.specialty-card {
    background: var(--color-cream-50);
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid var(--color-cream-200);
    transition: box-shadow var(--transition-base), transform var(--transition-base);
}
.specialty-card:hover {
    box-shadow: 0 12px 40px rgba(4, 47, 46, 0.08);
    transform: translateY(-4px);
}
.specialty-card-number {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-family: var(--font-serif);
    font-size: 3rem;
    color: var(--color-emerald-200);
    line-height: 1;
    opacity: 0.5;
}
.specialty-card > img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-radius: 6px 6px 0 0;
}
.specialty-card-body {
    padding: 1.75rem;
}
.specialty-card-title {
    font-family: var(--font-serif);
    font-size: 1.4rem;
    color: var(--color-emerald-950);
    margin-bottom: 0.75rem;
    font-style: italic;
}
.specialty-card-desc {
    font-size: 0.95rem;
    color: var(--color-text-mid);
    line-height: 1.7;
}

/* ---------- GALLERY ---------- */
.gallery {
    padding: clamp(5rem, 10vw, 8rem) 0;
}
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-template-rows: auto;
    gap: 1rem;
}
.gallery-item {
    overflow: hidden;
    border-radius: 4px;
    position: relative;
}
.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}
.gallery-item:hover img { transform: scale(1.03); }
.gallery-item--wide { grid-column: span 7; }
.gallery-item:nth-child(2) { grid-column: span 5; }
.gallery-item:nth-child(3) { grid-column: span 5; }
.gallery-item:nth-child(4) { grid-column: span 6; }
.gallery-item:nth-child(5) { grid-column: span 6; }

/* ---------- CTA ---------- */
.cta {
    position: relative;
    min-height: 60vh;
    min-height: 60dvh;
    display: flex;
    align-items: center;
    overflow: hidden;
}
.cta-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}
.cta-bg img { width: 100%; height: 100%; object-fit: cover; }
.cta-content {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: clamp(4rem, 10vw, 7rem) 0;
    max-width: 700px;
    margin: 0 auto;
}
.cta-content .section-title { margin-bottom: 1.25rem; }
.cta-content .section-body { margin: 0 auto 2.5rem; }
.cta-content .section-body a { color: var(--color-emerald-400); text-decoration: underline; text-underline-offset: 3px; }
.cta-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem; }

/* ---------- VISIT ---------- */
.visit {
    padding: clamp(5rem, 10vw, 8rem) 0;
    background: var(--color-cream-100);
}
.visit-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(2rem, 5vw, 5rem);
    align-items: start;
}
.visit-info { padding: 1rem 0; }
.visit-details { margin-top: 2.5rem; }
.visit-detail {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--color-cream-200);
}
.visit-detail:first-child { border-top: 1px solid var(--color-cream-200); }
.visit-detail dt {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--color-emerald-700);
    flex: 0 0 auto;
    min-width: 80px;
}
.visit-detail dd {
    font-size: 1rem;
    color: var(--color-text-mid);
    line-height: 1.7;
}
.visit-detail a {
    color: var(--color-emerald-700);
    text-decoration: underline;
    text-underline-offset: 3px;
}
.visit-detail a:hover { color: var(--color-emerald-900); }

.visit-map {
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid var(--color-cream-200);
    aspect-ratio: 4/3;
    min-height: 320px;
}
.visit-map iframe { width: 100%; height: 100%; }

/* ---------- FOOTER ---------- */
.site-footer {
    background: var(--color-emerald-950);
    color: var(--color-text-on-dark);
    padding: 3.5rem 0 2rem;
}
.footer-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 2rem;
    padding-bottom: 2.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
.footer-tagline {
    font-size: 0.95rem;
    color: var(--color-text-on-dark-muted);
    max-width: 32ch;
    line-height: 1.7;
}
.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    padding-top: 2rem;
}
.footer-copy {
    font-size: 0.8rem;
    color: var(--color-text-on-dark-muted);
}
.footer-contact {
    font-size: 0.8rem;
    color: var(--color-text-on-dark-muted);
}
.footer-contact a {
    color: var(--color-emerald-400);
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color var(--transition-fast);
}
.footer-contact a:hover { color: var(--color-emerald-300); }

/* ---------- MOBILE NAV OVERLAY ---------- */
.nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 99;
    background: rgba(4, 47, 46, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    opacity: 0;
    transition: opacity var(--transition-base);
}
.nav-overlay.active { display: block; opacity: 1; }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 900px) {
    .nav-toggle { display: flex; }
    
    .main-nav {
        position: fixed;
        top: 0;
        right: 0;
        width: min(320px, 85vw);
        height: 100vh;
        height: 100dvh;
        background: var(--color-cream-50);
        padding: 5rem 2rem 2rem;
        transform: translateX(100%);
        transition: transform var(--transition-base);
        z-index: 100;
        box-shadow: -8px 0 30px rgba(0,0,0,0.1);
    }
    .main-nav.open { transform: translateX(0); }
    .nav-list {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
    .nav-link {
        color: var(--color-emerald-950) !important;
        font-size: 0.9rem;
        padding: 0.75rem 0;
        width: 100%;
    }
    .nav-link:hover { background: transparent; }
    .nav-cta {
        margin-left: 0 !important;
        margin-top: 1rem;
        border-color: var(--color-emerald-700) !important;
        color: var(--color-emerald-700) !important;
        justify-content: flex-start;
    }
    .nav-cta:hover { background: var(--color-emerald-50) !important; }

    .hero-headline { font-size: clamp(2.25rem, 10vw, 3.5rem); }
    .hero-scroll { display: none; }

    .about-grid { grid-template-columns: 1fr; }
    .about-image { max-height: 400px; }
    .about-image img { aspect-ratio: auto; height: 100%; }

    .specialties-grid { grid-template-columns: 1fr; }
    
    .gallery-grid { grid-template-columns: 1fr 1fr; }
    .gallery-item--wide { grid-column: span 2; }
    .gallery-item:nth-child(n) { grid-column: span 1; }
    .gallery-item:nth-child(2) { grid-column: span 1; }
    .gallery-item:nth-child(3) { grid-column: span 1; }
    .gallery-item:nth-child(4) { grid-column: span 1; }
    .gallery-item:nth-child(5) { grid-column: span 1; }
    .gallery-item img { height: 200px; }

    .visit-grid { grid-template-columns: 1fr; }
    .visit-map { aspect-ratio: 16/9; }

    .footer-top { flex-direction: column; }
    .footer-bottom { flex-direction: column; text-align: center; }
}

@media (max-width: 600px) {
    .hero-actions { flex-direction: column; }
    .hero-actions .btn { width: 100%; justify-content: center; }
    .cta-actions { flex-direction: column; align-items: center; }
    .cta-actions .btn { width: 100%; max-width: 280px; justify-content: center; }
    
    .gallery-grid { grid-template-columns: 1fr; }
    .gallery-item--wide { grid-column: span 1; }
    .gallery-item img { height: 220px; }

    .intro-strip-inner { flex-direction: column; align-items: flex-start; gap: 1rem; }
    .intro-divider { width: 30px; height: 1px; }
}

/* ---------- 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; }
    .hero-bg img, .cta-bg img, .about-image img, .gallery-item img {
        transition: none;
    }
}
