:root {
  --paper: #e7f1f8;
  --paper-deep: #d5e5f1;
  --ink: #14211d;
  --muted: #4d6270;
  --line: #c3d4e1;
  --signal: #d74b32;
  --signal-dark: #a82d1d;
  --mint: #b8dbca;
  --white: #fffef9;
  --display: "Newsreader", Georgia, serif;
  --body: "Manrope", sans-serif;
  --mono: "DM Mono", monospace;
  --content: min(1180px, calc(100vw - 48px));
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.65;
}

body.menu-open {
  overflow: hidden;
}

a {
  color: inherit;
}

img {
  display: block;
  max-width: 100%;
}

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 100;
  padding: 10px 14px;
  background: var(--ink);
  color: var(--white);
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 20;
  width: 100%;
  height: 88px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 max(24px, calc((100vw - 1180px) / 2));
  border-bottom: 1px solid rgba(20, 33, 29, 0.24);
  box-sizing: border-box;
}

.wordmark {
  font-family: var(--display);
  font-size: 30px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
}

.wordmark span {
  color: var(--signal);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

.site-nav a {
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.site-nav a:not(.nav-contact):hover {
  color: var(--signal-dark);
}

.nav-contact {
  padding: 9px 16px;
  border: 1px solid var(--ink);
}

.nav-contact:hover {
  background: var(--ink);
  color: var(--white);
}

.menu-button {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--ink);
  background: transparent;
  color: var(--ink);
}

.menu-button svg,
.button svg,
.text-link svg,
.contact-links svg,
.site-footer svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
}

.hero {
  position: relative;
  overflow: hidden;
  padding: 154px max(24px, calc((100vw - 1180px) / 2)) 168px;
  background:
    radial-gradient(880px 420px at 8% 0%, rgba(255, 255, 255, 0.85), transparent 58%),
    radial-gradient(720px 380px at 92% 18%, rgba(93, 147, 187, 0.28), transparent 62%),
    linear-gradient(180deg, #f5fafd 0%, #d4e7f4 72%, #c3dced 100%);
}

.hero-copy,
.chapter-links {
  position: relative;
  z-index: 1;
}

.hero-waves {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 150px;
  line-height: 0;
  pointer-events: none;
}

.hero-waves svg {
  display: block;
  width: 100%;
  height: 100%;
}

.hero-copy {
  max-width: none;
}

.hero-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 48px;
}

.hero-aside {
  max-width: 460px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 28px;
}

.hero-aside .hero-intro {
  margin: 0;
}

.hero-heading .hero-actions {
  flex: 0 1 auto;
  justify-content: flex-start;
  margin-top: 0;
}

.eyebrow,
.project-kind,
.case-index {
  margin: 0 0 20px;
  color: var(--signal-dark);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero h1 {
  min-width: 0;
  max-width: 100%;
  margin: 0;
  font-family: var(--display);
  font-size: clamp(76px, 8vw, 122px);
  font-weight: 500;
  line-height: 0.82;
}

.hero-identity {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  min-width: 0;
}

.hero-avatar {
  width: 82px;
  height: 82px;
  flex: 0 0 auto;
  margin-top: 8px;
  border: 1px solid var(--ink);
  border-radius: 50%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.08);
}

.hero-location {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 24px 0 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
}

.hero-location svg,
.hero-email svg {
  width: 15px;
}

.hero-email {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 8px 0 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12px;
}

.hero-email a {
  color: inherit;
  text-decoration: none;
}

.hero-email a:hover {
  color: var(--signal-dark);
}

.hero-intro {
  max-width: 620px;
  margin: 44px 0 0;
  font-size: clamp(20px, 2.2vw, 29px);
  line-height: 1.4;
}

.hero-actions,
.project-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 36px;
}

.hero-links {
  display: flex;
  align-items: center;
  gap: 20px;
}

.button,
.text-link {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.button {
  padding: 12px 18px;
  border: 1px solid var(--ink);
}

.button-primary {
  background: var(--ink);
  color: var(--white);
}

.button-primary:hover {
  background: var(--signal-dark);
  border-color: var(--signal-dark);
}

.button-secondary:hover {
  background: var(--white);
}

.text-link {
  border-bottom: 1px solid var(--ink);
}

.chapter-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 28px;
  margin-top: 56px;
}

.chapter-links a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  text-decoration: none;
  text-transform: uppercase;
}

.chapter-links a:hover {
  color: var(--signal-dark);
}

.chapter-links svg {
  width: 16px;
  height: 16px;
}

.section {
  padding: 120px max(24px, calc((100vw - 1180px) / 2));
}

.section-heading {
  display: grid;
  grid-template-columns: 0.72fr 1.28fr;
  gap: 40px;
  margin-bottom: 72px;
}

.section-heading h2,
.about h2,
.contact h2 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(52px, 7vw, 92px);
  font-weight: 500;
  line-height: 0.95;
}

.selected-work {
  background: var(--ink);
  color: var(--white);
}

.selected-work .eyebrow,
.selected-work .project-kind {
  color: var(--mint);
}

.featured-project {
  display: grid;
  grid-template-columns: 0.82fr 1.18fr;
  gap: 64px;
  align-items: center;
}

.featured-project + .featured-project {
  margin-top: 120px;
  padding-top: 120px;
  border-top: 1px solid rgba(255, 254, 249, 0.16);
}

.project-number {
  margin-bottom: 54px;
  font-family: var(--display);
  font-size: 46px;
  color: var(--mint);
}

.project-copy h3 {
  margin: 0 0 22px;
  font-family: var(--display);
  font-size: clamp(48px, 6vw, 82px);
  font-weight: 500;
  line-height: 0.95;
}

.project-lede {
  font-size: 21px;
  line-height: 1.5;
}

.project-copy > p:not(.project-kind) {
  max-width: 620px;
  color: #d6ded9;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 30px 0 0;
  padding: 0;
  list-style: none;
}

.tag-list li {
  padding: 6px 10px;
  border: 1px solid #66716c;
  font-family: var(--mono);
  font-size: 11px;
}

.selected-work .button-primary {
  background: var(--mint);
  color: var(--ink);
  border-color: var(--mint);
}

.selected-work .button-primary:hover {
  background: var(--white);
  border-color: var(--white);
}

.selected-work .button-secondary {
  border-color: #8e9993;
  color: var(--white);
}

.app-preview {
  position: relative;
  min-width: 0;
  height: 650px;
  border: 1px solid #78837d;
  background: var(--white);
  box-shadow: 22px 22px 0 var(--signal);
  overflow: hidden;
}

.preview-bar {
  height: 44px;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 14px;
  border-bottom: 1px solid #d7dbd9;
  background: #eef0ed;
}

.preview-bar span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #9da5a1;
}

.preview-bar p {
  margin: 0 0 0 8px;
  color: #59615d;
  font-family: var(--mono);
  font-size: 10px;
}

.app-preview iframe {
  width: 100%;
  height: calc(100% - 44px);
  border: 0;
  background: white;
}

.app-preview.snake-preview {
  height: 720px;
  background: #111;
}

.app-preview.snake-preview iframe {
  background: #111;
}

.preview-fallback {
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  background: var(--ink);
  color: var(--white);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}

.preview-fallback svg {
  width: 15px;
}

.experience {
  background: var(--white);
}

.experience .section-heading {
  margin-bottom: 28px;
}

.experience-intro {
  max-width: 740px;
  margin: 0 0 56px;
  font-size: 21px;
  line-height: 1.5;
}

.case-study {
  display: grid;
  grid-template-columns: 60px 1fr 210px;
  gap: 40px;
  align-items: center;
  padding: 45px 0;
  border-top: 1px solid var(--line);
}

.case-study:last-child {
  border-bottom: 1px solid var(--line);
}

.case-index {
  align-self: start;
  color: var(--signal-dark);
}

.case-study h3 {
  margin: 0 0 10px;
  font-family: var(--display);
  font-size: clamp(28px, 3vw, 42px);
  font-weight: 500;
  line-height: 1.1;
}

.case-study p:not(.case-index, .project-kind) {
  max-width: 700px;
  margin: 0;
  color: var(--muted);
}

.metric {
  padding-left: 36px;
  border-left: 1px solid var(--line);
}

.metric strong {
  display: block;
  font-family: var(--display);
  font-size: 64px;
  font-weight: 500;
  line-height: 1;
  color: var(--signal-dark);
}

.metric-word strong {
  font-size: 52px;
}

.metric span {
  color: var(--muted);
  font-size: 13px;
}

.confidentiality-note {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 28px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.confidentiality-note svg {
  width: 15px;
}

.about {
  display: block;
}

.about-copy {
  max-width: 900px;
  margin-left: auto;
}

.about-copy .eyebrow {
  margin-bottom: 32px;
}

.about-lede {
  margin: 44px 0 18px;
  font-size: 24px;
  line-height: 1.45;
}

.about-copy > p:not(.eyebrow, .about-lede) {
  max-width: 740px;
  color: var(--muted);
}

.ways-of-working {
  margin-top: 48px;
}

.ways-of-working h3 {
  margin: 0 0 8px;
  font-size: 14px;
}

.ways-of-working > p,
.ways-note {
  margin: 0;
  color: var(--muted);
}

.ways-of-working ol {
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.ways-of-working li {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.ways-of-working li span {
  color: var(--signal-dark);
  font-family: var(--mono);
  font-size: 12px;
}

.ways-of-working strong {
  font-size: 15px;
}

.ways-of-working li p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.ways-note {
  margin-top: 16px;
  font-family: var(--mono);
  font-size: 12px;
}

.capabilities {
  margin-top: 48px;
  border-top: 1px solid var(--line);
}

.capabilities > div {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 24px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}

.capabilities h3,
.capabilities p {
  margin: 0;
}

.capabilities h3 {
  font-size: 14px;
}

.capabilities p {
  color: var(--muted);
  font-size: 14px;
}

.contact {
  padding: 100px max(24px, calc((100vw - 1180px) / 2));
  background: var(--signal);
  color: var(--white);
}

.contact .eyebrow {
  color: var(--white);
}

.contact-layout {
  display: grid;
  grid-template-columns: 1.4fr 0.6fr;
  gap: 80px;
  align-items: end;
}

.contact h2 {
  max-width: 850px;
}

.contact-links {
  display: flex;
  flex-direction: column;
}

.contact-links a {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.55);
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
}

.contact-links a:hover {
  background: rgba(255, 255, 255, 0.1);
}

.site-footer {
  min-height: 86px;
  padding: 0 max(24px, calc((100vw - 1180px) / 2));
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--ink);
  color: var(--white);
  font-size: 12px;
}

.site-footer a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 650ms ease, transform 650ms ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 960px) {
  .hero {
    padding-top: 140px;
  }

  .hero-heading {
    flex-direction: column;
    align-items: flex-start;
    gap: 28px;
  }

  .hero-heading .hero-actions {
    justify-content: flex-start;
  }

  .section-heading,
  .featured-project,
  .about,
  .contact-layout {
    grid-template-columns: 1fr;
  }

  .featured-project,
  .about {
    gap: 64px;
  }

  .featured-project + .featured-project {
    margin-top: 84px;
    padding-top: 84px;
  }

  .app-preview {
    height: 600px;
  }

  .app-preview.snake-preview {
    height: 680px;
  }

  .contact-layout {
    gap: 50px;
  }
}

@media (max-width: 720px) {
  :root {
    --content: calc(100vw - 32px);
  }

  .site-header {
    height: 72px;
    padding: 0 16px;
  }

  .menu-button {
    display: inline-flex;
  }

  .site-nav {
    position: fixed;
    top: 72px;
    left: 0;
    width: 100%;
    height: calc(100svh - 72px);
    padding: 40px 24px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--paper);
  }

  .site-nav.is-open {
    display: flex;
  }

  .site-nav a {
    padding: 18px 0;
    border-bottom: 1px solid var(--line);
    font-family: var(--display);
    font-size: 32px;
  }

  .nav-contact {
    border: 0;
  }

  .hero {
    min-height: auto;
    padding: 120px 16px 88px;
  }

  .hero h1 {
    font-size: clamp(58px, 17vw, 72px);
  }

  .hero-identity {
    gap: 12px;
  }

  .hero-avatar {
    width: 68px;
    height: 68px;
    margin-top: 2px;
  }

  .hero-intro {
    margin-top: 34px;
  }

  .section {
    padding: 84px 16px;
  }

  .section-heading {
    gap: 14px;
    margin-bottom: 48px;
  }

  .section-heading h2,
  .about h2,
  .contact h2 {
    font-size: clamp(48px, 15vw, 68px);
  }

  .project-number {
    margin-bottom: 30px;
  }

  .app-preview {
    height: 530px;
    box-shadow: 10px 10px 0 var(--signal);
  }

  .app-preview.snake-preview {
    height: 620px;
  }

  .featured-project + .featured-project {
    margin-top: 64px;
    padding-top: 64px;
  }

  .preview-bar p {
    max-width: 210px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .case-study {
    grid-template-columns: 34px 1fr;
    gap: 14px;
  }

  .metric {
    grid-column: 2;
    padding: 20px 0 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .capabilities > div {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .contact {
    padding: 80px 16px;
  }

  .site-footer {
    padding: 0 16px;
  }
}

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

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}