/* Specibo marketing site — shares the product's brand tokens verbatim with
   docker/branding/specibo-theme.css. Kept as one small stylesheet rather than a
   framework: the site is five static pages and should stay that way. */

@font-face {
  font-family: "Comfortaa"; src: url("specibo-comfortaa.woff2") format("woff2");
  font-weight: 300 700; font-display: swap;
}
@font-face {
  font-family: "Noto Sans"; src: url("specibo-notosans.woff2") format("woff2");
  font-weight: 100 900; font-display: swap;
}
@font-face {
  font-family: "Noto Sans"; src: url("specibo-notosans-italic.woff2") format("woff2");
  font-weight: 100 900; font-style: italic; font-display: swap;
}

:root {
  --sp-navy: #21386B;
  --sp-navy-deep: #152A54;
  --sp-green: #2E7D68;
  --sp-amber: #E8A63C;
  --sp-ink: #182338;
  --sp-cream: #FBF9F1;
  --sp-muted: #5C6678;
  --sp-border: #E5E3DA;
  --sp-font-display: "Comfortaa", system-ui, sans-serif;
  --sp-font-text: "Noto Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --sp-max: 1120px;

  /* Type scale. Replaces thirteen ad-hoc sizes, two of which (.95rem and .96rem)
     differed by 0.16px — drift rather than a decision, and the main reason the
     page read as assembled rather than designed. Add a step only if none fits. */
  --t-xs:  0.8125rem;   /* 13px — hints, legal, tagline            */
  --t-sm:  0.9375rem;   /* 15px — nav, buttons, labels, card copy  */
  --t-md:  1rem;        /* 16px — body                             */
  --t-lg:  1.125rem;    /* 18px — ledes                            */
  --t-xl:  1.375rem;    /* 22px — card h3, doc h2                  */
  --t-2xl: clamp(1.6rem, 1.2rem + 2vw, 2.1rem);   /* h2            */
  --t-3xl: clamp(2rem, 1.4rem + 3.2vw, 3.1rem);   /* h1            */
}

/* Headings carried the body's 1.6 leading everywhere except the hero h1, which
   made a wrapped h2 read as separate lines rather than one heading. */
h1, h2, h3 { line-height: 1.2; text-wrap: balance; }

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

body {
  margin: 0;
  font-family: var(--sp-font-text);
  color: var(--sp-ink);
  background: #fff;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

/* Bypass Blocks. The header is sticky and carries up to five links, so without
   this a keyboard user re-traverses the whole nav on every page. */
.skip { position: absolute; left: -9999px; }
.skip:focus {
  left: 16px; top: 12px; z-index: 20; background: #fff; color: var(--sp-navy);
  padding: 10px 16px; border-radius: 8px; box-shadow: 0 2px 12px rgba(0,0,0,.18);
}

/* The header is sticky, so an in-page anchor would otherwise land its target
   underneath it — four of the five header links are anchors. */
html { scroll-behavior: smooth; }
section[id], .hero { scroll-margin-top: 88px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* Nothing on the site declared a focus style, so keyboard users got the browser
   default — whose colour follows the visitor's OS theme, and which is close to
   invisible on the navy button. `color-scheme: light` also stops the native
   <select> popup rendering dark on a dark-mode machine. */
:root { color-scheme: light; }
:where(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: 3px solid var(--sp-navy);
  outline-offset: 3px;
  border-radius: 4px;
}
.strip :focus-visible, footer.site :focus-visible, header.site .btn:focus-visible {
  outline-color: #fff;
}

/* Body copy links were unstyled, so they rendered as default browser blue —
   including in the middle of the demo form. */
.doc a, section a:not(.btn), .hero a:not(.btn) {
  color: var(--sp-navy);
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--sp-navy) 35%, transparent);
  text-underline-offset: 3px;
}
.doc a:hover, section a:not(.btn):hover { text-decoration-color: currentColor; }
.doc a:visited { color: var(--sp-navy-deep); }

/* ── header ─────────────────────────────────────────────────────────────── */
header.site {
  border-bottom: 1px solid var(--sp-border);
  background: #fff;
  position: sticky; top: 0; z-index: 10;
}
/* min-height, not height. A fixed height on a flex container guarantees
   overflow the moment any child wraps, instead of letting the bar grow. */
header.site .wrap { display: flex; align-items: center; gap: 24px; min-height: 72px; }
header.site img { height: 34px; width: auto; }
/* The brand tagline, kept identical to the one the product shows on its sign-in
   card (docker/branding/specibo-brand.js). Site and product are the same brand;
   two different taglines would read as two different companies. */
header.site .tagline {
  margin: 0; padding-left: 16px;
  border-left: 1px solid var(--sp-border);
  color: var(--sp-muted); font-size: var(--t-xs); line-height: 1.35;
  max-width: 20ch;
}
header.site nav { margin-left: auto; display: flex; gap: 24px; align-items: center; }
/* :not(.btn) matters. These selectors are more specific than `.btn`, so without
   it they win on colour and the header call-to-action renders muted grey on the
   navy fill — about 2:1 contrast, against 11:1 for the same button in the hero.
   Style the plain nav links only and let .btn own the button's colours. */
header.site nav a:not(.btn) { color: var(--sp-muted); text-decoration: none; font-size: var(--t-sm); }
header.site nav a:not(.btn):hover { color: var(--sp-ink); }

.btn {
  display: inline-block; padding: 11px 22px; border-radius: 8px;
  background: var(--sp-navy); color: #fff; text-decoration: none;
  font-weight: 600; font-size: var(--t-sm); border: 1px solid var(--sp-navy);
  /* A button that wraps to two lines stops being a button. */
  white-space: nowrap; line-height: 1.2;
}
.btn:hover { background: var(--sp-navy-deep); }
.btn.ghost { background: transparent; color: var(--sp-navy); }
.btn.ghost:hover { background: var(--sp-cream); }

/* ── hero ───────────────────────────────────────────────────────────────── */
.hero { background: var(--sp-cream); border-bottom: 1px solid var(--sp-border); }
.hero .wrap {
  display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px;
  align-items: center; padding-block: clamp(40px, 7vw, 72px);
}
.hero h1 {
  font-family: var(--sp-font-display);
  font-size: var(--t-3xl);
  line-height: 1.12; margin: 0 0 20px; font-weight: 700;
}
.hero h1 .g { color: var(--sp-green); }
.hero p.lede { font-size: var(--t-lg); color: var(--sp-muted); margin: 0 0 28px; max-width: 46ch; }
.hero .cta { display: flex; gap: 12px; flex-wrap: wrap; }
.hero img { width: 100%; height: auto; border-radius: 14px; }

/* ── sections ───────────────────────────────────────────────────────────── */
/* Fluid, so a phone does not spend 15% of the viewport on empty cream. */
section { padding: clamp(44px, 7vw, 72px) 0; }
section.alt { background: var(--sp-cream); border-block: 1px solid var(--sp-border); }
h2 {
  font-family: var(--sp-font-display); font-weight: 700;
  font-size: var(--t-2xl); margin: 0 0 12px;
}
.section-lede { color: var(--sp-muted); margin: 0 0 40px; max-width: 62ch; }

.grid { display: grid; gap: 24px; }
/* auto-fit rather than fixed tracks, so the layout reflows continuously
   instead of jumping 3-up straight to 1-up at a single breakpoint. */
.grid.three { grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); }
.grid.two   { grid-template-columns: repeat(auto-fit, minmax(min(360px, 100%), 1fr)); }

.card {
  background: #fff; border: 1px solid var(--sp-border);
  border-radius: 14px; padding: 26px;
}
.card h3 {
  font-family: var(--sp-font-display); font-size: var(--t-xl);
  margin: 0 0 8px; font-weight: 700;
}
.card p { margin: 0; color: var(--sp-muted); font-size: var(--t-sm); max-width: 62ch; }
.card .dot {
  width: 34px; height: 34px; border-radius: 9px; margin-bottom: 14px;
  background: color-mix(in srgb, var(--sp-green) 14%, #fff);
  /* #256B58, not --sp-green: the token gives 4.12:1 on this 14% tint and the
     glyph is 16px/700, which is not 'large text'. */
  display: grid; place-items: center; color: #256B58; font-weight: 700;
}

table.caps { width: 100%; border-collapse: collapse; font-size: var(--t-sm); }
table.caps th, table.caps td {
  text-align: left; padding: 14px 16px; border-bottom: 1px solid var(--sp-border);
  vertical-align: top;
}
table.caps th { width: 210px; font-family: var(--sp-font-display); font-weight: 700; }
table.caps td { color: var(--sp-muted); }

ul.ticks { list-style: none; padding: 0; margin: 0; }
ul.ticks li { padding-left: 28px; position: relative; margin-bottom: 12px; color: var(--sp-muted); max-width: 62ch; }
ul.ticks li::before {
  content: ""; position: absolute; left: 0; top: 8px;
  width: 9px; height: 9px; border-radius: 50%; background: var(--sp-green);
}

/* ── deploy strip ───────────────────────────────────────────────────────── */
.strip { background: var(--sp-navy); color: #fff; }
.strip h2 { color: #fff; }
.strip .section-lede { color: rgba(255,255,255,.72); }
.strip .card { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.14); }
.strip .card h3 { color: #fff; }
.strip .card p { color: rgba(255,255,255,.72); }
/* Lifted from --sp-amber, which gives only 3.47:1 on this tint. */
.strip .card .dot { background: rgba(232,166,60,.22); color: #F0B95C; }

/* ── legal / doc pages ──────────────────────────────────────────────────── */
/* Longhand, deliberately. `.doc` is always used as `class="wrap doc"`, and the
   `padding` shorthand would reset the 24px side padding `.wrap` sets — leaving
   the text hard against the screen edge on any viewport narrower than the 76ch
   measure. Desktop hides that, because the measure is narrower than the window;
   a phone does not. */
/* The measure goes on the children, not the container. `.doc` is used as
   `class="wrap doc"`, so overriding .wrap's max-width with 76ch also re-centred
   the whole column — at 1440px the text began 212px right of the header logo,
   and the optical left margin jumped as you scrolled past the header. */
.doc { padding-top: clamp(40px, 6vw, 56px); padding-bottom: 80px; }
.doc > * { max-width: 76ch; }
.doc h1 { font-family: var(--sp-font-display); font-size: var(--t-3xl); margin: 0 0 8px; }
.doc h2 { font-size: var(--t-xl); margin: 36px 0 10px; }
.doc p, .doc li { color: #35405A; }
.doc .updated { color: var(--sp-muted); font-size: var(--t-sm); margin-bottom: 32px; }
/* Lists sat at the browser's default 40px indent while .doc p was flush, so they
   visibly stepped out of the column. */
.doc ul, .doc ol { padding-left: 22px; }
.doc code {
  font-size: 0.9em; background: var(--sp-cream);
  border: 1px solid var(--sp-border); border-radius: 5px; padding: 1px 5px;
}
/* A licence block is long, pre-wrapped text. Let it scroll inside its own box
   rather than widening the page — nothing should make the body scroll sideways. */
.doc pre {
  background: var(--sp-cream); border: 1px solid var(--sp-border);
  border-radius: 10px; padding: 16px 18px;
  overflow-x: auto; max-width: 76ch;
}
.doc pre code {
  background: none; border: 0; padding: 0; font-size: var(--t-xs);
  line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere;
}
.notice {
  border: 1px solid var(--sp-amber);
  background: color-mix(in srgb, var(--sp-amber) 10%, #fff);
  border-radius: 12px; padding: 18px 20px; margin: 0 0 32px;
}
.notice strong { color: var(--sp-ink); }

/* ── form ───────────────────────────────────────────────────────────────── */
form.demo { max-width: 560px; }
form.demo label { display: block; font-weight: 600; margin: 18px 0 6px; font-size: var(--t-sm); }
form.demo input, form.demo textarea, form.demo select {
  width: 100%; padding: 11px 13px; border: 1px solid var(--sp-border);
  border-radius: 9px; font: inherit; color: inherit; background: #fff;
}
form.demo textarea { min-height: 110px; resize: vertical; }
form.demo button { min-height: 48px; }
form.demo .cf-turnstile { margin-top: 22px; }

/* The confirmation checkbox is a positive representation by the submitter, not
   decoration — give it a real target and keep the label clickable. */
form.demo .check {
  display: flex; gap: 10px; align-items: flex-start;
  margin-top: 14px; font-size: var(--t-sm); cursor: pointer;
}
form.demo .check input {
  width: auto; flex: none; margin: 2px 0 0; min-width: 18px; min-height: 18px;
  accent-color: var(--sp-navy);
}

.form-msg { border-radius: 9px; padding: 12px 14px; margin-top: 16px; font-size: var(--t-sm); }
.form-msg.error { color: #8C1D18; background: #FCEEEE; border: 1px solid #E4B4B0; }
.form-msg.ok {
  color: #1D5C4C;
  background: color-mix(in srgb, var(--sp-green) 8%, #fff);
  border: 1px solid color-mix(in srgb, var(--sp-green) 30%, #fff);
}
.form-msg.ok:focus-visible { outline: 3px solid var(--sp-navy); outline-offset: 3px; }
form.demo .hint { color: var(--sp-muted); font-size: var(--t-xs); margin-top: 6px; }
form.demo button + .hint { margin-top: 14px; }
/* The "no participant data" warning is the most consequential sentence on this
   page and was set in the smallest, faintest type on the site. */
form.demo .hint.caution {
  font-size: var(--t-sm); color: var(--sp-ink);
  border-left: 3px solid var(--sp-amber); padding-left: 12px; margin-top: 12px;
}
form.demo button { margin-top: 24px; }

/* ── footer ─────────────────────────────────────────────────────────────── */
footer.site {
  background: var(--sp-navy-deep); color: rgba(255,255,255,.75);
  padding: clamp(36px, 6vw, 48px) 0 40px; font-size: var(--t-sm);
}
footer.site img { height: 30px; margin-bottom: 16px; }
footer.site a { color: rgba(255,255,255,.85); text-decoration: none; }
footer.site a:hover { text-decoration: underline; }
footer.site .cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(180px, 100%), 1fr)); gap: 32px; }
footer.site .legal {
  display: flex; gap: 18px; flex-wrap: wrap; align-items: center;
  color: rgba(255,255,255,.6); font-size: var(--t-xs);
}
/* The rule and the space above it only make sense when .cols is there to be
   separated from. Only the homepage has .cols; on the four sub-pages this used
   to render as empty navy, a stray horizontal rule, then the copyright. */
footer.site .cols + .legal {
  margin-top: 36px; padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,.14);
}

@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; gap: 32px; padding-top: 40px; padding-bottom: 48px; }
  /* The illustration must NOT lead on a phone. It previously carried order:-1,
     which put a near-square image at full viewport width above the headline —
     roughly 600px of a 812px screen — so the first thing a visitor met was
     decoration and the actual proposition started below the fold. Source order
     (words, then picture) is correct here; cap the width so it stays support
     rather than spectacle. */
  .hero img { max-width: 420px; justify-self: center; }

  /* The capability descriptions are the product content of this section. A
     fixed 210px label column left them ~15 characters wide on a phone, with
     the one-word labels taking 62% of the screen. Stack instead. */
  table.caps, table.caps tbody, table.caps tr, table.caps th, table.caps td {
    display: block; width: auto;
  }
  table.caps tr { border-bottom: 1px solid var(--sp-border); padding: 14px 0; }
  table.caps th, table.caps td { border-bottom: 0; padding: 0; }
  table.caps th { margin-bottom: 4px; }
  form.demo button { width: 100%; }
  footer.site .cols a { display: inline-block; padding: 9px 0; }
  .grid.three, .grid.two { grid-template-columns: 1fr; }
  footer.site .cols { grid-template-columns: 1fr; }
}

/* The header collapses at 980px, not 860px, because that is where its content
   actually stops fitting: logo + tagline + five nav items needs ~975px. Between
   861 and 975 the CTA wrapped to two lines and rendered 73px tall inside a 72px
   bar — overflowing it — and "Why Specibo" stacked. 960px is a browser at half
   width on a 1920 display, so this was a common width, not an edge case. */
@media (max-width: 980px) {
  header.site nav a:not(.btn) { display: none; }
  header.site .tagline { display: none; }
}
