/* ============================================================
   MAGNOLIA CAFÉ — DESIGN SYSTEM
   ------------------------------------------------------------
   Color tokens
   --espresso   #3A2A1E   deep brown — headlines, wordmark
   --coffee     #6B4A32   warm brown — secondary text
   --sage       #71805B   muted olive-sage — accents, dividers
   --sage-deep  #4E5A3E   darker sage — footer, buttons
   --cream      #F1E9DA   warm plaster cream — page background
   --cream-lt   #FBF7EF   near-white — cards, flowers
   --gold       #B4832F   brass/gold — accents, hover, prices
   --ink        #241A12   near-black brown — body copy
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Libre+Baskerville:ital,wght@0,400;0,700;1,400&family=Jost:wght@300;400;500;600&family=Caveat:wght@600;700&display=swap');

:root {
  --espresso: #3A2A1E;
  --coffee: #6B4A32;
  --sage: #71805B;
  --sage-deep: #4E5A3E;
  --cream: #F1E9DA;
  --cream-lt: #FBF7EF;
  --gold: #B4832F;
  --ink: #241A12;

  --serif: 'Libre Baskerville', Georgia, serif;
  --sans: 'Jost', -apple-system, BlinkMacSystemFont, sans-serif;
  --hand: 'Caveat', cursive;

  --container: 1180px;
  --radius: 2px;
}

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

html { scroll-behavior: smooth; }

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

body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.6;
  overflow-x: hidden;
}

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

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

.wrap { max-width: var(--container); margin: 0 auto; padding: 0 32px; }

h1, h2, h3 { font-family: var(--serif); color: var(--espresso); font-weight: 700; line-height: 1.15; }

.eyebrow {
  font-family: var(--sans);
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 500;
  display: inline-block;
  margin-bottom: 14px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 30px;
  font-family: var(--sans);
  font-size: 0.92rem;
  letter-spacing: 0.04em;
  border: 1.5px solid var(--espresso);
  border-radius: var(--radius);
  background: transparent;
  color: var(--espresso);
  cursor: pointer;
  transition: background 0.35s ease, color 0.35s ease, border-color 0.35s ease;
}
.btn:hover { background: var(--espresso); color: var(--cream-lt); }
.btn.solid { background: var(--espresso); color: var(--cream-lt); }
.btn.solid:hover { background: var(--gold); border-color: var(--gold); color: var(--espresso); }
.btn.on-dark { border-color: var(--cream-lt); color: var(--cream-lt); }
.btn.on-dark:hover { background: var(--cream-lt); color: var(--espresso); }

/* ---------------- Nav ---------------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 26px 40px;
  transition: padding 0.4s ease, background 0.4s ease, box-shadow 0.4s ease;
}
.nav.scrolled {
  padding: 14px 40px;
  background: rgba(241, 233, 218, 0.94);
  backdrop-filter: blur(8px);
  box-shadow: 0 2px 18px rgba(58, 42, 30, 0.08);
}

.brand { display: flex; align-items: center; gap: 10px; }
.brand svg { width: 34px; height: 34px; flex-shrink: 0; }
.brand-text {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.28rem;
  letter-spacing: 0.02em;
  color: var(--espresso);
}
.nav.scrolled .brand-text,
.nav.scrolled .brand svg .brand-stroke { color: var(--espresso); }
.nav:not(.scrolled) .brand-text { color: var(--cream-lt); }
.nav:not(.scrolled) .brand svg .brand-stroke { stroke: var(--cream-lt); }
.nav:not(.scrolled) .brand svg .brand-fill { fill: var(--cream-lt); }

.nav-links { display: flex; align-items: center; gap: 38px; }
.nav-links a {
  font-size: 0.9rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-weight: 500;
  position: relative;
  padding-bottom: 4px;
}
.nav:not(.scrolled) .nav-links a { color: var(--cream-lt); }
.nav.scrolled .nav-links a { color: var(--espresso); }
.nav-links a::after {
  content: '';
  position: absolute; left: 0; bottom: 0;
  width: 0; height: 1.5px;
  background: var(--gold);
  transition: width 0.3s ease;
}
.nav-links a:hover::after { width: 100%; }

.nav-toggle { display: none; background: none; border: none; cursor: pointer; z-index: 101; }
.nav-toggle span {
  display: block; width: 26px; height: 2px; margin: 5px 0;
  background: var(--espresso);
  transition: transform 0.3s ease, opacity 0.3s ease, background 0.3s ease;
}
.nav:not(.scrolled) .nav-toggle span { background: var(--cream-lt); }

/* ---------------- Hero ---------------- */
.hero {
  position: relative;
  height: 100vh;
  min-height: 640px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}
.hero-img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transform: scale(1.06);
  animation: heroZoom 16s ease-out forwards;
}
@keyframes heroZoom { to { transform: scale(1); } }
.hero::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(36,26,18,0.4) 0%, rgba(36,26,18,0.4) 40%, rgba(36,26,18,0.9) 100%);
}
.hero-content {
  position: relative;
  z-index: 2;
  padding: 0 40px 100px;
  max-width: 760px;
  color: var(--cream-lt);
  opacity: 0;
  animation: heroUp 1s ease 0.4s forwards;
}
@keyframes heroUp { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: translateY(0); } }
.hero-content .eyebrow { color: #EBC878; text-shadow: 0 1px 10px rgba(36,26,18,0.8); font-weight: 600; }
.hero h1 {
  color: var(--cream-lt);
  font-size: clamp(2.6rem, 6vw, 4.6rem);
  margin-bottom: 20px;
}
.hero p {
  font-size: 1.1rem;
  max-width: 480px;
  margin-bottom: 34px;
  color: rgba(251, 247, 239, 0.88);
}
.hero-cta { display: flex; gap: 16px; flex-wrap: wrap; }

.scroll-cue {
  position: absolute;
  bottom: 34px; left: 40px;
  z-index: 2;
  display: flex; align-items: center; gap: 10px;
  color: var(--cream-lt);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.8;
}
.scroll-cue .line { width: 34px; height: 1px; background: var(--cream-lt); position: relative; overflow: hidden; }
.scroll-cue .line::after {
  content: ''; position: absolute; left: -100%; top: 0; bottom: 0; width: 100%;
  background: var(--gold);
  animation: cueSlide 2.2s ease-in-out infinite;
}
@keyframes cueSlide { 50% { left: 100%; } 100% { left: 100%; } }

/* ---------------- Reveal ---------------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.8s ease, transform 0.8s ease; }
.reveal.in { opacity: 1; transform: translateY(0); }
.reveal-d1 { transition-delay: 0.1s; }
.reveal-d2 { transition-delay: 0.22s; }
.reveal-d3 { transition-delay: 0.34s; }

/* ---------------- Section base ---------------- */
section { position: relative; }
.section-pad { padding: 120px 0; }
@media (max-width: 720px) { .section-pad { padding: 80px 0; } }

.section-head { max-width: 620px; margin-bottom: 56px; }
.section-head h2 { font-size: clamp(1.9rem, 3.4vw, 2.6rem); }
.section-head p { color: var(--coffee); font-size: 1.02rem; margin-top: 14px; }

/* ---------------- Story ---------------- */
.story { background: var(--cream); }
.story-grid {
  display: grid;
  grid-template-columns: 0.85fr 1fr;
  gap: 72px;
  align-items: center;
}
.story-img-wrap { position: relative; }
.story-img-wrap img {
  width: 100%;
  border-radius: var(--radius);
  filter: sepia(6%) saturate(105%);
}
.story-img-frame {
  position: absolute;
  top: 22px; left: 22px;
  width: 100%; height: 100%;
  border: 1.5px solid var(--gold);
  z-index: -1;
}
.story-text p { color: var(--coffee); margin-bottom: 18px; font-size: 1.02rem; }
.story-text p:last-of-type { margin-bottom: 0; }
.story-sign { font-family: var(--hand); font-size: 1.7rem; color: var(--espresso); margin-top: 26px; }

@media (max-width: 860px) {
  .story-grid { grid-template-columns: 1fr; gap: 44px; }
  .story-img-frame { display: none; }
}

/* ---------------- Signature divider (wall art recreation) ---------------- */
.motto {
  background: var(--espresso);
  color: var(--cream-lt);
  padding: 96px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.motto .leaf-edge {
  position: absolute; top: -1px; left: 0; right: 0; height: 46px;
  background: repeating-linear-gradient(115deg, var(--sage) 0 26px, var(--sage-deep) 26px 52px);
  clip-path: polygon(0 0,100% 0,100% 40%,95% 100%,90% 45%,85% 100%,80% 45%,75% 100%,70% 45%,65% 100%,60% 45%,55% 100%,50% 45%,45% 100%,40% 45%,35% 100%,30% 45%,25% 100%,20% 45%,15% 100%,10% 45%,5% 100%,0 40%);
}
.motto-text {
  font-family: var(--serif);
  font-weight: 700;
  line-height: 1.05;
  font-size: clamp(2.4rem, 7vw, 5.2rem);
}
.motto-text .small { display: block; font-size: 0.4em; letter-spacing: 0.02em; color: rgba(251,247,239,0.7); font-family: var(--sans); font-weight: 400; text-transform: uppercase; letter-spacing: 0.3em; margin-bottom: 10px; }
.motto-text .accent { color: var(--gold); font-family: var(--hand); font-weight: 600; font-size: 1.1em; }

/* ---------------- Menu ---------------- */
.menu { background: var(--cream-lt); }
.menu-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 48px;
  border-bottom: 1px solid rgba(58,42,30,0.15);
  padding-bottom: 4px;
}
.menu-tab {
  background: none; border: none; cursor: pointer;
  font-family: var(--sans);
  font-size: 0.92rem;
  letter-spacing: 0.03em;
  padding: 10px 4px;
  color: var(--coffee);
  position: relative;
  transition: color 0.3s ease;
}
.menu-tab::after {
  content: '';
  position: absolute; left: 0; bottom: -5px; width: 0; height: 2px;
  background: var(--gold);
  transition: width 0.3s ease;
}
.menu-tab.active { color: var(--espresso); font-weight: 500; }
.menu-tab.active::after { width: 100%; }

.menu-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 60px;
  row-gap: 6px;
}
@media (max-width: 720px) { .menu-grid { grid-template-columns: 1fr; } }

.menu-item {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 14px;
  padding: 18px 0;
  border-bottom: 1px dashed rgba(58,42,30,0.18);
}
.menu-item-name { font-family: var(--serif); font-size: 1.08rem; color: var(--espresso); }
.menu-item-desc { display: block; font-family: var(--sans); font-size: 0.86rem; color: var(--coffee); margin-top: 3px; font-weight: 300; }
.menu-item-price { font-family: var(--sans); color: var(--gold); font-weight: 500; white-space: nowrap; }

.menu-note {
  margin-top: 40px;
  font-size: 0.88rem;
  color: var(--coffee);
  font-style: italic;
}

/* ---------------- Gallery ---------------- */
.gallery { background: var(--cream); }
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 220px;
  gap: 14px;
}
.gallery-item { overflow: hidden; border-radius: var(--radius); cursor: pointer; position: relative; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease; }
.gallery-item:hover img { transform: scale(1.08); }
.gallery-item::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 60%, rgba(36,26,18,0.45) 100%);
  opacity: 0; transition: opacity 0.35s ease;
}
.gallery-item:hover::after { opacity: 1; }
.gallery-item.tall { grid-row: span 2; }
.gallery-item.wide { grid-column: span 2; }
.gallery-placeholder {
  display: flex; align-items: center; justify-content: center;
  background: repeating-linear-gradient(45deg, rgba(58,42,30,0.06), rgba(58,42,30,0.06) 10px, rgba(58,42,30,0.03) 10px, rgba(58,42,30,0.03) 20px);
  color: var(--coffee);
  font-size: 0.82rem;
  text-align: center;
  padding: 16px;
  border: 1px dashed rgba(58,42,30,0.25);
}
@media (max-width: 860px) {
  .gallery-grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 180px; }
  .gallery-item.wide { grid-column: span 2; }
}

/* ---------------- Reviews ---------------- */
.reviews {
  background: var(--sage-deep);
  color: var(--cream-lt);
}
.reviews .section-head h2 { color: var(--cream-lt); }
.reviews .section-head p { color: rgba(251,247,239,0.75); }
.reviews-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}
@media (max-width: 860px) { .reviews-grid { grid-template-columns: 1fr; } }
.review-card {
  background: rgba(251, 247, 239, 0.06);
  border: 1px solid rgba(251, 247, 239, 0.16);
  border-radius: var(--radius);
  padding: 34px 30px;
}
.review-stars { color: var(--gold); letter-spacing: 3px; margin-bottom: 16px; font-size: 0.95rem; }
.review-quote { font-family: var(--serif); font-style: italic; font-size: 1.02rem; line-height: 1.6; margin-bottom: 20px; color: rgba(251,247,239,0.95); }
.review-name { font-size: 0.85rem; letter-spacing: 0.05em; text-transform: uppercase; color: var(--gold); }

/* ---------------- Visit ---------------- */
.visit { background: var(--cream-lt); }
.visit-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 70px;
}
@media (max-width: 860px) { .visit-grid { grid-template-columns: 1fr; gap: 44px; } }

.visit-block { margin-bottom: 34px; }
.visit-block:last-child { margin-bottom: 0; }
.visit-block h3 { font-size: 1.05rem; margin-bottom: 10px; letter-spacing: 0.02em; }
.visit-block p, .visit-block a.line { color: var(--coffee); font-size: 1rem; display: block; }
.visit-block a.line:hover { color: var(--gold); }

.visit-map {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid rgba(58,42,30,0.15);
  min-height: 360px;
}
.visit-map iframe { width: 100%; height: 100%; min-height: 360px; border: 0; filter: sepia(12%) saturate(85%); }

.social-row { display: flex; gap: 16px; margin-top: 8px; }
.social-row a {
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--coffee);
  border-radius: 50%;
  transition: background 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}
.social-row a:hover { background: var(--gold); border-color: var(--gold); color: var(--cream-lt); }

/* ---------------- Footer ---------------- */
footer {
  background: var(--espresso);
  color: rgba(251,247,239,0.75);
  padding: 60px 0 30px;
}
.footer-top {
  display: flex; justify-content: space-between; align-items: flex-start;
  flex-wrap: wrap; gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(251,247,239,0.14);
}
.footer-brand .brand-text { color: var(--cream-lt); }
.footer-tag { font-family: var(--hand); font-size: 1.3rem; color: var(--gold); margin-top: 6px; }
.footer-links { display: flex; gap: 60px; flex-wrap: wrap; }
.footer-col h4 { font-size: 0.82rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--cream-lt); margin-bottom: 16px; font-weight: 500; }
.footer-col a, .footer-col p { display: block; font-size: 0.92rem; margin-bottom: 10px; color: rgba(251,247,239,0.72); }
.footer-col a:hover { color: var(--gold); }
.footer-bottom {
  padding-top: 26px;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px;
  font-size: 0.8rem; color: rgba(251,247,239,0.5);
}

/* ---------------- Mobile nav ---------------- */
@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: fixed; inset: 0;
    background: var(--espresso);
    flex-direction: column;
    justify-content: center;
    gap: 34px;
    transform: translateX(100%);
    transition: transform 0.45s ease;
  }
  .nav-links.open { transform: translateX(0); }
  .nav-links a, .nav.scrolled .nav-links a { color: var(--cream-lt); font-size: 1.1rem; }
  body.menu-open { overflow: hidden; }
}

/* ---------------- Lightbox ---------------- */
.lightbox {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(36,26,18,0.92);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity 0.35s ease;
  padding: 40px;
}
.lightbox.open { opacity: 1; pointer-events: auto; }
.lightbox img { max-width: 90vw; max-height: 85vh; border: 4px solid var(--cream-lt); }
.lightbox-close {
  position: absolute; top: 30px; right: 40px;
  color: var(--cream-lt); font-size: 2rem; cursor: pointer;
  background: none; border: none;
}

/* ---------------- Google rating summary card (v2) ---------------- */
.review-summary {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  background: rgba(180, 131, 47, 0.14);
  border-color: rgba(180, 131, 47, 0.5);
  transition: background 0.3s ease, transform 0.3s ease;
}
.review-summary:hover { background: rgba(180, 131, 47, 0.24); transform: translateY(-3px); }
.review-score { font-family: var(--serif); font-size: 3.6rem; font-weight: 700; line-height: 1; color: var(--cream-lt); margin-bottom: 8px; }

/* v2 fix: placeholder tiles fill their grid cell */
.gallery-item .gallery-placeholder { width: 100%; height: 100%; }
