/* ==========================================================================
   Components — buttons, links, header/nav, drawer, cards, forms, footer
   ========================================================================== */

/* --- Buttons (plan.txt section 07) ---------------------------------------
   Not every action is a large coloured button. Primary is Royal Purple;
   secondary is a hairline outline. Rose gold is reserved for the single
   conversion CTA on dark bands.
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-3);
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: var(--ls-ui);
  text-transform: uppercase;
  padding: 1.05em 1.9em;
  border: 1px solid transparent;
  border-radius: var(--r-btn);
  white-space: nowrap;
  cursor: pointer;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease),
    border-color var(--dur) var(--ease), transform var(--dur-fast) var(--ease);
}
.btn:active {
  transform: translateY(1px);
}
.btn svg {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform var(--dur) var(--ease);
}
.btn:hover svg {
  transform: translateX(4px);
}

.btn--primary {
  background: var(--puck-bg, var(--purple));
  color: var(--off-white);
}
.btn--primary:hover {
  background: var(--purple-deep);
}

.btn--secondary {
  background: transparent;
  color: var(--slate);
  border-color: var(--line-strong);
}
.btn--secondary:hover {
  background: var(--puck-bg, var(--purple));
  border-color: var(--purple);
  color: var(--off-white);
}

.btn--rose {
  background: var(--rose);
  color: var(--off-white);
}
.btn--rose:hover {
  background: var(--rose-deep);
}

.btn--sm {
  font-size: var(--fs-eyebrow);
  padding: 0.9em 1.5em;
}

/* Secondary sitting on a dark band — the hero and the CTA sections. */
.on-dark .btn--secondary,
.btn--on-dark {
  background: transparent;
  color: var(--off-white);
  border-color: rgba(248, 249, 251, 0.34);
}
.on-dark .btn--secondary:hover,
.btn--on-dark:hover {
  background: var(--off-white);
  border-color: var(--off-white);
  color: var(--purple);
}
.on-dark .btn--primary {
  background: var(--rose);
  color: var(--off-white);
}
.on-dark .btn--primary:hover {
  background: var(--rose-deep);
}

/* --- Text link — rose underline drawn in on hover ------------------------ */
.link {
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: var(--ls-ui);
  text-transform: uppercase;
  color: var(--purple);
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  padding-bottom: 3px;
  background-image: linear-gradient(var(--rose), var(--rose));
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 0% 1px;
  transition: background-size var(--dur) var(--ease), color var(--dur) var(--ease);
}
.link svg {
  width: 13px;
  height: 13px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform var(--dur) var(--ease);
}
.link:hover {
  background-size: 100% 1px;
  color: var(--rose);
}
.link:hover svg {
  transform: translateX(3px);
}
.on-dark .link {
  color: var(--off-white);
}
.on-dark .link:hover {
  color: var(--rose-bright);
}

/* ==========================================================================
   Notice bar — sits above the header, retracts on scroll
   ========================================================================== */
.notice {
  border-bottom: 1px solid rgba(248, 249, 251, 0.12);
  color: var(--text-on-dark-muted);
  font-family: var(--font-mono);
  font-size: var(--fs-eyebrow);
  letter-spacing: 0.04em;
  height: var(--notice-h);
  overflow: hidden;
  transition: height var(--dur) var(--ease), opacity var(--dur) var(--ease),
    border-bottom-width var(--dur) var(--ease);
}
/* Messages are stacked in one grid cell and cross-fade; site.js moves
   .is-active along. Hidden messages are visibility:hidden so their links
   drop out of the tab order. */
.notice__inner {
  height: var(--notice-h);
  display: grid;
  align-items: center;
}
.notice__item {
  grid-area: 1 / 1;
  display: flex;
  align-items: center;
  gap: var(--s-3);
  min-width: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.6s var(--ease), visibility 0s linear 0.6s;
}
.notice__item.is-active {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.6s var(--ease) 0.2s, visibility 0s;
}
.notice__item span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
@media (prefers-reduced-motion: reduce) {
  .notice__item,
  .notice__item.is-active {
    transition: none;
  }
}
.notice svg {
  width: 13px;
  height: 13px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  opacity: 0.75;
}
.notice a {
  margin-left: auto;
  color: var(--rose-bright);
  white-space: nowrap;
  transition: color var(--dur-fast) var(--ease);
}
.notice a:hover {
  color: var(--off-white);
}
@media (max-width: 719.98px) {
  :root {
    --notice-h: 0px;
  }
  .notice {
    display: none;
  }
}

/* --- In-content callout --------------------------------------------------
   Visually a sibling of the notice bar, but a normal-flow block: it wraps,
   has no fixed height, and survives below the notice bar's 720px cutoff.
   -------------------------------------------------------------------------- */
.callout {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-3);
  padding: var(--s-4) var(--s-5);
  background: var(--gray);
  border-left: 2px solid var(--rose);
  border-radius: var(--r-card);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  letter-spacing: 0.03em;
  color: var(--purple);
}
.callout svg {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
  color: var(--rose);
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
}
.callout a {
  margin-left: auto;
  color: var(--rose);
  white-space: nowrap;
  transition: color var(--dur-fast) var(--ease);
}
.callout a:hover {
  color: var(--purple);
}

/* ==========================================================================
   Header — floats transparent over the page's opening dark band, settles
   into a solid purple bar once scrolled.
   ========================================================================== */
.header {
  position: fixed;
  inset: 0 0 auto;
  z-index: var(--z-header);
}

.header__main {
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background var(--dur) var(--ease),
    border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}

.header__bar {
  display: flex;
  align-items: center;
  gap: clamp(var(--s-5), 3vw, var(--s-8));
  min-height: var(--header-h);
  padding-block: 10px;
  transition: height var(--dur) var(--ease);
}
/* The wordmark alone (no tagline line) reads larger at the same height. */
.header .logo__img {
  height: clamp(40px, calc(3vw + 12px), 50px);
  max-height: 50px;
}

/* At rest the whole header sits on the dark opening band. */
.header .logo,
.header .nav__link,
.header .portal-link,
.header .burger {
  color: var(--text-on-dark);
}

/* --- Brand lockup --------------------------------------------------------- */
.logo {
  display: inline-flex;
  align-items: center;
  flex: none;
  line-height: 0;
}
.logo__img {
  display: block;
  width: auto;
  height: clamp(36px, 3.6vw, 45px);
  max-height: 45px;
  transition: height var(--dur) var(--ease);
}

/* --- Desktop nav ---------------------------------------------------------- */
.nav {
  display: none;
  align-items: center;
  gap: clamp(var(--s-5), 2vw, var(--s-7));
  margin-left: auto;
  min-width: 0;
}
@media (min-width: 1060px) {
  .nav {
    display: flex;
  }
}

.nav__item {
  position: relative;
}

.nav__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  font-family: var(--font-sans);
  font-size: var(--fs-eyebrow);
  font-weight: 500;
  letter-spacing: var(--ls-ui);
  text-transform: uppercase;
  padding-bottom: 4px;
  background-image: linear-gradient(var(--rose), var(--rose));
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 0% 1px;
  transition: background-size var(--dur) var(--ease), color var(--dur) var(--ease);
}
.nav__link:hover,
.nav__item:hover > .nav__link {
  background-size: 100% 1px;
  color: var(--rose-bright);
}
.nav__link[aria-current="page"] {
  background-size: 100% 1px;
}
/* Stop the underline at the label so it doesn't run under the caret (caret 7px + 6px gap). */
.nav__link:has(.nav__caret):hover,
.nav__item:hover > .nav__link:has(.nav__caret),
.nav__link:has(.nav__caret)[aria-current="page"] {
  background-size: calc(100% - 13px) 1px;
}

.nav__caret {
  width: 7px;
  height: 7px;
  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  transition: transform var(--dur) var(--ease);
}
.nav__item:hover .nav__caret {
  transform: translateY(0) rotate(45deg);
}

/* --- Services dropdown ---------------------------------------------------- */
.dropdown {
  position: absolute;
  top: 100%;
  left: 50%;
  translate: -50% 0;
  margin-top: var(--s-4);
  width: 380px;
  padding: var(--s-3);
  background: var(--white);
  border: 1px solid var(--line-neutral);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-card);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease),
    visibility var(--dur);
}
/* Bridges the gap between the link and the panel so the pointer can cross. */
.dropdown::before {
  content: "";
  position: absolute;
  inset: calc(var(--s-4) * -1) 0 100% 0;
}
.nav__item:hover .dropdown,
.nav__item:focus-within .dropdown {
  opacity: 1;
  visibility: visible;
  transform: none;
}
.dropdown a {
  display: flex;
  gap: var(--s-4);
  padding: var(--s-4);
  border-radius: var(--r-btn);
  color: var(--slate);
  transition: background var(--dur-fast) var(--ease);
}
.dropdown a:hover {
  background: var(--off-white-deep);
}
.dropdown a > svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  align-self: flex-start;
  margin-top: 2px;
  color: var(--rose);
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.dropdown a > span {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.dropdown strong {
  font-size: 0.9375rem;
  line-height: 20px;
  font-weight: 500;
  color: var(--purple);
}
.dropdown span span {
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--text-muted);
}

/* --- Header right-hand cluster -------------------------------------------- */
.header__actions {
  display: flex;
  align-items: center;
  gap: var(--s-4);
  margin-left: auto;
}
@media (min-width: 1060px) {
  .header__actions {
    margin-left: 0;
  }
}

.portal-link {
  display: none;
  align-items: center;
  gap: var(--s-2);
  font-family: var(--font-sans);
  font-size: var(--fs-eyebrow);
  font-weight: 500;
  letter-spacing: var(--ls-ui);
  text-transform: uppercase;
  padding: 0.75em 1.25em;
  border: 1px solid rgba(248, 249, 251, 0.28);
  border-radius: var(--r-btn);
  background-image: none;
  transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease),
    color var(--dur) var(--ease);
}
.portal-link:hover {
  background: var(--rose);
  border-color: var(--rose);
  color: var(--off-white);
}
.portal-link svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
}
@media (min-width: 720px) {
  .portal-link {
    display: inline-flex;
  }
}

/* --- Client portal menu (click to open) ----------------------------------- */
.portal-menu {
  position: relative;
}
button.portal-link {
  background-color: transparent;
  cursor: pointer;
  line-height: inherit;
}
.portal-menu .nav__caret {
  margin-left: 2px;
}
.portal-menu.is-open .portal-link {
  background: var(--rose);
  border-color: var(--rose);
  color: var(--off-white);
}
.portal-menu.is-open .nav__caret {
  transform: translateY(1px) rotate(-135deg);
}
.portal-menu__panel {
  left: auto;
  right: 0;
  translate: none;
  width: 300px;
  max-width: calc(100vw - 32px);
}
.portal-menu__panel::before {
  content: none;
}
.portal-menu.is-open .portal-menu__panel {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.burger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(248, 249, 251, 0.28);
  border-radius: var(--r-btn);
  transition: border-color var(--dur) var(--ease);
}
.burger:hover {
  border-color: var(--rose);
}
.burger svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
}
@media (min-width: 1060px) {
  .burger {
    display: none;
  }
}

/* --- Scrolled state -------------------------------------------------------
   The notice bar retracts, the bar fills purple, the lockup tightens.
   -------------------------------------------------------------------------- */
.header.is-scrolled .notice {
  height: 0;
  opacity: 0;
  /* Width, not just colour — a 1px transparent border still occupies a row
     and page content shows through it at the top of the viewport. */
  border-bottom-width: 0;
}
.header.is-scrolled .header__main {
  background: var(--purple-deep);
  border-bottom-color: rgba(184, 115, 74, 0.28);
  box-shadow: 0 12px 34px -22px rgba(0, 0, 0, 0.7);
}
.header.is-scrolled .header__bar {
  min-height: var(--header-h-scrolled);
}
.header.is-scrolled .logo__img {
  height: clamp(40px, calc(3vw + 12px), 48px);
}

@media (prefers-reduced-motion: reduce) {
  .header *,
  .header__main,
  .notice {
    transition: none !important;
  }
}

/* ==========================================================================
   Mobile drawer
   ========================================================================== */
.drawer {
  position: fixed;
  inset: 0;
  z-index: var(--z-drawer);
  background: var(--puck-bg, var(--purple));
  padding: var(--s-5) 0 var(--s-7);
  overflow-y: auto;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-12px);
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease),
    visibility var(--dur);
}
.drawer[data-open="true"] {
  opacity: 1;
  visibility: visible;
  transform: none;
}
.drawer__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-inline: var(--gutter);
  color: var(--off-white);
  margin-bottom: var(--s-7);
}
.drawer__close {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-on-dark);
  border-radius: var(--r-btn);
  color: var(--off-white);
}
.drawer__close svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
}
.drawer__nav {
  padding-inline: var(--gutter);
}
.drawer__nav a {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s-5);
  font-family: var(--font-display);
  /* 22px type + 12px padding: rows of about 55px, still well over the 44px
     tap-target minimum, and all ten links fit a phone screen. */
  font-size: 1.375rem;
  color: var(--off-white);
  padding: var(--s-3) 0;
  border-bottom: 1px solid var(--line-on-dark);
  transition: color var(--dur-fast) var(--ease), padding-left var(--dur) var(--ease);
}
.drawer__nav a span {
  font-family: var(--font-mono);
  font-size: var(--fs-eyebrow);
  letter-spacing: var(--ls-eyebrow);
  color: var(--rose-soft);
}
.drawer__nav a:hover {
  color: var(--rose-bright);
  padding-left: var(--s-3);
}
/* Portal + Book sit above the page list so they are on the first screen. */
.drawer__foot {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: var(--s-3);
  padding: 0 var(--gutter) var(--s-6);
}
.drawer__foot .btn svg {
  width: 13px;
  height: 13px;
}

/* ==========================================================================
   Cards — hairline rose rule draws across the top edge on hover
   ========================================================================== */
.grid {
  display: grid;
  gap: var(--s-6);
}
@media (min-width: 620px) {
  .grid-2 {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 620px) {
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 1000px) {
  .grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (min-width: 620px) {
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 1100px) {
  .grid-4 {
    grid-template-columns: repeat(4, 1fr);
  }
}

.card {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: clamp(var(--s-6), 3vw, var(--s-7));
  background: var(--white);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  transition: transform var(--dur-slow) var(--ease-out),
    box-shadow var(--dur-slow) var(--ease-out);
}
.card::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  height: 2px;
  width: 100%;
  background: var(--rose);
  z-index: 2;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--dur-slow) var(--ease-out);
}
/* Warm wash rising from the base, so the hover has depth, not just a shadow */
.card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(184, 115, 74, 0.07), transparent 55%);
  z-index: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--dur-slow) var(--ease-out);
}
.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-card);
}
.card:hover::before {
  transform: scaleX(1);
}
.card:hover::after {
  opacity: 1;
}
.card > * {
  position: relative;
  z-index: 1;
}
/* Four-up cards are narrow: tight padding keeps the copy from stacking into a
   column of two-word lines. */
.grid-4 .card {
  padding: var(--s-6) var(--s-5);
}
.grid-4 .card__icon {
  margin-bottom: var(--s-4);
  color: var(--rose);
}
.grid-4 .card:hover .card__icon {
  color: var(--rose-deep);
}
.card__icon {
  width: 30px;
  height: 30px;
  margin-bottom: var(--s-5);
  color: var(--purple);
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: color var(--dur) var(--ease);
}
.card:hover .card__icon {
  color: var(--rose);
}
.card h3,
.card .h4 {
  margin-bottom: var(--s-3);
}
.card p {
  font-size: var(--fs-small);
  flex: 1;
  margin: 0;
}

/* ==========================================================================
   Forms
   ========================================================================== */
.form-panel {
  background: var(--white);
  border: 1px solid var(--line-neutral);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-soft);
  padding: clamp(var(--s-6), 3vw, var(--s-7));
}
.form-row {
  display: grid;
  gap: var(--s-4);
}
@media (min-width: 560px) {
  .form-row {
    grid-template-columns: repeat(2, 1fr);
  }
}
.field {
  display: block;
  margin-bottom: var(--s-4);
}
.field > span {
  display: block;
  font-family: var(--font-mono);
  font-size: var(--fs-eyebrow);
  letter-spacing: var(--ls-eyebrow);
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: var(--s-2);
}
.field input,
.field textarea,
.field select {
  width: 100%;
  background: var(--off-white);
  border: 1px solid var(--line-neutral);
  border-radius: var(--r-input);
  padding: 0.85em 1em;
  font-size: var(--fs-body);
  color: var(--slate);
  transition: border-color var(--dur-fast) var(--ease),
    background var(--dur-fast) var(--ease);
}
.field select {
  appearance: none;
  padding-right: 2.75em;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%236b7280' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1.1em center;
  background-size: 12px 8px;
}
.field textarea {
  min-height: 140px;
  resize: vertical;
}
.field input::placeholder,
.field textarea::placeholder {
  color: rgba(107, 114, 128, 0.7);
}
.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: none;
  background-color: var(--white);
  border-color: var(--rose);
}
.form-status {
  margin-top: var(--s-4);
  font-size: var(--fs-small);
  color: var(--text-muted);
  display: none;
}
.form-status[data-show="true"] {
  display: block;
}
.form-status[data-state="ok"] {
  color: #256b3c;
}
.form-status[data-state="error"] {
  color: #a3372b;
}
.form-status a {
  color: var(--purple);
  text-decoration: underline;
}
.form-note {
  margin-top: var(--s-4);
  font-size: var(--fs-small);
  color: var(--text-muted);
}
.form-note a {
  color: var(--purple);
}

/* Privacy / newsletter consent: an unticked box with its sentence beside it. */
.consent {
  display: flex;
  align-items: flex-start;
  gap: var(--s-3);
  margin: var(--s-2) 0 var(--s-5);
  font-size: var(--fs-small);
  line-height: 1.5;
  color: var(--text-muted);
  cursor: pointer;
}
.consent input {
  flex: none;
  width: 18px;
  height: 18px;
  margin: 2px 0 0; /* reset the browser's default checkbox margin so it lines up */
  accent-color: var(--purple);
}
.consent a {
  color: var(--purple);
  text-decoration: underline;
}
.consent--dark {
  margin: var(--s-3) 0 0;
  color: var(--text-on-dark-muted);
}
.consent--dark input {
  accent-color: var(--rose);
}
.consent--dark a {
  color: var(--rose-bright);
}

/* ==========================================================================
   Footer CTA card — white card overlapping the footer's top edge
   ========================================================================== */
/* The wrap takes no height of its own: the card straddles the seam, with the
   last page section extending down to sit behind its top half. */
.cta-card-wrap {
  position: relative;
  z-index: 2;
  height: 0;
}
/* `translate`, not `transform`, so it composes with the .reveal animation. */
.cta-card-wrap .cta-card {
  translate: 0 -50%;
}
/* --cta-half is the card's measured half-height, set by site.js
   (initCtaOverlap); 7rem is the no-JS fallback. */
main.has-cta > :last-child {
  padding-bottom: calc(var(--section-y) + var(--cta-half, 7rem));
}
.cta-card {
  display: grid;
  gap: var(--s-5);
  align-items: center;
  background: var(--white);
  border: 1px solid var(--line-neutral);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-card);
  padding: clamp(var(--s-6), 4vw, var(--s-9));
}
.cta-card h2 {
  font-size: var(--fs-h3);
  font-family: var(--font-display);
}
@media (min-width: 860px) {
  .cta-card {
    grid-template-columns: 1fr auto;
    gap: var(--s-8);
  }
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: var(--puck-bg, var(--purple));
  color: var(--text-on-dark);
  padding-top: var(--section-y);
}
/* Extra room only when the CTA card overlaps the footer's top edge. */
/* Half the card's height (see --cta-half above) plus a steady gap, so the
   space under the card is the same at every screen width. */
.cta-card-wrap + .footer {
  padding-top: calc(var(--cta-half, 7rem) + var(--s-7));
}
.footer::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(
      to bottom,
      rgba(11, 8, 25, 0.97) 0%,
      rgba(18, 12, 36, 0.9) 45%,
      rgba(11, 8, 25, 0.96) 100%
    ),
    radial-gradient(120% 90% at 50% 0%, transparent 0%, rgba(11, 8, 25, 0.6) 100%);
}
.footer .backdrop img {
  object-position: 50% 35%;
}
.footer .logo {
  color: var(--off-white);
}

/* --- Newsletter — compact sign-up in the footer's last column ------------ */
.newsletter {
  max-width: 38ch;
  font-size: var(--fs-small);
  scroll-margin-top: 120px;
}
.newsletter__x {
  margin: 0;
  font-size: var(--fs-small);
  line-height: 1.5;
  color: var(--text-on-dark-muted);
  text-align: left;
}
.newsletter__row {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  margin-top: var(--s-4);
  padding: 4px 4px 4px var(--s-4);
  background: rgba(248, 249, 251, 0.06);
  border: 1px solid var(--line-on-dark);
  border-radius: 999px;
  transition: border-color var(--dur-fast) var(--ease);
}
.newsletter__row:focus-within {
  border-color: var(--rose);
}
.newsletter__icon {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  fill: none;
  stroke: var(--text-on-dark-muted);
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.newsletter__input {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 40px;
  padding: 0;
  font-size: var(--fs-small);
  color: var(--off-white);
  background: transparent;
  border: 0;
  outline: 0;
}
.newsletter__input::placeholder {
  color: var(--text-on-dark-muted);
}
.newsletter__btn {
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  color: var(--white);
  background: var(--rose);
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease);
}
.newsletter__btn:hover {
  background: var(--rose-deep);
}
.newsletter__btn:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}
.newsletter__btn:disabled {
  opacity: 0.6;
  cursor: progress;
}
.newsletter__btn svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.newsletter__status {
  min-height: 1.6em;
  margin-top: var(--s-2);
  font-size: var(--fs-small);
  color: var(--rose-bright);
}
.newsletter__status[data-state="error"] {
  color: #f0a59a;
}
/* No message yet: take no room, so the footer has no empty band under the form. */
.newsletter__status:empty {
  min-height: 0;
  margin: 0;
}
/* Honeypot field: off-screen for people, still filled in by bots. */
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.footer__top {
  display: grid;
  gap: var(--s-6);
  padding-bottom: var(--s-7);
}
/* Phones: stacking every column made a very long footer. The two short link
   lists (Services, Firm) sit side by side; everything else stays full width. */
@media (max-width: 639.98px) {
  .footer__top {
    grid-template-columns: 1fr 1fr;
    column-gap: var(--s-5);
  }
  .footer__top > * {
    grid-column: 1 / -1;
  }
  .footer__top > .footer__col--half {
    grid-column: auto;
  }
  /* Logo and intro text centred above the link columns. */
  .footer__brand {
    text-align: center;
  }
  .footer__brand .footer__blurb {
    text-align: center;
    margin-inline: auto;
  }
  /* Contact and Newsletter centred to match. The consent line stays
     left-aligned beside its checkbox, where centred text reads badly. */
  .footer__col--center,
  .footer__col--center li {
    text-align: center;
  }
  /* Full width, so its divider matches the other blocks' dividers. */
  .footer__col--center .newsletter {
    max-width: none;
  }
  .footer__col--center .newsletter__x {
    text-align: center;
    text-wrap: balance; /* two even lines instead of one long + one stub */
  }
  /* Same inset as the email box's padding, so the checkbox sits under the
     envelope icon and the form reads as one unit. */
  .footer__col--center .consent {
    padding-left: var(--s-4);
    text-align: left;
  }
}
@media (min-width: 640px) {
  .footer__top {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 1000px) {
  .footer__top {
    grid-template-columns: 1.3fr 0.8fr 0.9fr 1fr 1.3fr;
    gap: var(--s-6);
  }
}
.footer__blurb {
  margin-top: var(--s-4);
  font-size: var(--fs-small);
  color: var(--text-on-dark-muted);
  max-width: 38ch;
}
.footer__h {
  font-family: var(--font-mono);
  font-size: var(--fs-eyebrow);
  font-weight: 500;
  letter-spacing: var(--ls-eyebrow);
  text-transform: uppercase;
  color: var(--rose-soft);
  margin-bottom: var(--s-3);
  padding-bottom: var(--s-3);
  border-bottom: 1px solid var(--line-on-dark);
}
/* Same size and line height as the links, so each row is only as tall as its
   text (the body line height was adding hidden extra space to every row). */
.footer__list {
  font-size: var(--fs-small);
  line-height: 1.4;
}
.footer__list li + li {
  margin-top: var(--s-1);
}
.footer__list a {
  display: inline-block;
  font-size: var(--fs-small);
  line-height: 1.4;
  color: var(--text-on-dark-muted);
  transition: color var(--dur-fast) var(--ease), padding-left var(--dur) var(--ease);
}
.footer__list a:hover {
  color: var(--off-white);
  padding-left: 5px;
}

.footer__bottom {
  border-top: 1px solid var(--line-on-dark);
  padding-block: var(--s-5);
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-4) var(--s-6);
  align-items: center;
  justify-content: space-between;
}
.footer__legal {
  font-family: var(--font-mono);
  font-size: var(--fs-eyebrow);
  color: var(--text-on-dark-muted);
  margin: 0;
  max-width: none;
}
.footer__legal a {
  margin-left: var(--s-3);
  text-decoration: underline;
}
.footer__legal a:hover {
  color: var(--off-white);
}

.social {
  display: flex;
  gap: var(--s-3);
}
.social a {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-on-dark);
  border-radius: 50%;
  color: var(--text-on-dark-muted);
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease),
    color var(--dur) var(--ease);
}
.social a:hover {
  background: var(--rose);
  border-color: var(--rose);
  color: var(--off-white);
}
.social svg {
  width: 15px;
  height: 15px;
  fill: currentColor;
}
/* Two copies of the icon row exist (see partials/social.blade.php): under
   the logo text on phones, in the bottom strip from 640px up. */
.social--top {
  display: none;
}
@media (max-width: 639.98px) {
  .social--top {
    display: flex;
    justify-content: center;
    margin-top: var(--s-5);
  }
  .social--bottom {
    display: none;
  }
  /* Only the © line is left in the bottom strip; centre it. */
  .footer__bottom {
    justify-content: center;
  }
  .footer__legal {
    text-align: center;
  }
  .footer__legal a {
    margin-left: 0; /* the left margin pushed the wrapped link off centre */
  }
}

/* ==========================================================================
   Sticky mobile CTA bar
   ========================================================================== */
.mobile-cta {
  position: fixed;
  inset: auto 0 0;
  z-index: var(--z-mobilebar);
  display: flex;
  gap: 1px;
  background: var(--line-neutral);
  box-shadow: 0 -6px 24px -14px rgba(0, 0, 0, 0.4);
  transform: translateY(100%);
  transition: transform var(--dur) var(--ease);
}
.mobile-cta.is-visible {
  transform: none;
}
.mobile-cta .btn {
  flex: 1;
  border-radius: 0;
  padding: 1.15em 1em;
}
.mobile-cta .btn--secondary {
  background: var(--white);
  border-color: transparent;
}
@media (min-width: 1060px) {
  .mobile-cta {
    display: none;
  }
}

/* ==========================================================================
   Floating contact dock — WhatsApp + quick call on the right
   ========================================================================== */
.dock {
  position: fixed;
  bottom: 28px;
  z-index: var(--z-mobilebar);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.dock--right {
  right: 22px;
  align-items: flex-end;
}
.dock__btn {
  display: inline-flex;
  align-items: center;
  gap: 0;
  height: 52px;
  padding: 0 15px;
  border-radius: 999px;
  background: var(--puck-bg, var(--purple));
  color: var(--white);
  box-shadow: 0 10px 30px -12px rgba(0, 0, 0, 0.55);
  text-decoration: none;
  white-space: nowrap;
  transition: gap var(--dur) var(--ease), background var(--dur) var(--ease),
    transform var(--dur) var(--ease);
}
.dock__btn:hover,
.dock__btn:focus-visible {
  gap: 10px;
  background: var(--purple-mid);
  transform: translateY(-2px);
}
/* Over a dark band (.on-dark / footer) the purple puck disappears — go rose. */
.dock__btn.is-on-dark {
  background: var(--rose);
}
.dock__btn.is-on-dark:hover,
.dock__btn.is-on-dark:focus-visible {
  background: var(--rose-deep);
}
.dock__btn--wa {
  background: #25d366;
  color: #0b3d22;
}
.dock__btn--wa:hover,
.dock__btn--wa:focus-visible {
  background: #1fbb59;
}
.dock__btn svg {
  width: 22px;
  height: 22px;
  flex: none;
  fill: none;
  stroke: currentColor;
}
.dock__btn--wa svg {
  stroke-width: 1.8;
}
.dock__label {
  max-width: 0;
  overflow: hidden;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  transition: max-width var(--dur) var(--ease);
}
.dock__btn:hover .dock__label,
.dock__btn:focus-visible .dock__label {
  max-width: 160px;
}
@media (max-width: 1059px) {
  /* Sits above the sticky bar. */
  .dock {
    bottom: 84px;
  }
  .dock--right {
    right: 14px;
  }
  .dock__btn {
    height: 46px;
    padding: 0 12px;
  }
  /* Room for the sticky bar, so it never covers the footer or a form button. */
  body:has(.mobile-cta) {
    padding-bottom: 64px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .dock__btn,
  .dock__label {
    transition: none;
  }
}

/* ==========================================================================
   Chat panel — the dock's chat button opens this instead of leaving the page.
   White header, lavender transcript, composer pinned to the bottom edge.
   ========================================================================== */
.chat {
  position: fixed;
  left: 22px;
  bottom: 92px;
  z-index: var(--z-drawer);
  width: min(374px, calc(100vw - 32px));
  max-height: calc(100vh - 130px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 18px;
  background: var(--white);
  box-shadow: 0 30px 70px -24px rgba(11, 8, 25, 0.45),
    0 2px 10px rgba(11, 8, 25, 0.08);
  opacity: 0;
  visibility: hidden;
  transform: translateY(14px) scale(0.98);
  transform-origin: 0 100%;
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease),
    visibility var(--dur) var(--ease);
}
.chat.is-open {
  opacity: 1;
  visibility: visible;
  transform: none;
}
.chat__head {
  flex: none;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 22px 20px 20px;
  background: var(--white);
}
.chat__title {
  margin: 0;
  font-size: 27px;
  line-height: 1.15;
  letter-spacing: -0.01em;
  font-weight: 600;
  color: var(--purple);
}
.chat__status {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 7px 0 0;
  font-size: 15px;
  color: var(--ink-soft, #4a4657);
}
/* The dot is the whole "we're here" signal, so it stays saturated. */
.chat__status::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #22c55e;
  flex: none;
}
.chat__close {
  margin-left: auto;
  flex: none;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--purple);
  cursor: pointer;
  transition: background var(--dur) var(--ease);
}
.chat__close:hover,
.chat__close:focus-visible {
  background: rgba(26, 19, 51, 0.07);
}
.chat__close svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}
.chat__body {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 20px;
  background: linear-gradient(180deg, #f4ecfb 0%, #faf7fd 55%, #ffffff 100%);
}
.chat__body .field {
  margin-bottom: var(--s-3);
}
.chat__body .field input,
.chat__body .field textarea {
  background: var(--white);
}
.chat__body .field textarea {
  min-height: 96px;
}
.chat__body .btn {
  width: 100%;
}
@media (max-width: 480px) {
  .chat {
    left: 12px;
    right: 12px;
    bottom: 12px;
    width: auto;
    height: min(78vh, 620px);
  }
}
@media (prefers-reduced-motion: reduce) {
  .chat {
    transition: opacity var(--dur) var(--ease), visibility var(--dur) var(--ease);
    transform: none;
  }
}

/* --- Custom hover cursor --------------------------------------------------
   Injected by initCursor() and parked at the pointer with a transform; the
   inner puck does the scale so the follow stays jitter-free. */
.cursorpuck {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 900;
  pointer-events: none;
  will-change: transform;
}
.cursorpuck span {
  position: absolute;
  top: 0;
  left: 0;
  display: block;
  white-space: nowrap;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--puck-bg, var(--purple));
  color: #fff;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: var(--ls-eyebrow);
  text-transform: uppercase;
  opacity: 0;
  /* Grows out of a single point and collapses back into one on leave. */
  transform: translate(-50%, -50%) scale(0);
  transition:
    opacity 160ms var(--ease-out),
    transform var(--dur) var(--ease-out),
    background-color var(--dur) var(--ease);
}
.cursorpuck.is-on span {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}
.cursorpuck.is-on.is-down span {
  transform: translate(-50%, -50%) scale(0.92);
}
/* Hide the native arrow only where the puck actually stands in for it. */
@media (hover: hover) and (pointer: fine) {
  [data-cursor],
  [data-cursor] * {
    cursor: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  [data-cursor],
  [data-cursor] * {
    cursor: pointer;
  }
}
/* Newsletter status on a light form panel (Tax tips page). */
.newsletter__status--light {
  color: #256b3c;
}
.newsletter__status--light[data-state="error"] {
  color: #a3372b;
}
