/* ==========================================================================
   Footer — mobile first
   <768 stacked + accordions · 768–1099 2×2 · 1100+ four columns ·
   1360+ adds the sign-off column. Always ink, aligned to the header's
   content edge (same inset + pad + max width).
   ========================================================================== */

/* "Nothing You Could Do" (OFL, fonts/OFL-NothingYouCouldDo.txt), subset to the
   sign-off glyphs only: 2.5 KB. Any other text in it falls back to cursive. */
@font-face {
  font-family: "HB Signature";
  src: url("../fonts/hb-signature.woff2") format("woff2");
  font-display: swap;
}

.ftr {
  --ftr-text:        var(--slate-300);
  --ftr-muted:       var(--slate-400);
  --ftr-strong:      var(--slate-50);
  --ftr-line:        rgb(148 163 184 / 0.16);
  --ftr-line-strong: rgb(148 163 184 / 0.32);
  --ftr-hover:       rgb(148 163 184 / 0.10);
  --ftr-field:       rgb(2 6 23 / 0.45);
  --ftr-sign:        "HB Signature", "Segoe Script", "Bradley Hand", cursive;

  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 56px var(--hdr-inset) 0;
  background: var(--ink-900);
  color: var(--ftr-text);
}
.ftr :focus-visible { outline-color: var(--color-focus-on-ink); outline-offset: 3px; }

.ftr__inner {
  max-width: var(--hdr-max);
  margin-inline: auto;
  padding-inline: var(--hdr-pad);
}

/* Foothills at dusk, behind everything. */
.ftr__ridge {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  z-index: -1;
  width: 100%;
  height: clamp(128px, 96px + 8vw, 208px);
  pointer-events: none;
}
.ftr__ridge-far  { fill: var(--slate-800); opacity: 0.4; }
.ftr__ridge-near { fill: var(--ink-950); opacity: 0.55; }

.ftr__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "brand" "services" "quick" "loop";
}
.ftr__brand         { grid-area: brand; }
.ftr__col--services { grid-area: services; }
.ftr__col--quick    { grid-area: quick; }
.ftr__col--loop     { grid-area: loop; }
.ftr__signoff       { grid-area: signoff; display: none; }

/* ---- Brand ---------------------------------------------------------------- */

.ftr__logo {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-height: 44px;
  color: var(--ftr-strong);
  text-decoration: none;
}
.ftr__mark { flex-shrink: 0; display: grid; place-items: center; width: 44px; height: 44px; }
.ftr__mark img { width: 100%; height: 100%; object-fit: contain; }
.ftr__monogram {
  font-size: 2rem;
  font-weight: 700;
  font-stretch: 80%;
  letter-spacing: -0.06em;
  line-height: 1;
}
.ftr__rule { flex-shrink: 0; width: 1px; height: 40px; background: var(--ftr-line-strong); }
.ftr__id { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.ftr__name {
  font-size: 1.0625rem;
  font-weight: 700;
  font-stretch: 85%;
  letter-spacing: 0.04em;
  line-height: 1.15;
  text-transform: uppercase;
}
.ftr__role { font-size: 0.875rem; font-weight: 500; line-height: 1.25; color: var(--ftr-text); }

.ftr__blurb { max-width: 42ch; margin-top: 22px; line-height: 1.6; }

.ftr__place { display: flex; align-items: flex-start; gap: 8px; margin-top: 20px; line-height: 1.4; }
.ftr__place .icon { flex-shrink: 0; margin-top: 1px; color: var(--ftr-muted); }
.ftr__city  { display: block; font-weight: 500; color: var(--ftr-strong); }
.ftr__reach { display: block; margin-top: 2px; font-size: 0.875rem; color: var(--ftr-muted); }

.ftr__book {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  margin-top: 24px;
  padding-inline: 16px;
  border: 1px solid var(--ftr-line-strong);
  border-radius: 999px;
  color: var(--ftr-strong);
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  transition: border-color var(--t-fast) var(--ease-out), background-color var(--t-fast) var(--ease-out);
}
.ftr__book:hover { border-color: var(--color-primary); background: var(--ftr-hover); }

/* ---- Profiles ------------------------------------------------------------- */

.ftr__social { display: flex; flex-wrap: wrap; gap: 4px; margin: 20px 0 0 -12px; }
.ftr__social--loop { display: none; }
.ftr__icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: var(--r-sm);
  color: var(--ftr-text);
  transition: color var(--t-fast) var(--ease-out), background-color var(--t-fast) var(--ease-out);
}
a.ftr__icon:hover { color: var(--ftr-strong); background: var(--ftr-hover); }
.ftr__icon.is-pending { opacity: 0.35; cursor: help; }

/* ---- Link groups (accordions on phones) ----------------------------------- */

.ftr__col--services { margin-top: 32px; border-top: 1px solid var(--ftr-line-strong); }
.ftr__group { border-bottom: 1px solid var(--ftr-line); }
.ftr__summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 52px;
  list-style: none;
  cursor: pointer;
}
.ftr__summary::-webkit-details-marker { display: none; }
.ftr__heading {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--ftr-strong);
}
.ftr__chev { flex-shrink: 0; color: var(--ftr-muted); transition: transform var(--t-base) var(--ease-out); }
.ftr__group[open] .ftr__chev { transform: rotate(180deg); }

.ftr__links { padding-bottom: 12px; }
.ftr__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 44px;
  color: var(--ftr-text);
  text-decoration: none;
  transition: color var(--t-fast) var(--ease-out);
}
.ftr__arrow { flex-shrink: 0; color: var(--ftr-muted); transition: transform var(--t-fast) var(--ease-out), color var(--t-fast) var(--ease-out); }
.ftr__link:hover { color: var(--ftr-strong); }
.ftr__link:hover .ftr__arrow,
.ftr__book:hover .ftr__arrow { transform: translateX(3px); color: var(--ftr-strong); }

/* ---- Stay in the Loop ----------------------------------------------------- */

.ftr__loop { padding-bottom: 20px; }
.ftr__loop-copy { max-width: 38ch; font-size: 0.875rem; line-height: 1.6; }
.ftr__form { max-width: 416px; margin-top: 16px; }
.ftr__fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.ftr__field {
  position: relative;
  display: flex;
  border: 1px solid var(--ftr-line-strong);
  border-radius: var(--r-md);
  background: var(--ftr-field);
  transition: border-color var(--t-fast) var(--ease-out), box-shadow var(--t-fast) var(--ease-out);
}
.ftr__field:focus-within { border-color: var(--color-primary); box-shadow: 0 0 0 1px var(--color-primary); }
.ftr__field-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ftr-muted);
  pointer-events: none;
}
.ftr__input {
  flex: 1;
  min-width: 0;
  height: 52px;
  padding: 0 12px 0 46px;
  border: 0;
  border-radius: var(--r-md) 0 0 var(--r-md);
  background: transparent;
  color: var(--ftr-strong);
  font: inherit;
  font-size: 1rem; /* 16px: no iOS zoom on focus */
}
.ftr__input::placeholder { color: var(--ftr-muted); opacity: 1; }
.ftr .ftr__input:focus-visible { outline: none; } /* the field ring above shows focus */
.ftr__submit {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 52px;
  margin: -1px -1px -1px 0;
  border: 0;
  border-radius: 0 var(--r-md) var(--r-md) 0;
  background: var(--color-primary);
  color: var(--color-on-primary);
  cursor: pointer;
  transition: background-color var(--t-fast) var(--ease-out);
}
.ftr__submit .icon { transition: transform var(--t-fast) var(--ease-out); }
.ftr__submit:hover { background: var(--color-primary-hover); }
.ftr__submit:hover .icon { transform: translateX(2px); }
.ftr__fieldset:disabled .ftr__field { opacity: 0.6; }
.ftr__fieldset:disabled .ftr__input,
.ftr__fieldset:disabled .ftr__submit { cursor: not-allowed; }
.ftr__fieldset:disabled .ftr__submit:hover { background: var(--color-primary); }
.ftr__fieldset:disabled .ftr__submit:hover .icon { transform: none; }
.ftr__form-note { margin-top: 8px; font-size: 0.75rem; color: var(--ftr-muted); }

/* ---- Sign-off (wide screens only) ----------------------------------------- */

.ftr__sign {
  font-family: var(--ftr-sign);
  font-size: clamp(1.375rem, 0.9rem + 0.6vw, 1.625rem);
  line-height: 1.25;
  word-spacing: -0.15em;
  white-space: nowrap;
  color: var(--slate-200);
  transform: rotate(-8deg);
  transform-origin: 0 0;
}
.ftr__sign span { display: block; }
.ftr__swash {
  width: 120px;
  height: 16px;
  margin: 4px 0 0 8px;
  fill: none;
  stroke: var(--color-primary);
  stroke-width: 2.5;
  stroke-linecap: round;
}

/* ---- Bottom bar ----------------------------------------------------------- */

.ftr__bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-top: 24px;
  padding-block: 24px 40px;
  font-size: 0.875rem;
  color: var(--ftr-muted);
  text-align: center;
}
.ftr__legal { display: flex; align-items: center; gap: 16px; }
.ftr__legal li + li { display: flex; align-items: center; gap: 16px; }
.ftr__legal li + li::before { content: ""; width: 1px; height: 14px; background: var(--ftr-line-strong); }
.ftr__legal a,
.ftr__totop {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  color: var(--ftr-text);
  text-decoration: none;
  transition: color var(--t-fast) var(--ease-out);
}
.ftr__totop .icon { transition: transform var(--t-fast) var(--ease-out); }
.ftr__legal a:hover,
.ftr__totop:hover { color: var(--ftr-strong); }
.ftr__totop:hover .icon { transform: translateY(-2px); }

/* ---- Tablet (768–1099): 2×2 in DOM order ---------------------------------- */

@media (min-width: 768px) {
  .ftr { padding-top: 72px; }
  .ftr__grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-areas:
      "brand services"
      "quick loop";
    gap: 48px clamp(32px, 5vw, 64px);
  }
  .ftr__col--services { margin-top: 0; }
  .ftr__col--services,
  .ftr__group { border: 0; }
  .ftr__summary { min-height: 0; margin-bottom: 16px; cursor: default; pointer-events: none; }
  .ftr__chev { display: none; }
  .ftr__heading { font-size: 1.125rem; }
  .ftr__links,
  .ftr__loop { padding-bottom: 0; }
  .ftr__link { min-height: 36px; max-width: 224px; font-size: 0.9375rem; }
  .ftr__social--brand { display: none; }
  .ftr__social--loop { display: flex; margin-top: 16px; }
  .ftr__bottom { margin-top: 48px; border-top: 1px solid var(--ftr-line); }
}

/* The bottom bar fits one row once the content box is ~940px. */
@media (min-width: 1024px) {
  .ftr__inner { padding-inline: calc(var(--hdr-pad) + 1px); } /* the header card's 1px border */
  .ftr__bottom { flex-direction: row; flex-wrap: wrap; gap: 8px 24px; text-align: left; }
  .ftr__copy { margin-right: auto; }
}

/* ---- Desktop (1100+): brand · services · quick links · newsletter --------- */

@media (min-width: 1100px) {
  .ftr { padding-top: 88px; }
  .ftr__grid {
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1.1fr) minmax(0, 0.7fr) minmax(0, 1.3fr);
    grid-template-areas: "brand services quick loop";
    column-gap: clamp(32px, 3.5vw, 56px);
  }
  .ftr__name,
  .ftr__role { white-space: nowrap; }
}

/* ---- Wide (1360+): + the sign-off behind a hairline ----------------------- */

@media (min-width: 1360px) {
  .ftr__grid {
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1.1fr) minmax(0, 0.7fr) minmax(0, 1.35fr) minmax(0, 0.95fr);
    grid-template-areas: "brand services quick loop signoff";
  }
  .ftr__signoff {
    display: block;
    padding: 32px 0 0 clamp(20px, 2vw, 32px);
    border-left: 1px solid var(--ftr-line);
  }
}
