/* ===== Design tokens ===== */
:root {
  --bg: #FAF3EA;
  --surface: #F1E6D8;
  --text: #3A2A20;
  --text-muted: #7A6A5D;
  --accent: #C1633D;
  --accent-dark: #A34F30;
  --sage: #8A9A7E;
  --border: #E4D5C3;
  --shadow: 0 8px 24px rgba(58, 42, 32, 0.08);

  --font-head: 'Fraunces', serif;
  --font-body: 'Inter', sans-serif;
  --font-script: 'Caveat', cursive;

  --radius: 14px;
  --radius-lg: 24px;
  --container: 1180px;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

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

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -48px;
  left: 16px;
  z-index: 1000;
  background: var(--text);
  color: #fff;
  padding: 12px 20px;
  border-radius: 0 0 8px 8px;
  font-weight: 600;
  transition: top 0.2s ease;
}
.skip-link:focus { top: 0; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

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

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

.eyebrow {
  font-family: var(--font-script);
  font-size: 1.4rem;
  color: var(--accent-dark);
  display: block;
  margin-bottom: 4px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover { background: var(--accent-dark); transform: translateY(-2px); box-shadow: 0 10px 20px rgba(193,99,61,0.3); }

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1.5px solid var(--border);
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }

.section {
  padding: 96px 0;
}

.section-head {
  text-align: center;
  max-width: 560px;
  margin: 0 auto 56px;
}

.section-head p {
  color: var(--text-muted);
  margin-top: 12px;
}

/* ===== Header ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 243, 234, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
}

.logo {
  font-family: var(--font-head);
  font-size: 1.5rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}
.logo span { color: var(--accent); }

.nav-links {
  display: flex;
  gap: 36px;
  list-style: none;
}

.nav-links a {
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--text);
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute;
  left: 0; bottom: -4px;
  width: 0; height: 2px;
  background: var(--accent);
  transition: width 0.2s ease;
}
.nav-links a:hover::after { width: 100%; }

.nav-actions { display: flex; align-items: center; gap: 16px; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

/* ===== Hero ===== */
.hero {
  position: relative;
  min-height: 88vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: url('https://images.unsplash.com/photo-1495474472287-4d71bcdd2085?auto=format&fit=crop&w=1800&q=80') center/cover;
}
.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(35,26,21,0.78) 0%, rgba(35,26,21,0.45) 55%, rgba(35,26,21,0.15) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  color: #fff;
  max-width: 620px;
  padding: 24px;
}

.hero-content .eyebrow { color: #E8B8A0; }

.hero-content h1 {
  font-size: clamp(2.4rem, 5vw, 3.8rem);
  color: #fff;
  margin-bottom: 20px;
}

.hero-content p {
  font-size: 1.1rem;
  color: rgba(255,255,255,0.85);
  margin-bottom: 32px;
  max-width: 480px;
}

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

.hero-actions .btn-outline {
  border-color: rgba(255,255,255,0.4);
  color: #fff;
}
.hero-actions .btn-outline:hover { border-color: #fff; }

/* ===== Marquee strip ===== */
.strip {
  background: var(--text);
  color: var(--bg);
  padding: 14px 0;
  overflow: hidden;
  white-space: nowrap;
}
.strip-track {
  display: inline-flex;
  gap: 40px;
  animation: scroll-left 28s linear infinite;
  font-family: var(--font-head);
  font-size: 1.1rem;
}
.strip-track span { opacity: 0.85; }
@keyframes scroll-left {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ===== Menu ===== */
.menu-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.menu-card {
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.menu-card:hover { transform: translateY(-6px); box-shadow: 0 16px 32px rgba(58,42,32,0.14); }

.menu-card-img { height: 190px; overflow: hidden; }
.menu-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.menu-card:hover .menu-card-img img { transform: scale(1.06); }

.menu-card-body { padding: 20px 22px 24px; }

.menu-card-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 8px;
}
.menu-card-top h3 { font-size: 1.15rem; }
.price { color: var(--accent); font-weight: 700; font-family: var(--font-head); white-space: nowrap; }

.menu-card-body p { color: var(--text-muted); font-size: 0.92rem; }

.menu-tabs {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 48px;
  flex-wrap: wrap;
}
.menu-tab {
  padding: 10px 22px;
  border-radius: 999px;
  border: 1.5px solid var(--border);
  background: transparent;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  color: var(--text-muted);
  transition: all 0.2s ease;
}
.menu-tab.active, .menu-tab:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* ===== About ===== */
.about {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.about-media {
  position: relative;
}
.about-media img {
  border-radius: var(--radius-lg);
  width: 100%;
  height: 420px;
  object-fit: cover;
}
.about-media .float-card {
  position: absolute;
  bottom: -28px;
  right: -28px;
  background: #fff;
  border-radius: var(--radius);
  padding: 20px 24px;
  box-shadow: var(--shadow);
  max-width: 220px;
}
.about-media .float-card strong {
  font-family: var(--font-head);
  font-size: 1.8rem;
  color: var(--accent);
  display: block;
}
.about-media .float-card span { color: var(--text-muted); font-size: 0.85rem; }

.about-text .eyebrow { margin-bottom: 8px; }
.about-text h2 { font-size: clamp(1.8rem, 3vw, 2.6rem); margin-bottom: 20px; }
.about-text p { color: var(--text-muted); margin-bottom: 24px; }

.about-list {
  list-style: none;
  display: grid;
  gap: 14px;
  margin-bottom: 32px;
}
.about-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 500;
}
.about-list li::before {
  content: '';
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--sage);
  flex-shrink: 0;
}

/* ===== Gallery ===== */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 200px;
  gap: 16px;
}
.gallery-grid img {
  width: 100%; height: 100%;
  object-fit: cover;
  border-radius: var(--radius);
  transition: transform 0.4s ease, filter 0.4s ease;
}
.gallery-grid a { overflow: hidden; border-radius: var(--radius); display: block; }
.gallery-grid a:hover img { transform: scale(1.08); }
.gallery-grid .tall { grid-row: span 2; }
.gallery-grid a { cursor: zoom-in; }

/* ===== Lightbox ===== */
.lightbox {
  border: none;
  background: transparent;
  padding: 0;
  max-width: min(92vw, 1100px);
  max-height: 92vh;
}
.lightbox::backdrop {
  background: rgba(35, 26, 21, 0.85);
}
.lightbox img {
  display: block;
  max-width: min(92vw, 1100px);
  max-height: 92vh;
  border-radius: var(--radius);
}
.lightbox-close {
  position: absolute;
  top: -18px;
  right: -18px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: #fff;
  color: var(--text);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: var(--shadow);
}
.lightbox-close:hover { background: var(--accent); color: #fff; }
@media (max-width: 480px) {
  .lightbox-close { top: 8px; right: 8px; }
}

/* ===== Testimonials ===== */
.testimonials {
  background: var(--surface);
}
.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.testimonial-card {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow);
}
.stars { color: var(--accent); letter-spacing: 2px; margin-bottom: 16px; }
.testimonial-card p { color: var(--text); margin-bottom: 20px; font-size: 0.98rem; }
.testimonial-person { display: flex; align-items: center; gap: 12px; }
.testimonial-person img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; }
.testimonial-person strong { display: block; font-size: 0.92rem; }
.testimonial-person span { color: var(--text-muted); font-size: 0.82rem; }

/* ===== Visit / Hours ===== */
.visit {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: stretch;
}
.visit-card {
  background: var(--text);
  color: var(--bg);
  border-radius: var(--radius-lg);
  padding: 48px;
}
.visit-card h2 { color: #fff; margin-bottom: 24px; }
.hours-row {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255,255,255,0.12);
  font-size: 0.95rem;
}
.hours-row:last-of-type { border-bottom: none; }
.hours-row span:last-child { color: #E8B8A0; font-weight: 600; }

.visit-info { display: flex; flex-direction: column; gap: 24px; }
.info-block { display: flex; gap: 16px; align-items: flex-start; }
.info-icon {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--surface);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  font-size: 1.2rem;
}
.info-block h3 { font-size: 1.05rem; margin-bottom: 4px; }
.info-block p { color: var(--text-muted); font-size: 0.92rem; }

.map-embed {
  border-radius: var(--radius);
  overflow: hidden;
  height: 220px;
  margin-top: 8px;
}
.map-embed img { width: 100%; height: 100%; object-fit: cover; }

/* ===== Contact ===== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: stretch;
}

.contact-form {
  background: var(--bg);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-row label {
  font-weight: 600;
  font-size: 0.9rem;
}

.form-row .optional {
  font-weight: 400;
  color: var(--text-muted);
}

.form-row input,
.form-row textarea {
  font-family: var(--font-body);
  font-size: 0.95rem;
  padding: 12px 16px;
  border-radius: 10px;
  border: 1.5px solid var(--border);
  background: #fff;
  color: var(--text);
  resize: vertical;
}

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

.contact-form .btn { align-self: flex-start; }

.form-status {
  font-size: 0.9rem;
  font-weight: 600;
  min-height: 1.2em;
}
.form-status.success { color: var(--sage); }
.form-status.error { color: var(--accent-dark); }

.map-wrap {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  min-height: 320px;
}
.map-wrap iframe {
  width: 100%;
  height: 100%;
  min-height: 320px;
  border: 0;
  display: block;
}

/* ===== Newsletter ===== */
.newsletter {
  background: var(--accent);
  border-radius: var(--radius-lg);
  padding: 56px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 32px;
  flex-wrap: wrap;
  color: #fff;
  margin: 0 24px;
  max-width: calc(var(--container) - 48px);
  margin-left: auto;
  margin-right: auto;
}
.newsletter h2 { color: #fff; font-size: 1.7rem; margin-bottom: 8px; }
.newsletter p { color: rgba(255,255,255,0.85); }
.newsletter-form { display: flex; gap: 10px; flex-wrap: wrap; }
.newsletter-form input {
  padding: 14px 18px;
  border-radius: 999px;
  border: none;
  min-width: 260px;
  max-width: 100%;
  font-family: var(--font-body);
  font-size: 0.95rem;
}
.newsletter .newsletter-status {
  width: 100%;
  margin-top: 4px;
  color: #fff;
}
.newsletter .newsletter-status.success { color: #2F2013; }
.newsletter-form .btn-primary {
  background: var(--text);
}
.newsletter-form .btn-primary:hover { background: #241a14; }

/* ===== Footer ===== */
footer {
  background: var(--text);
  color: rgba(250,243,234,0.7);
  padding: 72px 0 28px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 48px;
}
.footer-brand .logo { color: #fff; margin-bottom: 14px; }
.footer-brand p { font-size: 0.9rem; line-height: 1.7; }
.footer-col h4 { color: #fff; font-family: var(--font-body); font-size: 0.95rem; margin-bottom: 18px; }
.footer-col ul { list-style: none; display: grid; gap: 12px; }
.footer-col a { font-size: 0.9rem; transition: color 0.2s ease; }
.footer-col a:hover { color: #fff; }
.social-row { display: flex; gap: 12px; margin-top: 18px; }
.social-row a {
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(250,243,234,0.2);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.9rem;
}
.social-row a:hover { background: var(--accent); border-color: var(--accent); }

.footer-bottom {
  border-top: 1px solid rgba(250,243,234,0.12);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  flex-wrap: wrap;
  gap: 12px;
}

/* ===== Sticky mobile order button ===== */
.sticky-order {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  display: none;
  box-shadow: 0 12px 28px rgba(193,99,61,0.4);
}

/* ===== Reveal on scroll ===== */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.in-view { opacity: 1; transform: translateY(0); }

/* ===== Responsive ===== */
@media (max-width: 960px) {
  .menu-grid { grid-template-columns: repeat(2, 1fr); }
  .about { grid-template-columns: 1fr; }
  .about-media img { height: 320px; }
  .visit { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: repeat(3, 1fr); grid-auto-rows: 160px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  .section { padding: 64px 0; }
  .nav-links, .nav-actions .btn-outline { display: none; }
  .nav-toggle { display: flex; }
  .nav.open .nav-links {
    display: flex;
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--bg);
    flex-direction: column;
    padding: 24px;
    gap: 20px;
    border-bottom: 1px solid var(--border);
  }
  .menu-grid { grid-template-columns: 1fr; }
  .testimonial-grid { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 150px; }
  .newsletter { padding: 36px 28px; flex-direction: column; text-align: center; }
  .newsletter-form { justify-content: center; width: 100%; }
  .newsletter-form input { flex: 1; min-width: 0; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .sticky-order { display: block; }
  footer { padding-bottom: 96px; }
  .hero { min-height: 92vh; }
  .about-media .float-card { right: 12px; bottom: -20px; padding: 14px 18px; }
  .contact-form { padding: 28px; }
}

/* ===== Café Assistant Chat Widget ===== */
.chat-widget {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 500;
}

.chat-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 14px 20px;
  border-radius: 999px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(193, 99, 61, 0.4);
  transition: background 0.2s ease, transform 0.2s ease;
}
.chat-toggle:hover { background: var(--accent-dark); transform: translateY(-2px); }
.chat-toggle-icon { font-size: 1.15rem; }

.chat-panel {
  position: fixed;
  right: 24px;
  bottom: 96px;
  width: 360px;
  max-width: calc(100vw - 32px);
  max-height: min(560px, calc(100vh - 140px));
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.chat-panel[hidden] { display: none; }

.chat-panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  background: var(--text);
  padding: 16px 18px;
}
.chat-panel-header h2 { font-family: var(--font-head); font-size: 1.05rem; color: #fff; margin: 0 0 2px; }
.chat-panel-header p { font-size: 0.78rem; color: rgba(255, 255, 255, 0.7); margin: 0; }

.chat-close {
  background: none;
  border: none;
  color: #fff;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  padding: 2px 8px;
  border-radius: 6px;
}
.chat-close:hover { background: rgba(255, 255, 255, 0.15); }

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.chat-msg {
  max-width: 85%;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 0.88rem;
  line-height: 1.5;
}
.chat-msg a { color: inherit; text-decoration: underline; }
.chat-msg.bot {
  align-self: flex-start;
  background: var(--surface);
  color: var(--text);
  border-bottom-left-radius: 4px;
}
.chat-msg.user {
  align-self: flex-end;
  background: var(--accent);
  color: #fff;
  border-bottom-right-radius: 4px;
}

.chat-msg.typing { display: flex; align-items: center; gap: 4px; padding: 12px 14px; }
.chat-msg.typing span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.4;
  animation: chat-typing-bounce 1.1s infinite ease-in-out;
}
.chat-msg.typing span:nth-child(2) { animation-delay: 0.15s; }
.chat-msg.typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes chat-typing-bounce {
  0%, 60%, 100% { opacity: 0.4; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-3px); }
}

.chat-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 18px 12px;
}
.chat-chip {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 6px 12px;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.chat-chip:hover { background: var(--bg); border-color: var(--accent); }

.chat-input-row {
  display: flex;
  gap: 8px;
  padding: 14px 18px;
  border-top: 1px solid var(--border);
  background: var(--bg);
}
.chat-input-row input {
  flex: 1;
  min-width: 0;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 0.88rem;
  background: #fff;
  color: var(--text);
}
.chat-input-row input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.chat-send { padding: 10px 18px; font-size: 0.85rem; white-space: nowrap; }

@media (max-width: 720px) {
  /* Clear the centered sticky "Order Now" pill at the bottom of the screen */
  .chat-widget { bottom: 88px; }
  .chat-panel { bottom: 160px; max-height: min(560px, calc(100vh - 200px)); }
}

@media (max-width: 480px) {
  .chat-widget { right: 16px; }
  .chat-panel { right: 16px; width: calc(100vw - 32px); }
  .chat-toggle-label { display: none; }
  .chat-toggle { padding: 14px; border-radius: 50%; }
}
