/* APS Consulting Services: site styles
   Colours are taken from the APS logo. */

:root {
  --ink: #0a2143;        /* wordmark navy: headings, dark bands */
  --ink-deep: #061730;   /* footer */
  --brand: #1e4b75;      /* mark blue: buttons, links, accents */
  --brand-hover: #0e284b;
  --text: #1f2d40;       /* body copy */
  --muted: #5d6b7e;      /* secondary copy */
  --rule: #d6dee8;       /* hairlines */
  --mist: #eef2f6;       /* pale band */
  --paper: #ffffff;
  --focus: #6fa0d2;

  --wrap: 1160px;
  --gutter: clamp(20px, 4vw, 40px);
  --radius: 4px;

  --font: "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--paper);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--brand); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--brand-hover); }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 2px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

.nowrap { white-space: nowrap; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--ink); color: #fff; padding: 10px 16px; border-radius: var(--radius);
}
.skip-link:focus { top: 12px; color: #fff; }

/* ---------- Type ---------- */

h1, h2, h3 {
  color: var(--ink);
  font-stretch: 112%;
  margin: 0;
  text-wrap: balance;
}
h1 {
  font-size: clamp(2.35rem, 1.4rem + 3.6vw, 4.1rem);
  font-weight: 650;
  line-height: 1.04;
  letter-spacing: -0.022em;
}
h2 {
  font-size: clamp(1.75rem, 1.3rem + 1.6vw, 2.6rem);
  font-weight: 620;
  line-height: 1.1;
  letter-spacing: -0.015em;
}
h3 {
  font-size: 1.2rem;
  font-weight: 620;
  line-height: 1.3;
  letter-spacing: -0.005em;
}
p { margin: 0; }
.lead {
  font-size: clamp(1.1rem, 1rem + 0.35vw, 1.3rem);
  line-height: 1.55;
  color: var(--text);
  max-width: 36em;
}
.muted { color: var(--muted); }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font: inherit; font-weight: 600; font-size: 1rem; line-height: 1.2;
  padding: 15px 24px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-hover); color: #fff; }
.btn-light { background: #fff; color: var(--ink); }
.btn-light:hover { background: var(--mist); color: var(--ink); }
.btn-outline { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-outline:hover { background: var(--ink); color: #fff; }

.text-link {
  font-weight: 600; color: var(--ink);
  text-decoration: underline; text-decoration-color: var(--rule);
  text-decoration-thickness: 2px; text-underline-offset: 6px;
}
.text-link:hover { text-decoration-color: var(--brand); color: var(--ink); }

.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; }

/* ---------- Header ---------- */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.96);
  backdrop-filter: saturate(140%) blur(8px);
  -webkit-backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--rule);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  min-height: 76px;
}

.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.brand img { width: 44px; height: auto; }
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-name {
  font-weight: 800; font-stretch: 115%; font-size: 1.32rem; letter-spacing: .01em; color: var(--ink);
}
.brand-sub {
  font-weight: 450; font-stretch: 110%; font-size: .66rem; letter-spacing: .14em;
  text-transform: uppercase; color: var(--ink); margin-top: 5px;
}

.nav { display: flex; align-items: center; gap: 32px; }
.nav-links { display: flex; gap: 28px; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  color: var(--text); text-decoration: none; font-weight: 500; font-size: .98rem;
  padding: 6px 0; border-bottom: 2px solid transparent;
}
.nav-links a:hover { color: var(--ink); border-bottom-color: var(--rule); }
.nav-links a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--brand); }
.nav .btn { padding: 11px 18px; font-size: .95rem; }

.menu-toggle {
  display: none;
  background: none; border: 1px solid var(--rule); border-radius: var(--radius);
  width: 44px; height: 44px; padding: 0; cursor: pointer; color: var(--ink);
  align-items: center; justify-content: center;
}
.menu-toggle svg { width: 22px; height: 22px; }
.menu-toggle .icon-close { display: none; }
.menu-toggle[aria-expanded="true"] .icon-open { display: none; }
.menu-toggle[aria-expanded="true"] .icon-close { display: block; }

@media (max-width: 860px) {
  .menu-toggle { display: inline-flex; }
  .nav {
    display: none;
    position: absolute; left: 0; right: 0; top: 100%;
    background: #fff; border-bottom: 1px solid var(--rule);
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 8px var(--gutter) 24px;
    box-shadow: 0 18px 30px -20px rgba(10,33,67,.35);
  }
  .nav.is-open { display: flex; }
  .nav-links { flex-direction: column; gap: 0; }
  .nav-links a {
    display: block; padding: 14px 0; border-bottom: 1px solid var(--rule); font-size: 1.05rem;
  }
  .nav-links a[aria-current="page"] { border-bottom-color: var(--rule); color: var(--brand); font-weight: 650; }
  .nav .btn { margin-top: 20px; padding: 15px 20px; font-size: 1rem; }
}

/* ---------- Sections ---------- */

.section { padding: clamp(64px, 9vw, 112px) 0; }
.section-mist { background: var(--mist); }
.section-ink { background: var(--ink); color: #d9e2ee; }
.section-ink h2, .section-ink h3 { color: #fff; }

.section-head { max-width: 40rem; margin-bottom: clamp(36px, 5vw, 56px); }
.section-head p { margin-top: 18px; }

/* ---------- Hero ---------- */

.hero { padding: clamp(56px, 8vw, 104px) 0 clamp(64px, 8vw, 112px); }
.hero-grid {
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: clamp(40px, 6vw, 88px); align-items: center;
}
.hero h1 { max-width: 13ch; }
.hero .lead { margin-top: 28px; }
.hero .actions { margin-top: 36px; }

@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; }
}

/* The ledger: activity vs value */
.ledger {
  background: var(--mist);
  border-radius: 6px;
  padding: clamp(22px, 3vw, 34px);
}
.ledger-intro { font-size: .98rem; color: var(--muted); margin-bottom: 18px; max-width: 30em; }
.ledger table { width: 100%; border-collapse: collapse; }
.ledger th {
  text-align: left; font-weight: 650; font-stretch: 112%; font-size: .95rem;
  padding: 0 0 12px; border-bottom: 2px solid var(--ink); color: var(--ink);
}
.ledger th.col-activity { color: var(--muted); border-bottom-color: #b3bfcd; }
.ledger td {
  padding: 14px 0; border-bottom: 1px solid var(--rule); vertical-align: top;
  font-size: .98rem; line-height: 1.4;
}
.ledger tr:last-child td { border-bottom: 0; padding-bottom: 0; }
.ledger td.activity { color: var(--muted); width: 42%; padding-right: 18px; }
.ledger td.value { color: var(--ink); font-weight: 560; }
.ledger td.value > span { display: flex; gap: 10px; align-items: flex-start; }
.ledger td.value svg { flex: none; width: 16px; height: 16px; margin-top: 2px; color: var(--brand); }

/* ---------- Services ---------- */

.split {
  display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(32px, 5vw, 72px);
}
.split .section-head { margin-bottom: 0; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } }

.service-list {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 clamp(28px, 4vw, 48px); margin: 0; padding: 0; list-style: none;
}
.service-list li { border-top: 1px solid var(--rule); padding: 26px 0 34px; }
.service-list h3 { margin-bottom: 10px; }
.service-list p { color: var(--muted); }
@media (max-width: 640px) { .service-list { grid-template-columns: 1fr; } }

/* ---------- Outcomes (dark band) ---------- */

.outcomes-head { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 32px 72px; align-items: end; }
.outcomes-head p { color: #c5d1e0; }
@media (max-width: 900px) { .outcomes-head { grid-template-columns: 1fr; } }

.outcomes {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 clamp(24px, 4vw, 48px);
  margin: clamp(40px, 6vw, 64px) 0 0; padding: 0; list-style: none;
}
.outcomes li { border-top: 1px solid rgba(255,255,255,.22); padding-top: 24px; }
.outcomes h3 { margin-bottom: 10px; }
.outcomes p { color: #c5d1e0; }
@media (max-width: 800px) { .outcomes { grid-template-columns: 1fr; gap: 28px; } }

/* ---------- Steps (a real sequence, so numbered) ---------- */

.steps {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 clamp(20px, 3vw, 36px);
  margin: 0; padding: 0; list-style: none; counter-reset: step;
}
.steps li { counter-increment: step; border-top: 2px solid var(--ink); padding-top: 20px; }
.steps li::before {
  content: counter(step);
  display: block; font-weight: 700; font-stretch: 115%; font-size: 1.05rem; color: var(--brand); margin-bottom: 14px;
}
.steps h3 { margin-bottom: 8px; }
.steps p { color: var(--muted); font-size: 1rem; }
@media (max-width: 900px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 36px 28px; } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; gap: 28px; } }

/* ---------- Call to action band ---------- */

.cta {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 32px 64px; align-items: end;
}
.cta h2 { max-width: 18ch; }
.cta p { margin-top: 16px; max-width: 34em; color: var(--muted); }
@media (max-width: 820px) { .cta { grid-template-columns: 1fr; align-items: start; } }

/* ---------- About ---------- */

.page-hero { padding: clamp(56px, 8vw, 100px) 0 clamp(48px, 6vw, 80px); border-bottom: 1px solid var(--rule); }
.page-hero h1 { max-width: 16ch; }
.page-hero .lead { margin-top: 26px; }

.prose p + p { margin-top: 1.1em; }
.prose { max-width: 40em; font-size: 1.1rem; line-height: 1.7; }

.facts { margin: 0; padding: 0; list-style: none; }
.prose + .facts { margin-top: 40px; }
.facts li { border-top: 1px solid var(--rule); padding: 16px 0; }
.facts li:last-child { border-bottom: 1px solid var(--rule); }
.facts strong { display: block; color: var(--ink); font-weight: 620; font-stretch: 110%; }
.facts span { color: var(--muted); font-size: .98rem; }

.experience { margin: 0; padding: 0; list-style: none; }
.experience li {
  display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 8px clamp(24px, 5vw, 72px);
  border-top: 1px solid var(--rule); padding: 28px 0;
}
.experience li:last-child { border-bottom: 1px solid var(--rule); }
.experience p { color: var(--text); max-width: 40em; }
@media (max-width: 760px) { .experience li { grid-template-columns: 1fr; } }

.principles {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 clamp(28px, 5vw, 64px);
  margin: 0; padding: 0; list-style: none;
}
.principles li { border-top: 2px solid var(--ink); padding: 22px 0 36px; }
.principles h3 { margin-bottom: 10px; }
.principles p { color: var(--muted); }
@media (max-width: 680px) { .principles { grid-template-columns: 1fr; } }

/* ---------- Contact ---------- */

.contact-grid {
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: clamp(40px, 6vw, 88px); align-items: start;
}
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }

.form { display: grid; gap: 22px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
@media (max-width: 600px) { .form-row { grid-template-columns: 1fr; } }
.field { display: grid; gap: 8px; }
.field label { font-weight: 600; color: var(--ink); font-size: .98rem; }
.field .hint { font-weight: 400; color: var(--muted); }
.field input,
.field select,
.field textarea {
  font: inherit; font-size: 1rem; color: var(--text);
  width: 100%; padding: 13px 14px;
  background: #fff; border: 1px solid #b6c2d0; border-radius: var(--radius);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field textarea { min-height: 160px; resize: vertical; line-height: 1.55; }
.field select {
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%230a2143' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; padding-right: 40px;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(30,75,117,.18);
}
.field input[aria-invalid="true"],
.field textarea[aria-invalid="true"] { border-color: #a4262c; }
.form .btn { justify-self: start; }
.form-status { font-size: 1rem; padding: 16px 18px; border-radius: var(--radius); }
.form-status[hidden] { display: none; }
.form-status.is-ok { background: #e8f1ec; color: #1d4a33; border: 1px solid #b9d4c4; }
.form-status.is-error { background: #fbecec; color: #7a1d22; border: 1px solid #ebc2c4; }

.contact-aside { display: grid; gap: 28px; }
.aside-block { border-top: 2px solid var(--ink); padding-top: 20px; }
.aside-block h2 { font-size: 1.35rem; margin-bottom: 10px; }
.aside-block p { color: var(--muted); }
.aside-block .btn { margin-top: 20px; }
.contact-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.contact-list span { display: block; font-size: .9rem; color: var(--muted); }
.contact-list a { font-weight: 600; color: var(--ink); word-break: break-word; }

/* ---------- Booking ---------- */

.booking-page { background: var(--mist); padding: clamp(32px, 6vw, 72px) 0 clamp(56px, 8vw, 96px); }
.booking-card {
  display: grid; grid-template-columns: minmax(280px, 380px) minmax(0, 1fr);
  background: #fff; border: 1px solid var(--rule); border-radius: 8px; overflow: hidden;
  box-shadow: 0 1px 2px rgba(10,33,67,.04), 0 12px 40px -24px rgba(10,33,67,.25);
}
.booking-info { padding: clamp(28px, 4vw, 44px); border-right: 1px solid var(--rule); }
.booking-mark {
  width: 76px; height: 76px; border-radius: 50%; background: var(--mist);
  display: grid; place-items: center; margin-bottom: 22px;
}
.booking-mark img { width: 46px; }
.booking-org { font-weight: 600; color: var(--muted); font-size: 1rem; }
.booking-info h1 { font-size: clamp(1.7rem, 1.3rem + 1.2vw, 2.15rem); line-height: 1.12; margin-top: 6px; }
.booking-meta { list-style: none; margin: 24px 0 0; padding: 0; display: grid; gap: 12px; }
.booking-meta li { display: flex; gap: 12px; align-items: flex-start; color: var(--muted); font-weight: 600; font-size: .98rem; line-height: 1.4; }
.booking-meta svg { flex: none; width: 22px; height: 22px; color: var(--ink); margin-top: -1px; }
.booking-body { margin-top: 26px; padding-top: 24px; border-top: 1px solid var(--rule); display: grid; gap: 16px; }
.booking-body p { font-size: 1rem; }
.booking-body h2 { font-size: 1.02rem; font-stretch: 105%; margin-top: 4px; }
.booking-body ul { margin: 0; padding-left: 1.15em; color: var(--muted); font-size: 1rem; }
.booking-body li + li { margin-top: 6px; }

.booking-calendar { display: flex; flex-direction: column; }
.calendly-frame { display: block; width: 100%; min-width: 300px; height: 720px; border: 0; }
.calendar-note {
  margin: 0; padding: 14px clamp(20px, 3vw, 32px) 18px; border-top: 1px solid var(--rule);
  font-size: .92rem; color: var(--muted); text-align: center;
}
.calendar-note a { color: var(--ink); font-weight: 600; }

@media (max-width: 880px) {
  .booking-card { grid-template-columns: 1fr; }
  .booking-info { border-right: 0; border-bottom: 1px solid var(--rule); }
  .calendly-frame { height: 1000px; }
}

/* ---------- Footer ---------- */

.site-footer { background: var(--ink-deep); color: #b7c4d6; padding: 64px 0 36px; font-size: .98rem; }
.footer-grid {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 3fr) minmax(0, 4fr); gap: 40px;
}
@media (max-width: 820px) { .footer-grid { grid-template-columns: 1fr; gap: 32px; } }
.site-footer .brand { color: #fff; }
.site-footer .brand-name, .site-footer .brand-sub { color: #fff; }
.footer-tagline { margin-top: 20px; color: #b7c4d6; max-width: 24em; }
.footer-title { color: #fff; font-weight: 620; font-stretch: 110%; margin-bottom: 12px; font-size: 1rem; }
.footer-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.site-footer a { color: #e3eaf3; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-base {
  margin-top: 56px; padding-top: 24px; border-top: 1px solid rgba(255,255,255,.14);
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; font-size: .9rem; color: #8fa0b8;
}

[hidden] { display: none !important; }
