/* ==========================================================================
   Contact (/contact). Page-only styles; the system lives in main.css.
   Form first, then the phone rings (Swift Sites calling back), then what
   happens next on daylight, then the office on a signal map of real clients.
   ========================================================================== */

/* ---------- 1. Hero + form ----------------------------------------------- */
.contact-hero {
  position: relative;
  isolation: isolate;
  background: var(--void);
  padding-top: calc(var(--header-h) + clamp(1.75rem, 5vh, 3.75rem));
  padding-bottom: var(--space-2xl);
}
.contact-hero__grid { display: grid; gap: var(--space-xl); align-items: start; }
.contact-hero__copy { display: grid; gap: var(--space-l); align-content: start; }
.contact-hero__title {
  font-size: clamp(2.75rem, .9rem + 5.1vw, 6rem);
  line-height: .9;
  letter-spacing: -.038em;
  max-width: 10.5ch;
}
.contact-hero .lede { max-width: 46ch; }

.agenda { display: grid; gap: var(--space-s); max-width: 40rem; }
.agenda__intro { color: var(--text-2); }
.agenda__list { display: grid; border-top: 1px solid var(--line-2); }
.agenda__list li {
  display: grid;
  grid-template-columns: 1.6rem minmax(0, 1fr);
  gap: .75rem;
  align-items: baseline;
  padding-block: .8rem;
  border-bottom: 1px solid var(--line-2);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--step-1);
  line-height: 1.2;
  letter-spacing: -.02em;
}
.agenda__list li::before {
  content: "";
  width: 1.1rem; height: 1.1rem;
  transform: translateY(.14em);
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'%3E%3Ccircle cx='20' cy='20' r='6' fill='%2300C6F2'/%3E%3Ccircle cx='20' cy='20' r='12.5' fill='none' stroke='%2300C6F2' stroke-width='2.6' opacity='.6'/%3E%3Ccircle cx='20' cy='20' r='18.5' fill='none' stroke='%2300C6F2' stroke-width='2.2' opacity='.3'/%3E%3C/svg%3E") center / contain no-repeat;
}
.agenda__calm { color: var(--text-2); }

.contact-hero__call { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1.25rem; }
.contact-hero__call a { display: inline-flex; align-items: center; gap: .9rem; color: var(--text); transition: color var(--dur) var(--ease-out); }
.contact-hero__call a:hover { color: var(--cyan); }
.contact-hero__dial { display: grid; place-items: center; width: 3.25rem; height: 3.25rem; border-radius: 50%; background: var(--cyan); color: var(--void); flex: none; }
.contact-hero__dial svg { width: 42%; height: 42%; }
.contact-hero__num {
  font-family: var(--font-num);
  font-weight: 900;
  font-size: clamp(2.4rem, 1.8rem + 1.8vw, 3.4rem);
  line-height: .8;
  letter-spacing: -.005em;
  font-variant-numeric: lining-nums tabular-nums;
}
.contact-hero__hours { color: var(--muted); font-size: var(--step--1); }

/* The booking panel: a white sheet in the dark */
.book {
  position: relative;
  scroll-margin-top: calc(var(--header-h) + 1rem);
  border-radius: var(--radius-l);
  background: var(--paper);
  color: var(--ink);
  color-scheme: light;
  padding: clamp(1.4rem, 1rem + 2vw, 2.75rem);
  box-shadow: 0 50px 100px -40px rgba(0, 0, 0, .85), 0 0 0 1px rgba(255, 255, 255, .06);
}
.book :focus-visible { outline-color: var(--cyan-deep); }
.book .btn:not(.btn--primary) { --btn-fg: var(--ink); --btn-bd: rgba(10, 17, 27, .3); --btn-bg: transparent; }
.book .btn:not(.btn--primary):hover { --btn-bg: rgba(10, 17, 27, .05); --btn-bd: var(--ink); }
.book .btn--primary:focus-visible { outline-color: var(--ink); }
.book__title {
  font-size: var(--step-3);
  letter-spacing: -.04em;
  line-height: .98;
  margin-bottom: var(--space-m);
  max-width: 12ch;
}
.cform { gap: 1.05rem; }
.cform__fields { display: grid; gap: 1.05rem; }
.cform .form-note { color: var(--ink-muted); font-size: .875rem; }
.cform .form-note .req { color: var(--cyan-ink); font-weight: 600; }
.cform .field__label { font-weight: 600; font-size: .95rem; }
.cform .field__label .optional { color: var(--ink-muted); font-weight: 400; }
.cform .field__hint { margin-top: -.15rem; }
.cform .input, .cform .textarea { border-width: 1.5px; }
.cform .field__error:empty { display: none; }
.cform .field__error {
  display: flex;
  gap: .45rem;
  align-items: flex-start;
  font-size: .875rem;
  font-weight: 500;
  line-height: 1.4;
}
.cform .field__error::before {
  content: "!";
  flex: none;
  display: grid;
  place-items: center;
  width: 1.1rem; height: 1.1rem;
  margin-top: .05rem;
  border-radius: 50%;
  background: #B42318;
  color: #fff;
  font-size: .75rem;
  font-weight: 700;
  line-height: 1;
}
.cform .field.is-invalid .input,
.cform .field.is-invalid .textarea,
.cform .input[aria-invalid="true"],
.cform .textarea[aria-invalid="true"] { border-color: #D92D20; background: #FFFBFA; }
.cform .field.is-invalid .input:focus-visible { box-shadow: 0 0 0 3px rgba(217, 45, 32, .18); border-color: #B42318; }
.cform .field.is-valid .input { border-color: rgba(0, 108, 140, .55); }

.cform__submit { margin-top: .35rem; gap: .7rem; }
.cform__spin {
  display: none;
  width: 1.05rem; height: 1.05rem;
  border-radius: 50%;
  border: 2px solid rgba(5, 8, 12, .25);
  border-top-color: var(--void);
  animation: cform-spin .8s linear infinite;
}
@keyframes cform-spin { to { transform: rotate(360deg); } }
.cform[data-state="sending"] .cform__spin { display: inline-block; }
.cform[data-state="sending"] .cform__submit { opacity: .85; cursor: progress; }
@media (prefers-reduced-motion: reduce) { .cform__spin { animation: none; border-top-color: rgba(5, 8, 12, .25); border-right-color: var(--void); } }

/* Status: sending, error, success */
.cform__status { outline: none; }
.cform__status:empty { display: none; }
.cform__status[data-kind="sending"] { color: var(--ink-muted); font-size: .95rem; }
.cform__status[data-kind="error"] {
  display: flex;
  gap: .7rem;
  align-items: flex-start;
  padding: .9rem 1rem;
  border-radius: var(--radius-s);
  background: #FEF3F2;
  border: 1px solid #FECDCA;
  color: #912018 !important;
  font-weight: 500;
  line-height: 1.45;
}
.cform__status[data-kind="error"]::before {
  content: "!";
  flex: none;
  display: grid;
  place-items: center;
  width: 1.35rem; height: 1.35rem;
  border-radius: 50%;
  background: #B42318;
  color: #fff;
  font-size: .8rem;
  font-weight: 700;
  margin-top: .05rem;
}
.cform__done { display: none; }
.cform[data-state="success"] .cform__fields { display: none; }
.cform[data-state="success"] .cform__status {
  display: block;
  position: relative;
  padding-top: 5.25rem;
  font-family: var(--font-display);
  font-weight: 700 !important;
  font-size: var(--step-2);
  line-height: 1.12;
  letter-spacing: -.028em;
  color: var(--ink) !important;
  max-width: 22ch;
}
.cform[data-state="success"] .cform__status::before {
  content: "";
  position: absolute;
  left: 0; top: 0;
  width: 4rem; height: 4rem;
  border-radius: 50%;
  background: var(--cyan-deep) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 50% no-repeat;
  box-shadow: 0 0 0 8px rgba(0, 130, 168, .12), 0 0 0 16px rgba(0, 130, 168, .06);
}
.cform[data-state="success"] .cform__done { display: grid; gap: 1rem; justify-items: start; margin-top: .5rem; color: var(--ink-muted); }
.cform__done a { color: var(--cyan-ink); font-weight: 600; text-decoration: underline; text-underline-offset: .2em; }

@media (min-width: 1024px) {
  .contact-hero__grid { grid-template-columns: minmax(0, 1.1fr) minmax(420px, .9fr); column-gap: var(--space-xl); }
  .book { margin-top: .5rem; }
}

/* ---------- 2. Prefer to talk: the phone rings --------------------------- */
.call {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding-block: var(--space-2xl);
  background: var(--void);
}
.call__bg { position: absolute; inset: 0; z-index: -2; }
.call__bg img { width: 100%; height: 100%; object-fit: cover; object-position: 38% 62%; }
.call::before {
  content: "";
  position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(180deg, var(--void) 0%, rgba(5, 8, 12, .35) 22%, rgba(5, 8, 12, .3) 70%, var(--void) 100%),
    linear-gradient(90deg, rgba(5, 8, 12, .88) 0%, rgba(5, 8, 12, .62) 45%, rgba(5, 8, 12, .42) 100%);
}
.call__grid {
  --phone-col: clamp(236px, 20vw, 290px);
  display: grid;
  gap: var(--space-l);
  grid-template-areas: "copy" "num" "meta" "phone";
}
.call__copy { grid-area: copy; display: grid; gap: var(--space-s); }
.call__copy h2 { max-width: 12ch; }
.call__label { font-size: var(--step-2); font-weight: 500; color: var(--text-2); letter-spacing: -.01em; }
.call__num {
  grid-area: num;
  justify-self: start;
  font-family: var(--font-num);
  font-weight: 900;
  font-size: calc((100vw - 2 * var(--gutter)) / 5.7);
  line-height: .8;
  letter-spacing: -.005em;
  font-variant-numeric: lining-nums tabular-nums;
  white-space: nowrap;
  color: var(--text);
  transition: color var(--dur) var(--ease-out);
}
.call__num:hover { color: var(--cyan); }
.call__meta { grid-area: meta; display: grid; gap: .35rem; }
.call__meta p:first-child { font-size: var(--step-1); color: var(--text); max-width: 40ch; }
.call__hours { color: var(--muted); }
.call__phone { grid-area: phone; justify-self: center; margin: var(--space-l) 0 0; }
.call__phone .phone { --phone-w: min(74vw, 290px); }
@media (min-width: 960px) {
  .call { padding-block: clamp(6rem, 3rem + 8vw, 11rem); }
  .call__grid {
    grid-template-columns: minmax(0, 1fr) var(--phone-col);
    grid-template-areas: "copy phone" "num phone" "meta phone";
    grid-template-rows: auto auto 1fr;
    column-gap: var(--space-xl);
    row-gap: var(--space-l);
    align-items: start;
  }
  .call__copy { align-self: end; padding-top: var(--space-xl); }
  .call__num { font-size: min(10.5rem, calc((min(100vw, var(--container) + 2 * var(--gutter)) - 2 * var(--gutter) - var(--phone-col) - var(--space-xl)) / 5.6)); }
  .call__phone { justify-self: end; align-self: center; margin: 0; }
  .call__phone .phone { --phone-w: var(--phone-col); }
}

/* ---------- 3. What happens next (daylight) ------------------------------ */
.after__head { display: grid; gap: var(--space-m); align-items: end; }
.after__head h2 { max-width: 13ch; }
.after__promise {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--step-3);
  line-height: 1;
  letter-spacing: -.038em;
  color: var(--cyan-deep);
  max-width: 13ch;
}
@media (min-width: 960px) {
  .after__head { grid-template-columns: minmax(0, 1fr) auto; column-gap: var(--space-xl); }
  .after__promise { text-align: right; }
}
.after__route { position: relative; margin-top: var(--space-xl); }
.after__route .route__bg { stroke: rgba(10, 17, 27, .22); }
.after__route .route__line { stroke: var(--cyan-deep); }
.after__route .route__node { background: var(--daylight); border-color: rgba(10, 17, 27, .35); }
.after__route .route__node::after { background: var(--cyan-deep); }
.after__route .route__node.is-lit, html:not(.anim-ready) .after__route .route__node { border-color: var(--cyan-deep); }
.after__route .route__svg { left: -1px; width: 20px; top: var(--route-start, 0); height: var(--route-len, 100%); }
html:not(.js) .after__route .route__svg { display: none; }
.after__steps { display: grid; gap: var(--space-l); }
.after__step { position: relative; display: grid; gap: .7rem; align-content: start; padding-left: 2.6rem; }
.after__step .route__node { position: absolute; left: 0; top: .45rem; z-index: 1; }
.after__step h3 {
  font-size: clamp(2rem, 1.2rem + 2.4vw, 3.5rem);
  font-weight: 800;
  letter-spacing: -.042em;
  line-height: .95;
}
.after__step p { color: var(--ink-muted); font-size: var(--step-1); line-height: 1.45; max-width: 26ch; }
@media (min-width: 900px) {
  .after__route .route__svg { left: var(--route-start, 0); width: var(--route-len, 100%); height: 20px; }
  .after__steps { grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: var(--space-l); }
  .after__step { padding-left: 0; padding-top: 2.75rem; }
  .after__step .route__node { top: 1px; }
}

.who { margin-top: var(--space-2xl); display: grid; gap: var(--space-l); }
.who__title { font-size: var(--step-3); max-width: 12ch; }
.who__list { display: grid; gap: 0 var(--space-l); border-top: 2px solid var(--ink); }
.who__list li {
  padding: 1.1rem 0 1.25rem;
  border-bottom: 1px solid var(--ink-line);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--step-2);
  line-height: 1.08;
  letter-spacing: -.03em;
  word-spacing: .03em;
  text-wrap: balance;
}
@media (min-width: 720px) { .who__list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) {
  .who__list { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .who__list li { border-bottom: 0; padding-right: 1.5rem; }
}

/* ---------- 4. Why us + the office --------------------------------------- */
.why { display: grid; gap: var(--space-l); }
.why h2 { max-width: 11ch; }
.why__list { display: grid; border-top: 1px solid var(--line-2); }
.why__list li {
  display: grid;
  grid-template-columns: 1.6rem minmax(0, 1fr);
  gap: .9rem;
  align-items: baseline;
  padding-block: 1.1rem;
  border-bottom: 1px solid var(--line-2);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--step-2);
  line-height: 1.1;
  letter-spacing: -.028em;
}
.why__list li::before {
  content: "";
  width: 1.15rem; height: 1.15rem;
  transform: translateY(.12em);
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'%3E%3Ccircle cx='20' cy='20' r='6' fill='%2300C6F2'/%3E%3Ccircle cx='20' cy='20' r='12.5' fill='none' stroke='%2300C6F2' stroke-width='2.6' opacity='.6'/%3E%3Ccircle cx='20' cy='20' r='18.5' fill='none' stroke='%2300C6F2' stroke-width='2.2' opacity='.3'/%3E%3C/svg%3E") center / contain no-repeat;
}
@media (min-width: 960px) {
  .why { grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); column-gap: var(--space-xl); align-items: end; }
  .why__list { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--space-l); }
}
.office__statement {
  display: grid;
  margin-top: var(--space-2xl);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.1rem, .8rem + 4.6vw, 5.75rem);
  line-height: .96;
  letter-spacing: -.044em;
  word-spacing: .06em;
  text-wrap: balance;
}
.office__statement span:first-child { color: var(--muted); }

.office__grid { display: grid; gap: var(--space-xl); margin-top: var(--space-2xl); align-items: center; }
@media (min-width: 1200px) {
  .office__grid { grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); column-gap: var(--space-2xl); }
}
@media (min-width: 720px) and (max-width: 1199.98px) {
  .radar { max-width: 640px; }
}

/* The signal map: our office at the center, real client towns at their true bearings */
.radar { margin: 0; display: grid; gap: .9rem; container: radar / inline-size; }
.radar__map {
  --town-dot: 12px;
  position: relative;
  aspect-ratio: 1;
  width: 100%;
  border-radius: var(--radius-l);
  background:
    linear-gradient(rgba(234, 241, 247, .035) 1px, transparent 1px) 0 0 / 12.5% 12.5%,
    linear-gradient(90deg, rgba(234, 241, 247, .035) 1px, transparent 1px) 0 0 / 12.5% 12.5%,
    var(--night);
  border: 1px solid var(--line);
  overflow: hidden;
  container-type: inline-size;
}
.radar__svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.radar__ring { fill: none; stroke: rgba(234, 241, 247, .22); stroke-width: 1.25; stroke-dasharray: 3 6; vector-effect: non-scaling-stroke; }
.radar__pulse { fill: none; stroke: var(--cyan); stroke-width: 1.75; vector-effect: non-scaling-stroke; opacity: 0; }
.radar__mi, .radar__north {
  position: absolute;
  left: var(--x); top: var(--y);
  transform: translate(-50%, -50%);
  padding: .1rem .35rem;
  border-radius: 4px;
  background: var(--night);
  font-size: .75rem;
  color: var(--muted);
  white-space: nowrap;
}
.radar__north { --x: 50%; --y: 4.5%; font-weight: 600; color: var(--text-2); background: none; }
.radar__office {
  position: absolute;
  left: var(--x); top: var(--y);
  width: 0; height: 0;
  z-index: 3;
}
.radar__office svg { position: absolute; left: -15px; top: -42px; width: 30px; height: 42px; max-width: none; color: var(--cyan); filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .55)); }
.radar__office::before {
  content: "";
  position: absolute;
  left: -8px; top: -3px;
  width: 16px; height: 6px;
  border-radius: 50%;
  background: var(--cyan);
}
.radar__office p {
  position: absolute;
  left: 0; top: 12px;
  transform: translateX(-50%);
  display: grid;
  justify-items: center;
  white-space: nowrap;
  font-size: .8125rem;
  line-height: 1.25;
  color: var(--muted);
  text-align: center;
}
.radar__office strong { color: #fff; font-weight: 600; font-size: .9375rem; }

.radar__towns { position: absolute; inset: 0; }
.town {
  position: absolute;
  left: var(--x); top: var(--y);
  width: 0; height: 0;
  z-index: 2;
}
.town::before {
  content: "";
  position: absolute;
  left: calc(var(--town-dot) / -2); top: calc(var(--town-dot) / -2);
  width: var(--town-dot); height: var(--town-dot);
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 0 4px rgba(0, 198, 242, .18);
  transition: background-color .5s var(--ease-out), box-shadow .5s var(--ease-out), transform .5s var(--ease-out);
}
.town > a, .town > p {
  position: absolute;
  display: grid;
  gap: .05rem;
  width: max-content;
  max-width: min(15rem, 44cqi);
  font-size: .8125rem;
  line-height: 1.3;
  color: var(--text-2);
  transition: opacity .5s var(--ease-out), color .3s;
}
.town strong { font-family: var(--font-display); font-weight: 700; font-size: 1.125rem; letter-spacing: -.02em; color: #fff; }
.town > a:hover strong { color: var(--cyan); text-decoration: underline; text-underline-offset: .18em; }
.town > a { border-radius: 4px; }
.town--left > * { right: 14px; top: 0; transform: translateY(-50%); text-align: right; justify-items: end; }
.town--right > * { left: 14px; top: 0; transform: translateY(-50%); }
.town--below > * { left: 0; top: 14px; transform: translateX(-35%); }
.town--above > * { right: -6px; bottom: 16px; text-align: right; justify-items: end; }
.town--below-left > * { right: -6px; top: 14px; text-align: right; justify-items: end; }
/* Armed by JS (before the ping): towns wait in grey; the ping lights them in turn */
.radar.is-armed .town::before { background: rgba(234, 241, 247, .35); box-shadow: 0 0 0 4px rgba(234, 241, 247, .06); transform: scale(.8); }
.radar.is-armed .town > * { opacity: .38; }
.radar.is-armed .town.is-lit::before { background: var(--cyan); box-shadow: 0 0 0 4px rgba(0, 198, 242, .18); transform: scale(1); }
.radar.is-armed .town.is-lit > * { opacity: 1; }
.radar__cap { color: var(--muted); font-size: var(--step--1); }

@container (max-width: 420px) {
  .town strong { font-size: .9375rem; }
  .town > a, .town > p { font-size: .6875rem; }
  .radar__office p { font-size: .6875rem; }
  .radar__office strong { font-size: .8125rem; }
}

.office__card { display: grid; gap: var(--space-m); align-content: start; }
.office__card h2 { max-width: 10ch; }
.office__card .lede { max-width: 42ch; }
.nap { display: grid; gap: .3rem; font-size: var(--step-1); line-height: 1.4; }
.nap__name { font-family: var(--font-display); font-weight: 800; font-size: var(--step-2); letter-spacing: -.03em; }
.nap__muted { color: var(--muted); font-size: var(--step-0); }
.office__facts { display: grid; gap: 0; border-top: 1px solid var(--line-2); }
.office__facts > div { display: grid; grid-template-columns: 5.5rem minmax(0, 1fr); gap: 1rem; padding-block: .8rem; border-bottom: 1px solid var(--line-2); }
.office__facts dt { color: var(--muted); font-size: var(--step--1); padding-top: .15rem; }
.office__facts dd { margin: 0; }
.office__facts a { color: var(--text); text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: .22em; transition: color var(--dur-fast), text-decoration-color var(--dur-fast); }
.office__facts a:hover { color: var(--cyan); text-decoration-color: var(--cyan); }
.office__card .btn-row { margin-top: var(--space-2xs); }

/* Narrow maps: town names only on the map, results in a legend below
   (each width exposes the results once) */
.radar__legend { display: none; }
@container radar (max-width: 540px) {
  .town span { display: none; }
  .town strong { font-size: .9375rem; }
  .radar__office span { display: none; }
  .radar__legend { display: grid; border-top: 1px solid var(--line-2); }
  .radar__legend li { display: grid; gap: .1rem; padding-block: .7rem; border-bottom: 1px solid var(--line-2); color: var(--text-2); font-size: .9375rem; }
  .radar__legend strong { font-family: var(--font-display); font-weight: 700; color: #fff; font-size: 1.0625rem; letter-spacing: -.02em; }
  .radar__legend a { text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: .2em; }
}

/* Phones: the form comes right after the pitch, before the agenda */
@media (max-width: 1023.98px) {
  .contact-hero__copy { display: contents; }
  .contact-hero__title { order: 1; }
  .contact-hero .lede { order: 2; }
  .book { order: 3; }
  .agenda { order: 4; }
  .contact-hero__call { order: 5; }
}

/* Load check: the inline stylesheet guard re-fetches this file if this rule is missing. Keep it last. */
:root { --css-contact: 1; }
