/* Theme: Deep claret (dining) */
:root {
  color-scheme: light dark;
  --bg: #fbf6f6;
  --surface: #ffffff;
  --text: #241417;
  --muted: #6f545a;
  --border: #e8d8da;
  --accent: #7d2436;
  --accent-contrast: #ffffff;
  --heading-font: "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --body-font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --max-width: 68rem;
  --radius: 14px;
  --space: clamp(1rem, 2.5vw, 2rem);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #170f11;
    --surface: #201619;
    --text: #f5eaec;
    --muted: #c2a3aa;
    --border: #352529;
    --accent: #d9788c;
    --accent-contrast: #0d0d0d;
  }
}

[data-theme="dark"] {
  --bg: #170f11;
  --surface: #201619;
  --text: #f5eaec;
  --muted: #c2a3aa;
  --border: #352529;
  --accent: #d9788c;
  --accent-contrast: #0d0d0d;
}

[data-theme="light"] {
  --bg: #fbf6f6;
  --surface: #ffffff;
  --text: #241417;
  --muted: #6f545a;
  --border: #e8d8da;
  --accent: #7d2436;
  --accent-contrast: #ffffff;
}

/* Global overflow guard */
*,
*::before,
*::after {
  box-sizing: border-box;
}

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

figcaption {
  max-width: 100%;
}

figure {
  max-width: 100%;
  min-width: 0;
  overflow-wrap: anywhere;
}

/* Prevent overflow from long URLs in lists */
ul,
ol,
li {
  max-width: 100%;
  min-width: 0;
  overflow-wrap: anywhere;
}

/* Wrapping container */
.wrap {
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space);
  padding-right: var(--space);
  min-width: 0;
}

/* Social list links — biggest overflow culprit */
.social-list {
  list-style: none;
  padding-left: 0;
  max-width: 100%;
  min-width: 0;
  overflow-wrap: anywhere;
}

.social-list li {
  max-width: 100%;
  min-width: 0;
  overflow-wrap: anywhere;
}

.social-list a {
  display: inline-block;
  max-width: 100%;
  min-width: 0;
  overflow-wrap: anywhere;
  word-wrap: break-word;
  word-break: break-word;
  hyphens: auto;
}

/* Source list long URLs */
.source-list {
  word-break: break-word;
  overflow-wrap: anywhere;
}

.source-list a {
  display: inline-block;
  max-width: 100%;
  min-width: 0;
  overflow-wrap: anywhere;
  word-wrap: break-word;
  word-break: break-word;
}

/* Contact list phone numbers */
.contact-list a {
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* Navigation list — prevent overflow */
.nav-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  list-style: none;
  padding-left: 0;
  max-width: 100%;
  min-width: 0;
}

.nav-list a {
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
}

/* Generic anchor inside footer */
footer a {
  word-break: break-word;
  overflow-wrap: anywhere;
  hyphens: auto;
}

/* Trust strip */
.trust-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  justify-content: center;
  list-style: none;
  padding-left: 0;
  max-width: 100%;
  min-width: 0;
}

/* Footer grid — prevent overflow */
.footer-grid {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space);
  max-width: 100%;
  min-width: 0;
}

.footer-grid > * {
  flex: 1 1 180px;
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
}

/* Section inner layout */
.section-inner {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space);
  align-items: center;
  max-width: 100%;
  min-width: 0;
}

.section-copy {
  flex: 1 1 280px;
  min-width: 0;
  max-width: 100%;
}

.section-figure {
  flex: 1 1 280px;
  margin: 0;
  min-width: 0;
  max-width: 100%;
}

.section-figure img {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
}

/* Hero layout */
.hero-inner {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space);
  align-items: center;
  max-width: 100%;
  min-width: 0;
}

.hero-copy {
  flex: 1 1 280px;
  min-width: 0;
  max-width: 100%;
}

.hero-figure {
  flex: 0 0 auto;
  margin: 0;
  max-width: 100%;
  min-width: 0;
}

.hero-figure img {
  max-width: 100%;
  height: auto;
}

/* Header layout */
.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem var(--space);
  max-width: 100%;
  min-width: 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
  min-width: 0;
  max-width: 100%;
}

.brand-mark {
  flex-shrink: 0;
}

.brand-name {
  white-space: nowrap;
}

/* Site footer */
.site-footer {
  padding: var(--space) 0;
  max-width: 100%;
  overflow: hidden;
}

/* Sources section */
.sources {
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
}

/* Body-level overflow safety */
body {
  overflow-x: hidden;
  margin: 0;
}

/* Keep scroll for main content but clip horizontal overflow */
html {
  overflow-x: hidden;
}

/* Theme toggle */
.theme-toggle {
  margin-left: auto;
  flex-shrink: 0;
}

/* Button */
.button {
  display: inline-block;
  padding: 0.6rem 1.4rem;
  background: var(--accent);
  color: var(--accent-contrast);
  text-decoration: none;
  font-weight: 600;
  border-radius: 40px;
  border: none;
  cursor: pointer;
}

.button:hover {
  opacity: 0.9;
}

/* Basic typography */
body {
  font-family: var(--body-font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}

h1, h2, h3, h4 {
  font-family: var(--heading-font);
  line-height: 1.2;
}

h1 {
  font-size: 2rem;
}

h2 {
  font-size: 1.4rem;
  margin-top: 0;
}

a {
  color: var(--accent);
}

a:hover {
  opacity: 0.85;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 999;
  background: var(--accent);
  color: var(--accent-contrast);
  padding: 0.5rem 1rem;
}

.skip-link:focus {
  left: 0;
}

/* Generic wrap fallback */
.wrap {
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space);
  padding-right: var(--space);
  min-width: 0;
}

/* Note / muted text */
.note {
  color: var(--muted);
  font-size: 0.9rem;
}

/* Hours/contact lists */
.contact-list,
.hours-list {
  list-style: none;
  padding-left: 0;
}

.site-footer h2 {
  margin-top: 0;
}

/* Responsive adjustments */
@media (max-width: 600px) {
  .footer-grid {
    flex-direction: column;
  }
  .section-inner {
    flex-direction: column;
  }
  .hero-inner {
    flex-direction: column;
    text-align: center;
  }
  .header-inner {
    flex-wrap: wrap;
  }
  .brand-name {
    font-size: 0.9rem;
  }
}

/* Hex grid placeholder */
#booking-widget {
  min-height: 80px;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 0.8rem;
  max-width: 100%;
  overflow-wrap: anywhere;
}
