/* BOCU public pages.
 *
 * The look comes from the product: a black box with a gold mark, bolted next
 * to a contactor in a field. So the page opens on that black, and the light
 * below it is warm rather than the usual cold grey -- a neutral picked to sit
 * with brass, not inherited from a reset.
 *
 * The three phase colours are the product's own vocabulary and they are the
 * only other colour allowed anywhere. */

:root {
  --night: #0b0c0e;
  --night-panel: #15171b;
  --night-line: #24272d;
  --night-ink: #f2f1ee;
  --night-mid: #a9adb4;
  --night-soft: #767b83;

  --ground: #faf9f6;
  --panel: #ffffff;
  --line: #e5e2da;
  --line-soft: #efece5;
  --ink: #16181b;
  --ink-mid: #52565c;
  --ink-soft: #85898f;

  --brass: #8a6518;
  --brass-lit: #c9962f;
  --brass-wash: #f7f0df;

  --r: #d8402f;
  --s: #e0900e;
  --t: #2c6fd1;
  --go: #10894a;

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

  --measure: 38rem;
  --wide: 64rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ground: #0f1113;
    --panel: #16191c;
    --line: #262a2f;
    --line-soft: #1e2225;
    --ink: #f0efec;
    --ink-mid: #adb2b8;
    --ink-soft: #7d828a;
    --brass: #c9962f;
    --brass-wash: #241d10;
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  * {
    animation: none !important;
    transition: none !important;
  }
}

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

/* ------------------------------------------------------------- masthead */

.bar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--night);
  padding: 1rem clamp(1rem, 5vw, 2.5rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  border-bottom: 1px solid transparent;
  transition:
    border-color 0.3s,
    box-shadow 0.3s;
}

.bar.sailed {
  border-bottom-color: var(--night-line);
  box-shadow: 0 10px 30px -22px rgba(0, 0, 0, 0.9);
}

.mark {
  display: inline-block;
  font-family: var(--display);
  font-size: clamp(1.75rem, 2.6vw, 2.15rem);
  font-weight: 800;
  letter-spacing: 0.05em;
  color: var(--night-ink);
  text-decoration: none;
  line-height: 1;
}

.mark b {
  color: var(--brass-lit);
  font-weight: 800;
}

.tagline {
  display: block;
  white-space: nowrap;
  font-family: var(--body);
  font-size: 0.58rem;
  letter-spacing: 0.2em;
  color: var(--night-soft);
  font-weight: 600;
  margin-top: 0.3rem;
}

.bar nav {
  display: flex;
  gap: clamp(0.75rem, 2.4vw, 1.6rem);
  font-size: 0.84rem;
  font-weight: 600;
}

.bar nav a {
  color: var(--night-mid);
  text-decoration: none;
  white-space: nowrap;
}

.bar nav a:hover,
.bar nav a:focus-visible {
  color: var(--brass-lit);
}

/* Five links do not fit beside the mark on a phone, so the nav takes its own
   row rather than shrinking the brand into three lines. */
@media (max-width: 42rem) {
  .bar {
    gap: 0.7rem;
  }

  .bar nav {
    width: 100%;
    justify-content: space-between;
    gap: 0.4rem;
    font-size: 0.82rem;
  }
}

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

.hero {
  background: var(--night);
  color: var(--night-ink);
  padding: clamp(2.5rem, 7vw, 5rem) clamp(1rem, 5vw, 2.5rem)
    clamp(3rem, 8vw, 5.5rem);
  border-bottom: 1px solid var(--night-line);
}

.hero-inner {
  max-width: var(--wide);
  margin: 0 auto;
  display: grid;
  gap: clamp(2rem, 5vw, 3.5rem);
  grid-template-columns: 1fr;
  align-items: start;
}

.hero-inner > div {
  max-width: 44rem;
}

.eyebrow {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brass-lit);
  margin: 0 0 1.1rem;
}

.eyebrow.ink {
  color: var(--brass);
}

.hero h1 {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(2.3rem, 6.2vw, 4rem);
  line-height: 1.02;
  letter-spacing: -0.022em;
  margin: 0 0 1.2rem;
  color: var(--night-ink);
  text-wrap: balance;
}

.hero p {
  color: var(--night-mid);
  font-size: clamp(1.02rem, 1.6vw, 1.15rem);
  max-width: 32rem;
  margin: 0 0 1rem;
}

/* The three phases, used as a rule. It is the product's own vocabulary. */
.phase-rule {
  display: flex;
  height: 3px;
  width: 8rem;
  margin: 0 0 1.75rem;
  border-radius: 2px;
  overflow: hidden;
}

.phase-rule i {
  flex: 1;
}

.phase-rule i:nth-child(1) {
  background: var(--r);
}

.phase-rule i:nth-child(2) {
  background: var(--s);
}

.phase-rule i:nth-child(3) {
  background: var(--t);
}

.claims {
  list-style: none;
  padding: 0;
  margin: 2rem 0 0;
  display: grid;
  gap: 0.9rem;
  max-width: 30rem;
}

.claims li {
  position: relative;
  padding-left: 1.2rem;
  color: var(--night-mid);
  font-size: 0.97rem;
  line-height: 1.55;
}

/* The marker is positioned rather than laid out: as a grid column it made the
   bold lead and the sentence after it separate items, which put them on two
   rows pulled to opposite edges. */
.claims li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brass-lit);
}

.claims b {
  color: var(--night-ink);
  font-weight: 600;
}

/* -------------------------------------------------------------- content */

main {
  max-width: var(--wide);
  margin: 0 auto;
  padding: clamp(2.5rem, 6vw, 4.5rem) clamp(1rem, 5vw, 2.5rem) 4rem;
}

main.doc {
  max-width: 46rem;
}

section {
  margin-bottom: clamp(3rem, 7vw, 5rem);
}

section:last-of-type {
  margin-bottom: 0;
}

h1 {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(2rem, 5vw, 2.7rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0 0 0.75rem;
  text-wrap: balance;
}

h2 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  line-height: 1.15;
  letter-spacing: -0.012em;
  margin: 0 0 1rem;
  text-wrap: balance;
}

.doc h2 {
  margin-top: 2.75rem;
  padding-bottom: 0.45rem;
  border-bottom: 1px solid var(--line);
}

h3 {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.05rem;
  margin: 1.75rem 0 0.35rem;
}

p,
li {
  color: var(--ink-mid);
}

p {
  margin: 0 0 1.05rem;
  max-width: var(--measure);
}

.doc p,
.doc li {
  max-width: 42rem;
}

ul {
  padding-left: 1.15rem;
}

li {
  margin-bottom: 0.5rem;
}

.lede {
  font-size: 1.12rem;
  color: var(--ink-mid);
  max-width: 40rem;
}

.updated {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  margin-bottom: 2.25rem;
}

a {
  color: var(--brass);
  text-underline-offset: 0.15em;
}

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

/* ---------------------------------------------------------- how it works */

.steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}

@media (min-width: 46rem) {
  .steps {
    grid-template-columns: repeat(2, 1fr);
  }
}

.steps li {
  background: var(--panel);
  padding: 1.35rem 1.4rem;
  margin: 0;
  display: grid;
  gap: 0.3rem;
  align-content: start;
}

.steps .n {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  color: var(--brass);
}

.steps h3 {
  margin: 0;
  font-size: 1.02rem;
  color: var(--ink);
}

.steps p {
  margin: 0;
  font-size: 0.94rem;
  line-height: 1.55;
  max-width: none;
}

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

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.2rem 1.4rem;
  margin: 1.35rem 0;
}

.pull {
  border-left: 3px solid var(--brass);
  background: var(--brass-wash);
  padding: 1.15rem 1.4rem;
  border-radius: 0 12px 12px 0;
  margin: 1.5rem 0;
}

.pull p {
  margin: 0;
  color: var(--ink);
  font-size: 1.02rem;
  max-width: none;
}

/* ----------------------------------------------------------------- team */

.team {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}

.team li {
  background: var(--panel);
  padding: 1.25rem 1.4rem;
  margin: 0;
  display: grid;
  gap: 0.2rem;
}

.team .who {
  font-family: var(--display);
  font-weight: 700;
  color: var(--ink);
  font-size: 1.08rem;
  letter-spacing: -0.008em;
}

.team .role {
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brass);
}

.team .what {
  font-size: 0.94rem;
  color: var(--ink-mid);
  line-height: 1.5;
  margin-top: 0.15rem;
}

/* ---------------------------------------------------------------- table */

.scroll {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
}

table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.95rem;
}

th,
td {
  text-align: left;
  padding: 0.7rem 0.9rem;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: top;
  color: var(--ink-mid);
}

tr:last-child td {
  border-bottom: none;
}

th {
  font-family: var(--mono);
  color: var(--ink-soft);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
  border-bottom: 1px solid var(--line);
}

/* -------------------------------------------------------------- movement */

/* Everything below is opt-in: without motion.js nothing is displaced, so the
   page is fully readable if the script never runs or the reader asked for
   stillness. */

.motion .rise {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.motion .rise.shown {
  opacity: 1;
  transform: none;
}

/* The hero is above the fold, so it plays on load rather than on approach. */
.motion .hero-copy > * {
  animation: enter 0.7s cubic-bezier(0.22, 1, 0.36, 1) backwards;
}

.motion .hero-copy > :nth-child(1) {
  animation-delay: 0.05s;
}

.motion .hero-copy > :nth-child(2) {
  animation-delay: 0.13s;
}

.motion .hero-copy > :nth-child(3) {
  animation-delay: 0.21s;
}

.motion .hero-copy > :nth-child(4) {
  animation-delay: 0.29s;
}

.motion .hero-copy > :nth-child(5) {
  animation-delay: 0.37s;
}

@keyframes enter {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
}

/* The three phases draw themselves in, which is the one flourish the product's
   own vocabulary earns. */
.motion .phase-rule {
  animation: draw 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.3s backwards;
}

@keyframes draw {
  from {
    width: 0;
  }
}

.steps li,
.team li,
.pillar {
  transition:
    transform 0.25s cubic-bezier(0.22, 1, 0.36, 1),
    background 0.25s;
}

.steps li:hover,
.team li:hover {
  background: var(--brass-wash);
}

.pillar:hover {
  transform: translateY(-3px);
}

/* --------------------------------------------------------------- pillars */

.pillars {
  display: grid;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  margin-top: 2rem;
}

@media (min-width: 52rem) {
  .pillars {
    grid-template-columns: repeat(3, 1fr);
  }
}

.pillar {
  background: var(--panel);
  padding: 1.5rem 1.5rem 1.6rem;
  display: grid;
  gap: 0.4rem;
  align-content: start;
}

.pillar .tag {
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.16em;
  color: var(--brass);
}

.pillar h3 {
  margin: 0;
  font-size: 1.08rem;
  color: var(--ink);
}

.pillar p {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.55;
  max-width: none;
}

/* ----------------------------------------------------------------- facts */

.facts {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--night-line);
  border-radius: 16px;
  overflow: hidden;
  margin-top: 1.5rem;
}

@media (min-width: 52rem) {
  .facts {
    grid-template-columns: repeat(4, 1fr);
  }
}

.fact {
  background: var(--night);
  color: var(--night-ink);
  padding: 1.3rem 1.35rem 1.4rem;
  display: grid;
  gap: 0.25rem;
  align-content: start;
}

.fact b {
  font-family: var(--display);
  font-size: clamp(1.5rem, 3.2vw, 1.95rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--brass-lit);
  font-variant-numeric: tabular-nums;
}

.fact span {
  font-size: 0.86rem;
  line-height: 1.45;
  color: var(--night-mid);
}

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

footer {
  background: var(--night);
  color: var(--night-soft);
  padding: clamp(2rem, 5vw, 3rem) clamp(1rem, 5vw, 2.5rem);
  font-size: 0.9rem;
}

.foot-inner {
  max-width: var(--wide);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  justify-content: space-between;
  align-items: center;
}

footer a {
  color: var(--night-mid);
  text-decoration: none;
}

footer a:hover,
footer a:focus-visible {
  color: var(--brass-lit);
}

.foot-links {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.credit {
  color: var(--night-soft);
}

.credit a {
  color: var(--brass-lit);
}
