@font-face {
  font-family: "Bricolage Grotesque";
  src: url("/static/fonts/bricolage.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}
@font-face {
  font-family: "Source Serif 4";
  src: url("/static/fonts/source-serif.woff2") format("woff2");
  font-weight: 200 900;
  font-display: swap;
}

:root {
  --stone: #f2f4f1;
  --white: #ffffff;
  --ink: #15202b;
  --cobalt: #2447d6;
  --cobalt-deep: #1a35a8;
  --hay: #f2c230;
  --slate: #515d69;
  --line: #d5dad6;
  --green: #17693f;
  --display: "Bricolage Grotesque", "Helvetica Neue", Arial, sans-serif;
  --body: "Source Serif 4", Georgia, serif;
  --header-h: 72px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
[id] { scroll-margin-top: calc(var(--header-h) + 16px); }
body {
  margin: 0;
  background: var(--stone);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.125rem;
  line-height: 1.65;
}
h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1.08; letter-spacing: -0.02em; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(2.5rem, 6vw + 0.75rem, 5.5rem); font-weight: 800; letter-spacing: -0.035em; }
h2 { font-size: clamp(1.75rem, 2.5vw + 1rem, 2.75rem); }
h3 { font-size: 1.375rem; line-height: 1.2; }
p { margin: 0 0 1em; max-width: 68ch; }
a { color: var(--cobalt); text-underline-offset: 0.18em; }
a:hover { color: var(--cobalt-deep); }
:focus-visible { outline: 3px solid var(--hay); outline-offset: 3px; border-radius: 2px; }
img, svg { max-width: 100%; }

.wrap { width: min(100% - 2.5rem, 1160px); margin-inline: auto; }
.skip { position: absolute; left: 1rem; top: -4rem; background: var(--ink); color: var(--white); padding: 0.75rem 1rem; z-index: 100; }
.skip:focus { top: 1rem; color: var(--white); }

/* Header */
.site-header { position: sticky; top: 0; z-index: 20; background: var(--stone); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); }
.logo { display: inline-flex; align-items: center; gap: 0.6rem; font-family: var(--display); font-weight: 800; font-size: 1.5rem; letter-spacing: -0.03em; color: var(--ink); text-decoration: none; min-height: 44px; }
.logo-dog { height: 52px; width: auto; }
.logo-word { height: 26px; width: auto; }
.about-logo { display: block; width: min(100%, 17rem); height: auto; }
.logo:hover { color: var(--ink); }
.nav-desktop { display: none; gap: 2rem; }
.nav-desktop a, .mobile-menu nav a { font-family: var(--display); font-weight: 600; color: var(--ink); text-decoration: none; }
.nav-desktop a { padding: 0.75rem 0; border-bottom: 3px solid transparent; }
.nav-desktop a:hover, .nav-desktop a[aria-current] { border-bottom-color: var(--hay); }
.menu-button, .menu-close { display: inline-grid; place-items: center; width: 48px; height: 48px; background: none; border: 0; color: var(--ink); cursor: pointer; }
@media (min-width: 760px) {
  .nav-desktop { display: flex; }
  .menu-button { display: none; }
}

.mobile-menu { position: fixed; inset: 0; z-index: 50; background: var(--cobalt); color: var(--white); padding: 0 1.25rem 2rem; overflow-y: auto; }
.mobile-menu[hidden] { display: none; }
.mobile-menu-top { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); }
.mobile-menu .logo, .mobile-menu .menu-close { color: var(--white); }
.mobile-menu nav { display: grid; margin-top: 1.5rem; }
.mobile-menu nav a { color: var(--white); font-size: 2rem; font-weight: 700; padding: 0.6rem 0; border-bottom: 1px solid rgb(255 255 255 / 0.25); }
.mobile-menu nav a[aria-current] { color: var(--hay); }
body.menu-open { overflow: hidden; }

/* Sections */
.section { padding-block: clamp(3.5rem, 8vw, 7rem); }
.section-white { background: var(--white); }
.section-ink { background: var(--ink); color: var(--white); }
.section-cobalt { background: var(--cobalt); color: var(--white); }
.section-hay { background: var(--hay); }
.section-head { margin-bottom: clamp(1.75rem, 4vw, 3rem); }
.section-head p { margin-top: 1rem; color: var(--slate); }
.section-ink .section-head p, .section-cobalt p { color: rgb(255 255 255 / 0.85); }
.lede { font-size: clamp(1.2rem, 1vw + 1rem, 1.5rem); line-height: 1.5; max-width: 62ch; }

/* Hero */
.hero { padding-block: clamp(3rem, 9vw, 7.5rem) clamp(3rem, 7vw, 5.5rem); animation: fadeIn 0.7s ease both; }
.hero h1 { max-width: 14ch; }
.hero .lede { margin-top: clamp(1.5rem, 3vw, 2.25rem); }
.page-hero { padding-block: clamp(2.5rem, 7vw, 5.5rem) clamp(2rem, 5vw, 3.5rem); animation: fadeIn 0.7s ease both; }
.page-hero h1 { font-size: clamp(2.25rem, 4.5vw + 0.75rem, 4.25rem); max-width: 18ch; }
.page-hero .lede { margin-top: 1.5rem; }
.rule { display: block; width: 5.5rem; height: 0.6rem; background: var(--hay); margin-bottom: 1.75rem; }
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem 1rem; margin-top: 2rem; }

.button { display: inline-flex; align-items: center; min-height: 52px; padding: 0.7rem 1.5rem; font-family: var(--display); font-weight: 700; font-size: 1.0625rem; text-decoration: none; border-radius: 6px; border: 2px solid var(--cobalt); background: var(--cobalt); color: var(--white); transition: all 0.2s; }
.button:hover { transform: scale(1.02); box-shadow: 0 14px 30px -12px rgb(36 71 214 / 0.55); color: var(--white); }
.button:active { transform: scale(0.98); }
.button-quiet { background: transparent; color: var(--cobalt); }
.button-quiet:hover { color: var(--cobalt-deep); box-shadow: none; }
.section-ink .button, .section-cobalt .button { background: var(--hay); border-color: var(--hay); color: var(--ink); }
.section-ink .button:hover, .section-cobalt .button:hover { color: var(--ink); box-shadow: 0 14px 30px -12px rgb(0 0 0 / 0.5); }

/* Metrics */
.metrics { display: flex; flex-wrap: wrap; }
.metric { flex: 1 1 10rem; padding: 0.5rem 1.5rem 0.5rem 0; }
.metric + .metric { border-left: 1px solid rgb(255 255 255 / 0.25); padding-left: 1.5rem; }
.metric b { display: block; font-family: var(--display); font-weight: 800; font-size: clamp(2.5rem, 5vw, 4rem); line-height: 1; letter-spacing: -0.03em; color: var(--hay); }
.metric span { display: block; margin-top: 0.4rem; font-size: 1rem; }
@media (max-width: 560px) {
  .metric { flex-basis: 100%; padding: 1rem 0; }
  .metric + .metric { border-left: 0; border-top: 1px solid rgb(255 255 255 / 0.25); padding-left: 0; }
}

/* Feature (StableSync) */
.feature { display: grid; gap: clamp(1.5rem, 4vw, 4rem); }
.feature h2 { font-size: clamp(2.25rem, 5vw + 0.5rem, 4.5rem); font-weight: 800; letter-spacing: -0.035em; }
.feature-kicker { font-family: var(--display); font-weight: 600; margin-bottom: 0.75rem; color: var(--hay); }
.feature ul { list-style: none; margin: 0; padding: 0; border-top: 1px solid rgb(255 255 255 / 0.3); }
.feature li { padding: 0.85rem 0; border-bottom: 1px solid rgb(255 255 255 / 0.3); }
.feature li b { font-family: var(--display); font-weight: 700; display: block; }
@media (min-width: 860px) { .feature { grid-template-columns: 1.15fr 1fr; align-items: start; } .feature-shot { grid-column: 1 / -1; } }

/* Ledger */
.ledger { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--ink); }
.ledger-row a { display: grid; gap: 0.35rem 1.5rem; padding: 1.25rem 0.5rem; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; transition: background-color 0.2s, padding-left 0.2s; }
.ledger-row a:hover { background: var(--white); padding-left: 1rem; }
.ledger-name { font-family: var(--display); font-weight: 700; font-size: 1.3rem; line-height: 1.2; letter-spacing: -0.015em; }
.ledger-row a:hover .ledger-name { color: var(--cobalt); }
.ledger-what { color: var(--slate); font-size: 1rem; line-height: 1.5; }
.ledger-for { font-size: 1rem; }
.ledger .chip { justify-self: start; }
@media (min-width: 900px) {
  .ledger-row a { grid-template-columns: 1.2fr 1.6fr 1fr 9.5rem; align-items: baseline; }
  .ledger .chip { justify-self: end; }
}

.chip { display: inline-flex; align-items: center; gap: 0.45rem; font-family: var(--display); font-weight: 600; font-size: 0.875rem; line-height: 1; padding: 0.4rem 0.7rem; border-radius: 999px; white-space: nowrap; border: 1px solid var(--line); background: var(--white); color: var(--slate); }
.chip::before { content: ""; width: 0.5rem; height: 0.5rem; border-radius: 50%; background: currentColor; }
.chip-live { color: var(--green); border-color: #b9d8c6; }
.chip-dev { color: var(--cobalt); border-color: #c3cdf3; }
.chip-proto { color: var(--slate); }

/* Cards */
.card-hover { transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease; }
.card-hover:hover { transform: translateY(-2px); box-shadow: 0 8px 30px -12px rgb(36 71 214 / 0.25); border-color: rgb(36 71 214 / 0.35); }
.cards { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 16.5rem), 1fr)); }
.cards-wide { grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr)); }
.card { background: var(--stone); border: 1px solid var(--line); border-radius: 10px; padding: 1.75rem; }
.section:not(.section-white) .card { background: var(--white); }
.card .icon { width: 44px; height: 44px; color: var(--cobalt); margin-bottom: 1.1rem; }
.card h3 { margin-bottom: 0.6rem; }
.card p { font-size: 1.0625rem; margin: 0; }
.card p + p { margin-top: 0.75em; }

/* Projects (work page) */
.projects { display: grid; gap: 1.25rem; }
.project { background: var(--white); border: 1px solid var(--line); border-radius: 10px; padding: clamp(1.5rem, 3.5vw, 2.5rem); display: grid; gap: 1.25rem 3rem; }
.project-head { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1rem; }
.project-head h2 { font-size: clamp(1.5rem, 1.6vw + 1rem, 2.125rem); }
.project-shot { margin: 0; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--stone); }
.project-shot img { display: block; width: 100%; height: auto; }
.project-shot-wide img { aspect-ratio: 16 / 9; object-fit: cover; object-position: top; }
.project-shot-phone { display: grid; place-items: center; padding: 1.5rem 1rem 0; }
.project-shot-phone img { width: min(100%, 17.5rem); height: 26rem; object-fit: cover; object-position: top; border-radius: 1.25rem 1.25rem 0 0; border: 1px solid var(--line); border-bottom: 0; box-shadow: 0 18px 40px -18px rgb(21 32 43 / 0.45); }
.feature-shot { margin: 0; border-radius: 10px; overflow: hidden; box-shadow: 0 30px 60px -30px rgb(0 0 0 / 0.6); }
.feature-shot img { display: block; width: 100%; height: auto; }
.project-body p:last-child { margin-bottom: 0; }
.project-link a { font-family: var(--display); font-weight: 700; display: inline-flex; align-items: center; gap: 0.4rem; min-height: 44px; }
.project-facts { margin: 0; display: grid; gap: 0.9rem; align-content: start; font-size: 1rem; line-height: 1.45; }
.project-facts dt { font-family: var(--display); font-weight: 600; color: var(--slate); font-size: 0.9375rem; }
.project-facts dd { margin: 0.1rem 0 0; }
@media (min-width: 860px) {
  .project { grid-template-columns: 1.7fr 1fr; }
  .project-head, .project-shot { grid-column: 1 / -1; }
  .project-facts { border-left: 1px solid var(--line); padding-left: 2rem; }
}

/* Steps timeline */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 2rem; counter-reset: step; }
.steps li { position: relative; padding-left: 4.25rem; counter-increment: step; }
.steps li::before { content: counter(step); position: absolute; left: 0; top: 0; width: 3rem; height: 3rem; border-radius: 50%; display: grid; place-items: center; background: var(--cobalt); color: var(--white); font-family: var(--display); font-weight: 800; font-size: 1.25rem; z-index: 1; }
.steps li:not(:last-child)::after { content: ""; position: absolute; left: calc(1.5rem - 1px); top: 3rem; bottom: -2rem; width: 2px; background: var(--line); }
.steps h3 { margin-bottom: 0.4rem; padding-top: 0.6rem; }
.steps p { margin: 0; font-size: 1.0625rem; }
@media (min-width: 900px) {
  .steps { grid-template-columns: repeat(4, 1fr); gap: 2rem; }
  .steps li { padding-left: 0; padding-top: 4.25rem; }
  .steps li:not(:last-child)::after { left: 3rem; right: -2rem; top: calc(1.5rem - 1px); bottom: auto; width: auto; height: 2px; }
  .steps h3 { padding-top: 0; }
}

/* FAQ accordion */
.faq { border-top: 2px solid var(--ink); max-width: 52rem; }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item h3 { font-size: inherit; }
.faq-q { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 1rem; min-height: 64px; padding: 1rem 0.25rem; background: none; border: 0; text-align: left; color: var(--ink); font-family: var(--display); font-weight: 700; font-size: 1.25rem; line-height: 1.25; cursor: pointer; }
.faq-q svg { flex: none; color: var(--cobalt); transition: transform 0.25s ease; }
.faq-q[aria-expanded="true"] svg { transform: rotate(180deg); }
.faq-a { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.3s ease; }
.faq-item:has(.faq-q[aria-expanded="true"]) .faq-a { grid-template-rows: 1fr; }
.faq-a > div { overflow: hidden; visibility: hidden; transition: visibility 0.3s; }
.faq-item:has(.faq-q[aria-expanded="true"]) .faq-a > div { visibility: visible; }
.faq-a p { padding: 0 0.25rem 1.25rem; margin: 0; }

/* People */
.people { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr)); }
.person { background: var(--white); border: 1px solid var(--line); border-radius: 10px; padding: clamp(1.5rem, 3vw, 2.25rem); }
.person .initials { width: 4rem; height: 4rem; border-radius: 50%; display: grid; place-items: center; background: var(--cobalt); color: var(--white); font-family: var(--display); font-weight: 800; font-size: 1.4rem; margin-bottom: 1.25rem; }
.person:nth-child(2) .initials { background: var(--hay); color: var(--ink); }
.person h2, .person h3 { font-size: 1.75rem; }
.person .role { font-family: var(--display); font-weight: 600; color: var(--slate); margin: 0.35rem 0 1rem; }
.person p:last-child { margin-bottom: 0; }

.split { display: grid; gap: clamp(1.5rem, 4vw, 4rem); }
@media (min-width: 860px) { .split { grid-template-columns: 1fr 1.3fr; } }

.prose h2 { font-size: clamp(1.4rem, 1.2vw + 1rem, 1.875rem); margin: 2.25rem 0 0.75rem; }
.prose ul { padding-left: 1.2rem; max-width: 68ch; }
.prose li { margin-bottom: 0.4rem; }

.contact-mail { font-family: var(--display); font-weight: 800; font-size: clamp(1.75rem, 5.5vw, 3.75rem); letter-spacing: -0.03em; line-height: 1.1; overflow-wrap: anywhere; color: var(--white); text-decoration-color: var(--hay); text-decoration-thickness: 0.12em; }
.contact-mail:hover { color: var(--hay); }

/* Footer */
.site-footer { background: var(--ink); color: rgb(255 255 255 / 0.85); padding-block: 3.5rem 2rem; font-size: 1rem; border-top: 1px solid rgb(255 255 255 / 0.2); }
.footer-inner { display: grid; gap: 2rem; }
.footer-name { font-family: var(--display); font-weight: 800; font-size: 1.5rem; color: var(--white); margin-bottom: 0.4rem; }
.site-footer nav { display: grid; gap: 0.1rem; align-content: start; }
.site-footer a { color: var(--white); display: inline-flex; align-items: center; min-height: 44px; }
.site-footer a:hover { color: var(--hay); }
.footer-small { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid rgb(255 255 255 / 0.2); font-size: 0.9375rem; max-width: none; }
@media (min-width: 760px) { .footer-inner { grid-template-columns: 2fr 1fr 1.2fr; } .footer-mail { text-align: right; } }

/* Motion */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes revealUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .reveal { animation: revealUp 0.6s ease both; animation-timeline: view(); animation-range: entry 0% entry 30%; }
  }
}
@supports not (animation-timeline: view()) {
  .reveal { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
