:root {
  --void: #f6f8fb;
  --ink: #121826;
  --raised: #ffffff;
  --paper: #ffffff;
  --cream: #eef1f6;
  --gold: #1e4a8c;
  --gold-deep: #16366c;
  --forest: #1e4a8c;
  --muted-ink: #5c6475;
  --muted-paper: #5c6475;
  --line-ink: #d5dbe6;
  --line-paper: #e2e6ee;
  --header-h: 5.25rem;
  --max: 72rem;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
}

body {
  margin: 0;
  background: var(--void);
  color: var(--ink);
  font-family: Sora, system-ui, sans-serif;
  font-size: 1.02rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 80;
  pointer-events: none;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

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

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3 {
  font-family: "Instrument Serif", Georgia, serif;
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 1.08;
  margin: 0 0 0.85rem;
}

h1 {
  font-size: clamp(3rem, 8vw, 6.15rem);
}

h2 {
  font-size: clamp(2rem, 4.4vw, 3.35rem);
}

h3 {
  font-family: Sora, system-ui, sans-serif;
  font-size: 1.05rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

p {
  margin: 0 0 1rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  background: var(--ink);
  color: var(--void);
  padding: 0.5rem 0.85rem;
}

.skip-link:focus {
  top: 1rem;
}

.eyebrow {
  margin-bottom: 0.7rem;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
}

.theme-paper .eyebrow {
  color: var(--forest);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.85rem;
  padding: 0.55rem 1.25rem;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.btn-sm {
  min-height: 2.35rem;
  padding: 0.35rem 0.95rem;
  font-size: 0.8rem;
}

.btn-primary {
  background: var(--gold);
  border-color: var(--gold);
  color: #fff;
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background: var(--gold-deep);
  border-color: var(--gold-deep);
}

.btn-ghost {
  border-color: var(--line-ink);
  color: var(--ink);
}

.btn-ghost:hover,
.btn-ghost:focus-visible {
  border-color: var(--gold);
  color: var(--gold);
}

.theme-ink {
  background: var(--void);
  color: var(--ink);
}

.theme-paper {
  background: var(--paper);
  color: var(--ink);
}

.theme-ink p,
.theme-paper p {
  color: var(--muted-ink);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(246, 248, 251, 0.42);
  box-shadow: 0 14px 36px rgba(16, 20, 28, 0.1);
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
}

.site-header.is-scrolled {
  background: rgba(246, 248, 251, 0.62);
}

.header-inner {
  max-width: var(--max);
  min-height: var(--header-h);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.wordmark {
  display: inline-flex;
  align-items: center;
}

.wordmark img {
  width: auto;
  height: 4.5rem;
  object-fit: contain;
}

.nav-toggle {
  display: none;
  width: 2.4rem;
  height: 2.4rem;
  margin-left: auto;
  border: 0;
  background: transparent;
  cursor: pointer;
  position: relative;
}

.nav-toggle span:not(.sr-only),
.nav-toggle span:not(.sr-only)::before,
.nav-toggle span:not(.sr-only)::after {
  position: absolute;
  left: 0.5rem;
  width: 1.35rem;
  height: 1.5px;
  background: var(--ink);
}

.nav-toggle span:not(.sr-only) {
  top: 50%;
}

.nav-toggle span:not(.sr-only)::before,
.nav-toggle span:not(.sr-only)::after {
  content: "";
  left: 0;
}

.nav-toggle span:not(.sr-only)::before {
  top: -6px;
}

.nav-toggle span:not(.sr-only)::after {
  top: 6px;
}

.nav-toggle[aria-expanded="true"] span:not(.sr-only) {
  background: transparent;
}

.nav-toggle[aria-expanded="true"] span:not(.sr-only)::before {
  top: 0;
  transform: rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:not(.sr-only)::after {
  top: 0;
  transform: rotate(-45deg);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.6rem;
  margin-left: auto;
}

.site-nav a {
  font-size: 0.88rem;
  color: var(--muted-paper);
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--ink);
}

.header-cta {
  flex: 0 0 auto;
}

.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: clamp(32rem, 72vh, 44rem);
  padding: 5.5rem 0;
  display: flex;
  align-items: center;
  background-color: #1c2a24;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-inner {
  position: relative;
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.hero-copy {
  container-type: inline-size;
  width: min(100%, 40rem);
  min-width: 0;
  padding: 1.35rem 1.4rem 1.2rem;
  border-radius: 0.65rem;
  background: rgba(246, 248, 251, 0.42);
  box-shadow: 0 14px 36px rgba(16, 20, 28, 0.14);
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
}

.hero-copy h1 {
  margin-bottom: 0.7rem;
}

.hero-copy .lede {
  margin-bottom: 0;
}

.hero h1 {
  /* Wider line is "Financial Applications" at 7.515em in Instrument Serif
     (about 6.89em after the heading's -0.03em letter-spacing).
     8.11cqi keeps that line near half the column, so the type reads smaller
     than a column-filling display size. */
  font-size: clamp(1.69rem, 8.11cqi, 3.15rem);
  white-space: nowrap;
}

.hero h1 em {
  font-style: italic;
  color: var(--gold);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1.25rem;
}

.section-head {
  max-width: 38rem;
  margin-bottom: 2.5rem;
}

.section-head p:last-child {
  margin-bottom: 0;
}

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 5rem 1.5rem;
}

.vertical-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line-paper);
}

.vertical-list li {
  display: grid;
  grid-template-columns: 4.5rem minmax(0, 1fr);
  gap: 1.25rem;
  padding: 1.7rem 0;
  border-bottom: 1px solid var(--line-paper);
}

.vertical-list span {
  font-family: "Instrument Serif", Georgia, serif;
  font-size: 1.6rem;
  color: var(--forest);
}

.vertical-list h3 {
  margin-bottom: 0.4rem;
}

.vertical-list p {
  margin: 0;
  max-width: 42rem;
}

.method-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.method-grid article {
  padding-top: 1.25rem;
  border-top: 1px solid var(--line-ink);
}

.method-grid span {
  display: block;
  margin-bottom: 1.1rem;
  font-family: "Instrument Serif", Georgia, serif;
  font-size: 2rem;
  color: var(--gold);
}

.method-grid p {
  color: var(--muted-paper);
  margin: 0;
}

.studio-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 3.5rem;
  align-items: center;
}

.studio-visual {
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.studio-visual img {
  width: auto;
  height: auto;
  max-height: min(34rem, 70vh);
}

.studio-copy > p:not(.eyebrow),
.contact-intro > p:not(.eyebrow),
.work-copy p {
  text-align: justify;
  hyphens: none;
}

.studio-stats {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  margin: 2rem 0 0;
  padding: 0;
  list-style: none;
}

.studio-stats li {
  margin: 0;
  font-family: "Instrument Serif", Georgia, serif;
  font-size: 1.35rem;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.work {
  border-top: 1px solid var(--line-paper);
  border-bottom: 1px solid var(--line-paper);
}

.work-lead {
  margin-bottom: 2rem;
}

.work-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem 3.5rem;
  align-items: start;
}

.work-item {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  min-width: 0;
}

@media (min-width: 961px) {
  .work-item {
    display: contents;
  }

  .work-item:nth-child(odd) .work-copy,
  .work-item:nth-child(odd) .client-gallery {
    grid-column: 1;
  }

  .work-item:nth-child(even) .work-copy,
  .work-item:nth-child(even) .client-gallery {
    grid-column: 2;
  }

  .work-item:nth-child(1) .work-copy,
  .work-item:nth-child(2) .work-copy {
    grid-row: 1;
  }

  .work-item:nth-child(1) .client-gallery,
  .work-item:nth-child(2) .client-gallery {
    grid-row: 2;
  }

  .work-item:nth-child(3) .work-copy,
  .work-item:nth-child(4) .work-copy {
    grid-row: 3;
    padding-top: 2.5rem;
  }

  .work-item:nth-child(3) .client-gallery,
  .work-item:nth-child(4) .client-gallery {
    grid-row: 4;
  }
}

.work-copy p:last-child {
  margin-bottom: 0;
}

.client-gallery.is-single .slider-controls {
  display: none;
}

.client-gallery .keen-slider {
  aspect-ratio: 1;
  width: 100%;
  background: var(--cream);
  border: 1px solid var(--line-paper);
}

.client-gallery .keen-slider,
.client-gallery .keen-slider__slide {
  min-width: 0;
}

.client-gallery .keen-slider__slide {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--cream);
}

.client-gallery .keen-slider__slide img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.slider-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 0.9rem;
}

.slider-arrow {
  width: 2.5rem;
  height: 2.5rem;
  flex: 0 0 auto;
  border: 1px solid var(--line-ink);
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
  position: relative;
}

.slider-arrow::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0.45rem;
  height: 0.45rem;
  border-top: 1.5px solid var(--ink);
  border-right: 1.5px solid var(--ink);
}

.slider-arrow[data-slider-prev]::before {
  transform: translate(-30%, -50%) rotate(-135deg);
}

.slider-arrow[data-slider-next]::before {
  transform: translate(-70%, -50%) rotate(45deg);
}

.slider-arrow:hover,
.slider-arrow:focus-visible {
  border-color: var(--gold);
}

.slider-arrow:focus-visible,
.slider-dots button:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.slider-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
}

.slider-dots button {
  width: 0.45rem;
  height: 0.45rem;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: var(--line-ink);
  cursor: pointer;
}

.slider-dots button[aria-current="true"] {
  background: var(--gold);
}

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 3.5rem;
  align-items: start;
}

.contact-intro > p:not(.eyebrow) {
  color: var(--muted-paper);
}

.contact-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.15rem 1.25rem;
  padding: 1.8rem;
  background: var(--raised);
  border: 1px solid var(--line-ink);
}

.contact-form label {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted-paper);
}

.contact-form .full,
.contact-form button,
.form-status {
  grid-column: 1 / -1;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  font: inherit;
  font-size: 1rem;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line-ink);
  border-radius: 0;
  padding: 0.55rem 0;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-bottom-color: var(--gold);
}

.contact-form button {
  justify-self: end;
  margin-top: 0.35rem;
}

.contact-form button:disabled {
  opacity: 0.6;
  cursor: wait;
}

.contact-form .form-status {
  margin: 0;
  color: var(--gold);
}

.contact-form .form-status.is-error {
  color: var(--ink);
}

.site-footer {
  background: var(--cream);
  border-top: 1px solid var(--line-ink);
  padding: 2.25rem 1.5rem 2rem;
}

.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  column-gap: 2.5rem;
  row-gap: 1.5rem;
}

.footer-inner p,
.footer-inner a {
  color: var(--muted-paper);
}

.footer-meta p {
  margin: 0;
}

.footer-mark {
  grid-column: 1 / -1;
  justify-self: center;
  margin: 0.15rem 0 0;
}

.footer-inner .wordmark img {
  height: 5.25rem;
  /* The file has empty margin around the mark. Pull the box in so the
     centered ink sits tight against the quote and the credit line. */
  margin-top: calc(5.25rem * -225 / 1000);
  margin-bottom: calc(5.25rem * -241 / 1000);
}

.footer-meta {
  grid-column: 2;
  grid-row: 1;
  text-align: right;
  padding-bottom: 0.05rem;
}

.footer-meta address {
  margin: 0.55rem 0 0;
  font-style: normal;
  font-size: 0.82rem;
  line-height: 1.5;
  color: var(--muted-paper);
}

.footer-meta .fine {
  margin-top: 0.7rem;
}

.footer-inner a:hover,
.footer-inner a:focus-visible {
  color: var(--ink);
}

.fine {
  font-size: 0.82rem;
}

.footer-quote {
  grid-column: 1;
  grid-row: 1;
  margin: 0;
  max-width: 36rem;
}

.footer-quote p {
  margin: 0;
  color: var(--ink);
}

.footer-quote > p:not(.built-note) {
  width: max-content;
  max-width: 100%;
  text-align: justify;
  text-align-last: justify;
  hyphens: none;
}

.footer-quote cite {
  display: block;
  margin-top: 0.55rem;
  font-size: 0.82rem;
  font-style: normal;
  letter-spacing: 0.02em;
  color: var(--muted-paper);
}

.footer-quote cite::before {
  content: "— ";
}

.footer-quote .built-note {
  margin-top: 0.9rem;
  font-size: 0.75rem;
  line-height: 1.5;
  color: var(--muted-paper);
}

.image-credit {
  grid-column: 1 / -1;
  margin: 0;
  padding-top: 1.15rem;
  border-top: 1px solid var(--line-ink);
  font-size: 0.75rem;
  line-height: 1.55;
}

.image-credit a {
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

@media (max-width: 960px) {
  .studio-grid,
  .work-grid,
  .contact-grid,
  .method-grid,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .footer-quote,
  .footer-meta {
    grid-column: 1;
    grid-row: auto;
  }

  .footer-meta {
    text-align: left;
  }

  .work-grid {
    row-gap: 3.5rem;
  }

  .hero {
    min-height: 0;
    padding-top: 3.5rem;
    padding-bottom: 2.75rem;
  }

}

@media (max-width: 720px) {
  .nav-toggle {
    display: block;
  }

  .site-nav {
    display: none;
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    margin: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 0.4rem 1.5rem 1rem;
    background: var(--void);
    border-bottom: 1px solid var(--line-ink);
  }

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

  .site-nav a {
    width: 100%;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--line-ink);
  }

  .header-cta {
    display: none;
  }

  .wrap {
    padding: 3.25rem 1.25rem;
  }

  .vertical-list li,
  .contact-form {
    grid-template-columns: 1fr;
  }

  .studio-stats {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.85rem;
  }

  .vertical-list span {
    margin-bottom: -0.6rem;
  }

}

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

  .btn {
    transition: none;
  }
}
