/* Otherpath — a studio building a tool that listens to speech.
   The page borrows that world: transcript mono for utility text, a grotesque
   set tight for the claim, and a speech envelope as the one signature element.
   Cool slate rather than paper; the accent is a signal colour, used sparingly. */

/* ---------- faces (self-hosted; no third-party request) ---------- */

@font-face {
  font-family: "Bricolage";
  src: url("fonts/bricolage.woff2") format("woff2");
  font-weight: 400 800;
  font-stretch: 75% 100%;
  font-display: swap;
}
@font-face {
  font-family: "PublicSans";
  src: url("fonts/publicsans.woff2") format("woff2");
  font-weight: 400 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "PublicSans";
  src: url("fonts/publicsans-italic.woff2") format("woff2");
  font-weight: 400 500;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "PlexMono";
  src: url("fonts/plexmono.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

:root {
  /* ---- colour: every foreground clears WCAG AA on its own surface ---- */
  --bg: #eceff1;
  --ink: #131719;        /* 15.62:1 */
  --ink-soft: #49535b;   /*  6.81:1 */
  --ink-faint: #5c666f;  /*  5.07:1 */
  --rule: #d7dcdf;
  --rule-strong: #c2c9cd;
  --signal: #0d5b62;     /*  6.76:1 on bg, 5.99:1 on chip */
  --chip: #dbe3e4;
  --wave: #9fb0b4;

  /* ---- type ---- */
  --font-display: "Bricolage", ui-sans-serif, system-ui, sans-serif;
  --font-body: "PublicSans", ui-sans-serif, system-ui, sans-serif;
  --font-mono: "PlexMono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --fs-2xs: .72rem;
  --fs-xs: .78rem;
  --fs-sm: .84rem;
  --fs-base: 1.0625rem;
  --fs-md: 1.14rem;
  --fs-lg: 1.5rem;
  --fs-xl: clamp(1.7rem, 3vw, 2.15rem);
  --fs-display: clamp(2.2rem, 6.6vw, 4.5rem);

  /* ---- space ---- */
  --sp-1: .25rem;
  --sp-2: .5rem;
  --sp-3: .75rem;
  --sp-4: 1rem;
  --sp-5: 1.5rem;
  --sp-6: 2rem;
  --sp-7: 3rem;
  --sp-8: 4rem;

  --measure: 38rem;
  --shell: 74rem;
  --rail: 10rem;
  --gutter: clamp(1.5rem, 5vw, 5rem);
  --step: clamp(3.5rem, 9vh, 6.5rem);

  --ease: cubic-bezier(.2, .7, .3, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1315;
    --ink: #e6eaec;       /* 15.43:1 */
    --ink-soft: #98a3ab;  /*  7.26:1 */
    --ink-faint: #7c878f; /*  5.09:1 */
    --rule: #1e2528;
    --rule-strong: #2c353a;
    --signal: #58b8b8;    /*  7.97:1 on bg, 6.67:1 on chip */
    --chip: #16262a;
    --wave: #3a4a50;
  }
}

:root[data-theme="dark"] {
  --bg: #0f1315;
  --ink: #e6eaec;
  --ink-soft: #98a3ab;
  --ink-faint: #7c878f;
  --rule: #1e2528;
  --rule-strong: #2c353a;
  --signal: #58b8b8;
  --chip: #16262a;
  --wave: #3a4a50;
}

:root[data-theme="light"] {
  --bg: #eceff1;
  --ink: #131719;
  --ink-soft: #49535b;
  --ink-faint: #5c666f;
  --rule: #d7dcdf;
  --rule-strong: #c2c9cd;
  --signal: #0d5b62;
  --chip: #dbe3e4;
  --wave: #9fb0b4;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
}

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

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: var(--bg);
  padding: var(--sp-3) var(--sp-4);
  z-index: 10;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
}
.skip:focus { left: 0; }

/* ---------- layout ---------- */

.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.band-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--sp-5);
}

@media (min-width: 62rem) {
  .band-grid {
    grid-template-columns: var(--rail) minmax(0, var(--measure));
    gap: var(--sp-8);
    align-items: start;
  }
}

.column { min-width: 0; }

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

.site { padding-block: var(--sp-5); }

.site-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
}

.mark {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  text-decoration: none;
  color: var(--ink);
}

.mark-glyph { width: 22px; height: 22px; overflow: visible; flex: none; }
.mark-glyph path { fill: none; stroke-width: 2.4; stroke-linecap: round; }
.mark-main { stroke: currentColor; }
.mark-branch { stroke: var(--signal); }

.mark-word {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  font-variation-settings: "wdth" 90;
  letter-spacing: -.01em;
}

.contact-link {
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  color: var(--ink-faint);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color .25s var(--ease), border-color .25s var(--ease);
}
.contact-link:hover {
  color: var(--ink);
  border-bottom-color: var(--rule-strong);
}

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

.hero { padding-block: var(--step) 0; }

h1 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 630;
  font-variation-settings: "wdth" 90;
  font-size: var(--fs-display);
  line-height: 1.02;
  letter-spacing: -.035em;
  max-width: 21ch;
}

h1 .line { display: block; }
h1 .accent { color: var(--signal); }

/* Motion is an enhancement. Text is legible without it, and the reduced-motion
   block below collapses every duration rather than removing the end state. */
@media (prefers-reduced-motion: no-preference) {
  h1 .line {
    opacity: 0;
    transform: translateY(.32em);
    animation: rise .8s var(--ease) forwards;
  }
  h1 .line:nth-child(1) { animation-delay: .04s; }
  h1 .line:nth-child(2) { animation-delay: .12s; }
  h1 .line:nth-child(3) { animation-delay: .20s; }

  .lede { opacity: 0; animation: rise .8s var(--ease) .5s forwards; }
}

@keyframes rise { to { opacity: 1; transform: none; } }

/* ---------- signature: the speech envelope ----------
   Bursts of speech separated by real pauses. It sweeps in left to right like a
   playhead, which is the one deliberately bold moment on the page. */

.wave-wrap {
  margin-block: clamp(2rem, 5vw, 3.5rem) 0;
  padding-inline: var(--gutter);
  max-width: var(--shell);
  margin-inline: auto;
}

.wave {
  display: block;
  width: 100%;
  height: clamp(56px, 9vw, 96px);
}

.wave-bars { fill: var(--wave); }

.wave-bars rect:nth-child(3n) { fill: var(--signal); opacity: .55; }

@media (prefers-reduced-motion: no-preference) {
  .wave-bars {
    animation: sweep 1.5s var(--ease) .35s both;
  }
}

@keyframes sweep {
  from { clip-path: inset(0 100% 0 0); }
  to   { clip-path: inset(0 0 0 0); }
}

.lede {
  margin: clamp(2rem, 4vw, 3rem) 0 0;
  max-width: var(--measure);
  color: var(--ink-soft);
  font-size: var(--fs-md);
}

@media (min-width: 62rem) {
  .lede { margin-left: calc(var(--rail) + var(--sp-8)); }
}

/* ---------- bands ---------- */

.band {
  margin-top: var(--step);
  padding-block: calc(var(--step) * .8);
  border-top: 1px solid var(--rule);
}

.rail { min-width: 0; }

.section-label {
  margin: 0;
  font-family: var(--font-mono);
  font-size: var(--fs-2xs);
  font-weight: 400;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-faint);
  line-height: 1.6;
}

@media (min-width: 62rem) {
  .rail .section-label { padding-top: .5rem; }
}

/* ---------- work ---------- */

.entry { max-width: var(--measure); }

.entry-head {
  display: flex;
  align-items: baseline;
  gap: var(--sp-3);
  flex-wrap: wrap;
  margin-bottom: var(--sp-3);
}

.entry h3 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-variation-settings: "wdth" 92;
  font-size: var(--fs-xl);
  letter-spacing: -.025em;
  line-height: 1.15;
}

.status {
  font-family: var(--font-mono);
  font-size: var(--fs-2xs);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--signal);
  background: var(--chip);
  border-radius: 3px;
  padding: .35em .7em;
  white-space: nowrap;
}

.entry-line {
  margin: 0 0 var(--sp-4);
  font-size: var(--fs-md);
  color: var(--ink);
  text-wrap: balance;
}

.entry-body {
  margin: 0 0 var(--sp-5);
  color: var(--ink-soft);
}

.entry-meta {
  margin: 0;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  color: var(--ink-faint);
}

.more {
  margin: var(--sp-7) 0 0;
  padding-top: var(--sp-5);
  border-top: 1px solid var(--rule);
  max-width: var(--measure);
  color: var(--ink-faint);
  font-style: italic;
}

/* ---------- contact ---------- */

.contact-body {
  margin: 0;
  max-width: var(--measure);
  font-size: var(--fs-md);
  color: var(--ink-soft);
  text-wrap: pretty;
}

.contact-body a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--signal);
  padding-bottom: .05em;
  transition: color .25s var(--ease);
}
.contact-body a:hover { color: var(--signal); }

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

.site-footer {
  margin-top: var(--step);
  padding-block: calc(var(--step) * .6) calc(var(--step) * .55);
  border-top: 1px solid var(--rule);
}

.footer-inner { max-width: var(--measure); }

.legal {
  margin: 0 0 var(--sp-1);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  line-height: 1.7;
  color: var(--ink-faint);
}
.legal.muted { margin-top: var(--sp-4); }

/* ---------- motion ---------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  h1 .line, .lede { opacity: 1; transform: none; }
  .wave-bars { clip-path: none; }
}

@media (max-width: 34rem) {
  .site-inner { flex-direction: column; align-items: flex-start; gap: var(--sp-2); }
  h1 { max-width: none; }
}
