/* ============================================
   Mr. Ed's Espresso & Juice — Styles
   Palette: Terracotta + Sand
   ============================================ */

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

:root {
    --color-terracotta: #C05A36;
    --color-terracotta-dark: #A04828;
    --color-terracotta-light: #D4845E;
    --color-sand: #F5EDE3;
    --color-sand-light: #FAF6F1;
    --color-sand-dark: #E8DDD0;
    --color-charcoal: #2A2522;
    --color-warm-gray: #5C534D;
    --color-light-gray: #9E948D;
    --color-white: #FFFFFF;
    --color-cream: #FDF9F5;

    --font-body: 'Manrope', sans-serif;
    --font-display: 'Playfair Display', serif;

    --fs-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
    --fs-sm: clamp(0.875rem, 0.8rem + 0.35vw, 1rem);
    --fs-md: clamp(1rem, 0.9rem + 0.5vw, 1.125rem);
    --fs-lg: clamp(1.125rem, 1rem + 0.6vw, 1.375rem);
    --fs-xl: clamp(1.5rem, 1.2rem + 1.5vw, 2.25rem);
    --fs-2xl: clamp(2rem, 1.5rem + 2.5vw, 3.5rem);
    --fs-3xl: clamp(2.5rem, 1.8rem + 3.5vw, 5rem);

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

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

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

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-body);
    font-weight: 300;
    font-size: var(--fs-md);
    line-height: 1.7;
    color: var(--color-charcoal);
    background-color: var(--color-cream);
}

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

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

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 var(--space-md);
}

/* ============================================
   Typography
   ============================================ */

.section-label {
    display: inline-block;
    font-size: var(--fs-xs);
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--color-terracotta);
    margin-bottom: var(--space-sm);
}

.section-title {
    font-family: var(--font-display);
    font-size: var(--fs-2xl);
    font-weight: 400;
    line-height: 1.15;
    color: var(--color-charcoal);
    margin-bottom: var(--space-md);
}

.section-title .accent {
    color: var(--color-terracotta);
    font-style: italic;
}

.section-subtitle {
    font-size: var(--fs-lg);
    color: var(--color-warm-gray);
    max-width: 560px;
    line-height: 1.6;
}

.lead {
    font-size: var(--fs-md);
    line-height: 1.8;
    color: var(--color-warm-gray);
    margin-bottom: var(--space-sm);
}

/* ============================================
   Buttons
   ============================================ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-xs);
    font-family: var(--font-body);
    font-size: var(--fs-sm);
    font-weight: 500;
    letter-spacing: 0.04em;
    padding: 0.875rem 2rem;
    border-radius: var(--radius-sm);
    border: 1.5px solid transparent;
    cursor: pointer;
    transition: all var(--transition);
    white-space: nowrap;
}

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

.btn--primary:hover {
    background-color: var(--color-terracotta-dark);
    border-color: var(--color-terracotta-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(192, 90, 54, 0.3);
}

.btn--outline {
    background-color: transparent;
    color: var(--color-terracotta);
    border-color: var(--color-terracotta);
}

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

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

.btn--ghost:hover {
    border-color: var(--color-white);
    background-color: rgba(255, 255, 255, 0.1);
}

.btn--full {
    width: 100%;
}

/* ============================================
   Navbar
   ============================================ */

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: var(--space-sm) 0;
    transition: all var(--transition);
    background: transparent;
}

.navbar.scrolled {
    background: rgba(253, 249, 245, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 var(--color-sand-dark);
    padding: 0.75rem 0;
}

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

.logo {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.logo-text {
    font-family: var(--font-display);
    font-size: var(--fs-lg);
    font-weight: 600;
    color: var(--color-charcoal);
}

.logo-sub {
    font-size: var(--fs-xs);
    font-weight: 400;
    letter-spacing: 0.08em;
    color: var(--color-warm-gray);
    text-transform: uppercase;
}

.navbar .logo-text,
.navbar .logo-sub {
    color: var(--color-white);
}

.navbar.scrolled .logo-text,
.navbar.scrolled .logo-sub {
    color: var(--color-charcoal);
}

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

.nav-links a {
    font-size: var(--fs-sm);
    font-weight: 400;
    letter-spacing: 0.04em;
    color: rgba(255, 255, 255, 0.85);
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: currentColor;
    transition: width var(--transition);
}

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

.nav-links a:hover {
    color: var(--color-white);
}

.navbar.scrolled .nav-links a {
    color: var(--color-warm-gray);
}

.navbar.scrolled .nav-links a:hover {
    color: var(--color-terracotta);
}

/* Mobile Toggle */
.mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.mobile-toggle span {
    display: block;
    width: 24px;
    height: 1.5px;
    background: var(--color-white);
    transition: all var(--transition);
}

.navbar.scrolled .mobile-toggle span {
    background: var(--color-charcoal);
}

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

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

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

/* ============================================
   Hero
   ============================================ */

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

.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(42, 37, 34, 0.55) 0%,
        rgba(42, 37, 34, 0.4) 50%,
        rgba(42, 37, 34, 0.7) 100%
    );
}

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

.hero-eyebrow {
    font-size: var(--fs-xs);
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--color-terracotta-light);
    margin-bottom: var(--space-sm);
}

.hero-title {
    font-family: var(--font-display);
    font-size: var(--fs-3xl);
    font-weight: 400;
    line-height: 1.1;
    color: var(--color-white);
    margin-bottom: var(--space-md);
}

.hero-title .accent {
    color: var(--color-terracotta-light);
    font-style: italic;
}

.hero-subtitle {
    font-size: var(--fs-lg);
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.7;
    margin-bottom: var(--space-md);
    max-width: 520px;
}

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

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

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

/* ============================================
   About
   ============================================ */

.about {
    padding: var(--space-2xl) 0;
    background: var(--color-cream);
}

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

.about-image img {
    width: 100%;
    height: 560px;
    object-fit: cover;
    border-radius: var(--radius-md);
}

.about-content .section-title {
    margin-bottom: var(--space-sm);
}

.about-stats {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-top: var(--space-md);
    padding-top: var(--space-md);
    border-top: 1px solid var(--color-sand-dark);
}

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

.stat-number {
    font-family: var(--font-display);
    font-size: var(--fs-xl);
    color: var(--color-terracotta);
    line-height: 1;
}

.stat-label {
    font-size: var(--fs-xs);
    color: var(--color-light-gray);
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.stat-divider {
    width: 1px;
    height: 40px;
    background: var(--color-sand-dark);
}

/* ============================================
   Divider Section
   ============================================ */

.divider-section {
    padding: var(--space-lg) 0;
    background: var(--color-sand);
}

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

.divider-text {
    font-family: var(--font-display);
    font-size: var(--fs-xl);
    font-weight: 400;
    font-style: italic;
    color: var(--color-warm-gray);
    margin-bottom: var(--space-sm);
}

.divider-line {
    width: 60px;
    height: 1px;
    background: var(--color-terracotta);
    margin: 0 auto;
}

/* ============================================
   Menu
   ============================================ */

.menu {
    padding: var(--space-2xl) 0;
    background: var(--color-cream);
}

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

.section-header .section-subtitle {
    margin: 0 auto;
}

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

.menu-card {
    padding: var(--space-md);
    background: var(--color-white);
    border-radius: var(--radius-md);
    border: 1px solid var(--color-sand-dark);
    transition: all var(--transition);
}

.menu-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(42, 37, 34, 0.08);
    border-color: var(--color-terracotta-light);
}

.menu-card-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    background: var(--color-sand);
    color: var(--color-terracotta);
    margin-bottom: var(--space-sm);
}

.menu-card-title {
    font-family: var(--font-display);
    font-size: var(--fs-lg);
    font-weight: 600;
    color: var(--color-charcoal);
    margin-bottom: var(--space-xs);
}

.menu-card-desc {
    font-size: var(--fs-sm);
    color: var(--color-warm-gray);
    line-height: 1.7;
}

/* ============================================
   Underground
   ============================================ */

.underground {
    padding: var(--space-2xl) 0;
    background: var(--color-charcoal);
}

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

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

.underground-content .lead {
    color: rgba(255, 255, 255, 0.7);
}

.underground-content p {
    color: rgba(255, 255, 255, 0.65);
    margin-bottom: var(--space-sm);
    font-size: var(--fs-md);
}

.underground-features {
    list-style: none;
    margin-top: var(--space-md);
    display: grid;
    gap: var(--space-sm);
}

.underground-features li {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: var(--fs-md);
    color: rgba(255, 255, 255, 0.8);
}

.underground-features li svg {
    color: var(--color-terracotta-light);
    flex-shrink: 0;
}

.underground-images {
    position: relative;
    padding-left: var(--space-md);
}

.ug-img {
    border-radius: var(--radius-md);
    overflow: hidden;
}

.ug-img--main img {
    width: 100%;
    height: 520px;
    object-fit: cover;
}

.ug-img--accent {
    position: absolute;
    bottom: -40px;
    left: -40px;
    border: 4px solid var(--color-charcoal);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.ug-img--accent img {
    width: 260px;
    height: 180px;
    object-fit: cover;
}

/* ============================================
   Gallery
   ============================================ */

.gallery {
    padding: var(--space-lg) 0;
    background: var(--color-sand);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-sm);
}

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

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

.gallery-item:hover img {
    transform: scale(1.05);
}

/* ============================================
   Visit / Contact
   ============================================ */

.visit {
    padding: var(--space-2xl) 0;
    background: var(--color-cream);
}

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

.contact-details {
    display: grid;
    gap: var(--space-md);
    margin-top: var(--space-lg);
}

.contact-item {
    display: flex;
    gap: var(--space-sm);
}

.contact-item svg {
    color: var(--color-terracotta);
    flex-shrink: 0;
    margin-top: 2px;
}

.contact-item strong {
    display: block;
    font-weight: 500;
    font-size: var(--fs-sm);
    color: var(--color-charcoal);
    margin-bottom: 4px;
    letter-spacing: 0.04em;
}

.contact-item p {
    font-size: var(--fs-sm);
    color: var(--color-warm-gray);
    line-height: 1.7;
}

.contact-item a {
    color: var(--color-terracotta);
}

.contact-item a:hover {
    text-decoration: underline;
}

/* Form */
.visit-form-wrapper {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    padding: var(--space-md);
    border: 1px solid var(--color-sand-dark);
}

.visit-form h3 {
    font-family: var(--font-display);
    font-size: var(--fs-xl);
    font-weight: 400;
    color: var(--color-charcoal);
    margin-bottom: var(--space-xs);
}

.visit-form > p {
    font-size: var(--fs-sm);
    color: var(--color-light-gray);
    margin-bottom: var(--space-md);
}

.form-group {
    margin-bottom: var(--space-sm);
}

.form-group label {
    display: block;
    font-size: var(--fs-xs);
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-warm-gray);
    margin-bottom: 6px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    font-family: var(--font-body);
    font-size: var(--fs-md);
    font-weight: 300;
    color: var(--color-charcoal);
    background: var(--color-sand-light);
    border: 1px solid var(--color-sand-dark);
    border-radius: var(--radius-sm);
    outline: none;
    transition: border-color var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--color-terracotta);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--color-light-gray);
}

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

.form-success {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: var(--space-lg) var(--space-md);
    text-align: center;
    color: var(--color-terracotta);
}

.form-success svg {
    color: var(--color-terracotta);
}

.form-success p {
    font-size: var(--fs-md);
    color: var(--color-warm-gray);
}

/* ============================================
   Footer
   ============================================ */

.footer {
    padding: var(--space-lg) 0 var(--space-md);
    background: var(--color-charcoal);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1.5fr;
    gap: var(--space-lg);
    padding-bottom: var(--space-lg);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

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

.footer-brand .logo-sub {
    color: rgba(255, 255, 255, 0.5);
    display: block;
    margin-top: 4px;
    font-size: var(--fs-xs);
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.footer-tagline {
    margin-top: var(--space-sm);
    font-size: var(--fs-sm);
    color: rgba(255, 255, 255, 0.5);
    line-height: 1.6;
    max-width: 280px;
}

.footer-links,
.footer-contact {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.footer-links strong,
.footer-contact strong {
    font-size: var(--fs-xs);
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.4);
    margin-bottom: var(--space-xs);
}

.footer-links a {
    font-size: var(--fs-sm);
    color: rgba(255, 255, 255, 0.7);
}

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

.footer-contact p {
    font-size: var(--fs-sm);
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.7;
}

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

.footer-bottom {
    padding-top: var(--space-md);
    text-align: center;
}

.footer-bottom p {
    font-size: var(--fs-xs);
    color: rgba(255, 255, 255, 0.3);
}

/* ============================================
   Responsive
   ============================================ */

@media (max-width: 1024px) {
    .about-grid,
    .underground-grid,
    .visit-grid {
        grid-template-columns: 1fr;
        gap: var(--space-md);
    }

    .about-image {
        order: -1;
    }

    .about-image img {
        height: 400px;
    }

    .underground-images {
        padding-left: 0;
        order: -1;
    }

    .ug-img--main img {
        height: 400px;
    }

    .ug-img--accent {
        display: none;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: var(--space-md);
    }

    .footer-brand {
        grid-column: 1 / -1;
    }
}

@media (max-width: 768px) {
    .mobile-toggle {
        display: flex;
        z-index: 1001;
    }

    .nav-links {
        position: fixed;
        inset: 0;
        background: rgba(42, 37, 34, 0.97);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        flex-direction: column;
        justify-content: center;
        gap: var(--space-md);
        opacity: 0;
        visibility: hidden;
        transition: all var(--transition);
    }

    .nav-links.active {
        opacity: 1;
        visibility: visible;
    }

    .nav-links a {
        font-size: var(--fs-lg);
        color: rgba(255, 255, 255, 0.85);
    }

    .nav-links a:hover {
        color: var(--color-white);
    }

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

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .hero-title {
        font-size: var(--fs-2xl);
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: var(--space-md);
    }

    .footer-brand {
        grid-column: auto;
    }
}

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

    .hero-actions {
        flex-direction: column;
    }

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

/* ============================================
   Reduced Motion
   ============================================ */

@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; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }
}
