/* Page structure: container, sections, header, footer, grids.
   Design rule: no divider lines and no colour bands; space and soft surfaces do the separating. */

.container {
  width: min(100% - 2 * var(--space-5), var(--container));
  margin-inline: auto;
}

.section { padding-block: var(--space-8); }
/* Sections of the designed pages (Home, About, Services, Contact) sit closer together. */
.page .section { padding-block: var(--space-6); }
@media (min-width: 48rem) { .page .section { padding-block: var(--space-7); } }

.page-header { margin-bottom: var(--space-7); }
.page-header__title { font-size: var(--text-4xl); margin-bottom: var(--space-3); }
.page-header__lead { color: var(--color-text-muted); font-size: var(--text-lg); max-width: var(--container-text); }

/* ── Bands: every section of a designed page (Home, About, Services, Contact) sits on its own
   full-width ground ──
   Ivory and warm alternate (lr_render_bands(), lr_band_tones()). A panel inside a band takes the
   other tone through --panel-bg, so it stays visible on either ground. */
.band { background: var(--band-bg); }
.band--ivory { --band-bg: var(--color-bg); --panel-bg: var(--color-surface-alt); }
.band--warm  { --band-bg: var(--color-surface-alt); --panel-bg: var(--color-bg); }
/* Scroll reveal (assets/js/reveal.js): the content of a band rises 12px when it comes into view; the
   band's ground stays put. Movement only, so nothing is hidden if the script does not run. */
.band[data-reveal="pending"] > .container { transform: translateY(0.75rem); }
.band[data-reveal="done"] > .container { transition: transform var(--transition-slow); } /* only the rise is animated; the shift at load is instant */
/* The last band ends the page; the footer follows without a gap. */
body.has-bands .site-footer { margin-top: 0; }

/* ── Header: sticky, quieter and shorter once the page is scrolled ── */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--color-bg); transition: box-shadow var(--transition-base); }
.site-header.is-stuck { box-shadow: var(--shadow-card); }
.site-header.is-stuck .site-header__inner { min-height: 4rem; }
.site-header.is-stuck .site-header__logo { height: 1.9rem; }
/* Logged-in editors: stay below the WordPress admin bar (it is not fixed under 600px). */
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 46px; } }
@media (max-width: 600px) { .admin-bar .site-header { top: 0; } }
.site-header__inner {
  transition: min-height var(--transition-base);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  min-height: 5rem;
}
.site-header__brand { display: inline-flex; align-items: center; color: var(--color-text); text-decoration: none; }
.site-header__logo { display: block; height: 2.25rem; width: auto; transition: height var(--transition-base); }
.site-header__name { font-family: var(--font-heading); font-size: var(--text-xl); }
.custom-logo { max-height: 2.75rem; width: auto; }

/* Mobile first: the navigation is collapsed until the toggle opens it. display:none
   (not just off-screen) so closed links are also out of the keyboard order. */
.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-md);
  background: var(--color-bg);
  color: var(--color-text);
  cursor: pointer;
}
.nav-toggle__bars,
.nav-toggle__bars::before,
.nav-toggle__bars::after {
  display: block;
  width: 1.25rem;
  height: 2px;
  background: currentColor;
  content: "";
  position: relative;
}
.nav-toggle__bars::before { position: absolute; top: -0.4rem; }
.nav-toggle__bars::after  { position: absolute; top: 0.4rem; }

.js .nav-toggle { display: inline-flex; }
/* Open menu: as much space below its last item as the closed bar has below the logo (bar 5rem, toggle 2.75rem). */
.site-nav { flex-basis: 100%; padding-bottom: calc((5rem - 2.75rem) / 2); }
.js .site-nav { display: none; }
.js .site-nav.is-open { display: block; max-height: calc(100dvh - 5rem); overflow-y: auto; }
.site-nav__list { list-style: none; margin: 0; padding: 0; }
.site-nav__list + .site-nav__phone { margin-top: var(--space-4); }
.site-nav__list a { display: block; padding: var(--space-3) 0; color: var(--color-text); text-decoration: none; font-size: var(--text-sm); }
.site-nav__list a { transition: color var(--transition-fast); }
.site-nav__list a:hover { color: var(--color-primary); }
.site-nav__list [aria-current="page"] { color: var(--color-primary); font-weight: 500; }
.site-nav__list .sub-menu { list-style: none; padding-left: var(--space-4); }

@media (min-width: 52rem) {
  .js .nav-toggle { display: none; }
  .site-nav,
  .js .site-nav { display: flex; align-items: center; gap: var(--space-6); flex-basis: auto; padding-bottom: 0; }
  .site-nav__list { display: flex; gap: var(--space-6); margin: 0; }
  .site-nav__list + .site-nav__phone { margin-top: 0; }
  .site-nav__list a { padding: var(--space-2) 0; }
  .site-nav__list > li { position: relative; }
  .site-nav__list .sub-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 14rem;
    padding: var(--space-3) var(--space-4);
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-menu);
    z-index: 20;
  }
  .site-nav__list li:hover > .sub-menu,
  .site-nav__list li:focus-within > .sub-menu { display: block; }
}

/* ── Footer: compact columns (contact, links, social, newsletter), little padding, small type ── */
.site-footer { margin-top: var(--space-8); padding-block: var(--space-5) var(--space-4); background: var(--color-surface-alt); font-size: var(--text-sm); }
.site-footer__brand { display: flex; align-items: center; gap: var(--space-2); margin-bottom: var(--space-2); }
.site-footer__mark { flex: none; width: 2rem; height: auto; }
.site-footer__title { font-family: var(--font-heading); font-size: var(--text-lg); margin: 0; }
.site-footer__address { margin: 0; }
.site-footer__hours { margin: var(--space-2) 0 0; }
.site-footer__grid { display: grid; gap: var(--space-4); }
.site-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-5);
  justify-content: space-between;
  margin-top: var(--space-4);
  color: var(--color-text-muted);
  font-size: var(--text-xs);
}
.site-footer__bottom p { margin: 0; }
.footer-list { list-style: none; margin: 0; padding: 0; }
.footer-list li { margin-bottom: var(--space-1); }
.footer-list--inline { display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-4); }
.footer-list--inline li { margin: 0; }
/* Phones: links and social links run in a line instead of a tall column. */
.site-footer__nav .footer-list,
.site-footer__social .footer-list { display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-4); }
.site-footer__nav .footer-list li,
.site-footer__social .footer-list li { margin: 0; }

/* Newsletter: a small block. Heading, then the address field with its button beside it, then the consent line. */
.site-footer__newsletter { max-width: 24rem; }
.site-footer__newsletter .site-footer__title { margin-bottom: var(--space-2); }
.site-footer__newsletter .form { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: var(--space-2); align-items: end; max-width: none; }
.site-footer__newsletter .form__row { grid-column: 1; grid-row: 1; margin: 0; }
.site-footer__newsletter .form__label { margin-bottom: 0.15rem; font-size: var(--text-xs); }
.site-footer__newsletter .field { height: 2.5rem; padding-block: 0; font-size: var(--text-sm); }
.site-footer__newsletter .button { grid-column: 2; grid-row: 1; display: inline-flex; align-items: center; justify-content: center; height: 2.5rem; padding-block: 0; padding-inline: var(--space-4); font-size: var(--text-sm); }
.site-footer__newsletter .form__check { grid-column: 1 / -1; grid-row: 2; margin: var(--space-2) 0 0; gap: var(--space-2); font-size: var(--text-xs); }
.site-footer__newsletter .form__check input { width: 1rem; height: 1rem; }
.site-footer__newsletter .form__feedback { grid-column: 1 / -1; grid-row: 3; margin: var(--space-2) 0 0; padding: var(--space-2) var(--space-3); font-size: var(--text-xs); }

@media (min-width: 52rem) {
  /* Flex, so a missing column (no social links, no newsletter) simply gives its room to the others
     and a narrow desktop wraps the widest column onto its own row. */
  .site-footer__grid { display: flex; flex-wrap: wrap; gap: var(--space-4) var(--space-6); }
  .site-footer__contact { flex: 3 1 14rem; }
  .site-footer__nav { flex: 2 1 8rem; }
  .site-footer__social { flex: 2 1 6rem; }
  .site-footer__newsletter { flex: 3 1 16rem; }
  .site-footer__nav .footer-list,
  .site-footer__social .footer-list { display: block; }
  .site-footer__nav .footer-list li,
  .site-footer__social .footer-list li { margin-bottom: var(--space-1); }
}

/* ── Grids ── */
.card-grid { display: grid; gap: var(--space-5); grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); }

/* ── Article ── */
.article { max-width: var(--container-text); }
.article__title { font-size: var(--text-4xl); }
.article__image { margin-block: var(--space-6); }
.article__image img { border-radius: var(--radius-sm); width: 100%; }

/* Block editor alignments inside content */
.entry-content > * { max-width: var(--container-text); margin-inline: 0; }
.entry-content > .alignwide,
.entry-content > .alignfull { max-width: var(--container); }
/* Block groups inside editor content (posts, legal pages) breathe vertically */
.entry-content > .wp-block-group { margin-block: var(--space-8); }

/* Editor content (posts, legal pages): readable rhythm */
.entry-content { font-size: var(--text-md); }
.entry-content > * + * { margin-top: var(--space-4); margin-bottom: 0; }
.entry-content h2 { margin-top: var(--space-7); font-size: var(--text-3xl); }
.entry-content h3 { margin-top: var(--space-6); font-size: var(--text-xl); }
.entry-content ul, .entry-content ol { padding-left: 1.25em; }
.entry-content li + li { margin-top: var(--space-2); }
.entry-content blockquote { margin-inline: 0; padding-left: var(--space-5); font-family: var(--font-heading); font-size: var(--text-xl); }
.entry-content img { border-radius: var(--radius-sm); }
.entry-content figcaption { margin-top: var(--space-2); color: var(--color-text-muted); font-size: var(--text-sm); }
