/* ============================================================
   Styles for interior pages (contact, error).
   Loads after site.css and reuses its tokens.
   ============================================================ */

/* ---------- gradient page header ---------- */

.page-head {
  position: relative;
  background: var(--grad);
  color: #fff;
  overflow: hidden;
  padding: 74px 0 78px;
}
.page-head::before {
  content: "";
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(52% 62% at 82% 10%, rgba(255,255,255,.24), transparent 62%),
    radial-gradient(46% 54% at 6% 94%, rgba(3,24,90,.5), transparent 68%);
}
.page-head::after {
  content: "";
  position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.07) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(92% 78% at 50% 26%, #000, transparent 78%);
  -webkit-mask-image: radial-gradient(92% 78% at 50% 26%, #000, transparent 78%);
}
.page-head .wrap { position: relative; }
.page-head h1 {
  margin: 16px 0 0;
  font-size: clamp(2.1rem, 4.6vw, 3.25rem);
  letter-spacing: -0.04em;
  line-height: 1.05;
  max-width: 18ch;
}
.page-head__lede {
  margin: 18px 0 0;
  color: rgba(235,245,255,.88);
  font-size: 1.0625rem;
  max-width: 54ch;
  line-height: 1.6;
}

/* The service pages carry an icon, a back link and buttons in the same header. */
.page-head__back {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--display); font-weight: 600; font-size: 13px;
  color: rgba(235,245,255,.82);
  transition: color .18s ease, gap .2s ease;
}
.page-head__back svg { transform: rotate(180deg); }
.page-head__back:hover { color: #fff; gap: 12px; }

/* Icon and service name share a line — stacking them cost ~46px of header for
   no gain, and the glyph belongs with the label it illustrates. */
.page-head__id { display: flex; align-items: center; gap: 15px; margin-top: 26px; }
.page-head__ico {
  width: 48px; height: 48px; border-radius: 13px; flex: none;
  background: rgba(255,255,255,.16);
  border: 1px solid rgba(255,255,255,.32);
  backdrop-filter: blur(8px);
  color: #fff;
  display: grid; place-items: center;
}

/* Service headlines are written to sit on one line at full width; the 18ch
   measure that suits the legal and contact pages would break every one of them.
   Below roughly 1080px they wrap naturally, which is what we want on mobile. */
.page-head--svc h1 { max-width: none; margin-top: 20px; }

.page-head__cta { display: flex; gap: 13px; margin-top: 32px; flex-wrap: wrap; }

/* ---------- contact layout ---------- */

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr);
  gap: 64px;
  align-items: start;
}
@media (max-width: 940px) {
  .contact-grid { grid-template-columns: 1fr; gap: 44px; }
}

.coords { display: grid; margin: 34px 0 0; }
.coord {
  display: grid;
  grid-template-columns: 128px 1fr;
  gap: 18px;
  padding: 15px 0;
  border-top: 1px solid var(--rule);
  align-items: baseline;
}
.coord:last-child { border-bottom: 1px solid var(--rule); }
.coord dt {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--mono);
  font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink-3);
}
.coord dt svg { color: var(--blue-600); flex: none; }
.coord dd {
  margin: 0;
  font-family: var(--display);
  font-weight: 500;
  font-size: 1rem;
  color: var(--ink);
  line-height: 1.45;
}
.coord dd a { border-bottom: 1px solid var(--rule-2); }
.coord dd a:hover { border-bottom-color: var(--blue-600); color: var(--blue-600); }
@media (max-width: 480px) { .coord { grid-template-columns: 1fr; gap: 6px; } }

.promise {
  margin-top: 34px;
  background: var(--tint-2);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--blue-600);
  border-radius: 10px;
  padding: 20px 22px 22px;
}
.promise b {
  font-family: var(--display);
  font-size: 14px;
  letter-spacing: -0.015em;
  display: block;
  margin-bottom: 10px;
}
.promise ol { margin: 0; padding-left: 18px; display: grid; gap: 7px; }
.promise li { font-size: 13.5px; color: var(--ink-2); line-height: 1.5; }

/* ---------- form ---------- */

.form {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 16px;
  padding: 32px 30px 30px;
  display: grid;
  gap: 20px;
  box-shadow: var(--shadow-m);
}
.form__pair { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 560px) { .form__pair { grid-template-columns: 1fr; } }

.field { display: grid; gap: 7px; }
.field label {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.field input,
.field select,
.field textarea {
  font-family: var(--body);
  font-size: 15px;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--rule-2);
  border-radius: 8px;
  padding: 12px 13px;
  width: 100%;
  transition: border-color .16s ease, box-shadow .16s ease;
}
.field textarea { resize: vertical; min-height: 130px; line-height: 1.55; }
.field select { font-family: var(--display); font-weight: 500; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--blue-400); }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--blue-600);
  box-shadow: 0 0 0 3px var(--tint);
}
.field input::placeholder, .field textarea::placeholder { color: var(--ink-3); opacity: .7; }

.field__err {
  font-size: 12.5px;
  color: #C02617;
  min-height: 0;
}
.field__err:empty { display: none; }
.field input.input-validation-error,
.field select.input-validation-error,
.field textarea.input-validation-error { border-color: #C02617; }

.form__summary { color: #C02617; font-size: 13.5px; }
.form__summary ul { margin: 0; padding-left: 18px; }
.form__summary:empty, .form__summary ul:empty { display: none; }

.form__foot {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  border-top: 1px solid var(--rule);
  padding-top: 20px;
}
.form__note {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-3);
  line-height: 1.55;
  letter-spacing: .02em;
}

/* honeypot — off-screen, never focusable, invisible to real visitors */
.hp {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ---------- success panel ---------- */

.sent {
  background: var(--tint-2);
  border: 1px solid var(--rule);
  border-radius: 16px;
  padding: 40px 34px 38px;
  display: grid;
  gap: 14px;
  justify-items: start;
  box-shadow: var(--shadow-m);
}
.sent__ico {
  width: 54px; height: 54px;
  border-radius: 14px;
  background: var(--tint);
  color: var(--blue-600);
  display: grid; place-items: center;
}
.sent h2 { font-size: 1.6rem; }
.sent p { color: var(--ink-2); max-width: 46ch; }
.sent p a { color: var(--blue-600); border-bottom: 1px solid var(--rule-2); }
.sent .btn { margin-top: 10px; }

/* ============================================================
   Service detail pages — /services/{slug}
   ============================================================ */

.band-off {
  background: var(--off);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

/* --- overview: prose beside the take-away panel --- */

.svc-lead {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr);
  gap: 64px;
  align-items: start;
}
.svc-lead__body p { color: var(--ink-2); margin-top: 20px; max-width: 58ch; }
.svc-lead__body .eyebrow { margin-top: 0; }
/* Two classes deep so it outranks `.svc-lead__body p` above — otherwise the
   label inherits body colour and the divider stops short at the prose measure. */
.svc-lead__body .svc-lead__tech {
  font-family: var(--mono);
  font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink-3);
  max-width: none;
  margin-top: 34px;
  padding-top: 24px;
  border-top: 1px solid var(--rule);
}
@media (max-width: 980px) { .svc-lead { grid-template-columns: 1fr; gap: 42px; } }

.chips { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 16px; }
.chip {
  font-family: var(--mono); font-size: 11px; letter-spacing: .05em;
  color: var(--ink-2); background: var(--paper);
  border: 1px solid var(--rule-2); border-radius: 100px;
  padding: 7px 14px; line-height: 1;
  transition: border-color .18s ease, color .18s ease;
}
.chip:hover { border-color: var(--blue-400); color: var(--blue-600); }

.panel {
  background: var(--tint-2);
  border: 1px solid var(--rule);
  border-radius: 16px;
  padding: 30px 28px 28px;
  box-shadow: var(--shadow-m);
  position: sticky; top: 100px;
}
.panel h3 { font-size: 1.0625rem; letter-spacing: -0.02em; }
.panel ul { list-style: none; margin: 20px 0 0; padding: 0; display: grid; gap: 14px; }
.panel li { display: flex; gap: 11px; font-size: 14px; color: var(--ink-2); line-height: 1.5; }
.panel li svg { color: var(--blue-600); flex: none; margin-top: 2px; }
.panel__link { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--rule); width: 100%; }
@media (max-width: 980px) { .panel { position: static; } }

/* --- capability cards; --3 is the narrower "typical engagements" row --- */

.caps { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; margin-top: 46px; }
.caps--3 { grid-template-columns: repeat(3, 1fr); }
.cap {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 16px;
  padding: 26px 26px 28px;
  display: grid; gap: 14px; align-content: start;
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.cap:hover { transform: translateY(-4px); box-shadow: var(--shadow-l); border-color: var(--blue-400); }
.cap h3 { font-size: 1.125rem; letter-spacing: -0.025em; }
.cap p { font-size: 14px; color: var(--ink-2); line-height: 1.6; }
.cap--plain { gap: 12px; }
@media (max-width: 900px) { .caps--3 { grid-template-columns: 1fr; } }
@media (max-width: 820px) { .caps { grid-template-columns: 1fr; } }

/* --- cross-navigation to the other five services --- */

.svc-more { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 44px; }
.svc-more__i {
  display: flex; align-items: center; gap: 15px;
  padding: 18px 20px;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 14px;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.svc-more__i:hover { transform: translateY(-3px); border-color: var(--blue-400); box-shadow: var(--shadow-m); }
.svc-more__ico {
  width: 42px; height: 42px; border-radius: 12px; flex: none;
  background: var(--tint); color: var(--blue-600);
  display: grid; place-items: center;
}
.svc-more__txt { min-width: 0; }
.svc-more__i b {
  display: block;
  font-family: var(--display); font-size: 14.5px; font-weight: 700;
  letter-spacing: -0.02em; line-height: 1.25;
}
.svc-more__txt span {
  display: block; font-size: 12px; color: var(--ink-3); margin-top: 3px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.svc-more__i--all { background: var(--tint-2); }
.svc-more__arr { margin-left: auto; color: var(--blue-600); display: grid; place-items: center; flex: none; }
@media (max-width: 900px) { .svc-more { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .svc-more { grid-template-columns: 1fr; } }

/* ============================================================
   Legal pages — privacy, terms, sitemap
   ============================================================ */

.legal { max-width: 76ch; }
.legal--wide { max-width: none; }

.legal__meta {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-3);
  padding-bottom: 22px;
  border-bottom: 1px solid var(--rule);
}

.legal h2 {
  font-size: 1.375rem;
  letter-spacing: -0.025em;
  margin-top: 44px;
}
.legal h3 {
  font-size: 1.0625rem;
  letter-spacing: -0.015em;
  margin-top: 26px;
  color: var(--ink);
}
.legal p { margin-top: 14px; color: var(--ink-2); line-height: 1.7; }
.legal ul { margin: 14px 0 0; padding-left: 20px; display: grid; gap: 10px; }
.legal li { color: var(--ink-2); line-height: 1.65; }
.legal li b, .legal p b { color: var(--ink); font-weight: 600; }

.legal a { color: var(--blue-600); border-bottom: 1px solid var(--rule-2); }
.legal a:hover { border-bottom-color: var(--blue-600); }

.legal__nav {
  display: flex; gap: 30px; flex-wrap: wrap;
  margin-top: 52px; padding-top: 24px;
  border-top: 1px solid var(--rule);
}
.legal__nav a { border-bottom: 0; }

/* --- sitemap --- */

.sitemap { display: grid; grid-template-columns: repeat(3, 1fr); gap: 44px; }
.sitemap__col h2 { margin-top: 0; font-size: 1.0625rem; }
.sitemap__col h2 ~ h2 { margin-top: 36px; }
.sitemap__col ul { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 11px; }
.sitemap__col a {
  font-family: var(--display);
  font-weight: 500;
  font-size: 15px;
  color: var(--ink-2);
  border-bottom: 0;
}
.sitemap__col a:hover { color: var(--blue-600); }
@media (max-width: 760px) { .sitemap { grid-template-columns: 1fr; gap: 32px; } }
