/* Theme: Warm cottage (hospitality) */
:root {
  color-scheme: light dark;
  --bg: #fbf7f2;
  --surface: #ffffff;
  --text: #2b2119;
  --muted: #6d5c4d;
  --border: #e7dbcd;
  --accent: #a9603a;
  --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: #191411;
    --surface: #221b16;
    --text: #f3ebe2;
    --muted: #bda893;
    --border: #3a2e26;
    --accent: #d08a5f;
    --accent-contrast: #0d0d0d;
  }
}

[data-theme="dark"] {
  --bg: #191411;
  --surface: #221b16;
  --text: #f3ebe2;
  --muted: #bda893;
  --border: #3a2e26;
  --accent: #d08a5f;
  --accent-contrast: #0d0d0d;
}

[data-theme="light"] {
  --bg: #fbf7f2;
  --surface: #ffffff;
  --text: #2b2119;
  --muted: #6d5c4d;
  --border: #e7dbcd;
  --accent: #a9603a;
  --accent-contrast: #ffffff;
}

/* Prevent horizontal overflow on all elements */
*,
*::before,
*::after {
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* Ensure images and media never exceed their container */
img,
video,
canvas,
svg,
iframe {
  max-width: 100%;
  height: auto;
}

/* Reset max-width for elements that need to be full-width */
html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

/* Ensure the wrap container does not cause overflow */
.wrap {
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space);
  padding-right: var(--space);
  box-sizing: border-box;
}

/* Navigation list: allow wrapping on small screens */
.nav-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

/* Footer contact list: break long concatenated text */
.contact-list li:last-child {
  overflow-wrap: anywhere;
  word-break: break-all;
  max-width: 100%;
}

/* Social links: break long URLs */
.social-list a {
  overflow-wrap: anywhere;
  word-break: break-all;
  display: inline-block;
  max-width: 100%;
}

/* Source list links: break long URLs */
.source-list a {
  overflow-wrap: anywhere;
  word-break: break-all;
  display: inline-block;
  max-width: 100%;
}

/* Hero figure: constrain image */
.hero-figure {
  max-width: 100%;
  margin: 0;
}

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

/* Section figures: constrain images */
.section-figure {
  max-width: 100%;
  margin: 0;
}

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

/* Trust strip: ensure items wrap */
.trust-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

/* Footer grid: allow wrapping */
.footer-grid {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space);
}

.footer-grid > * {
  flex: 1 1 200px;
  min-width: 0;
}

/* Ensure all list items in footer break long words */
.contact-list li,
.hours-list li,
.social-list li,
.source-list li {
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* Button and link styling */
.button {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: var(--accent);
  color: var(--accent-contrast);
  text-decoration: none;
  border-radius: var(--radius);
  font-weight: 600;
}

/* Skip link */
.skip-link {
  position: absolute;
  top: -100%;
  left: 0;
  background: var(--accent);
  color: var(--accent-contrast);
  padding: 0.5rem 1rem;
  z-index: 100;
}

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

/* Theme toggle button */
.theme-toggle {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.5rem;
  padding: 0.25rem;
  color: var(--text);
}

/* General spacing */
.site-header,
.hero,
.trust-strip,
.content-section,
.site-footer {
  padding-top: var(--space);
  padding-bottom: var(--space);
}

/* Hero inner layout */
.hero-inner {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space);
  align-items: center;
}

.hero-copy {
  flex: 1 1 300px;
  min-width: 0;
}

.hero-figure {
  flex: 1 1 300px;
  min-width: 0;
}

/* Section inner layout */
.section-inner {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space);
  align-items: center;
}

.section-copy {
  flex: 1 1 300px;
  min-width: 0;
}

.section-figure {
  flex: 1 1 300px;
  min-width: 0;
}

/* Heading styles */
h1, h2, h3 {
  font-family: var(--heading-font);
  color: var(--text);
  line-height: 1.2;
}

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

/* Links */
a {
  color: var(--accent);
  text-decoration: underline;
}

a:hover {
  opacity: 0.8;
}

/* Lists */
ul {
  padding-left: 1.5rem;
}

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

/* Responsive adjustments */
@media (max-width: 480px) {
  .nav-list {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero-inner,
  .section-inner {
    flex-direction: column;
  }

  .footer-grid {
    flex-direction: column;
  }
}