/* Case-study pages (/goaltree, /vaboo). Tokens and components follow index.html's inline styles. */
:root {
  --paper: #f3f0e8;
  --paper-2: #ebe7dc;
  --ink: #16150f;
  --muted: #6b675c;
  --rule: #d6d0c1;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #121110;
    --paper-2: #1a1917;
    --ink: #ede9df;
    --muted: #9a958a;
    --rule: #2c2a26;
    color-scheme: dark;
  }
}
* {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font:
    400 16px/1.6 Geist,
    ui-sans-serif,
    system-ui,
    -apple-system,
    'Segoe UI',
    sans-serif;
  -webkit-font-smoothing: antialiased;
}
img,
video {
  display: block;
  max-width: 100%;
}
a {
  color: inherit;
}
.wrap {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding-inline: max(20px, env(safe-area-inset-left));
}
.mono {
  font-family: 'Geist Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Header */
header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--rule);
  padding-top: env(safe-area-inset-top);
}
.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 60px;
}
.mark {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  text-decoration: none;
  line-height: 1;
}
.mark b,
.mark i {
  font-family: 'Geist Mono', ui-monospace, Menlo, monospace;
  letter-spacing: 0.12em;
  font-size: 16px;
}
.mark b {
  font-weight: 500;
}
.mark i {
  font-style: normal;
  font-weight: 400;
  color: var(--muted);
}
nav {
  display: flex;
  gap: 24px;
}
nav a {
  text-decoration: none;
  color: var(--muted);
  font-size: 14px;
  transition: color 0.15s;
}
nav a:hover,
nav a[aria-current] {
  color: var(--ink);
}

.crumb {
  display: flex;
  gap: 10px;
  padding-block: 28px 18px;
  color: var(--muted);
}
.crumb a {
  text-decoration: none;
}
.crumb a:hover {
  color: var(--ink);
}

/* Hero: the homepage's product card, with the page title in it. */
.card {
  --c-line: rgba(255, 255, 255, 0.12);
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 56px);
  align-items: center;
  padding: clamp(24px, 4.5vw, 56px);
  border-radius: 28px;
  background: var(--c-bg);
  color: var(--c-fg);
  overflow: hidden;
  box-shadow: 0 0 0 1px var(--c-line);
}
.card.vaboo {
  --c-bg: #15101a;
  --c-fg: #f7f1f5;
  --c-muted: #b9a8b4;
  --c-accent: #e8498a;
  --c-line: rgba(247, 241, 245, 0.12);
  background:
    radial-gradient(60% 70% at 12% 0%, rgba(232, 73, 138, 0.22), transparent 70%),
    var(--c-bg);
}
.card.goaltree {
  --c-bg: #10110d;
  --c-fg: #f2f4ec;
  --c-muted: #a3a89a;
  --c-accent: #abff3f;
  --c-line: rgba(242, 244, 236, 0.12);
  background:
    radial-gradient(60% 70% at 100% 100%, rgba(171, 255, 63, 0.12), transparent 70%),
    var(--c-bg);
}
.card .num {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--c-muted);
}
.card .num::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--c-accent);
}
.card .name {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 22px;
}
.card .name img {
  width: 52px;
  height: 52px;
  border-radius: 13px;
}
.card h1 {
  margin: 0;
  font-size: clamp(30px, 3.6vw, 40px);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1;
}
.card .tag {
  margin: 22px 0 0;
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: clamp(28px, 3.4vw, 40px);
  line-height: 1.05;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
.card .tag em {
  color: var(--c-accent);
}
.card p.desc {
  margin: 16px 0 0;
  color: var(--c-muted);
  max-width: 50ch;
}
.card .go {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 28px;
  padding: 12px 18px;
  border-radius: 999px;
  background: var(--c-accent);
  color: var(--c-bg);
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
}
.card .go svg {
  width: 15px;
  height: 15px;
}
.card a:focus-visible {
  outline-color: var(--c-accent);
}
.phone {
  justify-self: center;
  width: min(300px, 78%);
  aspect-ratio: 390 / 844;
  border-radius: 38px;
  padding: 9px;
  background: #2a2230;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.08) inset,
    0 40px 80px -20px rgba(0, 0, 0, 0.6),
    0 0 120px -20px rgba(232, 73, 138, 0.35);
  transform: rotate(3deg);
}
.card.goaltree .phone {
  aspect-ratio: 1 / 2;
  background: #1c2016;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.08) inset,
    0 40px 80px -20px rgba(0, 0, 0, 0.6),
    0 0 120px -20px rgba(171, 255, 63, 0.28);
  transform: rotate(-3deg);
}
.phone video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  border-radius: 30px;
}
@media (max-width: 820px) {
  .card {
    grid-template-columns: minmax(0, 1fr);
    border-radius: 24px;
  }
  .phone,
  .card.goaltree .phone {
    width: min(240px, 70%);
    transform: none;
  }
}

/* Facts: the numbers under the hero. */
.facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 28px 0 0;
  border-top: 1px solid var(--rule);
}
.facts div {
  padding: 16px 16px 16px 0;
  border-bottom: 1px solid var(--rule);
}
.facts div + div {
  padding-left: 16px;
  border-left: 1px solid var(--rule);
}
.facts dt {
  color: var(--muted);
}
.facts dd {
  margin: 4px 0 0;
  font-size: 18px;
  font-weight: 500;
}
@media (max-width: 640px) {
  .facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .facts div:nth-child(odd) {
    padding-left: 0;
    border-left: 0;
  }
}

/* Sections */
section {
  padding-top: clamp(56px, 8vw, 96px);
}
.head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--ink);
  margin-bottom: 28px;
}
.head h2 {
  margin: 0;
  font-family: 'Instrument Serif', Georgia, serif;
  font-weight: 400;
  font-size: clamp(32px, 4.6vw, 48px);
  line-height: 1;
  letter-spacing: -0.01em;
}
.head .mono {
  color: var(--muted);
}
.prose {
  max-width: 64ch;
}
.prose p {
  margin: 0 0 16px;
  font-size: clamp(17px, 1.6vw, 19px);
}
.prose p.muted {
  color: var(--muted);
  font-size: 16px;
}

/* What I built: a grid of feature areas. */
.built {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  border-top: 1px solid var(--rule);
}
.built article {
  padding: 20px 20px 22px 0;
  border-bottom: 1px solid var(--rule);
}
.built article:not(:nth-child(3n + 1)) {
  padding-left: 20px;
  border-left: 1px solid var(--rule);
}
.built h3 {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
}
.built p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 15px;
}
@media (max-width: 820px) {
  .built {
    grid-template-columns: minmax(0, 1fr);
  }
  .built article,
  .built article:not(:nth-child(3n + 1)) {
    padding: 18px 0;
    border-left: 0;
  }
}

/* Stack: layer on the left, choices on the right. */
.stack {
  margin: 0;
}
.stack div {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--rule);
}
.stack div:first-child {
  border-top: 1px solid var(--rule);
}
.stack dt {
  color: var(--muted);
  padding-top: 3px;
}
.stack dd {
  margin: 0;
}
.stack dd span {
  color: var(--muted);
}
@media (max-width: 640px) {
  .stack div {
    grid-template-columns: minmax(0, 1fr);
    gap: 2px;
  }
}

/* Hard parts: numbered, like How we build. */
.hard {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0;
}
.hard li {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 16px;
  padding: 20px 0;
  border-bottom: 1px solid var(--rule);
}
.hard li:first-child {
  border-top: 1px solid var(--rule);
}
.hard .mono {
  color: var(--muted);
  padding-top: 6px;
}
.hard h3 {
  margin: 0;
  font-family: 'Instrument Serif', Georgia, serif;
  font-weight: 400;
  font-size: clamp(24px, 2.6vw, 28px);
  line-height: 1.15;
}
.hard p {
  margin: 8px 0 0;
  color: var(--muted);
  max-width: 68ch;
}

/* Shipping log, as on the homepage. */
.log {
  list-style: none;
  margin: 0;
  padding: 0;
}
.log li {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--rule);
  align-items: baseline;
}
.log time {
  color: var(--muted);
}
.log strong {
  font-weight: 600;
}
.log p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 15px;
}
@media (max-width: 640px) {
  .log li {
    grid-template-columns: minmax(0, 1fr);
    gap: 2px;
  }
}

/* Closing call to action. */
.cta {
  margin-top: clamp(56px, 8vw, 96px);
  margin-bottom: clamp(64px, 10vw, 120px);
  padding: clamp(24px, 4vw, 40px);
  border-radius: 24px;
  background: var(--paper-2);
  border: 1px solid var(--rule);
}
.cta p.big {
  margin: 0;
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: clamp(26px, 3vw, 34px);
  line-height: 1.2;
  text-wrap: balance;
}
.links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}
.links a {
  padding: 9px 14px;
  border-radius: 999px;
  border: 1px solid var(--rule);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
}
.links a.primary {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}

footer {
  border-top: 1px solid var(--rule);
  padding-block: 28px calc(28px + env(safe-area-inset-bottom));
  color: var(--muted);
  font-size: 14px;
}
footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
}

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