/* ==========================================================================
   GapSure design system
   --------------------------------------------------------------------------
   The visual language is survey instrumentation: measured spans, tick marks
   and dimension rules. The brand is about the distance between where a
   business is and where it could be, so structure is drawn, not decorated.

   Monospace is reserved for values that were actually measured — scores,
   header names, counts, URLs. It is never used for labels.
   ========================================================================== */

/* ---- 0. Fonts ----------------------------------------------------------
   Self-hosted (SIL Open Font License). No third-party request on page load,
   which keeps the site fast, private and working offline. Only the weights
   actually used are shipped: 156 KB in total.
   Archivo and IBM Plex are © their respective authors, OFL 1.1.
   ------------------------------------------------------------------------ */
@font-face {
  font-family: "Archivo"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("/assets/fonts/archivo-latin-600-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Archivo"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("/assets/fonts/archivo-latin-700-normal.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Sans"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("/assets/fonts/ibm-plex-sans-latin-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Sans"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("/assets/fonts/ibm-plex-sans-latin-500-normal.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Sans"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("/assets/fonts/ibm-plex-sans-latin-600-normal.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Mono"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("/assets/fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Mono"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("/assets/fonts/ibm-plex-mono-latin-500-normal.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Mono"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("/assets/fonts/ibm-plex-mono-latin-600-normal.woff2") format("woff2");
}

/* ---- 1. Tokens ---------------------------------------------------------- */
:root {
  /* surfaces */
  --void:      #070B16;  /* page */
  --strata:    #0D1526;  /* raised panel */
  --strata-2:  #121D33;  /* panel on panel */
  --rule:      #1D2B44;  /* hairlines */
  --rule-soft: #16223A;

  /* brand accents */
  --cyan:      #00D4FF;
  --blue:      #377DFF;
  --violet:    #8B5CF6;

  /* assessment signals — deliberately separate from brand accents so a
     score never reads as decoration. Green and amber carry over from the
     existing GapSure mark. */
  --pass:      #2FBF8F;
  --pass-dim:  #0F3830;
  --warn:      #E8B04B;
  --warn-dim:  #3A2D11;
  --fail:      #FF6B5A;
  --fail-dim:  #3C1A17;

  /* type */
  --ink:       #F4F7FC;
  --ink-2:     #A9BBD6;
  --ink-3:     #6F84A6;

  --display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --body:    "IBM Plex Sans", system-ui, -apple-system, Segoe UI, sans-serif;
  --mono:    "IBM Plex Mono", ui-monospace, SFMono-Regular, Consolas, monospace;

  /* measure */
  --gutter: clamp(20px, 5vw, 56px);
  --measure: 1180px;
  --rail: 56px;
  --radius: 14px;
  --radius-sm: 9px;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
/* The masthead is sticky, so anything scrolled to needs to clear it. */
:target, [id] { scroll-margin-top: 92px; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

body {
  margin: 0;
  background: var(--void);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* A single ambient field, fixed behind everything. One effect, not a wash
   repeated on every section. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(60rem 40rem at 78% -8%, rgba(55,125,255,.16), transparent 62%),
    radial-gradient(44rem 34rem at 4% 6%, rgba(139,92,246,.12), transparent 60%);
}

/* ---- 2. Type scale ------------------------------------------------------ */
h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: -0.028em;
  line-height: 1.04;
  margin: 0;
  text-wrap: balance;
}
h1 { font-size: clamp(2.4rem, 4.9vw, 3.72rem); }
h2 { font-size: clamp(1.95rem, 3.9vw, 2.9rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.42rem); letter-spacing: -0.018em; line-height: 1.22; }
h4 { font-size: 1.04rem; letter-spacing: -0.01em; line-height: 1.3; }

p { margin: 0 0 1.05em; max-width: 68ch; }
a { color: var(--cyan); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: #7BE7FF; }

strong { font-weight: 600; color: var(--ink); }
small { font-size: 0.82rem; }

.lede {
  font-size: clamp(1.08rem, 1.6vw, 1.26rem);
  color: var(--ink-2);
  max-width: 60ch;
  line-height: 1.58;
}
.sub { color: var(--ink-2); }
.dim { color: var(--ink-3); }
.val { font-family: var(--mono); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }

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

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--cyan); color: #04121A; padding: 12px 18px;
  font-weight: 600; border-radius: 0 0 var(--radius-sm) 0;
}
.skip:focus { left: 0; }

/* ---- 3. Layout ---------------------------------------------------------- */
.wrap {
  width: 100%;
  max-width: var(--measure);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* Sections carry a drawing-sheet rail: an index mark and a hairline that
   measures the section's vertical extent. */
.band { position: relative; padding-block: clamp(58px, 7.4vw, 96px); }
.band + .band { border-top: 1px solid var(--rule-soft); }

.band-head { margin-bottom: clamp(32px, 4.5vw, 54px); max-width: 62ch; }
.band-head h2 { margin-bottom: 14px; }
.band-head p { color: var(--ink-2); margin-bottom: 0; }

/* A section index, reserved for content that genuinely is an ordered
   sequence (the scan steps). Not used as a decorative eyebrow. */
.idx {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: 0.78rem; color: var(--ink-3);
  margin-bottom: 18px; letter-spacing: 0.04em;
}
.idx::after { content: ""; width: 34px; height: 1px; background: var(--rule); }

/* The scan result only occupies space once there is a result in it. */
.scan-host { padding-block: 0; }
.scan-host:has(.scan-result[data-on="true"]) { padding-block: 10px 46px; }

/* ---- 4. Header ---------------------------------------------------------- */
.masthead {
  position: sticky; top: 0; z-index: 50;
  background: rgba(7, 11, 22, .82);
  backdrop-filter: saturate(150%) blur(14px);
  -webkit-backdrop-filter: saturate(150%) blur(14px);
  border-bottom: 1px solid var(--rule-soft);
}
.masthead .wrap {
  display: flex; align-items: center; gap: 22px;
  min-height: 68px;
}
.logo {
  display: inline-flex; align-items: center; gap: 11px;
  font-family: var(--display); font-weight: 700; font-size: 1.24rem;
  letter-spacing: -0.03em; color: var(--ink); text-decoration: none;
  flex: 0 0 auto;
}
.logo svg { width: 30px; height: 30px; display: block; }
.logo:hover { color: var(--ink); }

.nav { display: flex; gap: 4px; margin-left: auto; align-items: center; }
.nav a {
  color: var(--ink-2); text-decoration: none; font-size: 0.945rem;
  padding: 8px 13px; border-radius: 8px; font-weight: 500;
  transition: color .15s, background .15s;
}
.nav a:hover { color: var(--ink); background: rgba(255,255,255,.045); }
.nav a[aria-current="page"] { color: var(--ink); background: rgba(55,125,255,.14); }

.nav-toggle {
  display: none; margin-left: auto;
  background: transparent; border: 1px solid var(--rule);
  color: var(--ink); border-radius: 9px; padding: 9px 12px;
  font: inherit; font-size: .9rem; cursor: pointer;
}

@media (max-width: 880px) {
  .nav-toggle { display: inline-flex; align-items: center; gap: 8px; }
  .nav {
    position: absolute; inset-inline: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 2px;
    background: var(--strata); border-bottom: 1px solid var(--rule);
    padding: 10px var(--gutter) 18px; margin: 0;
    display: none;
  }
  .nav[data-open="true"] { display: flex; }
  .nav a { padding: 12px 14px; font-size: 1rem; }
  .nav .btn { margin-top: 8px; justify-content: center; }
}

/* ---- 5. Buttons --------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  font-family: var(--body); font-weight: 600; font-size: 0.97rem;
  padding: 12px 21px; border-radius: 10px; border: 1px solid transparent;
  cursor: pointer; text-decoration: none; line-height: 1.2;
  transition: filter .16s, background .16s, border-color .16s, transform .12s;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: linear-gradient(103deg, var(--blue), var(--cyan));
  color: #03121C;
}
.btn-primary:hover { filter: brightness(1.09); color: #03121C; }
.btn-ghost {
  border-color: var(--rule); color: var(--ink); background: rgba(255,255,255,.025);
}
.btn-ghost:hover { border-color: #2C4166; background: rgba(255,255,255,.055); color: var(--ink); }
.btn-lg { padding: 15px 27px; font-size: 1.03rem; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

/* ---- 6. Panels ---------------------------------------------------------- */
.panel {
  background: linear-gradient(180deg, rgba(255,255,255,.028), rgba(255,255,255,.008));
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: clamp(20px, 2.6vw, 30px);
}
.panel-flat { background: var(--strata); border: 1px solid var(--rule); border-radius: var(--radius); }

.grid { display: grid; gap: 18px; }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 940px) { .grid-3 { grid-template-columns: repeat(auto-fit, minmax(255px, 1fr)); } }
@media (max-width: 720px) { .grid-2, .grid-3 { grid-template-columns: minmax(0, 1fr); } }

/* Service cards. The accent bar at the top is the only decoration, and it
   identifies which of the three services you are looking at. */
.svc { position: relative; display: flex; flex-direction: column; overflow: hidden; }
.svc::before {
  content: ""; position: absolute; inset-inline: 0; top: 0; height: 2px;
  background: linear-gradient(90deg, var(--c1), var(--c2));
}
.svc-1 { --c1: #00D4FF; --c2: #377DFF; }
.svc-2 { --c1: #377DFF; --c2: #8B5CF6; }
.svc-3 { --c1: #8B5CF6; --c2: #E8B04B; }
.svc h3 { margin-bottom: 10px; }
.svc p { color: var(--ink-2); font-size: 0.97rem; margin-bottom: 16px; }
.svc .svc-icon { margin-bottom: 18px; }
.svc .svc-icon svg { width: 38px; height: 38px; display: block; }
.svc ul { margin: 0 0 20px; padding: 0; list-style: none; }
.svc ul li {
  position: relative; padding-left: 20px; font-size: 0.925rem;
  color: var(--ink-2); margin-bottom: 7px;
}
.svc ul li::before {
  content: ""; position: absolute; left: 0; top: 0.62em;
  width: 9px; height: 1px; background: var(--c1);
}
.svc .svc-foot { margin-top: auto; }

/* Two-column editorial splits collapse to one column on narrow screens.
   Declared here so the inline grid-template on the page has something to
   override it at the breakpoint. */
@media (max-width: 920px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr) !important; }
}
@media (max-width: 640px) {
  .hero-grid figure { display: none; }
}

/* ---- 7. The measured span ----------------------------------------------- */
/* Used in the hero and the process section: two fixed points with a
   dimensioned interval between them. */
.span-fig { width: 100%; height: auto; display: block; }
.span-fig .pt { fill: var(--cyan); }
.span-fig .rail { stroke: var(--rule); stroke-width: 1; }
.span-fig .dim { stroke: var(--cyan); stroke-width: 1.5; }
.span-fig text { font-family: var(--body); font-size: 11.5px; fill: var(--ink-3); }

/* ---- 8. Process steps --------------------------------------------------- */
.steps { counter-reset: s; display: grid; gap: 1px; background: var(--rule-soft);
  border: 1px solid var(--rule); border-radius: var(--radius); overflow: hidden; }
.steps.four { grid-template-columns: repeat(4, minmax(0,1fr)); }
@media (max-width: 900px) { .steps.four { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 560px) { .steps.four { grid-template-columns: minmax(0,1fr); } }
.step { background: var(--strata); padding: 24px 22px 26px; counter-increment: s; }
.step::before {
  content: counter(s, decimal-leading-zero);
  font-family: var(--mono); font-size: .76rem; color: var(--cyan);
  display: block; margin-bottom: 14px; letter-spacing: .06em;
}
.step h3 { font-size: 1.08rem; margin-bottom: 8px; }
.step p { font-size: .92rem; color: var(--ink-2); margin: 0; }

/* ---- 9. Flow diagram ---------------------------------------------------- */
.flow {
  display: flex; align-items: stretch; gap: 0; flex-wrap: wrap;
  border: 1px solid var(--rule); border-radius: var(--radius); overflow: hidden;
  background: var(--strata);
}
.flow-node {
  flex: 1 1 150px; min-width: 0; padding: 20px 18px;
  border-right: 1px solid var(--rule-soft); position: relative;
}
.flow-node:last-child { border-right: 0; }
.flow-node .n-lab { font-size: .9rem; font-weight: 600; margin-bottom: 5px; display: block; }
.flow-node .n-sub { font-size: .83rem; color: var(--ink-3); line-height: 1.45; display: block; }
.flow-node .n-mark { display: block; margin-bottom: 12px; }
.flow-node .n-mark svg { width: 24px; height: 24px; display: block; }
@media (max-width: 760px) {
  .flow-node { flex: 1 1 100%; border-right: 0; border-bottom: 1px solid var(--rule-soft); }
  .flow-node:last-child { border-bottom: 0; }
}

/* ---- 10. Outcome list --------------------------------------------------- */
.outcomes { display: grid; gap: 0; border-top: 1px solid var(--rule); }
.outcome {
  display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: baseline;
  padding: 17px 2px; border-bottom: 1px solid var(--rule-soft);
}
.outcome b { font-weight: 600; font-size: 1.02rem; }
.outcome span { color: var(--ink-3); font-size: .9rem; text-align: right; }
@media (max-width: 620px) {
  .outcome { grid-template-columns: 1fr; gap: 4px; }
  .outcome span { text-align: left; }
}

/* ---- 11. Notices -------------------------------------------------------- */
.note {
  border-left: 2px solid var(--rule);
  padding: 2px 0 2px 16px; color: var(--ink-3); font-size: .9rem;
  max-width: 70ch;
}
.note-warn { border-left-color: var(--warn); }
.note strong { color: var(--ink-2); font-weight: 600; }

/* ---- 12. Forms ---------------------------------------------------------- */
.field { display: grid; gap: 7px; margin-bottom: 16px; }
.field > label { font-size: .88rem; font-weight: 600; color: var(--ink-2); }
.field .hint { font-size: .82rem; color: var(--ink-3); }
input, select, textarea {
  font: inherit; font-size: .97rem; color: var(--ink);
  background: #0A1120; border: 1px solid var(--rule);
  border-radius: var(--radius-sm); padding: 11px 13px; width: 100%;
}
input::placeholder, textarea::placeholder { color: #4E6283; }
input:focus, select:focus, textarea:focus { border-color: var(--blue); outline-offset: 1px; }
textarea { min-height: 128px; resize: vertical; line-height: 1.55; }
select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink-3) 50%),
                    linear-gradient(135deg, var(--ink-3) 50%, transparent 50%);
  background-position: calc(100% - 17px) calc(1em + 1px), calc(100% - 12px) calc(1em + 1px);
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 36px;
}
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---- 13. Footer --------------------------------------------------------- */
.foot { border-top: 1px solid var(--rule); padding-block: 54px 36px; margin-top: 0; }
.foot-grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 36px; }
@media (max-width: 860px) { .foot-grid { grid-template-columns: 1fr 1fr; gap: 30px; } }
@media (max-width: 520px) { .foot-grid { grid-template-columns: 1fr; } }
.foot h4 { font-family: var(--body); font-size: .86rem; font-weight: 600; color: var(--ink-3); margin-bottom: 13px; letter-spacing: 0; }
.foot ul { list-style: none; margin: 0; padding: 0; }
.foot li { margin-bottom: 9px; }
.foot a { color: var(--ink-2); text-decoration: none; font-size: .94rem; }
.foot a:hover { color: var(--cyan); }
.foot-base {
  margin-top: 42px; padding-top: 22px; border-top: 1px solid var(--rule-soft);
  display: flex; flex-wrap: wrap; gap: 14px 26px; align-items: center;
  font-size: .86rem; color: var(--ink-3);
}
.foot-base .spacer { margin-left: auto; }

/* ---- 14. Utilities ------------------------------------------------------ */
.sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.stack > * + * { margin-top: var(--s, 16px); }
.center-measure { max-width: 72ch; }
hr.rule { border: 0; border-top: 1px solid var(--rule-soft); margin: 34px 0; }
.tag {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: .8rem; color: var(--ink-2);
  border: 1px solid var(--rule); border-radius: 100px; padding: 5px 13px;
}
.tag i { width: 6px; height: 6px; border-radius: 50%; background: var(--cyan); flex: 0 0 auto; }
