/* site.css — HAND-WRITTEN. What the static site needs that the prototype
   did not: no-JS defaults, the menu button and panels once ui.js is running,
   image placeholders, form pieces, and phone layouts for grids the prototype
   set inline.

   Loads after styles.css (generated from design/styles.css). Several rules
   need !important for one reason only: the prototype writes layout inline
   (style="display:grid; grid-template-columns:…"), and an inline declaration
   beats any stylesheet rule without it. */

/* ---------------------------------------------------------------- utilities */
/* .visually-hidden lives in styles.css (design/styles.css), shared with the prototype. */
[hidden] { display: none !important; }

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--fg-1); color: var(--bg-page); padding: 10px 16px;
  border-radius: 4px; font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: 12px; }

:focus-visible { outline: 2px solid var(--color-ochre); outline-offset: 2px; }

/* ---------------------------------------------------------------- header
   No JS: the desktop nav is the only nav, so on a phone it wraps instead of
   disappearing. styles.css hides it below 880px unconditionally; that rule is
   only allowed to apply once ui.js has added .nav-js and shown the button. */
@media (max-width: 880px) {
  .site-header:not(.nav-js) .site-header-bar { flex-wrap: wrap; row-gap: 8px; }
  .site-header:not(.nav-js) nav.desktop-nav {
    display: flex !important; flex-wrap: wrap; gap: 4px 18px !important;
    margin-left: 0 !important; width: 100%;
  }
  .site-header:not(.nav-js) a.desktop-nav { display: none !important; }
  .site-header.nav-js .mobile-nav-trigger { display: inline-flex; }
}
@media (min-width: 880.02px) {
  #mobile-nav { display: none !important; }
}
.mobile-nav-trigger .icon-close,
.mobile-nav-trigger[aria-expanded="true"] .icon-open { display: none; }
.mobile-nav-trigger[aria-expanded="true"] .icon-close { display: block; }

/* ---------------------------------------------------------------- buttons
   The prototype's buttons were <button>s; the site's navigate, so they are
   <a>s and pick up the link underline unless told otherwise. */
a.btn { text-decoration: none; }

/* The draft's secondary button on the dark CTA band was dark-on-dark
   (unreadable). Not a design choice; fixed here, and worth fixing in design/. */
.cta-banner .btn-secondary { color: var(--fg-on-dark); border-color: rgba(242, 239, 234, .45); }
.cta-banner .btn-secondary:hover { background: rgba(242, 239, 234, .08); border-color: var(--fg-on-dark); }

/* ---------------------------------------------------------------- services */
.svc-row .expander[aria-expanded="false"] svg { transform: rotate(180deg); }

/* ---------------------------------------------------------------- image placeholders
   No photography has been supplied yet. Each <image-slot> in the design is
   rendered as a labelled box until a real image is set (src on the slot). */
.image-slot {
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-inset); border: 1px dashed var(--line-strong);
  color: var(--fg-3); font-size: 13px; line-height: 1.45; text-align: center;
  padding: 16px; overflow: hidden; border-radius: 10px; max-width: 100%;
}
img.image-slot { padding: 0; border: 0; object-fit: cover; display: block; }
.image-slot[data-shape="circle"] { border-radius: 50% !important; font-size: 11.5px; }
.image-slot[data-shape="rect"] { border-radius: 0; }
.image-slot span { max-width: 32ch; }

/* ---------------------------------------------------------------- contact form */
.form-toggle { border: 1px solid var(--line-2); margin: 0; min-width: 0; }
.form-toggle label {
  cursor: pointer; padding: 8px 16px; font-family: var(--font-sans);
  font-size: 13px; font-weight: 600; color: var(--fg-2); border-radius: 4px;
  transition: background 120ms, color 120ms;
}
.form-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.form-toggle label:has(input:checked) { background: #fff; color: var(--fg-1); box-shadow: var(--shadow-1); }
.form-toggle label:has(input:focus-visible) { outline: 2px solid var(--color-ochre); outline-offset: 2px; }

.housing-fields {
  border: 1px solid var(--line-1); border-radius: 6px; margin: 0; padding: 16px 18px 18px;
  display: flex; flex-direction: column; gap: 16px; min-width: 0;
}
.housing-legend {
  font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  color: var(--fg-3); padding: 0 6px;
}
/* ui.js hides the legend once the toggle is doing the explaining */
.js-form .housing-legend { display: none; }
.field-label { font-size: 13px; font-weight: 600; color: var(--fg-1); }

.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* ---------------------------------------------------------------- phone layouts */
@media (max-width: 760px) {
  .contact-top-grid, .contact-form-grid, .useful-grid {
    grid-template-columns: 1fr !important; gap: 32px !important;
  }
  .form-row-2 { grid-template-columns: 1fr !important; }
}
