/* Layout concept: an opening band where the logo bleeds off the page, then
   spec-sheet sections on one shared grid. The logo owns the colour; everything
   else stays plum, paper and type.

   Theme: every themed colour is one light-dark() token below. With no saved
   choice the page follows the system; data-theme on <html> pins a choice. */
:root {
  color-scheme: light dark;

  --bg: light-dark(#fbfafc, #150d1e);
  --bg-alt: light-dark(#f2eff5, #1c1228);
  --surface: light-dark(#f2eff5, #21162d);
  --text: light-dark(#1a1225, #ffffff);
  --muted: light-dark(#5f5570, #bdb3c9);
  --line: light-dark(rgba(26, 18, 37, .14), rgba(255, 255, 255, .15));
  --accent-text: light-dark(#b3285f, #fba03b);
  --btn-bg: light-dark(#1a1225, #ffffff);
  --btn-fg: light-dark(#ffffff, #1a1225);
  --hero-glow: light-dark(rgba(216, 54, 117, .1), rgba(216, 54, 117, .24));

  /* Measured from the logo. */
  --c-orange: #fba03b;
  --c-coral: #f46d44;
  --c-rose: #eb4d58;
  --c-magenta: #d83675;
  --c-violet: #87348f;

  --font-display: "Bricolage Grotesque", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --font-body: "Instrument Sans", "Helvetica Neue", "Segoe UI", system-ui, sans-serif;
  --font-mono: "DM Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --gutter: clamp(20px, 4vw, 48px);
  --band-y: clamp(72px, 10vw, 136px);
}

:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 76px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

h1, h2, h3, p, ol, dl, dd { margin: 0; padding: 0; }
ol { list-style: none; }
img, svg { max-width: 100%; }
img { display: block; height: auto; }
a { color: inherit; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  text-wrap: balance;
}

h2 {
  font-size: clamp(2rem, 4.2vw, 3.25rem);
  line-height: 1.08;
  letter-spacing: -.01em;
}

h3 {
  font-size: 1.5rem;
  line-height: 1.2;
  letter-spacing: -.012em;
}

p { text-wrap: pretty; }

:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
  border-radius: 4px;
}

.wrap {
  width: 100%;
  max-width: calc(1280px + 2 * var(--gutter));
  margin-inline: auto;
  padding-left: max(var(--gutter), env(safe-area-inset-left, 0px));
  padding-right: max(var(--gutter), env(safe-area-inset-right, 0px));
}

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.skip {
  position: absolute;
  left: 16px;
  top: -64px;
  z-index: 40;
  padding: 10px 16px;
  border-radius: 8px;
  background: var(--btn-bg);
  color: var(--btn-fg);
}
.skip:focus { top: 12px; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: .8125rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}

.intro {
  max-width: 58ch;
  color: var(--muted);
  font-size: 1.125rem;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 16px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-family: var(--font-mono);
  font-size: .8125rem;
  line-height: 1.7;
  color: var(--muted);
}

/* Buttons and links */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  transition: background-color .18s ease, color .18s ease, border-color .18s ease;
}
.btn--solid { background: var(--btn-bg); color: var(--btn-fg); }
.btn--solid:hover { background: var(--c-orange); color: #1a1225; }
.btn--ghost { border: 1px solid var(--line); color: var(--text); font-size: .9375rem; }
.btn--ghost:hover { border-color: var(--text); }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  font-weight: 600;
  text-decoration: none;
  color: var(--text);
}
.link-arrow::after { content: "→"; transition: transform .18s ease; }
.link-arrow:hover::after { transform: translateX(4px); }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  color: var(--text);
}
.site-header__row {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 76px;
}
.brand { flex: none; display: block; margin-right: auto; border-radius: 4px; }

/* The wordmark takes its fill from currentColor, so it follows the theme. */
.logo { display: block; height: auto; fill: currentColor; }
.brand .logo { width: 183px; }

.site-nav { display: flex; align-items: center; gap: 28px; }
.site-nav a:not(.btn) {
  font-size: .9375rem;
  text-decoration: none;
  color: var(--muted);
  transition: color .18s ease;
}
.site-nav a:not(.btn):hover { color: var(--text); }

.nav-toggle {
  display: none;
  min-height: 44px;
  padding: 8px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: none;
  color: var(--text);
  font: inherit;
  font-size: .9375rem;
  cursor: pointer;
}

.theme-toggle {
  flex: none;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: none;
  color: var(--text);
  cursor: pointer;
  transition: border-color .18s ease;
}
.theme-toggle:hover { border-color: var(--text); }
.theme-toggle svg { display: block; width: 20px; height: 20px; }

/* The icon shows the theme a click moves to. Without JS there is nothing to toggle. */
:root[data-theme="dark"] .theme-toggle__moon,
:root[data-theme="light"] .theme-toggle__sun,
:root:not([data-theme]) .theme-toggle { display: none; }

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background: var(--bg);
  color: var(--text);
}
.hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: 50%;
  right: -12vw;
  width: min(76vw, 1180px);
  aspect-ratio: 1;
  transform: translateY(-50%);
  background: radial-gradient(closest-side, var(--hero-glow), transparent);
}
.hero__copy { padding-block: clamp(64px, 9vw, 128px) clamp(48px, 7vw, 96px); }
.hero__copy > * { max-width: min(760px, 54vw); }
h1 {
  margin-top: 20px;
  font-size: clamp(2.75rem, 6.1vw, 5.5rem);
  line-height: 1.02;
  letter-spacing: -.012em;
}
.lede {
  margin-top: 28px;
  max-width: min(600px, 50vw);
  font-size: clamp(1.0625rem, 1.4vw, 1.25rem);
  color: var(--muted);
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 28px;
  margin-top: 36px;
}
.hero__mark {
  position: absolute;
  z-index: -1;
  top: 50%;
  right: max(-5vw, -120px);
  width: min(51vw, 860px);
  height: auto;
  transform: translateY(-53%);
  animation: settle 1.5s cubic-bezier(.16, 1, .3, 1) both;
}
@keyframes settle {
  from { transform: translateY(-53%) rotate(-9deg) scale(.95); }
  to { transform: translateY(-53%); }
}

.hero__strip {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 28px;
  padding-block: 20px;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: .8125rem;
  color: var(--text);
}
.hero__strip dt { color: var(--muted); margin-right: 8px; }

/* Bands */
.band { padding-block: var(--band-y); background: var(--bg); }
.band--alt { background: var(--bg-alt); }

.section-head { display: grid; gap: 16px; max-width: 760px; }

.split {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  gap: clamp(40px, 7vw, 104px);
}
.split > * { min-width: 0; }
.split__head {
  position: sticky;
  top: 112px;
  align-self: start;
  display: grid;
  gap: 16px;
}
.split__head h2 { font-size: clamp(1.875rem, 3vw, 2.625rem); line-height: 1.1; }

/* Services */
.service {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 12px 32px;
  padding-block: 28px;
  border-top: 1px solid var(--line);
}
.service:first-child { padding-top: 0; border-top: 0; }
.service:last-child { padding-bottom: 0; }
.service__body { display: grid; gap: 12px; min-width: 0; }
.service__body p:first-child { max-width: 58ch; }

/* Track record */
.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 32px;
  margin-top: clamp(40px, 6vw, 72px);
}
.stat {
  display: flex;
  flex-direction: column-reverse;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.stat dd {
  font-family: var(--font-display);
  font-size: clamp(2.75rem, 5vw, 4.25rem);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -.012em;
  font-variant-numeric: tabular-nums;
}
.stat dt { font-size: .9375rem; line-height: 1.45; color: var(--muted); }

.cases {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: clamp(40px, 6vw, 72px);
}
.case {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  padding: clamp(24px, 3vw, 36px);
  border-radius: 20px;
  background: var(--surface);
}
.case__org {
  font-family: var(--font-mono);
  font-size: .8125rem;
  letter-spacing: .04em;
  color: var(--accent-text);
}
.case p:not(.case__org):not(.tags) { color: var(--muted); }
.case .tags { margin-top: auto; padding-top: 8px; }

/* Process: a tendril from the logo, ending in a node at each step */
.steps {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 32px;
  margin-top: clamp(40px, 6vw, 64px);
  counter-reset: step;
}
.steps::before {
  content: "";
  position: absolute;
  top: 9px;
  left: 9px;
  right: 0;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--c-violet), var(--c-magenta) 34%, var(--c-rose) 58%, var(--c-orange));
}
.step { position: relative; min-width: 0; padding-top: 44px; counter-increment: step; }
.step::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--node);
}
.step:nth-child(1) { --node: var(--c-violet); }
.step:nth-child(2) { --node: var(--c-magenta); }
.step:nth-child(3) { --node: var(--c-rose); }
.step:nth-child(4) { --node: var(--c-coral); }
.step h3::before {
  content: counter(step) ". ";
  font-family: var(--font-mono);
  font-size: .875rem;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--muted);
}
.step p { margin-top: 8px; color: var(--muted); max-width: 32ch; }

/* Founder */
.founder-card { align-self: start; display: grid; gap: 8px; justify-items: start; }
.founder-photo {
  width: min(100%, 280px);
  aspect-ratio: 1;
  margin-bottom: 20px;
  border-radius: 28px;
  object-fit: cover;
}
.founder-card h2 { font-size: clamp(1.875rem, 3vw, 2.625rem); }
.founder-card__role { color: var(--muted); }

.founder-body { display: grid; gap: 16px; max-width: 760px; }
.founder-lead {
  font-family: var(--font-display);
  font-size: clamp(1.375rem, 2.2vw, 1.75rem);
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: -.012em;
}
.founder-body > p:not(.founder-lead):not(.education) { color: var(--muted); max-width: 62ch; }

.timeline-title {
  margin-top: 24px;
  font-family: var(--font-mono);
  font-size: .8125rem;
  font-weight: 400;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}
.timeline li {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) minmax(0, 1fr);
  gap: 4px 20px;
  align-items: baseline;
  padding-block: 12px;
  border-top: 1px solid var(--line);
}
.timeline__years {
  font-family: var(--font-mono);
  font-size: .8125rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.timeline__role { font-weight: 600; }
.timeline__org { color: var(--muted); }
.education { padding-top: 12px; border-top: 1px solid var(--line); color: var(--muted); font-size: .9375rem; margin-top: -16px; }

/* Contact */
.contact { position: relative; overflow: hidden; isolation: isolate; }
/* Only the top of the ring rises above the footer line, so no letter is ever cut. */
.contact__mark {
  position: absolute;
  z-index: -1;
  right: max(-4vw, -80px);
  bottom: 0;
  width: min(62vw, 960px);
  height: auto;
  transform: translateY(70%);
}
.contact .wrap { display: grid; gap: 16px; justify-items: start; }
.contact h2 { font-size: clamp(2.5rem, 5.6vw, 4.75rem); line-height: 1.04; letter-spacing: -.012em; max-width: 13ch; }
.contact .intro { max-width: 46ch; }
.contact__email {
  display: inline-block;
  margin-top: 8px;
  padding-block: 8px;
  font-family: var(--font-display);
  font-size: clamp(1.375rem, 3vw, 2.25rem);
  font-weight: 500;
  letter-spacing: -.015em;
  text-decoration-color: var(--c-coral);
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
  overflow-wrap: anywhere;
}
.contact__email:hover { color: var(--accent-text); }
.contact__phone {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: -12px;
  font-family: var(--font-display);
  font-size: clamp(1.125rem, 1.8vw, 1.375rem);
  font-weight: 500;
  text-decoration: none;
  font-variant-numeric: tabular-nums;
}
.contact__phone:hover { color: var(--accent-text); }
.contact__place { font-family: var(--font-mono); font-size: .8125rem; color: var(--muted); }

/* Footer */
.site-footer {
  position: relative;
  background: var(--bg-alt);
  color: var(--muted);
  border-top: 1px solid var(--line);
  padding-block: 28px;
  font-size: .875rem;
}
.site-footer__row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 40px; }
.site-footer .logo { width: 146px; color: var(--text); }
.site-footer p { flex: 1 1 320px; max-width: 72ch; text-align: right; }

/* Tablet */
@media (max-width: 1040px) {
  .split { grid-template-columns: minmax(0, 1fr); }
  .split__head { position: static; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .founder-card { grid-template-columns: auto minmax(0, 1fr); grid-template-rows: repeat(4, auto); column-gap: 28px; row-gap: 4px; align-items: center; }
  .founder-photo { grid-row: 1 / -1; width: 148px; margin-bottom: 0; border-radius: 24px; }
}

@media (max-width: 960px) {
  .site-header__row { gap: 12px; }
  .nav-toggle { display: inline-flex; align-items: center; }
  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 12px max(var(--gutter), env(safe-area-inset-right, 0px)) 20px;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
  }
  .site-nav.is-open { display: flex; }
  .site-nav a:not(.btn) { padding-block: 10px; font-size: 1.0625rem; color: var(--text); }
  .site-nav .btn { margin-top: 8px; }

  .hero__copy { padding-bottom: 16px; }
  .hero__copy > * { max-width: 680px; }
  .lede { max-width: 60ch; }
  .hero::before { top: auto; bottom: -6%; right: -30vw; width: 130vw; transform: none; }
  .hero__mark {
    position: static;
    display: block;
    width: min(112vw, 720px);
    margin: 8px -14vw 16px auto;
    transform: none;
    animation-name: settle-stacked;
  }
  @keyframes settle-stacked {
    from { transform: rotate(-9deg) scale(.95); }
    to { transform: none; }
  }
  .hero__strip { position: relative; }
  .hero__strip dt { flex-basis: 100%; }
  .contact { padding-bottom: calc(var(--band-y) + 34vw); }
  .contact__mark { right: -8vw; width: 116vw; }
}

/* Phone */
@media (max-width: 720px) {
  .service { grid-template-columns: minmax(0, 1fr); }
  .cases { grid-template-columns: minmax(0, 1fr); }
  .steps { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .steps::before { top: 9px; bottom: 40px; left: 9px; right: auto; width: 2px; height: auto; background: linear-gradient(180deg, var(--c-violet), var(--c-magenta) 34%, var(--c-rose) 58%, var(--c-orange)); }
  .step { padding: 0 0 0 44px; }
  .step p { max-width: 48ch; }
  .timeline li { grid-template-columns: 96px minmax(0, 1fr); }
  .timeline__org { grid-column: 2; }
  .site-footer p { text-align: left; }
}

@media (max-width: 460px) {
  .stats { gap: 28px 20px; }
  .founder-card { grid-template-columns: minmax(0, 1fr); }
  .founder-photo { grid-row: auto; width: 168px; margin-bottom: 16px; }
  .brand .logo { width: clamp(124px, 40vw, 154px); }
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

@media (prefers-reduced-motion: reduce) {
  .hero__mark { animation: none; }
  .btn, .link-arrow::after, .site-nav a, .theme-toggle { transition: none; }
}
