@font-face {
  font-family: "FirstSecond Icons";
  src: url("../icomoon/fonts/icomoon.woff") format("woff");
  font-display: block;
}

:root {
  color-scheme: light;
  --page: #f4f8f5;
  --ink: #12201b;
  --muted: #3f534a;
  --accent: #196649;
  --rule: #a7bfb1;
  --strong-rule: #789686;
  --button: #174b36;
  --button-ink: #fff;
  --button-hover: #226046;
  --mark: url("../images/firstsecond-mark-light.png");
  --booking-filter: none;
  --sans: -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --page: #101817;
  --ink: #f3f5ef;
  --muted: #c2d0c9;
  --accent: #a8f3ca;
  --rule: #718980;
  --strong-rule: #a4b5ad;
  --button: #a8f3ca;
  --button-ink: #101817;
  --button-hover: #c9fbe0;
  --mark: url("../images/firstsecond-mark-dark.png");
  --booking-filter: invert(1) hue-rotate(180deg) contrast(0.86);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    color-scheme: dark;
    --page: #101817;
    --ink: #f3f5ef;
    --muted: #c2d0c9;
    --accent: #a8f3ca;
    --rule: #718980;
    --strong-rule: #a4b5ad;
    --button: #a8f3ca;
    --button-ink: #101817;
    --button-hover: #c9fbe0;
    --mark: url("../images/firstsecond-mark-dark.png");
    --booking-filter: invert(1) hue-rotate(180deg) contrast(0.86);
  }
}

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

html {
  background: var(--page);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 100%;
}

body, h1, h2, h3, p {
  margin: 0;
}

body {
  line-height: 1.5;
}

a {
  color: inherit;
}

a:hover {
  color: var(--accent);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 5px;
}

[hidden] {
  display: none !important;
}

.visually-hidden, .skip-link:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  white-space: nowrap;
  clip-path: inset(50%);
}

.skip-link:focus {
  position: fixed;
  z-index: 1;
  inset: 1rem auto auto 1rem;
  padding: 0.7rem 1rem;
  background: var(--button);
  color: var(--button-ink);
  border-radius: 0.4rem;
}

.shell {
  width: min(100% - 2 * clamp(1.125rem, 4vw, 4rem), 88rem);
  margin-inline: auto;
}

.masthead {
  min-height: 5.625rem;
  display: flex;
  align-items: center;
  gap: clamp(1.25rem, 2.6vw, 2.5rem);
  padding-block: 0.75rem;
  border-bottom: 1px solid var(--strong-rule);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.48rem;
  margin-inline-end: auto;
  font-size: clamp(1.25rem, 2.35vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.052em;
  text-decoration: none;
  line-height: 1;
  white-space: nowrap;
}

.brand-mark {
  flex: none;
  width: 1.25em;
  aspect-ratio: 33 / 23;
  translate: 0 -1px;
  background: var(--mark) center / contain no-repeat;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.5vw, 2.5rem);
}

.nav-links a {
  font-size: 1.075rem;
  font-weight: 500;
  text-decoration: none;
}

.nav-links a:hover {
  text-decoration: underline;
  text-underline-offset: 0.3em;
}

.icon {
  font-family: "FirstSecond Icons";
  font-weight: normal;
  line-height: 1;
}

.icon-arrow::before {
  content: "\e095";
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.125rem;
  padding: 0.5rem 1.65rem;
  border-radius: 999px;
  background: var(--button);
  color: var(--button-ink);
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1.15;
  text-decoration: none;
}

.button:is(:hover, :focus-visible) {
  background: var(--button-hover);
  color: var(--button-ink);
}

.header-contact {
  min-height: 2.375rem;
  padding-inline: 1.1rem;
  font-size: 1rem;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 58%) minmax(0, 42%);
  align-items: center;
  padding-block: clamp(2.65rem, 4vw, 4.2rem) clamp(2rem, 2.65vw, 3rem);
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: clamp(1.4rem, 2.5vw, 2.35rem);
  font: 400 clamp(0.72rem, 1.42vw, 1.28rem)/1.5 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "/";
  color: var(--accent);
  font-weight: 500;
}

h1 {
  font-size: clamp(2.75rem, 5.44vw, 5.25rem);
  font-weight: 700;
  letter-spacing: -0.052em;
  line-height: 1.02;
}

h1 em {
  color: var(--accent);
  font-style: normal;
}

.hero-intro {
  max-width: 41rem;
  margin-top: clamp(1.2rem, 1.85vw, 1.65rem);
  color: var(--muted);
  font-size: clamp(1.1rem, 1.83vw, 1.62rem);
  line-height: 1.3;
  text-wrap: pretty;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: min(2.4vw, 2rem);
  margin-top: clamp(1.6rem, 2.8vw, 2.6rem);
}

.text-link {
  display: inline-block;
  font-weight: 500;
  text-underline-offset: 0.3em;
  text-decoration-thickness: 1px;
}

.hero-actions .text-link {
  border-inline-start: 1px solid var(--strong-rule);
  padding: 0.3rem 0 0.3rem min(2.4vw, 2rem);
  font-size: 1.36rem;
}

.byline {
  margin-top: clamp(1.45rem, 2.25vw, 2.1rem);
  font-size: clamp(1.05rem, 1.6vw, 1.4rem);
  font-weight: 600;
  line-height: 1.36;
}

.byline a {
  text-decoration: none;
}

.byline a:hover {
  text-decoration: underline;
  text-underline-offset: 0.3em;
}

.byline span {
  display: block;
  margin-top: 0.15rem;
  color: var(--muted);
  font: 400 clamp(0.73rem, 1.35vw, 1.15rem)/1.45 var(--mono);
}

.hero-art {
  display: block;
  align-self: center;
  width: min(100%, 36rem);
  height: auto;
  margin-inline: auto;
}

.traverse-leader {
  color: var(--accent);
  fill: currentColor;
}

.traverse-leader path {
  fill: none;
  stroke: currentColor;
  stroke-width: 2.6;
  stroke-linejoin: round;
}

.traverse-current {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.traverse-current use {
  --streak: 62px;
  stroke-dasharray: var(--streak) 1400px;
}

.traverse-current .current-edge {
  stroke: #205740;
  stroke-width: 16;
}

.traverse-current .current-trail {
  stroke: #56ffad;
  stroke-width: 11;
}

.traverse-current .current-tip {
  --streak: 21px;
  stroke: #ffffef;
  stroke-width: 10.5;
  filter: drop-shadow(0 0 5px #81ffc4);
}

.traverse-input-current {
  --travel: 294px;
  --duration: 263ms;
  --start: 1774ms;
}

.traverse-logic-current {
  --travel: 674px;
  --duration: 600ms;
  --start: 2017ms;
}

.traverse-output-current {
  --travel: 297px;
  --duration: 265ms;
  --start: 2587ms;
}

.traverse-contact {
  fill: url(#signal-contact);
}

.contact-input { --start: 1730ms; }
.contact-logic { --start: 1964ms; }
.contact-output { --start: 2524ms; }
.contact-data { --start: 2785ms; }

.traverse-current use, .traverse-contact, .traverse-sweep {
  opacity: 0;
}

@media (prefers-reduced-motion: no-preference) {
  .hero-art[data-motion="waiting"] .traverse-tier {
    opacity: 0;
  }

  .hero-art[data-motion="playing"] .traverse-tier {
    animation: assemble-plane 720ms ease-in-out both;
  }

  .traverse-base {
    --entry-y: 12px;
  }

  .hero-art[data-motion="playing"] .traverse-middle {
    --entry-y: -25px;
    animation-delay: 460ms;
  }

  .hero-art[data-motion="playing"] .traverse-top {
    --entry-y: -32px;
    animation-delay: 1040ms;
  }

  .hero-art[data-motion="playing"] .traverse-current use {
    animation: traverse-circuit var(--duration) var(--start) linear both;
  }

  .hero-art[data-motion="playing"] .traverse-contact {
    animation: light-contact 137ms var(--start) ease-in-out both;
  }

  .hero-art[data-motion="playing"] .traverse-sweep {
    animation: read-data 540ms 2829ms ease-out both;
  }

  .hero-art[data-motion="playing"] .traverse-records > :nth-child(2) .traverse-sweep {
    animation-delay: 2929ms;
  }

  .hero-art[data-motion="playing"] .traverse-records > :nth-child(3) .traverse-sweep {
    animation-delay: 3029ms;
  }
}

@keyframes assemble-plane {
  from { opacity: 0; transform: translateY(var(--entry-y)); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes traverse-circuit {
  0% { opacity: 0; stroke-dashoffset: var(--streak); }
  5%, 90% { opacity: 1; }
  100% { opacity: 0; stroke-dashoffset: calc(var(--streak) - var(--travel)); }
}

@keyframes light-contact {
  0%, 100% { opacity: 0; }
  40% { opacity: 1; }
}

@keyframes read-data {
  0% { opacity: 0; transform: translateX(0); }
  15%, 85% { opacity: 1; }
  100% { opacity: 0; transform: translateX(575px); }
}

.section {
  position: relative;
  padding-block: clamp(2.6rem, 4vw, 4rem);
  border-top: 1px solid var(--strong-rule);
}

.section-split {
  display: grid;
  grid-template-columns: minmax(0, 27%) minmax(0, 1fr);
  gap: clamp(1.75rem, 2.5vw, 2.75rem);
}

.anchor-offset {
  position: absolute;
  top: 0;
  left: 0;
}

h2 {
  font-size: clamp(2.25rem, 4.15vw, 3.75rem);
  letter-spacing: -0.045em;
  line-height: 1.02;
  text-wrap: balance;
}

h3 {
  font-size: clamp(1.22rem, 1.8vw, 1.55rem);
  line-height: 1.2;
  font-weight: 600;
}

.service-list {
  border-top: 1px solid var(--rule);
}

.service-list details {
  border-bottom: 1px solid var(--rule);
}

.service-list summary {
  display: grid;
  grid-template-columns: minmax(2.4rem, 0.1fr) minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(0.8rem, 1.1vw, 1.3rem);
  padding: clamp(0.9rem, 1.25vw, 1.2rem) 0.4rem clamp(0.95rem, 1.45vw, 1.4rem) 0;
  cursor: pointer;
  list-style: none;
}

.service-list summary::-webkit-details-marker {
  display: none;
}

.service-number {
  align-self: start;
  padding-top: 0.15rem;
  color: var(--accent);
  font: 500 clamp(0.95rem, 1.8vw, 1.6rem)/1.25 var(--mono);
}

.service-title {
  display: block;
  font-size: clamp(1.35rem, 2.35vw, 2.1rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.016em;
}

summary:hover .service-title {
  color: var(--accent);
}

.service-description {
  display: block;
  margin-top: 0.3rem;
  color: var(--muted);
  font-size: clamp(0.97rem, 1.55vw, 1.34rem);
  line-height: 1.3;
}

.service-list .icon-arrow {
  color: var(--accent);
  font-size: clamp(1.2rem, 2.4vw, 2rem);
}

.service-list details[open] .icon-arrow {
  transform: rotate(90deg);
}

.service-list details > p {
  max-width: 43rem;
  padding-bottom: 1.25rem;
  margin-inline-start: max(2.4rem, 8.9%);
  color: var(--muted);
  font-size: 1.06rem;
}

.approach-grid, .pricing-grid, .about-content {
  display: grid;
  gap: clamp(1.3rem, 3vw, 3rem);
}

.work-heading {
  align-self: start;
}

.work-controls, .project-links {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.work-controls {
  margin-top: 1.25rem;
}

.round-control {
  display: inline-grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 1px solid var(--rule);
  border-radius: 50%;
  background: var(--page);
  color: var(--ink);
  font-size: 1.15rem;
  cursor: pointer;
}

.round-control:enabled:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.round-control:disabled {
  opacity: 0.35;
  cursor: default;
}

.icon-back::before { content: "\e094"; }
.icon-close::before { content: "\e117"; }

.work-position {
  margin-inline-start: 0.4rem;
  color: var(--muted);
  font: 400 0.86rem/1 var(--mono);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.work-track {
  --card-gap: clamp(0.8rem, 1.6vw, 1.5rem);
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: calc((100% - var(--card-gap)) / 2);
  gap: var(--card-gap);
  min-width: 0;
  margin: 0;
  padding: 0 0 2px;
  list-style: none;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.work-track::-webkit-scrollbar {
  display: none;
}

.work-track li {
  min-width: 0;
  scroll-snap-align: start;
}

.work-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  width: 100%;
  height: 100%;
  min-height: 11.75rem;
  padding: clamp(1.1rem, 1.9vw, 1.8rem);
  border: 1px solid var(--rule);
  border-radius: 0.5rem;
  background: color-mix(in srgb, var(--accent) 4%, var(--page));
  color: var(--ink);
  font: inherit;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.work-card:hover, .work-card:focus-visible {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 8%, var(--page));
  color: var(--ink);
}

.work-card:focus-visible {
  outline-offset: -4px;
}

.work-card strong {
  padding-right: 1.9rem;
  font-size: clamp(1.45rem, 2.35vw, 2rem);
  line-height: 1.1;
  letter-spacing: -0.035em;
}

.work-card span, .project-copy p {
  color: var(--muted);
  line-height: 1.45;
  text-wrap: pretty;
}

.work-card span {
  font-size: clamp(1rem, 1.3vw, 1.18rem);
}

.work-card::after {
  content: "\e114" / "";
  position: absolute;
  top: clamp(1.1rem, 1.9vw, 1.8rem);
  right: clamp(1.1rem, 1.9vw, 1.8rem);
  color: var(--accent);
  font: 1.32rem/1.45 "FirstSecond Icons";
}

a.work-portfolio::after {
  content: "\f08e" / "";
}

#project-dialog {
  width: fit-content;
  max-width: calc(100% - 1rem);
  max-height: none;
  padding: 0;
  border: 0;
  overflow: visible;
  background: transparent;
  color: var(--ink);
}

#project-dialog[open] {
  display: grid;
  grid-template-columns: auto minmax(0, 42rem) auto;
  align-items: center;
  gap: clamp(0.3rem, 1.5vw, 1rem);
}

#project-dialog::backdrop {
  background: rgb(5 13 10 / 70%);
}

html:has(#project-dialog[open]) {
  overflow: hidden;
}

.project-panel {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
  grid-template-areas: "visual copy";
  max-height: calc(100dvh - 2rem);
  overflow: auto;
  overscroll-behavior: contain;
  border: 1px solid var(--rule);
  border-radius: 0.8rem;
  background: var(--page);
}

.project-panel:has(.project-visual:empty) {
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "copy";
}

.project-close {
  position: absolute;
  top: 0.8rem;
  right: 0.8rem;
  z-index: 1;
}

.project-copy {
  grid-area: copy;
  align-self: center;
  padding: 3.9rem clamp(1.25rem, 3vw, 2rem) 2rem;
}

.project-copy h2 {
  font-size: clamp(2rem, 4vw, 3rem);
}

.project-copy p {
  margin-top: 1rem;
}

.project-copy .project-summary {
  color: var(--ink);
  font-size: 1.1rem;
}

.project-links {
  flex-wrap: wrap;
  gap: 0.6rem 1.15rem;
  margin-top: 1.4rem;
}

.project-links a {
  color: var(--accent);
  font-weight: 550;
  text-underline-offset: 0.25em;
}

.project-visual {
  grid-area: visual;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  background: color-mix(in srgb, var(--accent) 8%, var(--page));
}

.project-visual:empty {
  display: none;
}

.project-visual img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 25rem;
  border-radius: 0.35rem;
}

.project-visual .project-icon {
  width: 8rem;
  border-radius: 22%;
}

.project-gallery {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem 0.15rem;
  width: 100%;
  max-width: 15rem;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.project-gallery img {
  display: none;
  grid-area: 1 / 1 / 2 / -1;
  justify-self: center;
}

.project-gallery label {
  display: grid;
  grid-row: 2;
  min-height: 2.5rem;
  place-items: center;
  border-radius: 100vmax;
  color: var(--muted);
  font-size: 0.875rem;
  cursor: pointer;
}

.project-gallery input:checked + label {
  background: var(--button);
  color: var(--button-ink);
  font-weight: 600;
}

.project-gallery input:checked + label + img {
  display: block;
}

.project-gallery input:focus-visible + label {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.approach-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.pricing-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.about-content {
  grid-template-columns: minmax(5.5rem, 10rem) minmax(0, 1fr);
  align-items: start;
}

.portrait {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 0.35rem;
  filter: grayscale(1);
}

.approach-grid p, .pricing-grid p, .about-content p, .contact p {
  max-width: 38rem;
  color: var(--muted);
  font-size: clamp(1rem, 1.35vw, 1.18rem);
}

.approach-grid h3, .pricing-grid h3 {
  margin-bottom: 0.55rem;
}

.about-content :is(p, .text-link) + :is(p, .text-link),
.pricing-grid .text-link,
.contact .button {
  margin-top: 1rem;
}

.calendly-overlay iframe {
  /* Calendly serves a light booking page for this event. */
  color-scheme: light;
  filter: var(--booking-filter);
}

.pricing-grid table {
  width: 100%;
  margin-top: 1rem;
  border-collapse: collapse;
  text-align: left;
}

.pricing-grid :is(td, th) {
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--rule);
}

.pricing-grid :is(td, th):last-child {
  padding-inline-start: 0.6rem;
  text-align: right;
  white-space: nowrap;
}

.footer, .footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
}

.footer {
  align-items: center;
  justify-content: space-between;
  padding-block: 1.5rem 2rem;
  border-top: 1px solid var(--strong-rule);
  color: var(--muted);
  font-size: 0.94rem;
}

.footer a {
  text-underline-offset: 0.25em;
}

.theme-picker {
  display: inline-flex;
  gap: 0.15rem;
  margin: 0 0 0 auto;
  padding: 0.125rem 0.2rem;
  border: 1px solid var(--strong-rule);
  border-radius: 100vmax;
  font-size: 0.8rem;
}

.theme-picker label span {
  display: grid;
  min-height: 1.75rem;
  min-width: 2.65rem;
  place-items: center;
  padding-inline: 0.6rem;
  border-radius: 100vmax;
  color: var(--muted);
  cursor: pointer;
}

.theme-picker label:hover span {
  color: var(--accent);
}

.theme-picker input:checked + span {
  background: var(--button);
  color: var(--button-ink);
  font-weight: 600;
}

.theme-picker input:focus-visible + span {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

@media (max-width: 66rem) {
  .hero-actions .button, .hero-actions .text-link {
    font-size: 1.15rem;
  }
}

@media (max-width: 49rem) {
  .masthead {
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.3rem 1rem;
  }

  .nav-links {
    width: 100%;
    order: 1;
    gap: clamp(0.9rem, 4vw, 1.65rem);
  }

  .nav-links a {
    display: flex;
    align-items: center;
    min-height: 2.75rem;
    font-size: 0.94rem;
  }

  .hero {
    grid-template-columns: 1fr;
  }

  .hero-art {
    width: min(100%, 29rem);
    margin: 1.15rem auto 0;
  }

  .hero-intro {
    max-width: 35rem;
  }

  h1 {
    font-size: clamp(2.15rem, 7.6vw, 4.4rem);
  }

  .hero-actions {
    gap: 0.5rem 1.1rem;
  }

  .hero-actions .text-link {
    border: 0;
    padding: 0.6rem 0;
  }

  .section-split {
    grid-template-columns: 1fr;
  }

  #work {
    row-gap: 1.15rem;
  }

  .work-heading {
    display: contents;
  }

  .work-controls {
    grid-row: 3;
    justify-self: end;
    margin: 0;
  }

  .section h2 {
    text-wrap: initial;
  }

  .desktop-break {
    display: none;
  }
}

@media (max-width: 35rem) {
  .work-track {
    grid-auto-columns: 100%;
  }

  .work-card {
    min-height: 10rem;
  }

  .project-panel {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "copy" "visual";
  }

  .project-copy {
    padding: 3.6rem 1rem 1.25rem;
  }

  .project-visual {
    padding: 1rem;
  }

  .project-visual img {
    max-height: 16rem;
  }

  .theme-picker {
    margin-inline-start: 0;
  }

  .approach-grid, .pricing-grid {
    grid-template-columns: 1fr;
  }

  .about-content {
    grid-template-columns: 1fr;
  }

  .portrait {
    max-width: 7.5rem;
  }

  .service-list details > p {
    margin-inline-start: 3.2rem;
  }
}

@media (max-width: 24rem) {
  .hero-actions .button, .contact .button {
    font-size: 1.08rem;
  }
}
