/* ==========================================================================
   The Housing Assembly — site styles
   Single stylesheet shared by every page.
   Palette is drawn from the logo: brick red, gold key, charcoal text.
   ========================================================================== */

@import url("https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;600;700&display=swap");

:root {
  --color-brick: #9e3b2e;
  --color-brick-dark: #7c2c22;
  --color-gold: #c79233;
  --color-charcoal: #1f1d1b;
  --color-text: #2c2a28;
  --color-muted: #6b6560;
  --color-bg: #ffffff;
  --color-bg-alt: #f6f3f0;
  --color-border: #e4ded8;

  --max-width: 1100px;
  --space: 1.5rem;
  --radius: 8px;
  --shadow: 0 2px 12px rgba(31, 29, 27, 0.08);

  --font: "Montserrat", system-ui, sans-serif;
}

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  font-weight: 400;
  line-height: 1.65;
  color: var(--color-text);
  background: var(--color-bg);
}

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

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

h1,
h2,
h3 {
  font-weight: 700;
  line-height: 1.2;
  color: var(--color-charcoal);
}

h1 {
  font-size: clamp(2rem, 5vw, 3rem);
}

h2 {
  font-size: clamp(1.6rem, 3.5vw, 2.25rem);
}

h3 {
  font-size: 1.25rem;
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--space);
}

.section {
  padding-block: clamp(2.5rem, 6vw, 4.5rem);
}

.section--alt {
  background: var(--color-bg-alt);
}

/* Visually hidden until focused — keyboard skip link */
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  z-index: 1000;
  padding: 0.75rem 1rem;
  background: var(--color-charcoal);
  color: #fff;
  border-radius: 0 0 var(--radius) 0;
}

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

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */

.btn {
  display: inline-block;
  padding: 0.75rem 1.6rem;
  border-radius: var(--radius);
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.btn--primary {
  background: var(--color-brick);
  color: #fff;
}

.btn--primary:hover {
  background: var(--color-brick-dark);
}

.btn--outline {
  border: 2px solid #fff;
  color: #fff;
}

.btn--outline:hover {
  background: #fff;
  color: var(--color-brick);
}

/* --------------------------------------------------------------------------
   Header / navigation (injected by js/components.js)
   -------------------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
  box-shadow: var(--shadow);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.75rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--color-charcoal);
}

.brand img {
  width: 52px;
  height: 52px;
  object-fit: cover;
  border-radius: 6px;
}

.brand__name {
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1.1;
}

.nav__list {
  list-style: none;
  display: flex;
  gap: 0.25rem;
  margin: 0;
  padding: 0;
}

.nav__link {
  display: block;
  padding: 0.5rem 0.85rem;
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--color-text);
  font-weight: 600;
  font-size: 0.95rem;
}

.nav__link:hover {
  background: var(--color-bg-alt);
}

.nav__link[aria-current="page"] {
  color: var(--color-brick);
}

.nav__link[aria-current="page"]::after {
  content: "";
  display: block;
  height: 2px;
  background: var(--color-gold);
  margin-top: 2px;
}

/* Hamburger — hidden on desktop */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  background: none;
  border: 0;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--color-charcoal);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

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

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

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

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

.hero {
  position: relative;
  color: #fff;
  text-align: center;
  background: var(--color-charcoal);
  overflow: hidden;
}

.hero__media {
  position: absolute;
  inset: 0;
  background-image: url('images/home-2.jpg');
  background-size: cover;
  background-position: center;
  opacity: 0.35;
}

.hero__inner {
  position: relative;
  padding-block: clamp(3rem, 9vw, 6rem);
}

.hero h1 {
  color: #fff;
}

.hero__lead {
  max-width: 60ch;
  margin-inline: auto;
  font-size: 1.1rem;
  font-weight: 300;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin-top: 2rem;
}

/* --------------------------------------------------------------------------
   Generic content helpers
   -------------------------------------------------------------------------- */

.lead {
  font-size: 1.15rem;
  color: var(--color-muted);
}

.section__title {
  text-align: center;
  margin-bottom: 2rem;
}

.section__title::after {
  content: "";
  display: block;
  width: 60px;
  height: 3px;
  background: var(--color-gold);
  margin: 0.75rem auto 0;
}

/* Image strip on the home page */
.photo-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.photo-strip img {
  width: 100%;
  height: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius);
}

/* Page header band for interior pages */
.page-header {
  background: var(--color-brick);
  color: #fff;
  padding-block: clamp(2rem, 5vw, 3rem);
}

.page-header h1 {
  color: #fff;
  margin: 0;
}

/* Two-column text + image (About) */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: center;
}

.split__image {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* Standalone feature image inside a content section.
   Capped at 420px tall (the original banner height) but scaled down at its
   natural aspect ratio so the whole photo stays visible instead of cropping. */
.feature-image {
  display: block;
  max-width: 100%;
  max-height: 420px;
  width: auto;
  height: auto;
  margin: 1.5rem auto;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* Campaigns (About) — a balanced 2x2 grid of campaign cards */
.campaign-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

.communities-district-grid {
  margin-top: 1.5rem;
}

.campaign-card {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1.5rem 1.6rem;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-top: 4px solid var(--color-gold);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.campaign-card__title {
  margin: 0;
}

.campaign-card__text {
  margin: 0;
  color: var(--color-text);
}

.campaign-card__demand {
  margin: 0.25rem 0 0;
  margin-top: auto;
  padding-top: 0.85rem;
  border-top: 1px solid var(--color-border);
  font-weight: 600;
  color: var(--color-charcoal);
}

.campaign-card__demand-label {
  display: block;
  margin-bottom: 0.2rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-brick);
}

/* Placeholder card reserving space for the upcoming fourth campaign */
.campaign-card--placeholder {
  align-items: center;
  justify-content: center;
  text-align: center;
  background: var(--color-bg-alt);
  border: 1px dashed var(--color-border);
  border-top: 4px dashed var(--color-gold);
  box-shadow: none;
  color: var(--color-muted);
}

.campaign-card--placeholder .campaign-card__text {
  color: var(--color-muted);
}

.campaign-card__soon {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: 999px;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  color: var(--color-muted);
}

/* Document / download lists (News, Resources) */
.doc-list {
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
}

.doc-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 1rem;
  padding: 1rem 1.25rem;
  border: 1px solid var(--color-border);
  border-left: 4px solid var(--color-gold);
  border-radius: var(--radius);
  margin-bottom: 0.75rem;
  background: var(--color-bg);
}

.doc-list a {
  font-weight: 600;
  text-decoration: none;
}

.doc-list a:hover {
  text-decoration: underline;
}

.doc-list__size {
  color: var(--color-muted);
  font-size: 0.85rem;
}

/* --------------------------------------------------------------------------
   Resource Library (resources.html, rendered by js/library.js)
   -------------------------------------------------------------------------- */

.library__intro {
  max-width: 65ch;
  color: var(--color-muted);
  margin-bottom: 1.75rem;
}

/* Search + open-access toggle row */
.library__controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.library__search {
  position: relative;
  flex: 1 1 280px;
}

.library__search input {
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 2.75rem;
  font: inherit;
  color: var(--color-text);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
}

.library__search input:focus-visible {
  outline: 2px solid var(--color-brick);
  outline-offset: 1px;
  border-color: var(--color-brick);
}

.library__search svg {
  position: absolute;
  top: 50%;
  left: 0.9rem;
  width: 18px;
  height: 18px;
  transform: translateY(-50%);
  fill: var(--color-muted);
  pointer-events: none;
}

/* Category filter chips */
.library__filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.lib-chip {
  padding: 0.45rem 0.9rem;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-text);
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: 999px;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.lib-chip:hover {
  border-color: var(--color-gold);
}

.lib-chip.is-active {
  background: var(--color-brick);
  border-color: var(--color-brick);
  color: #fff;
}

.lib-chip:focus-visible {
  outline: 2px solid var(--color-brick);
  outline-offset: 2px;
}

.library__count {
  margin: 0 0 1.25rem;
  font-size: 0.9rem;
  color: var(--color-muted);
}

/* Card grid */
.library__grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: 1.25rem;
}

.lib-card {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 1.25rem 1.4rem;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-top: 4px solid var(--color-gold);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.lib-card__cover {
  margin: -1.25rem -1.4rem 0.4rem;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--radius) var(--radius) 0 0;
}

.lib-card__cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.lib-card__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.lib-card__type {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  border-radius: 999px;
  background: var(--color-bg-alt);
  color: var(--color-charcoal);
}

.lib-card__type--guide {
  background: var(--color-brick);
  color: #fff;
}

.lib-card__type--newsletter {
  background: #8b3a2f;
  color: #fff;
}

.lib-card__type--web {
  background: #2f5d62;
  color: #fff;
}

.lib-card__type--book {
  background: #5b3a86;
  color: #fff;
}

.lib-card__type--news {
  background: var(--color-charcoal);
  color: #fff;
}

.lib-card__type--academic {
  background: var(--color-gold);
  color: var(--color-charcoal);
}

.lib-card__type--policy {
  background: #2f4f8f;
  color: #fff;
}

.lib-card__type--political_education {
  background: #6b2d6d;
  color: #fff;
}

.lib-card__type--community {
  background: #3a7d44;
  color: #fff;
}

.lib-card__oa {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  border-radius: 999px;
  background: #e7f1e8;
  color: #2f6b3a;
  border: 1px solid #bcd8c1;
}

.lib-card__title {
  font-size: 1.05rem;
  line-height: 1.35;
  margin: 0;
}

.lib-card__authors {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--color-text);
}

.lib-card__source {
  margin: 0;
  font-size: 0.85rem;
  color: var(--color-muted);
}

.lib-card__foot {
  margin-top: auto;
  padding-top: 0.5rem;
}

.lib-card__link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 600;
  font-size: 0.92rem;
  text-decoration: none;
  color: var(--color-brick);
}

.lib-card__link:hover {
  text-decoration: underline;
}

.lib-card__note {
  font-size: 0.85rem;
  font-style: italic;
  color: var(--color-muted);
}

.library__empty {
  padding: 2rem 1rem;
  text-align: center;
  color: var(--color-muted);
  background: var(--color-bg-alt);
  border-radius: var(--radius);
}

/* Responsive iframe embeds (Resources map, Donate campaign) */
.embed {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.embed--tall {
  aspect-ratio: auto;
  height: 900px;
}

.embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.embed--tall iframe {
  position: static;
}

.embed__link {
  margin-top: 0.75rem;
  font-size: 0.95rem;
  text-align: center;
}

.embed__link a {
  color: var(--color-brick);
  font-weight: 600;
  word-break: break-word;
}

/* Contact details card */
.contact-card {
  margin-top: 2rem;
  padding: 1.5rem 2rem;
  background: var(--color-bg-alt);
  border-radius: var(--radius);
  border-left: 4px solid var(--color-brick);
}

.contact-card h2 {
  margin-top: 0;
}

/* Staff directory (dynamically rendered from Google Sheet) */
.staff-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.staff-card {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 1.25rem 1.4rem;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-top: 4px solid var(--color-gold);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.staff-card__name {
  margin: 0;
  font-size: 1.05rem;
  color: var(--color-charcoal);
}

.staff-card__position {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-brick);
}

.staff-card__phone {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-brick);
  text-decoration: none;
}

.staff-card__phone::before {
  content: "📞";
  font-size: 0.85rem;
}

.staff-card__phone:hover {
  text-decoration: underline;
}

.staff-card__location {
  margin: 0;
  font-size: 0.85rem;
  color: var(--color-muted);
}

/* Gallery grid + lightbox */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.gallery-grid__item {
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  border-radius: var(--radius);
  overflow: hidden;
}

.gallery-grid__item img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.gallery-grid__item:hover img,
.gallery-grid__item:focus-visible img {
  transform: scale(1.05);
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: rgba(15, 13, 12, 0.9);
}

.lightbox.is-open {
  display: flex;
}

.lightbox__figure {
  margin: 0;
  max-width: 90vw;
}

.lightbox__img {
  max-width: 90vw;
  max-height: 85vh;
  border-radius: var(--radius);
}

.lightbox__caption {
  margin-top: 0.75rem;
  color: #fff;
  text-align: center;
  font-size: 0.95rem;
}

.lightbox__close {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  width: 48px;
  height: 48px;
  font-size: 2rem;
  line-height: 1;
  color: #fff;
  background: none;
  border: 0;
  cursor: pointer;
}

/* --------------------------------------------------------------------------
   Floating Widgets & Chatbot
   -------------------------------------------------------------------------- */

.floating-widgets {
  position: fixed;
  /* Respect the iOS home indicator / Android gesture bar. */
  bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  right: 24px;
  z-index: 300;
  display: flex;
  gap: 12px;
  align-items: center;
}

.widget-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  /* Fixed height keeps the touch target well above the 48px minimum in both
     the expanded pill and the collapsed circle states. */
  height: 56px;
  padding: 0 22px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  color: #fff;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  white-space: nowrap;
  /* Clip the label as the button collapses so it can't spill outside the
     circle while it fades out. */
  overflow: hidden;
  /* Keep the geometry (width/padding/gap) snapping together so the icon lands
     centered instead of jittering; only colour and hover scale animate. */
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.widget-btn:hover {
  transform: scale(1.05);
}

/* Once collapsed (chat open), don't scale on hover. As the pill shrinks into a
   circle under the pointer, the hover state would otherwise flicker on/off and
   make the button wiggle. */
.widget-btn--chatbot.is-collapsed,
.widget-btn--chatbot.is-collapsed:hover {
  transform: none;
}

.widget-btn__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.widget-btn__icon svg {
  width: 26px;
  height: 26px;
  fill: #fff;
}

.widget-btn__label {
  max-width: 200px;
  overflow: hidden;
  opacity: 1;
  transition: opacity 0.2s ease;
}

.widget-btn--whatsapp {
  background-color: #25d366;
  text-decoration: none;
}

.widget-btn--chatbot {
  background-color: var(--color-brick);
}

/* Collapsed state: icon-only circle (on scroll, or while the chat is open). */
.widget-btn--chatbot.is-collapsed {
  width: 56px;
  padding: 0;
  gap: 0;
  justify-content: center;
}

.widget-btn--chatbot.is-collapsed .widget-btn__label {
  max-width: 0;
  opacity: 0;
}

@media (prefers-reduced-motion: reduce) {
  .widget-btn,
  .widget-btn__label {
    transition: none;
  }
}

.chat-window {
  position: fixed;
  bottom: 92px;
  right: 24px;
  width: 460px;
  max-width: calc(100vw - 48px);
  height: 600px;
  max-height: calc(100vh - 120px);
  background: #fff;
  z-index: 300;
  border-radius: 22px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all 0.3s ease;
}

.chat-window.is-active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.chat-window__header {
  background: var(--color-brick);
  color: #fff;
  padding: 1rem 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.chat-window__header h3 {
  color: #fff;
  margin: 0;
  font-size: 1rem;
}

.chat-window__close {
  background: none;
  border: 0;
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
}

.chat-window__wa-banner {
  background: #e7f7ef;
  padding: 0.6rem 1.25rem;
  font-size: 0.85rem;
  border-bottom: 1px solid var(--color-border);
}

.chat-window__wa-banner a {
  color: #128c7e;
  text-decoration: none;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.chat-window__wa-banner a:hover {
  text-decoration: underline;
}

.chat-window__body {
  flex: 1;
  padding: 1.25rem;
  overflow-y: auto;
  background: var(--color-bg-alt);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.chat-msg {
  margin: 0;
  align-self: flex-start;
  background: #fff;
  padding: 0.75rem;
  border-radius: 0 12px 12px 12px;
  font-size: 0.9rem;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
  max-width: 85%;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

/* Messages sent by the user, aligned to the right in the site's brick red */
.chat-msg--user {
  align-self: flex-end;
  background: var(--color-brick);
  color: #fff;
  border-radius: 12px 12px 0 12px;
}

/* "Assembly Bot is typing..." placeholder while waiting for the webhook */
.chat-msg--pending {
  color: var(--color-muted);
  font-style: italic;
}

/* Bot replies rendered from Markdown: reset block spacing and style basics. */
.chat-msg--rich {
  white-space: normal;
}

.chat-msg--rich > :first-child {
  margin-top: 0;
}

.chat-msg--rich > :last-child {
  margin-bottom: 0;
}

.chat-msg--rich p {
  margin: 0 0 0.5rem;
}

.chat-msg--rich ul,
.chat-msg--rich ol {
  margin: 0 0 0.5rem;
  padding-left: 1.25rem;
}

.chat-msg--rich a {
  color: var(--color-brick);
  text-decoration: underline;
}

.chat-msg--rich code {
  background: rgba(0, 0, 0, 0.06);
  padding: 0.1em 0.3em;
  border-radius: 4px;
  font-size: 0.85em;
}

.chat-window__footer {
  padding: 1rem;
  border-top: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.chat-window__footer input {
  flex: 1 1 auto;
  min-width: 0;
  padding: 0.6rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.9rem;
}

.chat-window__footer input:focus {
  outline: none;
  border-color: var(--color-brick);
  box-shadow: 0 0 0 2px rgba(158, 59, 46, 0.15);
}

/* Rounded send button to match the new chat styling */
.chat-window__send {
  flex: 0 0 auto;
  padding: 0.6rem 1.3rem;
  border: 0;
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.9rem;
  cursor: pointer;
  white-space: nowrap;
}

/* Speech-to-text (microphone) button */
.chat-window__mic {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--color-border);
  border-radius: 50%;
  background: var(--color-bg-alt);
  color: var(--color-brick);
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.chat-window__mic:hover {
  background: var(--color-brick);
  color: #fff;
}

.chat-window__mic svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

/* Active "listening" state */
.chat-window__mic.is-listening {
  background: var(--color-brick);
  color: #fff;
  animation: chat-mic-pulse 1.2s ease-in-out infinite;
}

@keyframes chat-mic-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(158, 59, 46, 0.5);
  }
  50% {
    box-shadow: 0 0 0 6px rgba(158, 59, 46, 0);
  }
}

/* --------------------------------------------------------------------------
   Footer (injected by js/components.js)
   -------------------------------------------------------------------------- */

.site-footer {
  background: var(--color-charcoal);
  color: #d8d3ce;
}

.site-footer a {
  color: #fff;
}

.site-footer__cols {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  padding-block: 3rem;
  text-align: center;
}

.site-footer h3 {
  color: #fff;
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.site-footer__logo {
  width: 90px;
  margin: 0 auto 0.75rem;
  border-radius: 6px;
}

.site-footer__social {
  display: flex;
  justify-content: center;
  gap: 1rem;
  padding-bottom: 2rem;
}

.site-footer__social a {
  display: inline-flex;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
}

.site-footer__social svg {
  width: 18px;
  height: 18px;
  fill: #fff;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 900px) {
  .nav-toggle {
    display: flex;
  }

  .nav {
    position: absolute;
    inset: 100% 0 auto 0;
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--shadow);
    display: none;
  }

  .nav.is-open {
    display: block;
  }

  .nav__list {
    flex-direction: column;
    gap: 0;
    padding: 0.5rem var(--space) 1rem;
  }

  .nav__link {
    padding: 0.75rem 0.5rem;
  }

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

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

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

@media (max-width: 600px) {
  .photo-strip {
    grid-template-columns: 1fr;
  }

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

  .site-footer__cols {
    grid-template-columns: 1fr;
  }

  .embed--tall {
    height: 700px;
  }

  /* The 16/9 ratio makes interactive embeds far too short to use on phones.
     Drop the ratio and give them a tall, viewport-based height instead. */
  .embed {
    aspect-ratio: auto;
    height: 75vh;
    min-height: 480px;
  }

  .chat-window__footer {
    padding: 0.75rem;
    gap: 0.4rem;
  }

  .chat-window__footer input {
    padding: 0.55rem 0.85rem;
  }

  .chat-window__mic {
    width: 38px;
    height: 38px;
  }

  .chat-window__send {
    padding: 0.55rem 1rem;
  }
}
