/* ============================================
   MADFORD — Editorial Bakery & Groceries Site
   Color Palette: Teal + Slate Grey
   ============================================ */

/* ---- CUSTOM PROPERTIES ---- */
:root {
    --teal-50:  #f0fdfa;
    --teal-100: #ccfbf1;
    --teal-200: #99f6e4;
    --teal-300: #5eead4;
    --teal-400: #2dd4bf;
    --teal-500: #14b8a6;
    --teal-600: #0d9488;
    --teal-700: #0f766e;
    --teal-800: #115e59;
    --teal-900: #134e4a;

    --slate-50:  #f8fafc;
    --slate-100: #f1f5f9;
    --slate-200: #e2e8f0;
    --slate-300: #cbd5e1;
    --slate-400: #94a3b8;
    --slate-500: #64748b;
    --slate-600: #475569;
    --slate-700: #334155;
    --slate-800: #1e293b;
    --slate-900: #0f172a;
    --slate-950: #020617;

    --font-serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
    --font-sans:  'Inter', system-ui, -apple-system, sans-serif;

    --space-xs:  0.25rem;
    --space-sm:  0.5rem;
    --space-md:  1rem;
    --space-lg:  1.5rem;
    --space-xl:  2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;
    --space-4xl: 6rem;

    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 20px;

    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-sans);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--slate-800);
    background-color: var(--slate-50);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

img, svg {
    display: block;
    max-width: 100%;
}

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

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

ul, ol {
    list-style: none;
}

address {
    font-style: normal;
}

/* ---- UTILITY ---- */
.container {
    width: 100%;
    max-width: 1280px;
    margin-left: auto;
    margin-right: auto;
    padding-left: var(--space-xl);
    padding-right: var(--space-xl);
}

@media (max-width: 480px) {
    .container {
        padding-left: var(--space-lg);
        padding-right: var(--space-lg);
    }
}

/* ---- SCROLL REVEAL (progressive enhancement) ---- */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(24px);
        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-delay-1 { transition-delay: 0.1s; }
    .reveal-delay-2 { transition-delay: 0.2s; }
    .reveal-delay-3 { transition-delay: 0.3s; }
    .reveal-delay-4 { transition-delay: 0.4s; }
}

/* ---- BUTTONS ---- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 0.875rem 1.75rem;
    font-family: var(--font-sans);
    font-size: 0.9375rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    border-radius: var(--radius-md);
    transition: background var(--transition), color var(--transition), transform var(--transition), box-shadow var(--transition);
    white-space: nowrap;
}

.btn:hover {
    transform: translateY(-2px);
}

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

.btn--light {
    background: #ffffff;
    color: var(--teal-800);
}
.btn--light:hover {
    background: var(--teal-50);
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

.btn--ghost {
    background: transparent;
    color: #ffffff;
    border: 1.5px solid rgba(255,255,255,0.5);
}
.btn--ghost:hover {
    background: rgba(255,255,255,0.1);
    border-color: #ffffff;
}

.btn--dark {
    background: var(--slate-900);
    color: #ffffff;
}
.btn--dark:hover {
    background: var(--slate-800);
    box-shadow: 0 8px 24px rgba(15,23,42,0.25);
}

.btn--teal {
    background: var(--teal-700);
    color: #ffffff;
}
.btn--teal:hover {
    background: var(--teal-600);
    box-shadow: 0 8px 24px rgba(13,148,136,0.3);
}

.btn--full {
    width: 100%;
    justify-content: center;
}

/* ---- HEADER / NAV ---- */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: var(--space-md) 0;
    transition: background var(--transition), padding var(--transition), box-shadow var(--transition);
}

.site-header.scrolled {
    background: rgba(255,255,255,0.97);
    padding: var(--space-sm) 0;
    box-shadow: 0 1px 0 var(--slate-200);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.site-header.scrolled .logo-word { color: var(--slate-900); }
.site-header.scrolled .logo-mark { background: var(--teal-700); }
.site-header.scrolled .nav-link { color: var(--slate-700); }
.site-header.scrolled .nav-link:hover { color: var(--teal-700); }
.site-header.scrolled .nav-link--cta { background: var(--teal-700); color: #ffffff; }

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

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    z-index: 1001;
}

.logo-mark {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: #ffffff;
    color: var(--teal-700);
    font-family: var(--font-serif);
    font-size: 1.125rem;
    font-weight: 700;
    border-radius: var(--radius-sm);
    transition: background var(--transition), color var(--transition);
}

.logo-word {
    font-family: var(--font-serif);
    font-size: 1.375rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -0.01em;
    transition: color var(--transition);
}

/* Nav */
.nav-list {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.nav-link {
    padding: var(--space-sm) var(--space-md);
    font-size: 0.9375rem;
    font-weight: 400;
    color: rgba(255,255,255,0.85);
    border-radius: var(--radius-md);
    transition: color var(--transition), background var(--transition);
}

.nav-link:hover {
    color: #ffffff;
    background: rgba(255,255,255,0.1);
}

.nav-link--cta {
    background: rgba(255,255,255,0.15);
    color: #ffffff;
    font-weight: 500;
    margin-left: var(--space-sm);
}
.nav-link--cta:hover {
    background: #ffffff;
    color: var(--teal-800);
}

/* Mobile nav toggle */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    width: 28px;
    padding: 4px 0;
    z-index: 1001;
}

.nav-toggle-line {
    display: block;
    height: 2px;
    width: 100%;
    background: #ffffff;
    border-radius: 2px;
    transition: transform var(--transition), opacity var(--transition);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-line:nth-child(1) {
    transform: translateY(7px) 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(-7px) rotate(-45deg);
}

@media (max-width: 768px) {
    .nav-toggle { display: flex; }

    .nav {
        position: fixed;
        inset: 0;
        background: var(--slate-900);
        display: flex;
        align-items: center;
        justify-content: center;
        opacity: 0;
        visibility: hidden;
        transition: opacity var(--transition), visibility var(--transition);
        z-index: 1000;
    }

    .nav.open {
        opacity: 1;
        visibility: visible;
    }

    .nav-list {
        flex-direction: column;
        gap: var(--space-md);
    }

    .nav-link {
        font-size: 1.25rem;
        color: rgba(255,255,255,0.8);
        padding: var(--space-md) var(--space-xl);
    }
    .nav-link:hover,
    .nav-link:focus-visible {
        color: #ffffff;
        background: transparent;
    }
    .nav-link--cta {
        margin-left: 0;
        margin-top: var(--space-md);
        background: var(--teal-700);
        color: #ffffff;
        padding: var(--space-md) var(--space-2xl);
    }
}

/* ---- HERO ---- */
.hero {
    position: relative;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    overflow: hidden;
    background: var(--slate-900);
}

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

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

.hero-scrim {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(2,6,23,0.55) 0%,
        rgba(2,6,23,0.40) 50%,
        rgba(2,6,23,0.75) 100%
    );
}

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

.hero-eyebrow {
    font-family: var(--font-sans);
    font-size: 0.8125rem;
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--teal-300);
    margin-bottom: var(--space-lg);
}

.hero-title {
    font-family: var(--font-serif);
    font-size: clamp(3rem, 8vw, 5.5rem);
    font-weight: 900;
    line-height: 1.05;
    color: #ffffff;
    letter-spacing: -0.02em;
    margin-bottom: var(--space-xl);
}

.hero-accent {
    font-style: italic;
    font-weight: 400;
    color: var(--teal-200);
}

.hero-subtitle {
    font-size: clamp(1.0625rem, 2vw, 1.25rem);
    line-height: 1.65;
    color: rgba(255,255,255,0.8);
    max-width: 540px;
    margin-bottom: var(--space-2xl);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-md);
}

.scroll-indicator {
    position: absolute;
    bottom: var(--space-2xl);
    left: 50%;
    transform: translateX(-50%);
    z-index: 1;
    color: rgba(255,255,255,0.5);
    animation: scrollBounce 2s ease-in-out infinite;
}

@keyframes scrollBounce {
    0%, 100% { transform: translateX(-50%) translateY(0); opacity: 0.5; }
    50% { transform: translateX(-50%) translateY(8px); opacity: 1; }
}

/* ---- SECTION COMMON ---- */
.section-label {
    font-family: var(--font-sans);
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--teal-700);
    margin-bottom: var(--space-md);
}

.section-title {
    font-family: var(--font-serif);
    font-size: clamp(2rem, 5vw, 3.25rem);
    font-weight: 700;
    line-height: 1.1;
    color: var(--slate-900);
    letter-spacing: -0.02em;
    margin-bottom: var(--space-xl);
}

/* ---- PRODUCT STRIP ---- */
.product-strip {
    padding: var(--space-4xl) 0;
    background: var(--slate-50);
}

.product-strip .section-title {
    max-width: 480px;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-xl);
    margin-top: var(--space-2xl);
}

@media (max-width: 640px) {
    .product-grid {
        grid-template-columns: 1fr;
    }
}

.product-card {
    background: #ffffff;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 4px 16px rgba(0,0,0,0.04);
    transition: transform var(--transition), box-shadow var(--transition);
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08), 0 16px 40px rgba(0,0,0,0.08);
}

.product-card-img {
    overflow: hidden;
    aspect-ratio: 3/2;
}

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

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

.product-card-body {
    padding: var(--space-xl);
}

.product-card-title {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--slate-900);
    margin-bottom: var(--space-sm);
}

.product-card-desc {
    font-size: 0.9375rem;
    line-height: 1.65;
    color: var(--slate-600);
}

/* ---- SPLIT SECTION (About) ---- */
.split-section {
    padding: var(--space-4xl) 0;
    background: #ffffff;
}

.split-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-3xl);
    align-items: center;
}

@media (max-width: 900px) {
    .split-grid {
        grid-template-columns: 1fr;
        gap: var(--space-2xl);
    }
}

.split-image {
    border-radius: var(--radius-lg);
    overflow: hidden;
    aspect-ratio: 4/5;
}

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

.split-content .section-title {
    margin-bottom: var(--space-xl);
}

.split-body {
    font-size: 1.0625rem;
    line-height: 1.75;
    color: var(--slate-600);
    margin-bottom: var(--space-lg);
}

.split-stats {
    display: flex;
    gap: var(--space-xl);
    margin: var(--space-2xl) 0;
    padding: var(--space-xl) 0;
    border-top: 1px solid var(--slate-200);
    border-bottom: 1px solid var(--slate-200);
}

.stat {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.stat--divider {
    padding-left: var(--space-xl);
    border-left: 2px solid var(--slate-200);
}

.stat-number {
    font-family: var(--font-serif);
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--teal-700);
    line-height: 1;
}

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

/* ---- EDITORIAL QUOTE ---- */
.editorial-section {
    padding: var(--space-4xl) 0;
    background: var(--slate-900);
}

.editorial-inner {
    max-width: 860px;
    text-align: center;
    position: relative;
}

.editorial-mark {
    font-family: var(--font-serif);
    font-size: 8rem;
    line-height: 0.8;
    color: var(--teal-700);
    position: absolute;
    top: -1rem;
    left: -0.5rem;
    user-select: none;
}

.editorial-quote {
    font-family: var(--font-serif);
    font-size: clamp(1.5rem, 3.5vw, 2.25rem);
    font-weight: 400;
    font-style: italic;
    line-height: 1.45;
    color: #ffffff;
    margin-bottom: var(--space-xl);
    position: relative;
    z-index: 1;
}

.editorial-cite {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-md);
    font-family: var(--font-sans);
    font-size: 0.875rem;
    font-style: normal;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--slate-400);
}

.editorial-cite-line {
    display: block;
    width: 40px;
    height: 2px;
    background: var(--teal-600);
    border-radius: 2px;
}

/* ---- VISIT / LOCATION ---- */
.visit-section {
    padding: var(--space-4xl) 0;
    background: var(--slate-100);
}

.visit-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-3xl);
    align-items: stretch;
}

@media (max-width: 900px) {
    .visit-grid {
        grid-template-columns: 1fr;
    }
}

.visit-info {
    display: flex;
    flex-direction: column;
    gap: var(--space-xl);
}

.visit-title {
    margin-bottom: var(--space-sm);
}

.visit-address {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.visit-row {
    display: flex;
    gap: var(--space-md);
    align-items: flex-start;
}

.visit-icon {
    flex-shrink: 0;
    margin-top: 4px;
    color: var(--teal-600);
}

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

.visit-row p {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--slate-800);
}

.visit-row a {
    color: var(--teal-700);
    font-weight: 500;
    transition: color var(--transition);
}
.visit-row a:hover {
    color: var(--teal-600);
    text-decoration: underline;
}

.visit-map {
    border-radius: var(--radius-lg);
    overflow: hidden;
    min-height: 360px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.08);
}

/* ---- CONTACT ---- */
.contact-section {
    padding: var(--space-4xl) 0;
    background: #ffffff;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-3xl);
    align-items: start;
}

@media (max-width: 900px) {
    .contact-grid {
        grid-template-columns: 1fr;
    }
}

.contact-title {
    margin-bottom: var(--space-lg);
}

.contact-desc {
    font-size: 1.0625rem;
    line-height: 1.7;
    color: var(--slate-600);
    margin-bottom: var(--space-xl);
}

.contact-direct {
    padding: var(--space-lg) var(--space-xl);
    background: var(--teal-50);
    border-radius: var(--radius-md);
    border-left: 3px solid var(--teal-600);
}

.contact-direct p {
    font-size: 1rem;
    color: var(--slate-700);
}

.contact-direct a {
    color: var(--teal-700);
    font-weight: 600;
    transition: color var(--transition);
}
.contact-direct a:hover {
    color: var(--teal-600);
    text-decoration: underline;
}

/* Form */
.form-group {
    margin-bottom: var(--space-lg);
}

.form-label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--slate-600);
    margin-bottom: var(--space-sm);
}

.form-input {
    width: 100%;
    padding: 0.875rem 1rem;
    font-family: var(--font-sans);
    font-size: 1rem;
    color: var(--slate-900);
    background: var(--slate-50);
    border: 1.5px solid var(--slate-200);
    border-radius: var(--radius-md);
    transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
    outline: none;
}

.form-input::placeholder {
    color: var(--slate-400);
}

.form-input:hover {
    border-color: var(--slate-300);
}

.form-input:focus {
    border-color: var(--teal-500);
    box-shadow: 0 0 0 3px rgba(20,184,166,0.15);
    background: #ffffff;
}

.form-textarea {
    resize: vertical;
    min-height: 120px;
}

.form-success {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-lg);
    margin-top: var(--space-lg);
    background: var(--teal-50);
    border: 1px solid var(--teal-200);
    border-radius: var(--radius-md);
    color: var(--teal-800);
    font-size: 0.9375rem;
    font-weight: 500;
}

.form-success svg {
    flex-shrink: 0;
    color: var(--teal-600);
}

/* ---- FOOTER ---- */
.site-footer {
    background: var(--slate-900);
    color: var(--slate-400);
}

.footer-inner {
    padding: var(--space-3xl) 0 var(--space-2xl);
    display: grid;
    grid-template-columns: 1fr auto;
    gap: var(--space-2xl);
    align-items: start;
}

@media (max-width: 640px) {
    .footer-inner {
        grid-template-columns: 1fr;
    }
}

.footer-brand .logo-word {
    color: #ffffff;
}

.footer-tagline {
    margin-top: var(--space-md);
    font-size: 0.9375rem;
    color: var(--slate-500);
    max-width: 280px;
    line-height: 1.6;
}

.footer-links nav {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    text-align: right;
}

.footer-links a {
    font-size: 0.9375rem;
    color: var(--slate-400);
    transition: color var(--transition);
}

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

.footer-contact {
    grid-column: 1 / -1;
    padding-top: var(--space-xl);
    border-top: 1px solid var(--slate-800);
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    font-size: 0.9375rem;
}

.footer-contact a {
    color: var(--teal-400);
    transition: color var(--transition);
}
.footer-contact a:hover {
    color: var(--teal-300);
    text-decoration: underline;
}

.footer-bottom {
    background: var(--slate-950);
    padding: var(--space-lg) 0;
}

.footer-bottom-inner {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: var(--space-sm);
}

.footer-bottom p {
    font-size: 0.8125rem;
    color: var(--slate-600);
}

/* ---- FOCUS VISIBLE ---- */
:focus-visible {
    outline: 2px solid var(--teal-500);
    outline-offset: 2px;
}

/* ---- 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; }
    .reveal {
        opacity: 1;
        transform: none;
    }
}
