/* ============================================
   components.css — Reusable UI components
   ============================================ */
.eyebrow {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  font-size: var(--text-sm);
  line-height: 1.4;
  letter-spacing: .21em;
  font-weight: 700;
  color: var(--accent-text);
  text-transform: uppercase;
}
.eyebrow-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--red-bright);
  box-shadow: 0 0 15px var(--red-bright);
}
.eyebrow-line {
  display: inline-block;
  width: 32px;
  height: 1px;
  background: currentColor;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 23px;
  min-height: 54px;
  padding: 0 var(--space-md);
  border: 0;
  border-radius: var(--radius-md);
  font-size: var(--text-md);
  font-weight: 700;
  letter-spacing: .11em;
  text-transform: uppercase;
  text-align: center;
  cursor: pointer;
  transition: background var(--duration-fast), border-color var(--duration-fast), color var(--duration-fast);
}
.button-red {
  background: var(--red);
  color: #fff;
}
.button-red span, .text-link span {
  font-size: var(--text-lg);
}
.text-link {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  font-size: var(--text-md);
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--hero-muted);
}
.text-link span {
  margin-left: 7px;
  color: var(--accent-text);
}
/* The outlined secondary is the smaller of the two buttons: 46px tall (the
   WCAG 2.5.8 minimum) against the primary's 54, same 12px radius, and a
   lighter 600 weight so the red fill stays the loudest thing on the page.
   Its 1px translucent outline is kept — it is the boundary, not a shadow. */
.button-outline {
  margin-top: 20px;
  min-height: 46px;
  border: 1px solid var(--surface-contrast-border);
  color: var(--surface-contrast-text);
  background: transparent;
  font-weight: 600;
}
.button-outline:hover {
  border-color: var(--red);
  background: var(--red);
}
/* form.js sets `disabled` on submit. Without this the button keeps its full
   red fill while inert, because .button-red sets an explicit background and so
   suppresses the UA disabled styling. */
.button:disabled {
  background: var(--surface-contrast-soft);
  color: var(--text-muted);
  box-shadow: none;
  cursor: progress;
}
[data-theme-toggle] {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  transition: border-color var(--duration-fast), background-color var(--duration-fast), transform var(--duration-fast);
}
[data-theme-toggle]:hover {
  border-color: var(--accent-text);
  background: var(--surface-soft);
}
[data-theme-toggle] .theme-toggle__icon {
  display: grid;
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  place-items: center;
  color: var(--accent-text);
  font-size: var(--text-xl);
  line-height: 1;
  transition: transform calc(var(--duration-medium) * 0.5) ease;
}
[data-theme-toggle]:hover .theme-toggle__icon {
  transform: rotate(-18deg);
}
html:not(.js) [data-theme-toggle] {
  display: none;
}
.menu-toggle {
  display: none;
}
.form-top {
  display: flex;
  justify-content: space-between;
  padding-bottom: 20px;
  margin-bottom: 19px;
  border-bottom: 1px solid var(--border);
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 700;
  letter-spacing: .17em;
}
.field-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--space-sm);
}
/* One field = its label, its control and (when the server rejected it) its own
   sentence. The wrapper owns the vertical rhythm, so a field that grows an
   error message does not push its neighbour in .field-row out of line by
   inheriting a margin the label used to carry. */
.contact-form .field {
  min-width: 0;
  margin-bottom: 17px;
}
.contact-form label {
  display: block;
  color: var(--text-form);
  font-size: var(--text-md);
  font-weight: 700;
  letter-spacing: .04em;
}
.contact-form .field > label {
  margin-bottom: 7px;
}
/* Visible "this one is required" marker. Screen readers hear the required state
   from `aria-required` on the control (the form carries no `required` attribute
   — see the note in contact.php); this is for sighted and low-vision users,
   who otherwise have to submit to find out. The only optional field is the one
   folded into "More details", so the two conventions stay together. */
.req {
  color: var(--accent-text);
}
.contact-form input:not([type="checkbox"]):not([type="radio"]),
.contact-form textarea {
  display: block;
  width: 100%;
  margin-top: 0;
  padding: var(--space-xs) var(--space-sm);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  background: var(--surface-input);
  color: var(--ink);
  line-height: 1.3;
  /* Never below --text-lead: iOS Safari zooms the viewport on focus for any
     control under 16px, which leaves the page stuck at magnification. */
  font-size: var(--text-lead);
  transition: border-color var(--duration-fast);
}
/* min-height, not height: a fixed 42px box clips its own text when a visitor
   forces increased line (WCAG 1.4.12). */
.contact-form input:not([type="checkbox"]):not([type="radio"]) {
  min-height: 46px;
}
.contact-form textarea {
  resize: vertical;
  min-height: 118px;
}
.contact-form input:not([type="checkbox"]):not([type="radio"]):focus,
.contact-form textarea:focus {
  border-color: var(--red);
  background: var(--surface-form);
}
.contact-form input:not([type="checkbox"]):not([type="radio"])[aria-invalid="true"],
.contact-form textarea[aria-invalid="true"] {
  border-color: var(--status-error-text);
  box-shadow: 0 0 0 1px var(--status-error-text);
}
.contact-form input:not([type="checkbox"]):not([type="radio"])::placeholder,
.contact-form textarea::placeholder {
  color: var(--text-placeholder);
}
.form-bottom {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}
/* Consent checkbox. The only non-text control in the form, so it has to opt out
   of the `.contact-form input:not([type="checkbox"]):not([type="radio"])` block above with its own selector —
   `.contact-form label` alone is not specific enough to be worth fighting.
   `border`, `border-radius` and `box-shadow` are Firefox-only in practice:
   Blink ignores author border/radius/shadow on a native checkbox but honours
   them, so these neutralise effects.css:29's 12px radius and glass.css's inset
   highlight there. Do not delete them thinking Chrome ignores them. */
.contact-form .consent {
  display: flex;
  align-items: flex-start;
  gap: var(--space-xs);
  margin: 0 0 17px;
  color: var(--text-subtle);
  /* 14px, not the 13px the labels use: this is the one paragraph in the form a
     visitor has to actually read before ticking the box, and the smallest type
     on the panel is the wrong place to save a pixel. */
  font-size: var(--text-base);
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.5;
  cursor: pointer;
}
/* The 15px box is the visual control, but the tap target has to clear 24px
   (WCAG 2.5.8). Padding grows the hit area without moving the box. */
.contact-form .consent input[type="checkbox"] {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  /* `.contact-form input:not([type="checkbox"]):not([type="radio"])` sets `min-height: 46px` for the text fields. That
     declaration is inherited here and, unlike the `height` it replaced, is not
     beaten by specificity — `min-height` wins over `height` regardless — so
     without this the box rendered 18x46px. */
  min-height: 0;
  margin: 1px 0 0;
  padding: 4px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-xs);
  background: var(--surface-input);
  box-shadow: none;
  font-size: inherit;
  accent-color: var(--red);
  cursor: pointer;
}
/* The server can reject the consent box on its own (the checkbox is the one
   field whose message is not about typing), and it marked that control
   aria-invalid — but only the text inputs and the textarea had a visual state
   for it, so the box the visitor had to tick looked untouched. Same pair of
   declarations as the invalid text field above. */
.contact-form .consent input[type="checkbox"][aria-invalid="true"] {
  border-color: var(--status-error-text);
  box-shadow: 0 0 0 1px var(--status-error-text);
}
/* --- What the form says back ------------------------------------------------
   Two shapes, one vocabulary. The error summary sits at the top of the form and
   is the element the response's fragment focuses; the per-field sentence sits
   directly under the control it is about. Both state the problem in words and
   carry a shape as well as a colour — the summary has a heavy left rule, the
   field message a visually hidden "Error:" — so neither depends on hue alone. */
.form-feedback {
  padding: 13px 15px;
  margin: 0 0 18px;
  border: 1px solid var(--status-error-text);
  border-left-width: 4px;
  border-radius: var(--radius-sm);
  background: var(--status-error-bg);
  color: var(--status-error-text);
  font-size: var(--text-base);
  line-height: 1.55;
}
.form-feedback:focus-visible {
  outline: 3px solid var(--red-bright);
  outline-offset: 3px;
}
.form-feedback--success {
  background: var(--status-success-bg);
  border-color: var(--status-success-text);
  color: var(--status-success-text);
}
.form-feedback__title {
  margin: 0 0 6px;
  font-size: var(--text-lead);
  font-weight: 700;
  line-height: 1.3;
}
.form-feedback__text {
  margin: 0;
}
.form-feedback__text + .form-feedback__text {
  margin-top: 8px;
}
.form-feedback__list {
  margin: 0;
  padding-left: 18px;
  list-style: disc;
}
.form-feedback__list li + li {
  margin-top: 4px;
}
.form-feedback__list a {
  color: inherit;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}
/* The sentence for one rejected control. Under the box it belongs to, so the
   reason and the thing to change are in the same place on screen, and worded
   rather than tinted. */
.contact-form .field-error {
  margin: 6px 0 0;
  color: var(--status-error-text);
  font-size: var(--text-base);
  font-weight: 600;
  line-height: 1.45;
}
/* The one optional field, folded away. The primitive is the shared
   `.sf-disclosure` in material.css — this only dresses it for a form surface
   and gives the row a thumb-sized target. Its background is a translucent
   tint on a glass panel, so the border does the work of defining it. */
.contact-form .sf-disclosure {
  margin-bottom: 17px;
}
.contact-form .sf-disclosure > summary {
  min-height: 44px;
  color: var(--text-form);
  font-size: var(--text-md);
  font-weight: 700;
  letter-spacing: .04em;
}
.contact-form .sf-disclosure__body {
  padding: var(--space-sm);
  border-top: 1px solid var(--border);
}
.contact-form .sf-disclosure__body .field {
  margin-bottom: 0;
}
/* The receipt that stands in for the form after a successful send. */
.contact-form--sent .form-feedback__title {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  letter-spacing: .02em;
  text-transform: uppercase;
  color: var(--status-success-text);
}
.contact-form--sent .form-feedback__text {
  color: var(--status-success-text);
  max-width: 42ch;
}
.trap {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.service-card {
  position: relative;
  min-height: 360px;
  padding: var(--space-xl) var(--space-lg) var(--space-lg);
  /* All four sides, not just a right-hand divider: each card now has to
     describe its own shape. */
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
}
.service-number {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  letter-spacing: .16em;
  color: var(--text-subtle);
}
.service-icon {
  width: 52px;
  height: 52px;
  margin: 29px 0 20px;
  border: 1px solid var(--border-strong);
  color: var(--red);
  display: grid;
  place-items: center;
}
.service-icon img {
  width: 38px;
  height: 40px;
  object-fit: contain;
}
