/* ============================================
   Megpies Bakery & Cafe — Styles
   Clean minimalist · Terracotta + Sand
   ============================================ */

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

:root {
    --color-terracotta: #B8624A;
    --color-terracotta-dark: #9A4E3A;
    --color-sand: #E8D5C0;
    --color-sand-light: #F5EDE4;
    --color-cream: #FBF8F4;
    --color-warm-white: #FDFCFA;
    --color-dark: #1E1814;
    --color-text: #2C2420;
    --color-text-light: #6B5B52;
    --color-text-muted: #9A887E;
    --color-line: #E5D9CF;
    --color-line-light: #EDE3D9;
    
    --font-display: 'Cormorant Garamond', Georgia, serif;
    --font-body: 'Manrope', -apple-system, sans-serif;
    
    --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
    --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
}

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

body {
    font-family: var(--font-body);
    font-weight: 300;
    color: var(--color-text);
    background-color: var(--color-warm-white);
    line-height: 1.7;
    overflow-x: hidden;
}

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

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

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

/* --- Typography --- */
.section-label {
    display: inline-block;
    font-family: var(--font-body);
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--color-terracotta);
    margin-bottom: 1.25rem;
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 3.25rem);
    font-weight: 300;
    line-height: 1.2;
    color: var(--color-dark);
    letter-spacing: -0.01em;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 clamp(1.5rem, 4vw, 3rem);
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 1rem 2rem;
    border: 1px solid transparent;
    transition: all 0.4s var(--ease-out);
}

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

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

.btn-ghost {
    background-color: transparent;
    color: var(--color-text);
    border-color: var(--color-line);
}

.btn-ghost:hover {
    border-color: var(--color-terracotta);
    color: var(--color-terracotta);
}

/* --- Navbar --- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(253, 252, 250, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--color-line-light);
    transition: background 0.3s ease;
}

.navbar.scrolled {
    background: rgba(253, 252, 250, 0.97);
    box-shadow: 0 1px 0 var(--color-line-light);
}

.nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 clamp(1.5rem, 4vw, 3rem);
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.logo-mark {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 400;
    color: var(--color-terracotta);
    border: 1px solid var(--color-terracotta);
    border-radius: 50%;
}

.logo-text {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 400;
    color: var(--color-dark);
    letter-spacing: 0.02em;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2.5rem;
    list-style: none;
}

.nav-links a {
    font-size: 0.75rem;
    font-weight: 400;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-text-light);
    transition: color 0.3s ease;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--color-terracotta);
    transition: width 0.3s var(--ease-out);
}

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

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

.nav-cta {
    padding: 0.6rem 1.4rem;
    border: 1px solid var(--color-terracotta);
    color: var(--color-terracotta) !important;
    transition: all 0.3s var(--ease-out) !important;
}

.nav-cta::after {
    display: none !important;
}

.nav-cta:hover {
    background: var(--color-terracotta) !important;
    color: #fff !important;
}

/* Mobile nav toggle */
.nav-toggle {
    display: none;
    width: 40px;
    height: 40px;
    position: relative;
}

.hamburger {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 1px;
    background: var(--color-dark);
    transition: all 0.3s var(--ease-out);
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    left: 0;
    width: 100%;
    height: 1px;
    background: var(--color-dark);
    transition: all 0.3s var(--ease-out);
}

.hamburger::before { top: -6px; }
.hamburger::after { top: 6px; }

.nav-toggle[aria-expanded="true"] .hamburger {
    background: transparent;
}

.nav-toggle[aria-expanded="true"] .hamburger::before {
    top: 0;
    transform: rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .hamburger::after {
    top: 0;
    transform: rotate(-45deg);
}

/* --- Hero --- */
.hero {
    padding-top: 72px;
    min-height: 100vh;
    min-height: 100dvh;
    background: var(--color-warm-white);
    overflow: hidden;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: calc(100vh - 72px);
    min-height: calc(100dvh - 72px);
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 clamp(1.5rem, 4vw, 3rem);
    align-items: center;
    gap: 0;
}

.hero-text {
    padding: clamp(4rem, 10vw, 8rem) 0 clamp(4rem, 8vw, 6rem) clamp(0rem, 3vw, 4rem);
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.hero-label {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--color-text-muted);
}

.hero-label .line {
    width: 48px;
    height: 1px;
    background: var(--color-terracotta);
}

.hero-headline {
    font-family: var(--font-display);
    font-size: clamp(2.25rem, 5vw, 4rem);
    font-weight: 300;
    line-height: 1.15;
    color: var(--color-dark);
    letter-spacing: -0.02em;
    max-width: 540px;
}

.hero-desc {
    font-size: 1rem;
    font-weight: 300;
    line-height: 1.8;
    color: var(--color-text-light);
    max-width: 380px;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.hero-image {
    height: 100%;
    min-height: 500px;
}

.hero-img-wrapper {
    position: relative;
    height: 100%;
    width: 100%;
    overflow: hidden;
}

.hero-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-img-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        to bottom,
        transparent 60%,
        rgba(30, 24, 20, 0.08) 100%
    );
    pointer-events: none;
}

/* --- Story --- */
.story {
    padding: clamp(5rem, 12vw, 10rem) 0;
    background: var(--color-cream);
}

.story-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(2rem, 5vw, 6rem);
    align-items: center;
}

.story-content {
    padding-right: 0;
}

.story-content .section-title {
    margin-bottom: 2rem;
}

.story-body {
    font-size: 0.95rem;
    line-height: 1.85;
    color: var(--color-text-light);
    margin-bottom: 1.25rem;
}

.story-image {
    overflow: hidden;
}

.story-image img {
    width: 100%;
    height: clamp(400px, 60vh, 600px);
    object-fit: cover;
}

/* --- Divider --- */
.divider-section {
    padding: 0;
    overflow: hidden;
}

.divider-line {
    width: 100%;
    height: 1px;
    background: var(--color-line);
}

/* --- Menu --- */
.menu {
    padding: clamp(5rem, 12vw, 10rem) 0;
    background: var(--color-warm-white);
}

.menu-header {
    text-align: center;
    max-width: 600px;
    margin: 0 auto clamp(4rem, 8vw, 6rem);
}

.menu-header .section-title {
    margin-bottom: 1.25rem;
}

.menu-intro {
    font-size: 0.95rem;
    line-height: 1.8;
    color: var(--color-text-light);
}

.menu-categories {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: clamp(2rem, 4vw, 4rem);
}

.menu-category {
    padding: clamp(2rem, 3vw, 3rem);
    background: var(--color-cream);
    border: 1px solid var(--color-line-light);
}

.category-title {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--color-dark);
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--color-line);
}

.menu-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.menu-item {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.item-name {
    font-size: 0.85rem;
    font-weight: 400;
    color: var(--color-text);
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.item-dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--color-terracotta);
    flex-shrink: 0;
}

.item-desc {
    font-size: 0.8rem;
    font-weight: 300;
    color: var(--color-text-muted);
    line-height: 1.5;
}

.menu-note {
    text-align: center;
    font-size: 0.78rem;
    font-weight: 300;
    color: var(--color-text-muted);
    margin-top: 3rem;
    letter-spacing: 0.03em;
}

/* --- Space --- */
.space {
    padding: clamp(5rem, 12vw, 10rem) 0;
    background: var(--color-sand-light);
}

.space-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: clamp(2rem, 5vw, 6rem);
    align-items: center;
}

.space-image-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 1rem;
}

.space-img-main {
    overflow: hidden;
}

.space-img-main img {
    width: 100%;
    height: clamp(300px, 45vh, 500px);
    object-fit: cover;
}

.space-img-side {
    overflow: hidden;
    align-self: end;
}

.space-img-side img {
    width: 100%;
    height: clamp(200px, 30vh, 300px);
    object-fit: cover;
}

.space-content .section-title {
    margin-bottom: 2rem;
}

.space-body {
    font-size: 0.95rem;
    line-height: 1.85;
    color: var(--color-text-light);
    margin-bottom: 1.25rem;
}

.space-features {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 2.5rem;
}

.feature-item {
    font-size: 0.72rem;
    font-weight: 400;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-text-light);
    padding: 0.6rem 1rem;
    border: 1px solid var(--color-line);
}

/* --- CTA / Visit --- */
.cta-section {
    padding: clamp(5rem, 12vw, 10rem) 0;
    background: var(--color-dark);
}

.cta-section .section-label {
    color: var(--color-sand);
}

.cta-section .section-title {
    color: #fff;
}

.cta-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(2rem, 5vw, 6rem);
    align-items: start;
}

.cta-content {
    padding-top: 1rem;
}

.cta-content .section-title {
    margin-bottom: 1.5rem;
}

.cta-details {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.detail-block h4 {
    font-family: var(--font-body);
    font-size: 0.68rem;
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--color-terracotta);
    margin-bottom: 0.6rem;
}

.detail-block p {
    font-size: 0.95rem;
    font-weight: 300;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.75);
}

.detail-block a {
    color: rgba(255, 255, 255, 0.75);
    transition: color 0.3s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.detail-block a:hover {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.6);
}

/* --- Footer --- */
.footer {
    padding: 3rem 0;
    background: var(--color-dark);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.footer-grid {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    flex-wrap: wrap;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.footer-brand .logo-mark {
    width: 28px;
    height: 28px;
    font-size: 1rem;
    border-color: var(--color-terracotta);
}

.footer-brand .logo-text {
    font-family: var(--font-display);
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.85);
}

.footer-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.footer-links a {
    font-size: 0.72rem;
    font-weight: 400;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.45);
    transition: color 0.3s ease;
}

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

.footer-copy {
    text-align: right;
}

.footer-copy p {
    font-size: 0.72rem;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.3);
    line-height: 1.7;
}

/* --- Scroll reveal (progressive enhancement) --- */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}

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

/* --- Responsive --- */
@media (max-width: 900px) {
    .nav-links {
        position: fixed;
        top: 72px;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(253, 252, 250, 0.98);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        flex-direction: column;
        justify-content: center;
        gap: 2rem;
        padding: 2rem;
        transform: translateX(100%);
        transition: transform 0.5s var(--ease-out);
    }

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

    .nav-links a {
        font-size: 0.85rem;
    }

    .nav-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .hero-grid {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .hero-text {
        padding: clamp(5rem, 12vw, 7rem) 0 clamp(3rem, 6vw, 5rem);
        order: 2;
    }

    .hero-image {
        min-height: 45vh;
        order: 1;
    }

    .hero-img-wrapper {
        height: 100%;
    }

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

    .story-content {
        padding-right: 0;
        order: 2;
    }

    .story-image {
        order: 1;
    }

    .story-image img {
        height: clamp(300px, 50vh, 450px);
    }

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

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

    .space-image-grid {
        grid-template-columns: 1fr;
    }

    .space-img-side {
        align-self: stretch;
    }

    .space-img-side img {
        height: clamp(200px, 30vh, 300px);
    }

    .cta-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .cta-content {
        padding-top: 0;
    }

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

    .footer-copy {
        text-align: center;
    }

    .footer-links {
        flex-wrap: wrap;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .hero-actions {
        flex-direction: column;
    }

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

    .hero-label {
        font-size: 0.65rem;
    }

    .space-features {
        gap: 0.5rem;
    }

    .feature-item {
        font-size: 0.68rem;
        padding: 0.5rem 0.75rem;
    }
}

/* --- Reduced motion --- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
    
    .reveal {
        opacity: 1;
        transform: none;
    }
}
