/* ========================================
   Sugar Mountain — Bakery & Groceries
   Bold Editorial Style
   Emerald Green + Cream Palette
======================================== */

/* ─── Custom Properties ─── */
:root {
    --emerald-50: #f0fdf4;
    --emerald-100: #dcfce7;
    --emerald-200: #bbf7d0;
    --emerald-300: #86efac;
    --emerald-400: #4ade80;
    --emerald-500: #22c55e;
    --emerald-600: #16a34a;
    --emerald-700: #15803d;
    --emerald-800: #166534;
    --emerald-900: #14532d;
    --emerald-950: #052e16;

    --cream-50: #fefce8;
    --cream-100: #fef9c3;
    --cream-200: #fef08a;
    --cream-300: #fde047;
    --cream-400: #facc15;
    --cream-500: #ca8a04;

    --cream: #faf8f0;
    --cream-dark: #f5f0e1;
    --cream-warm: #f0e8d0;

    --stone-50: #fafaf9;
    --stone-100: #f5f5f4;
    --stone-200: #e7e5e4;
    --stone-300: #d6d3d1;
    --stone-400: #a8a29e;
    --stone-500: #78716c;
    --stone-600: #57534e;
    --stone-700: #44403c;
    --stone-800: #292524;
    --stone-900: #1c1917;
    --stone-950: #0c0a09;

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

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

    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 16px;
    --radius-xl: 24px;

    --transition-fast: 0.15s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* ─── Reset & Base ─── */
*, *::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: 16px;
    line-height: 1.6;
    color: var(--stone-800);
    background-color: var(--cream);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

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

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

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

ul {
    list-style: none;
}

.skip-link {
    position: absolute;
    top: -100%;
    left: var(--space-sm);
    padding: var(--space-xs) var(--space-sm);
    background: var(--emerald-700);
    color: white;
    border-radius: var(--radius-sm);
    z-index: 1000;
    font-weight: 500;
}

.skip-link:focus {
    top: var(--space-sm);
}

/* ─── Container ─── */
.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

@media (min-width: 768px) {
    .container {
        padding: 0 var(--space-2xl);
    }
}

/* ─── Typography ─── */
h1, h2, h3, h4 {
    font-family: var(--font-serif);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

/* ─── Section Labels ─── */
.section-label {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    font-family: var(--font-sans);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--emerald-700);
    margin-bottom: var(--space-md);
}

.section-label::before {
    content: '';
    display: inline-block;
    width: 24px;
    height: 2px;
    background: var(--emerald-600);
}

.section-label--light {
    color: var(--emerald-300);
}

.section-label--light::before {
    background: var(--emerald-400);
}

/* ─── Section Headings ─── */
.section-heading {
    font-size: clamp(2rem, 5vw, 3.5rem);
    color: var(--stone-900);
    margin-bottom: var(--space-lg);
}

.section-heading--light {
    color: var(--cream);
}

.emerald-text {
    color: var(--emerald-700);
}

/* ─── Buttons ─── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    padding: 0.875rem 1.75rem;
    font-family: var(--font-sans);
    font-size: 0.9375rem;
    font-weight: 500;
    border-radius: var(--radius-md);
    transition: all var(--transition-base);
    white-space: nowrap;
}

.btn--primary {
    background: var(--emerald-700);
    color: white;
    box-shadow: 0 4px 14px rgba(21, 128, 61, 0.3);
}

.btn--primary:hover {
    background: var(--emerald-800);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(21, 128, 61, 0.4);
}

.btn--ghost {
    background: transparent;
    color: var(--stone-700);
    border: 1.5px solid var(--stone-300);
}

.btn--ghost:hover {
    border-color: var(--emerald-600);
    color: var(--emerald-700);
}

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

/* ─── Navbar ─── */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(250, 248, 240, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    transition: all var(--transition-base);
}

.navbar.scrolled {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

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

.nav-logo {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    font-family: var(--font-serif);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--stone-900);
}

.nav-logo-icon {
    color: var(--emerald-700);
}

.nav-toggle {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: var(--space-xs);
    z-index: 101;
}

.nav-toggle-bar {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--stone-700);
    border-radius: 2px;
    transition: all var(--transition-base);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) {
    opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

.nav-menu {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    height: 100vh;
    background: var(--cream);
    display: flex;
    align-items: center;
    justify-content: center;
    transform: translateX(100%);
    transition: transform var(--transition-slow);
    z-index: 99;
}

.nav-menu.open {
    transform: translateX(0);
}

.nav-links {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-xl);
}

.nav-link {
    font-family: var(--font-serif);
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--stone-800);
    transition: color var(--transition-fast);
}

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

.nav-link--cta {
    margin-top: var(--space-md);
    padding: 0.75rem 2rem;
    background: var(--emerald-700);
    color: white;
    border-radius: var(--radius-md);
    font-family: var(--font-sans);
    font-size: 1rem;
}

.nav-link--cta:hover {
    background: var(--emerald-800);
    color: white;
}

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

    .nav-menu {
        position: static;
        width: auto;
        height: auto;
        background: transparent;
        transform: none;
        display: block;
    }

    .nav-links {
        flex-direction: row;
        gap: var(--space-xl);
    }

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

    .nav-link--cta {
        margin-top: 0;
        padding: 0.625rem 1.5rem;
        font-size: 0.875rem;
    }
}

/* ─── Hero ─── */
.hero {
    position: relative;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    background: var(--stone-950);
    overflow: hidden;
    padding: var(--space-4xl) 0 var(--space-3xl);
}

.hero-bg-pattern {
    position: absolute;
    inset: 0;
    color: var(--cream);
    opacity: 0.6;
    pointer-events: none;
}

.hero-container {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-2xl);
    align-items: center;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 100px;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--emerald-300);
    margin-bottom: var(--space-lg);
    backdrop-filter: blur(8px);
}

.hero-badge-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--emerald-400);
    animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.hero-headline {
    font-size: clamp(2.5rem, 7vw, 5rem);
    color: white;
    line-height: 1.05;
    margin-bottom: var(--space-lg);
}

.hero-headline-line {
    display: block;
}

.hero-headline-line:last-child {
    color: var(--emerald-400);
    font-style: italic;
}

.hero-subheadline {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: var(--stone-400);
    max-width: 520px;
    line-height: 1.7;
    margin-bottom: var(--space-xl);
}

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

.hero-actions .btn--ghost {
    border-color: rgba(255, 255, 255, 0.2);
    color: var(--stone-300);
}

.hero-actions .btn--ghost:hover {
    border-color: var(--emerald-400);
    color: var(--emerald-300);
}

/* Floating Stat Cards */
.hero-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
}

.stat-card {
    border-radius: var(--radius-lg);
    padding: var(--space-md);
    transition: transform var(--transition-base);
}

.stat-card:hover {
    transform: translateY(-4px);
}

.stat-card--cream {
    background: var(--cream);
}

.stat-card--emerald {
    background: var(--emerald-700);
}

.stat-card--emerald-light {
    background: var(--emerald-800);
}

.stat-card-inner {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.stat-card-label {
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.stat-card--cream .stat-card-label { color: var(--stone-500); }
.stat-card--emerald .stat-card-label { color: var(--emerald-200); }
.stat-card--emerald-light .stat-card-label { color: var(--emerald-300); }

.stat-card-value {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.2;
}

.stat-card--cream .stat-card-value { color: var(--stone-900); }
.stat-card--emerald .stat-card-value { color: white; }
.stat-card--emerald-light .stat-card-value { color: white; }

.stat-card-desc {
    font-size: 0.8125rem;
    color: var(--stone-500);
}

.stat-card--emerald .stat-card-desc,
.stat-card--emerald-light .stat-card-desc {
    color: var(--emerald-300);
}

.hero-scroll-indicator {
    position: absolute;
    bottom: var(--space-xl);
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-xs);
    color: var(--stone-500);
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    animation: float 2s ease-in-out infinite;
}

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

@media (min-width: 1024px) {
    .hero-container {
        grid-template-columns: 1.1fr 0.9fr;
        gap: var(--space-3xl);
    }
}

/* ─── Sections ─── */
.section {
    padding: var(--space-4xl) 0;
}

.section--dark {
    background: var(--stone-900);
}

.section--cream {
    background: var(--cream-dark);
}

.section-header {
    text-align: center;
    margin-bottom: var(--space-3xl);
}

/* ─── About ─── */
.about-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-2xl);
    align-items: center;
}

.about-image-wrap {
    position: relative;
}

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

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

.about-image-accent {
    position: absolute;
    bottom: -2rem;
    right: -1rem;
    width: 55%;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    border: 4px solid var(--cream);
}

.about-accent-box {
    position: absolute;
    top: -1rem;
    left: -1rem;
    background: var(--emerald-700);
    color: white;
    padding: var(--space-md);
    border-radius: var(--radius-md);
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.accent-box-number {
    font-family: var(--font-serif);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    opacity: 0.7;
}

.accent-box-text {
    font-family: var(--font-serif);
    font-size: 1.25rem;
    font-weight: 700;
}

.about-content {
    max-width: 560px;
}

.about-lead {
    font-size: 1.125rem;
    color: var(--stone-600);
    line-height: 1.8;
    margin-bottom: var(--space-md);
}

.about-body {
    color: var(--stone-600);
    line-height: 1.8;
    margin-bottom: var(--space-xl);
}

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

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

.value-icon {
    flex-shrink: 0;
    color: var(--emerald-600);
    margin-top: 2px;
}

.value-item strong {
    display: block;
    font-family: var(--font-serif);
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--stone-900);
    margin-bottom: 0.25rem;
}

.value-item span {
    font-size: 0.9375rem;
    color: var(--stone-500);
}

@media (min-width: 1024px) {
    .about-grid {
        grid-template-columns: 0.9fr 1.1fr;
        gap: var(--space-3xl);
    }
}

/* ─── Offerings ─── */
.offerings-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-xl);
}

.offering-card {
    background: var(--stone-800);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.offering-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.offering-card-image {
    position: relative;
    aspect-ratio: 4/3;
    overflow: hidden;
}

.offering-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

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

.offering-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(12, 10, 9, 0.6) 0%, transparent 50%);
}

.offering-card-content {
    padding: var(--space-lg);
}

.offering-card-number {
    font-family: var(--font-serif);
    font-size: 0.875rem;
    color: var(--emerald-500);
    font-weight: 600;
    display: block;
    margin-bottom: var(--space-xs);
}

.offering-card-title {
    font-size: 1.5rem;
    color: white;
    margin-bottom: var(--space-sm);
}

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

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

@media (min-width: 1024px) {
    .offerings-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* ─── Gallery ─── */
.gallery-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-md);
}

.gallery-item {
    border-radius: var(--radius-md);
    overflow: hidden;
    aspect-ratio: 4/3;
}

.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--large {
    aspect-ratio: 3/4;
}

.gallery-item--wide {
    grid-column: 1 / -1;
    aspect-ratio: 16/9;
}

@media (min-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
        grid-template-rows: repeat(2, 280px);
    }

    .gallery-item--large {
        grid-row: 1 / 3;
        aspect-ratio: auto;
    }

    .gallery-item--wide {
        grid-column: 2 / 4;
        grid-row: 2;
        aspect-ratio: auto;
    }
}

/* ─── Visit ─── */
.visit-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-2xl);
    align-items: start;
}

.visit-content {
    max-width: 560px;
}

.visit-lead {
    font-size: 1.0625rem;
    color: var(--stone-600);
    line-height: 1.8;
    margin-bottom: var(--space-xl);
}

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

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

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

.detail-item strong {
    display: block;
    font-family: var(--font-serif);
    font-size: 1.0625rem;
    font-weight: 700;
    color: var(--stone-900);
    margin-bottom: 0.25rem;
}

.detail-item span,
.detail-item a {
    font-size: 0.9375rem;
    color: var(--stone-600);
    line-height: 1.6;
}

.detail-item a:hover {
    color: var(--emerald-700);
    text-decoration: underline;
}

.map-placeholder {
    background: var(--emerald-800);
    border-radius: var(--radius-lg);
    padding: var(--space-2xl);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-md);
}

.map-icon {
    color: var(--emerald-400);
}

.map-text {
    font-family: var(--font-serif);
    font-size: 1.125rem;
    font-weight: 600;
    color: white;
    line-height: 1.6;
}

.map-link {
    margin-top: var(--space-sm);
}

@media (min-width: 1024px) {
    .visit-grid {
        grid-template-columns: 1.1fr 0.9fr;
        gap: var(--space-3xl);
    }
}

/* ─── Contact ─── */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-2xl);
    align-items: start;
}

.contact-content {
    max-width: 480px;
}

.contact-lead {
    font-size: 1.0625rem;
    color: var(--stone-600);
    line-height: 1.8;
}

.contact-form-wrap {
    background: white;
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
    border: 1px solid var(--stone-200);
}

.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(--stone-600);
    margin-bottom: var(--space-xs);
}

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

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

.form-input:focus {
    border-color: var(--emerald-500);
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.15);
    background: white;
}

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

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

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

@media (min-width: 1024px) {
    .contact-grid {
        grid-template-columns: 0.9fr 1.1fr;
        gap: var(--space-3xl);
    }
}

/* ─── Footer ─── */
.footer {
    background: var(--stone-950);
    color: var(--stone-400);
    padding: var(--space-3xl) 0 var(--space-xl);
}

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

.footer-logo {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    font-family: var(--font-serif);
    font-size: 1.25rem;
    font-weight: 700;
    color: white;
    margin-bottom: var(--space-sm);
}

.footer-logo-icon {
    color: var(--emerald-500);
}

.footer-tagline {
    font-size: 0.9375rem;
    line-height: 1.7;
    max-width: 320px;
}

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

.footer-col strong {
    display: block;
    font-family: var(--font-serif);
    font-size: 1rem;
    font-weight: 700;
    color: white;
    margin-bottom: var(--space-md);
}

.footer-col ul {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.footer-col a,
.footer-col span {
    font-size: 0.9375rem;
    color: var(--stone-400);
    transition: color var(--transition-fast);
}

.footer-col a:hover {
    color: var(--emerald-400);
}

.footer-bottom {
    border-top: 1px solid var(--stone-800);
    padding-top: var(--space-xl);
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    font-size: 0.875rem;
    color: var(--stone-500);
}

@media (min-width: 768px) {
    .footer-top {
        grid-template-columns: 1fr 1fr;
        align-items: center;
    }

    .footer-bottom {
        flex-direction: row;
        justify-content: space-between;
    }
}

/* ─── 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);
    }
}

/* For reduced motion, ensure everything is visible */
@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
    }
}
