/* ==========================================================================
   Gesana — shared stylesheet
   Mobile-first. No JavaScript, no framework, no build step.
   Colour pairs are chosen to clear WCAG 2.2 AA (>= 4.5:1 body text,
   >= 3:1 for large text, UI borders and focus rings).
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Tokens
   -------------------------------------------------------------------------- */
:root {
  /* Brand */
  --brand: #0f2a5c;

  /* Light scheme */
  --bg: #ffffff;
  --bg-sunken: #f4f6fa;
  --bg-raised: #ffffff;
  --border: #d3d9e4;
  --border-strong: #9aa5ba;
  --text: #161c28;          /* 15.6:1 on --bg */
  --text-muted: #4a5265;    /*  7.8:1 on --bg */
  --link: #0b4fbe;          /*  7.3:1 on --bg */
  --link-hover: #073a8c;
  --focus: #0b4fbe;

  /* Placeholder tokens: 6.9:1 on --ph-bg */
  --ph-bg: #fff7e6;
  --ph-border: #b26a00;
  --ph-text: #7a4a00;

  /* Type scale */
  --step-0: clamp(1rem, 0.97rem + 0.15vw, 1.0625rem);
  --step-1: clamp(1.1875rem, 1.13rem + 0.28vw, 1.3125rem);
  --step-2: clamp(1.4375rem, 1.33rem + 0.53vw, 1.6875rem);
  --step-3: clamp(1.75rem, 1.56rem + 0.94vw, 2.25rem);

  /* Space */
  --gap: 1rem;
  --pad: clamp(1.125rem, 0.85rem + 1.4vw, 2rem);
  --measure: 68ch;

  /* Height of the sticky header, used to derive scroll-padding-top so an
     anchor jump clears the header instead of hiding under it.
     Mobile value assumes the nav wraps onto a second row; the wider value is
     the measured single-row height (77px) plus breathing room. */
  --header-h: 8rem;

  /* Shape */
  --radius: 8px;
  --radius-lg: 12px;

  color-scheme: light dark;
}

/* Dark scheme: mirrored tokens. Body text 14.6:1, muted 8.2:1, link 9.2:1. */
@media (prefers-color-scheme: dark) {
  :root {
    --brand: #8fb8ff;
    --bg: #12161f;
    --bg-sunken: #1a1f2b;
    --bg-raised: #1a1f2b;
    --border: #333c4d;
    --border-strong: #5b6678;
    --text: #e8ecf4;          /* 14.6:1 on --bg */
    --text-muted: #a3adc0;    /*  8.2:1 on --bg */
    --link: #8fb8ff;          /*  9.2:1 on --bg */
    --link-hover: #b9d1ff;
    --focus: #8fb8ff;
    --ph-bg: #2a2410;
    --ph-border: #a9802c;
    --ph-text: #f0c96b;       /* 9.7:1 on --ph-bg */
  }
}

/* --------------------------------------------------------------------------
   2. Reset and base
   -------------------------------------------------------------------------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  /* Sticky header height + breathing room, so an anchor jump never parks a
     heading underneath the header. Must match --header-h below. */
  scroll-padding-top: calc(var(--header-h) + 1rem);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, "Noto Sans", sans-serif;
  font-size: var(--step-0);
  line-height: 1.65;
  text-underline-offset: 0.15em;
}

h1, h2, h3 {
  line-height: 1.25;
  margin: 2rem 0 0.6rem;
  text-wrap: balance;
}

h1 { font-size: var(--step-3); margin-top: 0; letter-spacing: -0.02em; }
h2 { font-size: var(--step-2); letter-spacing: -0.015em; }
h3 { font-size: var(--step-1); }

p, ul, ol, dl { max-width: var(--measure); }
p { margin: 0 0 1rem; }

a {
  color: var(--link);
  text-decoration-thickness: 0.08em;
}
a:hover { color: var(--link-hover); }

/* Keyboard focus only — never removed, always clearly visible. */
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: 2px;
}

hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 2.5rem 0;
}

abbr[title] { text-decoration: underline dotted; }
code { font-size: 0.92em; }

/* --------------------------------------------------------------------------
   3. Skip link
   -------------------------------------------------------------------------- */
.skip-link {
  position: absolute;
  left: 0.5rem;
  top: -4rem;
  z-index: 10;
  padding: 0.75rem 1rem;
  background: var(--bg-raised);
  color: var(--link);
  border: 2px solid var(--focus);
  border-radius: var(--radius);
  font-weight: 600;
}
.skip-link:focus { top: 0.5rem; }

/* --------------------------------------------------------------------------
   4. Layout
   -------------------------------------------------------------------------- */
.wrap {
  width: 100%;
  max-width: 62rem;
  margin-inline: auto;
  padding-inline: var(--pad);
}

/* Header — sticky, so the section nav is reachable from anywhere on the page.
   --header-h is the single source of truth for the height: scroll-padding-top
   on html is derived from it. */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}

.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  padding-block: 0.75rem;
}

/* From this width the nav sits on one row beside the brand, so the header
   shrinks to a single-row height. */
@media (min-width: 40rem) {
  .site-header .wrap { padding-block: 1rem; }
  :root { --header-h: 5rem; }
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: var(--step-1);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  text-decoration: none;
}
.brand:hover { color: var(--link); }
.brand img { width: 2rem; height: 2rem; border-radius: 6px; }

/* Primary nav: stacked links on small screens, inline from 40rem up. */
.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.site-nav a {
  display: inline-block;
  padding: 0.5rem 0;
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 600;
}
.site-nav a:hover { color: var(--link); text-decoration: underline; }

.site-nav a[aria-current="page"] {
  color: var(--text);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-decoration-color: var(--link);
}

main { display: block; padding-block: clamp(2rem, 1.4rem + 3vw, 3.5rem) 3rem; }

/* Hero — the opening statement at the top of the home page.
   Top padding is 0 because main already provides it. */
.hero {
  padding-block: 0 clamp(2rem, 1.4rem + 3vw, 3.5rem);
  border-bottom: 1px solid var(--border);
  margin-bottom: clamp(2rem, 1.4rem + 3vw, 3.5rem);
}
.hero h1 { max-width: 20ch; }
.hero .lede { max-width: 54ch; }

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-sunken);
  color: var(--text-muted);
  font-size: 0.9375rem;
  padding-block: 2rem;
}
.site-footer p { margin-bottom: 0.5rem; }
/* Copyright line: present but visually quiet. */
.site-footer .fineprint { font-size: 0.8125rem; opacity: 0.75; }
.site-footer nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
  margin: 0 0 1rem;
  padding: 0;
  list-style: none;
}

/* --------------------------------------------------------------------------
   5. Components
   -------------------------------------------------------------------------- */
.lede {
  font-size: var(--step-1);
  color: var(--text-muted);
  max-width: 58ch;
}

section + section { margin-top: 2.5rem; }
.template-banner + section { margin-top: 2.5rem; }

.card {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--pad);
}
.card + .card { margin-top: var(--gap); }
.card > :last-child { margin-bottom: 0; }

.card-grid {
  display: grid;
  gap: var(--gap);
  grid-template-columns: 1fr;
  margin-block: var(--gap);
}
@media (min-width: 48rem) {
  .card-grid { grid-template-columns: 1fr 1fr; }
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;           /* comfortable touch target */
  padding: 0.6rem 1.15rem;
  border: 1px solid var(--link);
  border-radius: var(--radius);
  background: var(--link);
  color: var(--bg);
  font-weight: 600;
  text-decoration: none;
}
.btn:hover { background: var(--link-hover); border-color: var(--link-hover); color: var(--bg); }

.btn-secondary {
  background: transparent;
  color: var(--link);
}
.btn-secondary:hover { background: var(--bg-sunken); color: var(--link-hover); }

.notice {
  border: 1px solid var(--border);
  border-left: 4px solid var(--link);
  border-radius: var(--radius);
  background: var(--bg-sunken);
  padding: 1rem 1.25rem;
  margin-block: 1.5rem;
}
.notice > :last-child { margin-bottom: 0; }

dl.meta { margin: 0 0 1rem; }
dl.meta dt { font-weight: 700; margin-top: 0.75rem; }
dl.meta dd { margin: 0.15rem 0 0; color: var(--text-muted); }

/* Definition-style rows used for the legal particulars table. */
dl.facts {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0 1.5rem;
  margin: 0 0 1rem;
}
@media (min-width: 34rem) {
  dl.facts { grid-template-columns: max-content 1fr; }
}
dl.facts dt {
  font-weight: 600;
  padding-block: 0.6rem;
  border-top: 1px solid var(--border);
}
dl.facts dd {
  margin: 0;
  padding-block: 0.6rem;
  border-top: 1px solid var(--border);
}

ul.checklist { padding-left: 1.25rem; }
ul.checklist li { margin-bottom: 0.4rem; }

/* --------------------------------------------------------------------------
   5b. Home page sections (NIPPT-style rhythm)
   -------------------------------------------------------------------------- */

/* Small label above a section heading. */
.eyebrow {
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0 0 0.4rem;
}

/* Numbered capability / portfolio cards. */
.svc-list {
  display: grid;
  gap: var(--gap);
  grid-template-columns: 1fr;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: svc;
}
@media (min-width: 40rem) {
  .svc-list { grid-template-columns: 1fr 1fr; }
}
.svc-list > li {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--pad);
  counter-increment: svc;
}
.svc-list > li::before {
  content: counter(svc, decimal-leading-zero);
  display: block;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}
.svc-list h3 { margin-top: 0; }
.svc-list > li > :last-child { margin-bottom: 0; }

/* Short keyword pills, e.g. a tech tag list. */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
}
.tags li {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-sunken);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.15rem 0.7rem;
}

/* Stat band — big number over a short label. */
.stat-band {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin: 2rem 0;
}
@media (min-width: 40rem) {
  .stat-band { grid-template-columns: repeat(4, 1fr); }
}
.stat {
  background: var(--bg-raised);
  padding: 1.25rem 1rem;
  text-align: center;
}
.stat .num {
  display: block;
  font-size: var(--step-2);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.stat .label {
  display: block;
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
}

/* Numbered process steps. */
.process {
  display: grid;
  gap: var(--gap);
  grid-template-columns: 1fr;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}
@media (min-width: 40rem) {
  .process { grid-template-columns: 1fr 1fr; }
}
.process > li {
  border-left: 3px solid var(--border-strong);
  padding-left: 1rem;
  counter-increment: step;
}
.process > li::before {
  content: "Step " counter(step);
  display: block;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.3rem;
}
.process h3 { margin-top: 0; }
.process > li > :last-child { margin-bottom: 0; }

/* FAQ — native <details>, styled summary with a chevron. */
.faq {
  margin: 0;
  border-top: 1px solid var(--border);
}
.faq:last-of-type { border-bottom: 1px solid var(--border); }
.faq summary {
  cursor: pointer;
  font-weight: 600;
  padding: 1rem 2rem 1rem 0;
  position: relative;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  position: absolute;
  right: 0.5rem;
  top: 1rem;
  font-size: 1.25rem;
  line-height: 1;
  color: var(--text-muted);
}
.faq[open] summary::after { content: "\2212"; }
.faq > p {
  margin: 0 0 1rem;
  padding-bottom: 0.25rem;
  color: var(--text-muted);
}

/* Logo / client strip. */
.logo-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
}
.logo-strip li {
  background: var(--bg-raised);
  padding: 1rem 0.75rem;
  text-align: center;
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--text-muted);
}

@media (min-width: 48rem) {
  .toc {
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--bg-sunken);
    padding: 1.25rem 1.5rem;
    margin-bottom: 2rem;
  }
  .toc p { font-weight: 700; margin-bottom: 0.5rem; }
  .toc ol { margin: 0; padding-left: 1.25rem; columns: 2; column-gap: 2rem; }
  .toc li { margin-bottom: 0.25rem; break-inside: avoid; }
}

/* --------------------------------------------------------------------------
   6. Placeholder tokens
   Tokens that still need input are rendered with a dashed outline so they
   are impossible to miss in review. Replace the token text; the span is
   harmless once the value is a real string.
   -------------------------------------------------------------------------- */
.ph {
  background: var(--ph-bg);
  color: var(--ph-text);
  border: 1px dashed var(--ph-border);
  border-radius: 4px;
  padding: 0.05em 0.3em;
  font-weight: 600;
  overflow-wrap: anywhere;
}

/* Multi-line values (e.g. a registered address) keep their line breaks. */
.ph-block {
  display: inline-block;
  white-space: pre-line;
}

/* A whole page that is still templated gets a banner. */
.template-banner {
  border: 1px solid var(--ph-border);
  background: var(--ph-bg);
  color: var(--ph-text);
  border-radius: var(--radius);
  padding: 0.9rem 1.15rem;
  margin-bottom: 2rem;
  font-size: 0.9375rem;
}
.template-banner > :last-child { margin-bottom: 0; }
.template-banner strong { display: block; }

/* --------------------------------------------------------------------------
   7. Motion and print
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

@media print {
  .site-nav, .skip-link, .button-row { display: none; }
  body { color: #000; background: #fff; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 0.85em; }
  .card, .notice { border-color: #999; }
}