/* Ember & Oak — café demo */
:root {
  --cream: #faf6f0;
  --cream-dark: #f0e8dc;
  --espresso: #2c1810;
  --espresso-soft: #4a3228;
  --caramel: #c4784a;
  --caramel-light: #e8a87c;
  --sage: #6b7f6a;
  --serif: "Fraunces", Georgia, serif;
  --sans: "DM Sans", system-ui, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --header-h: 76px;
  --container: min(1100px, calc(100% - 2.5rem));
  --shadow: 0 20px 50px rgba(44, 24, 16, 0.12);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--espresso);
  background: var(--cream);
  overflow-x: hidden;
}

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

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

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

ul {
  list-style: none;
}

address {
  font-style: normal;
}

/* Steam animation */
.steam {
  position: fixed;
  bottom: 0;
  left: 50%;
  width: 120px;
  height: 120px;
  margin-left: -60px;
  pointer-events: none;
  z-index: 0;
  opacity: 0.15;
  background: radial-gradient(ellipse at bottom, var(--caramel-light) 0%, transparent 70%);
  animation: steam 6s ease-in-out infinite;
}

@keyframes steam {
  0%, 100% { transform: translateY(0) scale(1); opacity: 0.1; }
  50% { transform: translateY(-30px) scale(1.2); opacity: 0.2; }
}

/* Typography */
.eyebrow {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--caramel);
  margin-bottom: 0.75rem;
}

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

h1 {
  font-size: clamp(2.5rem, 5.5vw, 3.75rem);
  font-weight: 600;
}

h1 em {
  font-style: italic;
  font-weight: 400;
  color: var(--caramel);
}

h2 {
  font-size: clamp(2rem, 3.5vw, 2.75rem);
  margin-bottom: 1rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.6rem;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: 999px;
  transition: transform 0.3s var(--ease), box-shadow 0.3s, background 0.3s;
}

.btn--primary {
  background: var(--espresso);
  color: var(--cream);
  box-shadow: var(--shadow);
}

.btn--primary:hover {
  transform: translateY(-2px);
  background: var(--espresso-soft);
  box-shadow: 0 24px 48px rgba(44, 24, 16, 0.2);
}

.btn--outline {
  border: 2px solid var(--espresso);
  color: var(--espresso);
  background: transparent;
}

.btn--outline:hover {
  background: var(--espresso);
  color: var(--cream);
}

.btn--small {
  padding: 0.55rem 1.1rem;
  font-size: 0.8rem;
  background: var(--caramel);
  color: white;
}

.btn--small:hover {
  background: var(--espresso);
  transform: translateY(-1px);
}

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

/* Header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  height: var(--header-h);
  transition: background 0.35s, box-shadow 0.35s;
}

.header--solid {
  background: rgba(250, 246, 240, 0.94);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 rgba(44, 24, 16, 0.06);
}

.nav {
  max-width: var(--container);
  margin: 0 auto;
  height: 100%;
  padding: 0 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.nav__logo {
  font-family: var(--serif);
  font-size: 1.35rem;
  color: var(--espresso);
}

.nav__logo span {
  font-weight: 400;
  color: var(--caramel);
}

.nav__links {
  display: flex;
  gap: 2rem;
}

.nav__links a {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--espresso-soft);
  position: relative;
  transition: color 0.25s;
}

.nav__links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -3px;
  width: 0;
  height: 2px;
  background: var(--caramel);
  border-radius: 2px;
  transition: width 0.35s var(--ease);
}

.nav__links a:hover {
  color: var(--espresso);
}

.nav__links a:hover::after {
  width: 100%;
}

.nav__actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.nav__menu {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 0.5rem;
}

.nav__menu span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--espresso);
  border-radius: 2px;
  transition: transform 0.3s var(--ease), opacity 0.3s;
}

.nav__menu[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

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

.nav__menu[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Hero */
.hero {
  position: relative;
  z-index: 1;
  max-width: var(--container);
  margin: 0 auto;
  padding: calc(var(--header-h) + 2.5rem) 1.25rem 4rem;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.hero__media {
  position: relative;
}

.hero__media img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 24px;
  box-shadow: var(--shadow);
  animation: heroImg 1.2s var(--ease) both;
}

@keyframes heroImg {
  from {
    opacity: 0;
    transform: scale(1.04);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.hero__float {
  position: absolute;
  bottom: -1rem;
  left: -1rem;
  padding: 1rem 1.25rem;
  background: white;
  border-radius: 16px;
  box-shadow: var(--shadow);
  animation: float 4s ease-in-out infinite;
}

.hero__rating {
  display: block;
  font-family: var(--serif);
  font-size: 1.5rem;
  color: var(--caramel);
  margin-bottom: 0.15rem;
}

.hero__float p {
  font-size: 0.8rem;
  color: var(--espresso-soft);
}

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

.hero__lead {
  font-size: 1.1rem;
  color: var(--espresso-soft);
  max-width: 28rem;
  margin: 1.25rem 0 1.75rem;
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.hero__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.hero__tags li {
  font-size: 0.75rem;
  padding: 0.4rem 0.85rem;
  background: var(--cream-dark);
  border-radius: 999px;
  color: var(--espresso-soft);
}

/* Marquee */
.marquee {
  position: relative;
  z-index: 1;
  background: var(--espresso);
  color: var(--cream);
  padding: 0.85rem 0;
  overflow: hidden;
}

.marquee__track {
  display: flex;
  gap: 2rem;
  width: max-content;
  animation: marquee 22s linear infinite;
}

.marquee__track span {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
}

.marquee__track span:nth-child(even) {
  color: var(--caramel-light);
}

@keyframes marquee {
  to { transform: translateX(-50%); }
}

/* Highlights */
.highlights {
  position: relative;
  z-index: 1;
  max-width: var(--container);
  margin: 0 auto;
  padding: 4rem 1.25rem;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.highlight {
  padding: 2rem 1.5rem;
  background: white;
  border-radius: 20px;
  box-shadow: 0 8px 32px rgba(44, 24, 16, 0.06);
  border: 1px solid rgba(44, 24, 16, 0.05);
  transition: transform 0.4s var(--ease), box-shadow 0.4s;
}

.highlight:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
}

.highlight__icon {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.highlight h3 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

.highlight p {
  font-size: 0.9rem;
  color: var(--espresso-soft);
}

/* Menu section */
.menu {
  position: relative;
  z-index: 1;
  padding: 4rem 0 5rem;
  background: linear-gradient(180deg, var(--cream) 0%, var(--cream-dark) 50%, var(--cream) 100%);
}

.section-head {
  max-width: var(--container);
  margin: 0 auto 2rem;
  padding: 0 1.25rem;
  text-align: center;
}

.section-desc {
  color: var(--espresso-soft);
  max-width: 28rem;
  margin: 0.5rem auto 0;
}

.menu-tabs {
  max-width: var(--container);
  margin: 0 auto 2rem;
  padding: 0 1.25rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
}

.menu-tab {
  padding: 0.6rem 1.25rem;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: 999px;
  color: var(--espresso-soft);
  background: white;
  border: 2px solid transparent;
  transition: all 0.3s var(--ease);
}

.menu-tab:hover {
  border-color: var(--cream-dark);
  color: var(--espresso);
}

.menu-tab.is-active {
  background: var(--espresso);
  color: var(--cream);
  border-color: var(--espresso);
  transform: scale(1.02);
}

.menu-grid {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.25rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
  transition: opacity 0.2s;
}

.menu-grid.is-switching {
  opacity: 0.5;
}

.menu-item {
  position: relative;
  padding: 1.35rem 1.5rem;
  background: white;
  border-radius: 16px;
  border: 1px solid rgba(44, 24, 16, 0.06);
  transition: transform 0.35s var(--ease), box-shadow 0.35s;
}

.menu-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.menu-item__badge {
  position: absolute;
  top: 1rem;
  right: 3rem;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.25rem 0.5rem;
  background: var(--caramel-light);
  color: var(--espresso);
  border-radius: 4px;
}

.menu-item__top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 0.35rem;
}

.menu-item h3 {
  font-size: 1.1rem;
  font-family: var(--serif);
}

.menu-item__price {
  font-weight: 600;
  color: var(--caramel);
  white-space: nowrap;
}

.menu-item p {
  font-size: 0.88rem;
  color: var(--espresso-soft);
  padding-right: 2rem;
}

.menu-item__fav {
  position: absolute;
  bottom: 1rem;
  right: 1rem;
  font-size: 1.25rem;
  color: var(--cream-dark);
  transition: transform 0.3s var(--ease), color 0.25s;
}

.menu-item__fav:hover {
  transform: scale(1.2);
}

.menu-item__fav.is-on {
  color: #c45;
  animation: heartPop 0.4s var(--ease);
}

@keyframes heartPop {
  0% { transform: scale(1); }
  50% { transform: scale(1.35); }
  100% { transform: scale(1); }
}

/* Story */
.story {
  position: relative;
  z-index: 1;
  padding: 5rem 0;
}

.story__grid {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.25rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.story__imgs {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 1rem;
}

.story__imgs img {
  width: 100%;
  object-fit: cover;
  border-radius: 16px;
  box-shadow: var(--shadow);
  transition: transform 0.6s var(--ease);
}

.story__imgs img:first-child {
  grid-row: span 2;
  aspect-ratio: 3 / 4;
}

.story__imgs img:last-child {
  aspect-ratio: 1;
  margin-top: 2rem;
}

.story__imgs img:hover {
  transform: scale(1.03);
}

.story__copy p {
  color: var(--espresso-soft);
  margin-bottom: 1rem;
}

.story blockquote {
  margin-top: 2rem;
  padding: 1.5rem;
  background: white;
  border-left: 4px solid var(--caramel);
  border-radius: 0 12px 12px 0;
}

.story blockquote p {
  font-family: var(--serif);
  font-size: 1.15rem;
  font-style: italic;
  color: var(--espresso);
  margin-bottom: 0.5rem;
}

.story cite {
  font-size: 0.8rem;
  color: var(--espresso-soft);
}

/* Gallery */
.gallery {
  position: relative;
  z-index: 1;
  max-width: var(--container);
  margin: 0 auto 4rem;
  padding: 0 1.25rem;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
}

.gallery img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 12px;
  transition: transform 0.5s var(--ease), filter 0.4s;
}

.gallery img:hover {
  transform: scale(1.05);
  filter: brightness(1.05);
  z-index: 2;
  position: relative;
}

/* Visit */
.visit {
  position: relative;
  z-index: 1;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.25rem 5rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  align-items: stretch;
}

.visit__card {
  padding: 2.5rem;
  background: var(--espresso);
  color: var(--cream);
  border-radius: 24px;
}

.visit__card .eyebrow {
  color: var(--caramel-light);
}

.visit__card h2 {
  color: var(--cream);
}

.visit address {
  margin: 1.5rem 0;
  line-height: 1.8;
  opacity: 0.9;
}

.visit__hours {
  margin-bottom: 1.5rem;
}

.visit__hours li {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.9rem;
}

.visit__phone {
  display: inline-block;
  font-weight: 600;
  margin-bottom: 1.5rem;
  color: var(--caramel-light);
  transition: opacity 0.25s;
}

.visit__phone:hover {
  opacity: 0.8;
}

.visit__card .btn--primary {
  background: var(--caramel);
  color: white;
}

.visit__card .btn--primary:hover {
  background: var(--caramel-light);
  color: var(--espresso);
}

.visit__map {
  min-height: 320px;
}

.map-placeholder {
  height: 100%;
  min-height: 320px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  background: var(--cream-dark);
  border-radius: 24px;
  border: 2px dashed rgba(44, 24, 16, 0.15);
  color: var(--espresso-soft);
  font-size: 0.9rem;
}

.map-placeholder span {
  font-size: 2.5rem;
}

/* Footer */
.footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 2.5rem 1.25rem;
  background: white;
  border-top: 1px solid rgba(44, 24, 16, 0.08);
}

.footer__brand {
  font-family: var(--serif);
  font-size: 1.25rem;
  margin-bottom: 0.35rem;
}

.footer__note {
  font-size: 0.8rem;
  color: var(--espresso-soft);
  margin-bottom: 1rem;
}

.footer__note a {
  color: var(--caramel);
  text-decoration: underline;
}

.footer__back {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--espresso);
}

.footer__back:hover {
  color: var(--caramel);
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(44, 24, 16, 0.5);
  backdrop-filter: blur(4px);
  animation: fadeIn 0.35s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 301;
  width: min(440px, calc(100% - 2rem));
  max-height: 90vh;
  overflow-y: auto;
  padding: 2rem;
  border: none;
  border-radius: 24px;
  background: white;
  box-shadow: 0 32px 80px rgba(44, 24, 16, 0.25);
  animation: modalIn 0.45s var(--ease);
}

.modal::backdrop {
  display: none;
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: translate(-50%, -48%) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

.modal__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 1.75rem;
  line-height: 1;
  color: var(--espresso-soft);
  transition: color 0.2s, transform 0.2s;
}

.modal__close:hover {
  color: var(--espresso);
  transform: rotate(90deg);
}

.modal__sub {
  font-size: 0.85rem;
  color: var(--espresso-soft);
  margin-bottom: 1.5rem;
}

.reserve-form .form-row {
  margin-bottom: 1rem;
}

.reserve-form label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
  color: var(--espresso-soft);
}

.reserve-form input,
.reserve-form select {
  width: 100%;
  padding: 0.75rem 1rem;
  font: inherit;
  border: 2px solid var(--cream-dark);
  border-radius: 12px;
  background: var(--cream);
  transition: border-color 0.25s;
}

.reserve-form input:focus,
.reserve-form select:focus {
  outline: none;
  border-color: var(--caramel);
}

.form-row--half {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-msg {
  margin-top: 1rem;
  font-size: 0.88rem;
  text-align: center;
  min-height: 1.25rem;
}

.form-msg--success {
  color: var(--sage);
  font-weight: 600;
}

.form-msg--error {
  color: #b44;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  z-index: 400;
  padding: 0.85rem 1.5rem;
  background: var(--espresso);
  color: var(--cream);
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 500;
  box-shadow: var(--shadow);
  transform: translateX(-50%) translateY(100px);
  opacity: 0;
  transition: transform 0.45s var(--ease), opacity 0.45s;
  pointer-events: none;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* Scroll reveal */
.reveal {
  opacity: 1;
  transform: none;
}

.js .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

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

/* Responsive */
@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
  }

  .hero__media {
    order: -1;
  }

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

  .story__grid,
  .visit {
    grid-template-columns: 1fr;
  }

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

  .story__imgs img:last-child {
    margin-top: 0;
  }
}

@media (max-width: 768px) {
  .nav__links {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 1.25rem;
    padding: 2rem;
    background: rgba(250, 246, 240, 0.98);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(44, 24, 16, 0.08);
    transform: translateY(-120%);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.4s var(--ease), opacity 0.4s, visibility 0.4s;
  }

  .nav__links.open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .nav__menu {
    display: flex;
  }

  .nav__actions .btn--small {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .marquee__track,
  .hero__float,
  .steam {
    animation: none;
  }

  .js .reveal {
    opacity: 1;
    transform: none;
  }
}
