/* ------------------------------------------------------------------
   swstrategies.com
   Sibling of evertest.ai: same typography and hard-edged geometry,
   heavier colour. everTest is the bright product; SWS is the parent.
   ------------------------------------------------------------------ */

:root {
  --ink:        #121212;
  --paper:      #FAFAFA;
  --paper-alt:  #F5F5F7;
  --navy:       #232946;
  --blue:       #2563EB;
  --blue-wash:  #E8EFFE;
  --teal:       #10D9C4;
  --red:        #E63946;
  --gold:       #FFA726;
  --gray:       #6B7280;
  --rule:       #D1D5DB;

  --wrap: 1240px;
  --font: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

body {
  font-family: var(--font);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); }

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

/* ---------- type ---------- */

h1, h2, h3, h4 { line-height: 1.08; letter-spacing: -0.02em; font-weight: 700; }
h1 { font-size: clamp(2.6rem, 6vw, 4.6rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); letter-spacing: -0.025em; }
h3 { font-size: 1.3rem; line-height: 1.25; }

.eyebrow {
  display: inline-block;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--blue);
  border: 2px solid var(--blue);
  padding: 8px 16px;
  margin-bottom: 28px;
}
.eyebrow.on-dark { color: #fff; border-color: rgba(255,255,255,.5); }

.lede { font-size: clamp(1.05rem, 1.6vw, 1.3rem); color: #333; max-width: 62ch; }
.mark { color: var(--blue); box-shadow: inset 0 -.32em 0 var(--blue-wash); }
.on-dark .mark, .dark .mark { color: var(--teal); box-shadow: none; }

/* ---------- buttons ---------- */

.btn {
  display: inline-block;
  font-size: .95rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 18px 32px;
  border: 2px solid var(--ink);
  background: var(--blue);
  color: #fff;
  transition: transform .12s ease, box-shadow .12s ease;
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: 4px 4px 0 var(--ink); }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.ghost:hover { background: var(--ink); color: #fff; }
.btn.on-dark { border-color: #fff; }
.btn.on-dark.ghost { color: #fff; }
.btn.on-dark.ghost:hover { background: #fff; color: var(--navy); }
.btn-row { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 40px; }

/* ---------- header ---------- */

.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--paper);
  border-bottom: 2px solid var(--ink);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 84px; gap: 24px; }
.brand { display: flex; align-items: center; text-decoration: none; }
.brand img { height: 42px; width: auto; }
.nav { display: flex; align-items: center; gap: 32px; }
.nav a { color: var(--ink); text-decoration: none; font-size: .98rem; font-weight: 500; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--blue); }
.nav .btn { padding: 14px 22px; font-size: .82rem; }

.nav-toggle { display: none; background: none; border: 2px solid var(--ink); padding: 10px 14px; font: inherit; font-weight: 700; cursor: pointer; }

@media (max-width: 960px) {
  .nav-toggle { display: block; }
  .nav {
    position: absolute; top: 84px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--paper); border-bottom: 2px solid var(--ink);
    padding: 8px 24px 24px;
  }
  .nav[hidden] { display: none; }
  .nav a { padding: 16px 0; border-bottom: 1px solid var(--rule); }
  .nav .btn { margin-top: 16px; text-align: center; border-bottom: 2px solid var(--ink); }
}

/* ---------- sections ---------- */

section { padding: clamp(64px, 9vw, 120px) 0; }
section.dark { background: var(--navy); color: #fff; }
section.dark .lede, section.dark p { color: rgba(255,255,255,.82); }
section.tint { background: var(--paper-alt); }
.section-head { max-width: 72ch; margin-bottom: 56px; }
.section-head p { margin-top: 20px; font-size: 1.1rem; color: #444; }
section.dark .section-head p { color: rgba(255,255,255,.8); }

/* ---------- hero ---------- */

.hero { padding: clamp(72px, 10vw, 140px) 0 clamp(56px, 7vw, 96px); }
.hero h1 { max-width: 20ch; }
.hero .lede { margin-top: 32px; }

/* ---------- proof strip ---------- */

.proof { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); border: 2px solid var(--ink); background: #fff; }
.proof > div { padding: 36px 32px; border-right: 2px solid var(--ink); }
.proof > div:last-child { border-right: 0; }
.proof .num { font-size: clamp(1.9rem, 3vw, 2.6rem); font-weight: 700; line-height: 1.05; letter-spacing: -.03em; }
.proof .num small { display: block; font-size: .95rem; font-weight: 400; color: var(--gray); letter-spacing: 0; margin-top: 4px; text-transform: none; }
.proof p { margin-top: 16px; font-size: .98rem; color: #444; }
@media (max-width: 860px) {
  .proof > div { border-right: 0; border-bottom: 2px solid var(--ink); }
  .proof > div:last-child { border-bottom: 0; }
}

/* ---------- cards ---------- */

.grid { display: grid; gap: 24px; }
.grid.two   { grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); }
.grid.three { grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); }

.card {
  background: #fff;
  border: 2px solid var(--ink);
  padding: 36px 32px;
  display: flex; flex-direction: column;
}
.card .tag { font-size: .74rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--blue); margin-bottom: 14px; }
.card h3 { margin-bottom: 14px; }
.card p { color: #444; font-size: 1rem; }
.card ul { margin: 18px 0 0 18px; color: #444; }
.card li { margin-bottom: 8px; }
.card .more { margin-top: auto; padding-top: 24px; font-weight: 700; font-size: .95rem; color: var(--blue);
  text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 2px; }

a.card { text-decoration: none; color: inherit; transition: transform .12s ease, box-shadow .12s ease; }
a.card:hover { transform: translate(-3px, -3px); box-shadow: 6px 6px 0 var(--ink); }

.card.accent-teal { border-top: 8px solid var(--teal); }
.card.accent-blue { border-top: 8px solid var(--blue); }
.card.accent-gold { border-top: 8px solid var(--gold); }
.card.accent-red  { border-top: 8px solid var(--red); }

section.dark .card { background: #fff; color: var(--ink); }
section.dark .card p { color: #444; }

/* ---------- numbered steps ---------- */

.steps { counter-reset: step; display: grid; gap: 0; border: 2px solid var(--ink); background: #fff; }
.steps > li { counter-increment: step; list-style: none; display: grid; grid-template-columns: 90px 1fr; border-bottom: 2px solid var(--ink); }
.steps > li:last-child { border-bottom: 0; }
.steps > li::before {
  content: counter(step, decimal-leading-zero);
  font-size: 1.5rem; font-weight: 700; color: var(--blue);
  padding: 32px 0 32px 32px;
}
.steps .body { padding: 32px; }
.steps h3 { margin-bottom: 10px; }
.steps p { color: #444; }
@media (max-width: 640px) {
  .steps > li { grid-template-columns: 1fr; }
  .steps > li::before { padding: 28px 28px 0; }
  .steps .body { padding: 12px 28px 28px; }
}

/* ---------- people ---------- */

.people { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.person { border: 2px solid var(--ink); background: #fff; }
.person img { width: 100%; aspect-ratio: 1; object-fit: cover; border-bottom: 2px solid var(--ink); filter: grayscale(1); }
.person .body { padding: 24px 24px 28px; }
.person .role { font-size: .76rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--blue); }
.person h3 { margin: 8px 0 12px; }
.person p { font-size: .96rem; color: #444; }

/* ---------- quote ---------- */

.quote { border-left: 8px solid var(--blue); padding: 8px 0 8px 32px; max-width: 70ch; }
.quote blockquote { font-size: clamp(1.2rem, 2.2vw, 1.6rem); line-height: 1.4; font-weight: 500; letter-spacing: -.015em; }
.quote cite { display: block; margin-top: 20px; font-style: normal; font-size: .95rem; color: var(--gray); }
section.dark .quote { border-left-color: var(--teal); }
section.dark .quote cite { color: rgba(255,255,255,.65); }

/* ---------- cta band ---------- */

.cta-band { background: var(--navy); color: #fff; border: 2px solid var(--ink); padding: clamp(40px, 6vw, 72px); }
.cta-band h2 { max-width: 20ch; }
.cta-band p { margin-top: 20px; color: rgba(255,255,255,.82); max-width: 60ch; font-size: 1.1rem; }

/* ---------- footer ---------- */

.site-footer { background: var(--ink); color: rgba(255,255,255,.72); padding: 72px 0 40px; font-size: .95rem; }
.site-footer a { color: rgba(255,255,255,.72); text-decoration: none; }
.site-footer a:hover { color: #fff; }
.footer-grid { display: grid; gap: 40px; grid-template-columns: 2fr 1fr 1fr 1fr; }
.footer-grid h4 { font-size: .76rem; letter-spacing: .14em; text-transform: uppercase; color: #fff; margin-bottom: 18px; }
.footer-grid ul { list-style: none; }
.footer-grid li { margin-bottom: 10px; }
.footer-brand img { height: 41px; width: auto; margin-bottom: 20px; }
.footer-bottom { margin-top: 56px; padding-top: 28px; border-top: 1px solid rgba(255,255,255,.18); display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; font-size: .88rem; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } }

/* ---------- misc ---------- */

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 200; background: #fff; border: 2px solid var(--ink); padding: 12px 20px; }

.breadcrumb { font-size: .9rem; color: var(--gray); padding-top: 32px; }
.breadcrumb a { color: var(--gray); }

.prose { max-width: 74ch; }
.prose h2 { margin: 56px 0 20px; font-size: 1.9rem; }
.prose h3 { margin: 36px 0 14px; }
.prose p { margin-bottom: 20px; color: #333; font-size: 1.06rem; }
.prose ul, .prose ol { margin: 0 0 24px 22px; color: #333; }
.prose li { margin-bottom: 10px; }

/* ---------- diagrams ----------
   The diagrams are the one place this site spends its boldness. They are content, not
   decoration: a CTO reading one learns something about how we think, which is the whole
   argument. Wide on purpose, so they scroll inside their own frame rather than shrinking
   to illegibility on a phone. */

.diagram { border: 2px solid var(--ink); background: #fff; }
.diagram .scroller > svg { display: block; width: 100%; min-width: 980px; height: auto; padding: 36px 32px 24px; }
.diagram .scroller { overflow-x: auto; }
.diagram figcaption {
  border-top: 2px solid var(--ink);
  padding: 22px 32px;
  font-size: .98rem;
  color: #444;
}
/* The rule must run the full width of the frame, so the measure is limited on the text
   inside it rather than on the figcaption itself. */
.diagram figcaption > span { display: block; max-width: 88ch; }

.diagram-svg text { font-family: var(--font); }
.d-stage     { font-size: 15px; font-weight: 700; fill: var(--blue); letter-spacing: .04em; }
.d-head      { font-size: 21px; font-weight: 700; fill: var(--ink); letter-spacing: -.01em; }
.d-box       { fill: #fff; stroke: var(--ink); stroke-width: 2; }
.d-legacy    { fill: #fff; }
.d-faded     { stroke: var(--rule); }
.d-new       { stroke: var(--blue); stroke-width: 3; }
.d-ship      { stroke: var(--ink); stroke-width: 3; fill: #F2FDFB; }
.d-boxtitle  { font-size: 18px; font-weight: 700; fill: var(--ink); }
.d-boxtitle.d-dim { fill: var(--gray); }
.d-boxsub    { font-size: 14px; fill: var(--gray); }
.d-row       { fill: var(--paper-alt); stroke: none; }
.d-rowtext   { font-size: 14px; fill: #444; }
.d-bad       { fill: var(--red); }
.d-note      { font-size: 14.5px; fill: #444; }
.d-arrow     { stroke: var(--ink); stroke-width: 2; fill: none; marker-end: url(#d-head); }
.d-tie       { stroke: var(--ink); stroke-width: 2; fill: none; }
.d-axis      { stroke: var(--rule); stroke-width: 2; }
.d-tick      { stroke: var(--ink); stroke-width: 2; }
.d-axislabel { font-size: 13px; fill: var(--gray); letter-spacing: .02em; }
.d-end       { text-anchor: end; }

/* The one orchestrated moment on the site: the connectors draw themselves the first time a
   diagram comes into view.

   Only the connecting LINES animate. Boxes and text are never hidden, not even for a frame.
   An earlier version faded the content in from opacity 0, which meant anything rendering
   mid-animation -- a screenshot, a crawler, a slow frame -- saw an empty diagram. That is the
   exact failure the old site had, and content must never depend on an animation having run.
   A half-drawn connector costs nothing; a missing box costs the whole picture. */
@media (prefers-reduced-motion: no-preference) {
  .diagram.is-drawing .d-arrow,
  .diagram.is-drawing .d-tie,
  .diagram.is-drawing .d-feed { stroke-dasharray: 1200; stroke-dashoffset: 1200; animation: d-draw .7s ease forwards; }
  .diagram.is-drawing [data-s="2"] { animation-delay: .18s; }
  .diagram.is-drawing [data-s="3"] { animation-delay: .36s; }
}
@keyframes d-draw { to { stroke-dashoffset: 0; } }

/* ---------- product screenshot ---------- */

.shot { border: 2px solid var(--ink); background: #fff; line-height: 0; }
.shot img { width: 100%; }
.shot figcaption { border-top: 2px solid var(--ink); padding: 20px 24px; font-size: .94rem; color: #444; line-height: 1.6; }
section.dark .shot { border-color: #fff; }
section.dark .shot figcaption { border-top-color: #fff; background: #fff; }

.split { display: grid; gap: 40px; grid-template-columns: 1fr 1.15fr; align-items: center; }
@media (max-width: 960px) { .split { grid-template-columns: 1fr; } }

/* ---------- case studies ---------- */

.case-head { padding: 36px 0 clamp(48px, 6vw, 80px); }
.case-head .kicker { font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--blue); }
.case-head h1 { margin: 18px 0 28px; font-size: clamp(2.1rem, 4.4vw, 3.4rem); max-width: 24ch; }
.case-head .lede { max-width: 70ch; }

/* The three-beat spine every case study follows: what was wrong, what we did, what came out.
   Same shape every time, so they can be compared rather than just read. */
.beats { display: grid; gap: 0; border: 2px solid var(--ink); background: #fff; }
.beats > section { padding: 36px 32px; border-bottom: 2px solid var(--ink); }
.beats > section:last-child { border-bottom: 0; }
.beats h2 { font-size: 1.25rem; letter-spacing: 0; margin-bottom: 20px; }
.beats h2 .n { color: var(--blue); margin-right: 12px; }
.beats ul { list-style: none; max-width: 86ch; }
.beats li { position: relative; padding-left: 26px; margin-bottom: 14px; color: #333; }
.beats li::before { content: ""; position: absolute; left: 0; top: .55em; width: 10px; height: 2px; background: var(--ink); }
.beats .outcome li::before { background: var(--blue); height: 10px; top: .35em; width: 10px; }
@media (min-width: 900px) {
  .beats { grid-template-columns: 1fr 1fr 1fr; }
  .beats > section { border-bottom: 0; border-right: 2px solid var(--ink); }
  .beats > section:last-child { border-right: 0; }
}

.techlist { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; list-style: none; }
.techlist li { border: 2px solid var(--rule); padding: 7px 14px; font-size: .9rem; color: #444; }

.case-nav { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }

/* ---------- extra diagram vocabulary ---------- */

.d-fail      { fill: #FFF5F5; stroke: var(--red); stroke-width: 2; }
.d-failtext  { font-size: 15px; font-weight: 700; fill: var(--red); }
.d-ok        { fill: var(--teal); }
.d-lane      { fill: var(--paper-alt); stroke: none; }
.d-lanelabel { font-size: 13px; font-weight: 700; fill: var(--gray); letter-spacing: .08em; }
.d-pill      { fill: #fff; stroke: var(--ink); stroke-width: 2; }
.d-pilltext  { font-size: 14px; fill: var(--ink); }
.d-metric    { font-size: 30px; font-weight: 700; fill: var(--ink); letter-spacing: -.02em; }
.d-metricsub { font-size: 13px; fill: var(--gray); }
.d-dash      { stroke: var(--gray); stroke-width: 2; stroke-dasharray: 6 5; fill: none; }
.d-feed      { stroke: var(--blue); stroke-width: 2; fill: none; marker-end: url(#d-head-blue); }
.d-small     { font-size: 13px; fill: var(--gray); }
.d-mid       { text-anchor: middle; }

/* ---------- preview banner ----------
   Only ever rendered by `build.py --preview`. A reviewer must never be in any doubt about
   whether they are looking at the live site. */
.preview-bar {
  background: var(--gold); color: var(--ink);
  border-bottom: 2px solid var(--ink);
  padding: 10px 24px; text-align: center;
  font-size: .9rem; font-weight: 700; letter-spacing: .02em;
}
.preview-bar span { font-weight: 400; }

/* ---------- forms ---------- */

.form-grid { display: grid; gap: 20px; grid-template-columns: 1fr 1fr; }
.form-grid .wide { grid-column: 1 / -1; }
@media (max-width: 680px) { .form-grid { grid-template-columns: 1fr; } }

.field label { display: block; font-size: .82rem; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--ink); margin-bottom: 8px; }
.field .opt { font-weight: 400; letter-spacing: 0; text-transform: none; color: var(--gray); }
.field input, .field textarea {
  width: 100%; font: inherit; font-size: 1rem; color: var(--ink);
  background: #fff; border: 2px solid var(--ink); padding: 14px 16px;
}
.field textarea { min-height: 170px; resize: vertical; }
.field input:focus, .field textarea:focus { outline: 3px solid var(--blue); outline-offset: 2px; }

.checks { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.checks label { display: flex; gap: 12px; align-items: flex-start; border: 2px solid var(--rule);
  padding: 14px 16px; font-size: .98rem; cursor: pointer; }
.checks label:hover { border-color: var(--ink); }
.checks input { margin-top: 3px; accent-color: var(--blue); width: 18px; height: 18px; flex: none; }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.sws-form-status { font-weight: 700; }

/* A person we have no photograph of still belongs on the page; initials in the brand navy
   read as deliberate, where a grey silhouette reads as an oversight. */
.person .noface {
  aspect-ratio: 1; background: var(--navy); border-bottom: 2px solid var(--ink);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: clamp(3rem, 7vw, 4.6rem); font-weight: 700; letter-spacing: -.03em;
}
