/* ==========================================================================
   Ember & Thyme — Café Website
   Mobile-first. Dark, cinematic, atmospheric.
   ========================================================================== */

:root {
  --color-bg: #0D0C09;
  --color-brown: #17130E;
  --color-cream: #F1E9D8;
  --color-olive: #687052;
  --color-olive-light: #7c866a;
  --color-amber: #8A5A35;

  --font-serif: 'Cormorant Garamond', Georgia, serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --container-max: 1320px;
  --pad-mobile: 22px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body, h1, h2, h3, h4, p, ul, figure { margin: 0; }
ul { padding: 0; list-style: none; }
img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
button { font: inherit; background: none; border: none; cursor: pointer; padding: 0; }

body {
  background: var(--color-bg);
  color: var(--color-cream);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--pad-mobile);
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--color-cream);
  color: var(--color-brown);
  padding: 12px 18px;
  z-index: 999;
}
.skip-link:focus { left: 0; }

/* ---------- Typography ---------- */
.eyebrow {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-amber);
  margin-bottom: 14px;
}

.section-heading {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(2.1rem, 6.5vw, 2.9rem);
  line-height: 1.14;
  letter-spacing: -0.01em;
  margin-bottom: 18px;
}

.section-desc {
  font-size: 1rem;
  opacity: 0.72;
  max-width: 42ch;
  line-height: 1.7;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 15px 28px;
  border-radius: 4px;
  transition: transform 0.3s var(--ease), background-color 0.3s var(--ease), color 0.3s var(--ease), border-color 0.3s var(--ease);
  white-space: nowrap;
}

.btn-primary {
  background: var(--color-olive);
  color: var(--color-cream);
  border: 1px solid var(--color-olive);
}
.btn-primary:hover {
  background: var(--color-olive-light);
  transform: translateY(-2px);
}

.btn-secondary {
  background: transparent;
  color: var(--color-cream);
  border: 1px solid rgba(241, 233, 216, 0.55);
}
.btn-secondary:hover {
  background: rgba(241, 233, 216, 0.1);
  border-color: var(--color-cream);
  transform: translateY(-2px);
}

/* ---------- Header (overlays hero) ---------- */
.site-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  padding: 22px 0;
}

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

.logo {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
  color: var(--color-cream);
}
.logo-line-1 {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  font-weight: 500;
  letter-spacing: 0.01em;
}
.logo-line-2 {
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  opacity: 0.75;
  margin-top: 2px;
}

.nav-desktop { display: none; }

/* Hamburger */
.hamburger {
  width: 28px;
  height: 18px;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  z-index: 210;
}
.hamburger span {
  display: block;
  height: 1.5px;
  width: 100%;
  background: var(--color-cream);
  border-radius: 2px;
  transition: transform 0.35s var(--ease), opacity 0.25s var(--ease);
}
.hamburger[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}
.hamburger[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}
.hamburger[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* ---------- Mobile Nav Overlay ---------- */
.mobile-nav {
  position: fixed;
  inset: 0;
  background: var(--color-brown);
  color: var(--color-cream);
  z-index: 200;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease), visibility 0.4s;
  display: flex;
  align-items: center;
}
.mobile-nav.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.mobile-nav-inner {
  width: 100%;
  padding: 0 var(--pad-mobile);
}

.mobile-nav ul {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 60px;
}

.mobile-nav a {
  font-family: var(--font-serif);
  font-size: 2.4rem;
  font-weight: 500;
  display: inline-block;
  padding: 10px 0;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
}
.mobile-nav.is-open a {
  opacity: 1;
  transform: translateY(0);
}
.mobile-nav.is-open ul li:nth-child(1) a { transition-delay: 0.08s; }
.mobile-nav.is-open ul li:nth-child(2) a { transition-delay: 0.14s; }
.mobile-nav.is-open ul li:nth-child(3) a { transition-delay: 0.2s; }
.mobile-nav.is-open ul li:nth-child(4) a { transition-delay: 0.26s; }

.mobile-nav-footer {
  opacity: 0;
  transition: opacity 0.6s var(--ease) 0.3s;
}
.mobile-nav.is-open .mobile-nav-footer { opacity: 1; }

.mobile-nav-meta {
  margin-top: 18px;
  font-size: 13px;
  opacity: 0.55;
}

.no-scroll { overflow: hidden; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
}

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

.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0;
  transform: scale(1.04);
  transition: opacity 1.4s var(--ease), transform 1.8s var(--ease);
}
.hero-img.is-loaded {
  opacity: 1;
  transform: scale(1);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(10, 9, 7, 0.45) 0%,
    rgba(10, 9, 7, 0.45) 45%,
    rgba(10, 9, 7, 0.7) 75%,
    rgba(10, 9, 7, 0.88) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 5;
  padding-bottom: 76px;
  padding-top: 140px;
}

.hero-heading {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(2.6rem, 11vw, 3.2rem);
  line-height: 1.08;
  letter-spacing: -0.01em;
  margin-bottom: 20px;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.35);
}

.hero-desc {
  font-size: 1.02rem;
  opacity: 0.85;
  max-width: 34ch;
  margin-bottom: 26px;
  line-height: 1.65;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.scroll-indicator {
  position: relative;
  z-index: 5;
  align-self: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding-bottom: 26px;
  color: var(--color-cream);
  opacity: 0.65;
  transition: opacity 0.3s var(--ease);
}
.scroll-indicator:hover { opacity: 1; }
.scroll-indicator span {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.scroll-indicator svg {
  width: 12px;
  height: 18px;
  animation: scroll-bob 2.6s ease-in-out infinite;
}

@keyframes scroll-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(4px); }
}

/* ---------- About (cream interlude) ---------- */
.about {
  padding: 70px 0;
  background: var(--color-cream);
  color: var(--color-brown);
}

.about .eyebrow { color: var(--color-amber); }

.about .section-desc { opacity: 0.68; }

.section-head { margin-bottom: 44px; }

.feature-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
}

.feature {
  border-top: 1px solid rgba(23, 19, 14, 0.14);
  padding-top: 26px;
}

.feature-num {
  display: block;
  font-family: var(--font-serif);
  font-size: 0.9rem;
  color: var(--color-amber);
  margin-bottom: 18px;
}

.feature-icon {
  display: inline-flex;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  color: var(--color-olive);
  margin-bottom: 18px;
}
.feature-icon svg { width: 100%; height: 100%; }

.feature h3 {
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.feature p {
  opacity: 0.68;
  max-width: 34ch;
}

/* ---------- Menu ---------- */
.menu {
  padding: 70px 0;
  background: var(--color-bg);
}

.menu-grid {
  display: flex;
  flex-direction: column;
  gap: 46px;
}

.menu-category-title {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 500;
  margin-bottom: 20px;
  color: var(--color-cream);
}

.menu-list li {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(241, 233, 216, 0.12);
}
.menu-list li:first-child { border-top: 1px solid rgba(241, 233, 216, 0.12); }

.menu-item-name {
  font-size: 1rem;
  white-space: nowrap;
  opacity: 0.9;
}

.menu-dots {
  flex: 1;
  border-bottom: 1px dotted rgba(241, 233, 216, 0.28);
  transform: translateY(-4px);
}

.menu-price {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-style: italic;
  color: var(--color-amber);
  white-space: nowrap;
}

.menu-cta {
  text-align: center;
  margin-top: 50px;
}

/* ---------- Story (full-bleed image) ---------- */
.story {
  padding: 0 0 70px;
  background: var(--color-bg);
}

.story-image {
  width: 100%;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  margin-bottom: 44px;
}
.story-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.story-text {
  font-family: var(--font-serif);
  font-weight: 400;
  font-style: italic;
  font-size: clamp(1.7rem, 6.5vw, 2.1rem);
  line-height: 1.32;
  color: var(--color-cream);
}

/* ---------- Visit ---------- */
.visit {
  padding: 70px 0;
  background: var(--color-brown);
}

.visit-grid {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.visit-block {
  margin-bottom: 26px;
}
.visit-block h3 {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-olive-light);
  margin-bottom: 10px;
}
.visit-block p {
  opacity: 0.82;
  margin-bottom: 4px;
  display: flex;
  gap: 14px;
}

.hours-days { min-width: 90px; opacity: 0.55; font-size: 0.9rem; }
.hours-time { font-family: var(--font-serif); font-style: italic; }

.visit-copy .btn { margin-top: 8px; }

.visit-map {
  border-radius: 4px;
  overflow: hidden;
}

.map-placeholder {
  background: var(--color-bg);
  background-image:
    linear-gradient(rgba(241,233,216,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(241,233,216,0.05) 1px, transparent 1px);
  background-size: 32px 32px;
  aspect-ratio: 4 / 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--color-amber);
}
.map-pin { width: 34px; height: 34px; }
.map-pin svg { width: 100%; height: 100%; }
.map-label {
  font-family: var(--font-sans);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-cream);
  opacity: 0.5;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--color-brown);
  color: var(--color-cream);
  padding: 44px 0 50px;
  border-top: 1px solid rgba(241, 233, 216, 0.08);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 26px;
  align-items: flex-start;
}

.footer-logo {
  font-family: var(--font-serif);
  font-size: 1.3rem;
}

.footer-links {
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
}
.footer-links a {
  font-size: 13px;
  opacity: 0.65;
  transition: opacity 0.25s var(--ease);
}
.footer-links a:hover { opacity: 1; }

.footer-copy {
  font-size: 12px;
  opacity: 0.45;
}

/* ---------- Scroll Reveal ---------- */
.reveal-up, .reveal-fade {
  opacity: 0;
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}
.reveal-up { transform: translateY(28px); }
.reveal-fade { transform: none; }
.reveal-up.is-visible, .reveal-fade.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Hero copy staggers in on load, not on scroll */
.hero-content .reveal-up { transition-delay: 0s; }
.hero-content .eyebrow.reveal-up { transition-delay: 0.1s; }
.hero-content .hero-heading.reveal-up { transition-delay: 0.25s; }
.hero-content .hero-desc.reveal-up { transition-delay: 0.5s; }
.hero-content .hero-actions.reveal-up { transition-delay: 0.68s; }

@media (prefers-reduced-motion: reduce) {
  .reveal-up, .reveal-fade, .mobile-nav, .mobile-nav a, .mobile-nav-footer, .btn, .hamburger span, .hero-img, .scroll-indicator svg {
    transition: none !important;
    animation: none !important;
  }
  html { scroll-behavior: auto; }
}

/* ==========================================================================
   Tablet
   ========================================================================== */
@media (min-width: 640px) {
  :root { --pad-mobile: 40px; }

  .feature-grid {
    grid-template-columns: 1fr 1fr;
    gap: 50px;
  }

  .menu-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .menu-grid > :first-child { grid-column: 1 / -1; }

  .story-image { aspect-ratio: 16 / 10; }
}

/* ==========================================================================
   Desktop
   ========================================================================== */
@media (min-width: 1024px) {
  :root { --pad-mobile: 56px; }

  body { font-size: 17px; }

  .site-header { padding: 34px 0; }

  .nav-desktop {
    display: flex;
    align-items: center;
    gap: 44px;
  }
  .nav-desktop ul {
    display: flex;
    gap: 40px;
  }
  .nav-desktop a {
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    position: relative;
    color: var(--color-cream);
  }
  .nav-desktop ul a::after {
    content: '';
    position: absolute;
    left: 0; right: 0; bottom: -6px;
    height: 1px;
    background: var(--color-cream);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s var(--ease);
  }
  .nav-desktop ul a:hover::after { transform: scaleX(1); }

  .hamburger { display: none; }

  /* Hero: text lower-left, image dominant */
  .hero-content {
    padding-bottom: 110px;
    padding-top: 0;
  }
  .hero-content .container { max-width: 640px; margin-left: max(56px, calc((100% - var(--container-max)) / 2 + 56px)); margin-right: 0; }
  .hero-heading { font-size: clamp(3.4rem, 5vw, 4.6rem); }
  .hero-desc { max-width: 38ch; }

  /* About: horizontal layout */
  .about { padding: 130px 0; }
  .about .container {
    display: grid;
    grid-template-columns: 0.85fr 1.15fr;
    gap: 90px;
    align-items: start;
  }
  .section-head { margin-bottom: 0; }
  .feature-grid { gap: 60px; align-content: start; }

  /* Menu: three columns */
  .menu { padding: 130px 0; }
  .menu .section-head { max-width: 640px; margin-left: auto; margin-right: auto; text-align: center; margin-bottom: 70px; }
  .menu .eyebrow, .menu .section-heading { text-align: center; }
  .menu-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 60px;
  }
  .menu-grid > :first-child { grid-column: auto; }

  /* Story: cinematic, wider aspect */
  .story { padding: 0 0 130px; }
  .story-image { aspect-ratio: 21 / 9; margin-bottom: 60px; }
  .story .container { text-align: center; }
  .story-text { max-width: 900px; margin: 0 auto; }

  /* Visit */
  .visit { padding: 130px 0; }
  .visit-grid {
    flex-direction: row;
    gap: 90px;
    align-items: center;
  }
  .visit-copy { flex: 1; }
  .visit-map { flex: 1.1; }
  .map-placeholder { aspect-ratio: 4 / 4; }

  .footer-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

@media (min-width: 1024px) and (hover: hover) {
  .btn-primary:hover, .btn-secondary:hover {
    transform: translateY(-3px);
  }
}
