/* ==========================================================================
   Talk of the Town Cafe II — site styles
   Colors come from the cafe itself: the dark green sign, cream lettering,
   red trim and the warm orange walls inside.
   ========================================================================== */

:root {
  --bg: #faf6ef;
  --surface: #ffffff;
  --surface-alt: #f3ecdf;
  --text: #27241f;
  --muted: #6b6459;
  --line: #e5ddcf;
  --primary: #1f3d2b;
  --primary-hover: #2b5239;
  --link: #1f3d2b;
  --on-primary: #ffffff;
  --accent: #d4821e;
  --accent-text: #9a540a;
  --accent-soft: #fbead3;
  --danger-red: #8b2e2e;
  --shadow: 0 8px 24px rgba(50, 35, 10, 0.08);
  --radius: 14px;
  --header-h: 72px;
  --hero-overlay-top: rgba(10, 22, 15, 0.35);
  --hero-overlay-bottom: rgba(10, 22, 15, 0.75);
}

:root[data-theme="dark"] {
  --bg: #15191b;
  --surface: #1f2528;
  --surface-alt: #262d31;
  --text: #f1ece3;
  --muted: #b1a99d;
  --line: #333b40;
  --primary: #2f5f42;
  --primary-hover: #3b7553;
  --link: #9fd3b4;
  --on-primary: #ffffff;
  --accent: #e39a3b;
  --accent-text: #eaa44a;
  --accent-soft: #3a2d1b;
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #15191b;
    --surface: #1f2528;
    --surface-alt: #262d31;
    --text: #f1ece3;
    --muted: #b1a99d;
    --line: #333b40;
    --primary: #2f5f42;
    --primary-hover: #3b7553;
    --link: #9fd3b4;
    --on-primary: #ffffff;
    --accent: #e39a3b;
    --accent-text: #eaa44a;
    --accent-soft: #3a2d1b;
    --shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  }
}

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
}

h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 0.6em; font-weight: 700; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.7rem, 3.5vw, 2.4rem); }
h3 { font-size: 1.35rem; }
h4 { font-size: 1.05rem; }
p { margin: 0 0 1em; }
a { color: var(--link); }
img { max-width: 100%; height: auto; display: block; }
address { font-style: normal; }
ul { padding-left: 1.2em; }

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

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

.container { max-width: 1100px; margin: 0 auto; padding: 0 1rem; }
.section { padding: 4.5rem 0; }
.section-alt { background: var(--surface-alt); }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 2.5rem; }
.section-head p { color: var(--muted); }
.eyebrow {
  display: inline-block; font-size: 0.8rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--accent-text); font-weight: 700; margin-bottom: 0.6rem;
}
.muted { color: var(--muted); }
.text-center { text-align: center; }

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.85rem 1.6rem; border-radius: 999px; border: 2px solid transparent;
  font-weight: 600; text-decoration: none; cursor: pointer; font-size: 1rem;
  transition: background-color .2s, color .2s, transform .2s, border-color .2s;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--primary); color: var(--on-primary); }
.btn-primary:hover { background: var(--primary-hover); }
.btn-outline { background: transparent; color: var(--link); border-color: var(--link); }
.btn-outline:hover { background: var(--link); color: var(--bg); }
.btn-light { background: rgba(255,255,255,0.14); color: #fff; border-color: rgba(255,255,255,0.6); }
.btn-light:hover { background: rgba(255,255,255,0.26); }
.btn-on-dark { background: #fff; color: #1f3d2b; }
.btn-on-dark:hover { background: #f6e7cf; color: #1f3d2b; }

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav-bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: var(--header-h); position: relative; }
.brand { font-weight: 800; font-size: 1.2rem; color: var(--text); text-decoration: none; letter-spacing: -0.01em; white-space: nowrap; }
.brand span { color: var(--accent); }
.site-nav { display: flex; align-items: center; gap: 1.6rem; }
.site-nav a { color: var(--text); text-decoration: none; font-weight: 600; padding: 0.3rem 0; border-bottom: 2px solid transparent; }
.site-nav a:hover, .site-nav a.active { border-bottom-color: var(--accent); }
.site-nav .nav-phone { color: var(--link); }
.nav-actions { display: flex; align-items: center; gap: 0.25rem; }
.icon-btn {
  background: none; border: 0; cursor: pointer; color: var(--text);
  width: 42px; height: 42px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center;
}
.icon-btn:hover { background: var(--surface-alt); }
.icon-btn svg { width: 22px; height: 22px; }
.menu-btn { display: none; }
.icon-sun { display: none; }
:root[data-theme="dark"] .icon-sun { display: block; }
:root[data-theme="dark"] .icon-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .icon-sun { display: block; }
  :root:not([data-theme="light"]) .icon-moon { display: none; }
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
.hero {
  position: relative; min-height: calc(100vh - var(--header-h)); min-height: 560px;
  display: flex; align-items: center; justify-content: center; text-align: center; color: #fff;
  background:
    linear-gradient(to bottom, var(--hero-overlay-top), var(--hero-overlay-bottom)),
    url("../images/cafe-sign.webp") center 35% / cover no-repeat;
}
.hero-inner { max-width: 760px; padding: 4rem 1rem; }
.hero .eyebrow { color: #f3d6a6; }
.hero h1 { color: #fff; text-shadow: 0 2px 18px rgba(0,0,0,0.35); margin-bottom: 0.4em; }
.hero .tagline { font-size: clamp(1.1rem, 2.2vw, 1.4rem); opacity: 0.95; margin-bottom: 1.8rem; text-shadow: 0 1px 10px rgba(0,0,0,0.4); }
.hero-actions { display: flex; gap: 0.8rem; justify-content: center; flex-wrap: wrap; }
.hero-hours {
  display: inline-block; margin-top: 2rem; padding: 0.6rem 1.2rem; border-radius: 999px;
  background: rgba(0,0,0,0.35); border: 1px solid rgba(255,255,255,0.25); font-size: 0.95rem;
}

/* --------------------------------------------------------------------------
   Cards / favorites
   -------------------------------------------------------------------------- */
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.5rem; }
.card {
  background: var(--surface); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); border: 1px solid var(--line);
  transition: transform .25s;
}
.card:hover { transform: translateY(-4px); }
.card img { width: 100%; height: 190px; object-fit: cover; }
.card-body { padding: 1.2rem 1.3rem 1.4rem; }
.card-body h3 { font-size: 1.15rem; margin-bottom: 0.35rem; display: flex; justify-content: space-between; gap: 0.5rem; align-items: baseline; }
.card-body p { color: var(--muted); font-size: 0.97rem; margin: 0; }
.price { color: var(--accent-text); font-weight: 700; white-space: nowrap; }

/* --------------------------------------------------------------------------
   Split sections (text + photo)
   -------------------------------------------------------------------------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; }
.split.reverse > .split-media { order: -1; }
.split-media img { width: 100%; border-radius: var(--radius); box-shadow: var(--shadow); aspect-ratio: 4 / 3; object-fit: cover; }
.split-text p { color: var(--muted); }
.split-text p.lead { color: var(--text); font-size: 1.12rem; }
.split-text .btn { margin-top: 0.5rem; }

.photo-wide { margin: 0; }
.photo-wide img { width: 100%; border-radius: var(--radius); box-shadow: var(--shadow); aspect-ratio: 16 / 7; object-fit: cover; }
.photo-wide figcaption { color: var(--muted); font-size: 0.92rem; margin-top: 0.7rem; text-align: center; }

/* --------------------------------------------------------------------------
   Hours / visit band
   -------------------------------------------------------------------------- */
.visit-band { background: var(--primary); color: #fff; }
.visit-band h2, .visit-band h3 { color: #fff; }
.visit-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; align-items: start; }
.visit-band a:not(.btn) { color: #fff; }
.visit-band .eyebrow { color: #f3d6a6; }
.hours { list-style: none; padding: 0; margin: 0; max-width: 360px; }
.hours li { display: flex; justify-content: space-between; gap: 1rem; padding: 0.45rem 0; border-bottom: 1px solid rgba(255,255,255,0.18); }
.hours li:last-child { border-bottom: 0; }
.hours-note { margin: 0.9rem 0 0; max-width: 360px; font-size: 0.92rem; line-height: 1.45; opacity: 0.85; }
.site-footer .hours-note { font-size: 0.85rem; }
.visit-actions { display: flex; gap: 0.8rem; flex-wrap: wrap; margin-top: 1.2rem; }

/* --------------------------------------------------------------------------
   Page header (inner pages)
   -------------------------------------------------------------------------- */
.page-head { padding: 3.5rem 0 2rem; text-align: center; }
.page-head p { color: var(--muted); max-width: 620px; margin: 0 auto; }

/* --------------------------------------------------------------------------
   Menu page
   -------------------------------------------------------------------------- */
.menu-tools { display: flex; flex-direction: column; gap: 1rem; align-items: center; margin: 0 auto 2.5rem; }
.menu-tools[hidden] { display: none; }
.search { width: 100%; max-width: 440px; }
.search input {
  width: 100%; padding: 0.85rem 1.1rem; border-radius: 999px; border: 2px solid var(--line);
  font-size: 1rem; background: var(--surface); color: var(--text);
}
.search input:focus { border-color: var(--accent); outline: none; }
.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; justify-content: center; }
.chip {
  border: 1px solid var(--line); background: var(--surface); color: var(--text);
  padding: 0.45rem 1rem; border-radius: 999px; cursor: pointer; font-size: 0.95rem; font-weight: 600;
}
.chip:hover { border-color: var(--accent); }
.chip[aria-pressed="true"] { background: var(--primary); color: var(--on-primary); border-color: var(--primary); }

.menu-category { margin-bottom: 3rem; }
.menu-category h2 {
  font-size: 1.7rem; color: var(--primary); padding-bottom: 0.4rem; margin-bottom: 1.2rem;
  border-bottom: 3px solid var(--accent); display: inline-block;
}
:root[data-theme="dark"] .menu-category h2 { color: var(--text); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .menu-category h2 { color: var(--text); } }
.menu-category h3 { font-size: 1.1rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin: 1.4rem 0 0.6rem; }
.menu-note { color: var(--muted); font-size: 0.95rem; font-style: italic; }
.menu-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 0.6rem 2.5rem; }
.menu-row {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.35rem 1rem; align-items: baseline;
  padding: 0.75rem 0; border-bottom: 1px dashed var(--line);
}
.menu-row-text { flex: 1 1 180px; }
.menu-row h4 { margin: 0 0 0.15rem; font-weight: 600; }
.menu-row p { margin: 0; color: var(--muted); font-size: 0.93rem; }
.sizes { margin-left: auto; display: flex; flex-wrap: wrap; gap: 0.25rem 0.9rem; justify-content: flex-end; font-weight: 700; color: var(--accent-text); white-space: nowrap; }
.sizes small { color: var(--muted); font-weight: 500; }
.badge {
  display: inline-block; vertical-align: middle; margin-left: 0.4rem; padding: 0.1rem 0.55rem; border-radius: 999px;
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
  background: var(--accent-soft); color: var(--accent-text);
}
.menu-empty { text-align: center; color: var(--muted); padding: 3rem 0; }
.menu-photos { display: grid; grid-template-columns: 2fr 1fr; gap: 1.2rem; margin-bottom: 3rem; }
.menu-photos img { width: 100%; height: 300px; object-fit: cover; border-radius: var(--radius); box-shadow: var(--shadow); }

/* --------------------------------------------------------------------------
   About page
   -------------------------------------------------------------------------- */
.facts { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: var(--radius); padding: 1.5rem 1.8rem; box-shadow: var(--shadow); }
.facts h3 { margin-bottom: 0.6rem; }
.facts ul { margin: 0; padding-left: 1.1rem; color: var(--muted); }
.facts li + li { margin-top: 0.5rem; }

/* --------------------------------------------------------------------------
   Contact page
   -------------------------------------------------------------------------- */
.contact-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.3rem; margin-bottom: 3rem; }
.info-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow); }
.info-card .icon { width: 44px; height: 44px; border-radius: 12px; background: var(--accent-soft); color: var(--accent-text); display: inline-flex; align-items: center; justify-content: center; margin-bottom: 0.9rem; }
.info-card .icon svg { width: 22px; height: 22px; }
.info-card h3 { font-size: 1.1rem; margin-bottom: 0.4rem; }
.info-card p { margin: 0 0 0.3rem; color: var(--muted); }
.info-card a { font-weight: 600; }
.info-card .hours li { border-bottom-color: var(--line); padding: 0.35rem 0; flex-direction: column; align-items: flex-start; gap: 0; }
.info-card .hours li span:first-child { font-weight: 600; }
.map-frame { border: 0; width: 100%; height: 420px; border-radius: var(--radius); box-shadow: var(--shadow); display: block; background: var(--surface-alt); }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.site-footer { background: #15201a; color: #d8d2c6; margin-top: 4rem; padding: 3rem 0 1.5rem; }
.site-footer a { color: #fff; }
.site-footer h4 { color: #fff; margin-bottom: 0.7rem; font-size: 0.85rem; letter-spacing: 0.12em; text-transform: uppercase; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2.5rem; }
.footer-brand { color: #fff; font-weight: 800; font-size: 1.2rem; margin-bottom: 0.4rem; }
.site-footer .hours li { border-bottom-color: rgba(255,255,255,0.12); padding: 0.3rem 0; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.12); margin-top: 2.5rem; padding-top: 1.2rem; font-size: 0.9rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.5rem; }
.footer-bottom p { margin: 0; }
.footer-note { flex-basis: 100%; font-size: 0.82rem; opacity: 0.7; }

/* --------------------------------------------------------------------------
   Reveal animation (only when JS is running)
   -------------------------------------------------------------------------- */
html.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity .4s ease, transform .4s ease; }
html.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html.js .reveal { opacity: 1; transform: none; transition: none; }
  .btn:hover, .card:hover { transform: none; }
  html { scroll-behavior: auto; }
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 860px) {
  /* Without JavaScript the links simply wrap onto their own row under the brand. */
  .nav-bar { flex-wrap: wrap; }
  .site-nav { flex-basis: 100%; order: 3; flex-wrap: wrap; gap: 0.2rem 1.2rem; padding-bottom: 0.6rem; }
  /* With JavaScript the links collapse behind the hamburger. */
  html.js .menu-btn { display: inline-flex; }
  html.js .site-nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%; order: 0; flex-basis: auto;
    flex-direction: column; align-items: stretch; gap: 0; padding: 0.5rem 1rem 1rem;
    background: var(--surface); border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
  }
  html.js .site-nav.open { display: flex; }
  html.js .site-nav a { padding: 0.8rem 0.2rem; border-bottom: 1px solid var(--line); }
  html.js .site-nav a:last-child { border-bottom: 0; }
  html.js .site-nav a.active { border-bottom-color: var(--line); color: var(--accent-text); }

  .split, .split.reverse { grid-template-columns: 1fr; gap: 1.6rem; }
  .split.reverse > .split-media { order: 0; }
  .visit-grid, .footer-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: repeat(2, 1fr); }
  .menu-photos { grid-template-columns: 1fr; }
  .menu-photos img { height: 220px; }
  .section { padding: 3.2rem 0; }
  .hero { min-height: 520px; }
  .map-frame { height: 320px; }
}

@media (max-width: 480px) {
  body { font-size: 16px; }
  .nav-bar { gap: 0.5rem; }
  .brand { font-size: 1.05rem; white-space: normal; min-width: 0; line-height: 1.15; }
  .icon-btn { width: 38px; height: 38px; }
  .contact-grid { grid-template-columns: 1fr; }
  .menu-row { flex-direction: column; gap: 0.25rem; align-items: flex-start; }
  .menu-row-text { flex: 0 0 auto; width: 100%; }
  .sizes { justify-content: flex-start; margin-left: 0; }
  .hero-actions .btn { width: 100%; justify-content: center; }
}
