* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
}

a {
  color: inherit;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 4px;
}

.container {
  width: min(100% - 3rem, 1160px);
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid currentColor;
  background: Canvas;
  transition: transform 250ms ease;
}

.site-header.is-hidden {
  transform: translateY(calc(-100% - 1px));
}

.site-header:focus-within {
  transform: none;
}

.header-inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 2.5rem;
  min-height: 5.5rem;
}

.brand {
  font-size: 1.5rem;
  font-weight: 750;
  letter-spacing: -0.06em;
  text-decoration: none;
  white-space: nowrap;
}

.main-nav {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem 2rem;
}

.main-nav a,
.header-login {
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
}

.main-nav a:hover,
.footer-inner a:hover {
  text-decoration: underline;
  text-underline-offset: 0.25em;
}

.header-login {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding-inline: 1.2rem;
  border: 1px solid currentColor;
  border-radius: 999px;
  white-space: nowrap;
}

.hero {
  display: grid;
  align-items: start;
  min-height: calc(100svh - 5.5rem);
  padding-block: clamp(2.5rem, 5vw, 4rem) 5rem;
}

.hero-copy {
  max-width: 100%;
}

.eyebrow {
  margin: 0 0 1.3rem;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

h1,
h2,
p,
dl,
ol {
  margin-top: 0;
}

h1,
h2 {
  line-height: 1.08;
  letter-spacing: -0.055em;
  text-wrap: balance;
}

h1 {
  margin-bottom: 2rem;
  font-size: clamp(2.75rem, 5vw, 5rem);
  font-weight: 750;
  text-wrap: nowrap;
  white-space: nowrap;
}

h2 {
  margin-bottom: 1.5rem;
  font-size: clamp(2.2rem, 4vw, 3.5rem);
  font-weight: 700;
}

.lead {
  max-width: 43rem;
  margin-bottom: 2.3rem;
  font-size: clamp(1.08rem, 1.8vw, 1.3rem);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.8rem 1.2rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.4rem;
  padding: 0.85rem 1.4rem;
  border: 2px solid transparent;
  border-radius: 999px;
  font-weight: 650;
  text-align: center;
  text-decoration: none;
}

.button-primary {
  border-color: currentColor;
}

.button-secondary {
  background: color-mix(in srgb, currentColor 10%, transparent);
}

.section {
  padding-block: clamp(4.5rem, 7vw, 7.5rem);
  border-top: 1px solid currentColor;
  scroll-margin-top: 7rem;
}

.project-section {
  display: grid;
  align-items: center;
  min-height: 80svh;
}

.project-panel {
  width: min(100%, 44rem);
  padding: clamp(2rem, 4vw, 3.5rem);
  border: 1px solid currentColor;
  border-radius: 1.5rem;
}

.project-panel h2 {
  max-width: 13ch;
}

.participants {
  margin-bottom: 0;
}

.participants div {
  padding-block: 1.2rem;
  border-top: 1px solid currentColor;
}

.participants dt {
  margin-bottom: 0.4rem;
  font-weight: 700;
}

.participants dd {
  margin-left: 0;
}

#about {
  overflow: hidden;
}

.about-grid {
  position: relative;
  display: flex;
  align-items: center;
  min-height: clamp(26rem, 40vw, 34rem);
}

.about-copy {
  position: relative;
  z-index: 1;
  max-width: 37rem;
}

.about-copy > p:last-child {
  margin-bottom: 0;
  font-size: clamp(1.1rem, 1.7vw, 1.3rem);
}

.about-image-slot {
  position: absolute;
  inset-block: 0;
  right: -2rem;
  display: grid;
  place-items: center;
  width: 54.5%;
  padding: 2rem;
  border: 1px dashed currentColor;
  border-radius: 1.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  text-align: center;
  opacity: 0.65;
  pointer-events: none;
}

.section-heading-wide {
  margin-bottom: 3rem;
}

.work-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  padding: 0;
  list-style: none;
}

.work-list li {
  min-width: 0;
}

.work-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 100%;
  min-height: 12rem;
  padding: 1.5rem;
  border: 1px solid currentColor;
  border-radius: 1rem;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: inherit;
  text-align: left;
  transition: transform 300ms ease, box-shadow 300ms ease;
}

.work-card[aria-expanded="true"] {
  z-index: 1;
  transform: scale(1.035);
  box-shadow: 0 1.2rem 2.5rem rgba(0, 0, 0, 0.12);
}

.work-number {
  margin-bottom: 2.5rem;
  font-size: 0.9rem;
  font-weight: 700;
}

.work-title {
  font-size: clamp(1.5rem, 2.1vw, 2.1rem);
  font-weight: 700;
  letter-spacing: -0.04em;
}

.work-detail {
  display: block;
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  visibility: hidden;
  transition: max-height 350ms ease, opacity 250ms ease, margin 350ms ease, visibility 350ms;
}

.work-card[aria-expanded="true"] .work-detail {
  max-height: 12rem;
  margin-top: 1rem;
  opacity: 1;
  visibility: visible;
  transition: max-height 350ms ease, opacity 250ms ease, margin 350ms ease, visibility 0s;
}

@media (hover: hover) and (pointer: fine) {
  .work-card:hover {
    z-index: 1;
    transform: scale(1.035);
    box-shadow: 0 1.2rem 2.5rem rgba(0, 0, 0, 0.12);
  }

  .work-card:hover .work-detail {
    max-height: 12rem;
    margin-top: 1rem;
    opacity: 1;
    visibility: visible;
    transition: max-height 350ms ease, opacity 250ms ease, margin 350ms ease, visibility 0s;
  }
}

.crm-panel {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(2rem, 7vw, 7rem);
  padding: clamp(2rem, 5vw, 4rem);
  border: 1px solid currentColor;
  border-radius: 1.5rem;
}

.crm-panel p {
  max-width: 41rem;
  margin-bottom: 0;
  font-size: clamp(1.1rem, 1.7vw, 1.3rem);
}

.start-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 2.5rem;
}

.start-panel p {
  max-width: 42rem;
}

.start-panel p:last-child {
  margin-bottom: 0;
}

.start-panel .actions {
  justify-content: flex-end;
}

.site-footer {
  padding-bottom: 0.5rem;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  width: min(100% - 3rem, 960px);
  min-height: 4.5rem;
  border-top: 1px solid currentColor;
}

.footer-inner p {
  margin-bottom: 0;
}

.reveal-pending {
  opacity: 0;
  transition: opacity 750ms ease, transform 750ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

.reveal-pending[data-reveal="left"] {
  transform: translateX(-4rem);
}

.reveal-pending[data-reveal="top"] {
  transform: translateY(-3rem);
}

.reveal-pending[data-reveal="right"] {
  transform: translateX(6rem);
}

.reveal-pending.is-visible {
  transform: none;
  opacity: 1;
}

.about-image-slot.is-visible {
  opacity: 0.65;
}

@media (max-width: 1050px) {
  .work-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .header-inner {
    grid-template-columns: 1fr auto;
    gap: 0.8rem 1.5rem;
    padding-block: 1rem;
  }

  .main-nav {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-content: flex-start;
  }

  .hero {
    min-height: 100svh;
  }

  .crm-panel,
  .start-panel {
    grid-template-columns: 1fr;
  }

  .about-copy {
    max-width: 55%;
  }

  .about-image-slot,
  .about-image-slot.is-visible {
    right: -3rem;
    width: 50%;
    opacity: 0.35;
  }

  .start-panel .actions {
    justify-content: flex-start;
  }
}

@media (max-width: 760px) {
  h1 {
    white-space: normal;
    text-wrap: balance;
  }
}

@media (max-width: 600px) {
  .container {
    width: min(100% - 2rem, 1160px);
  }

  .main-nav {
    gap: 0.4rem 1rem;
  }

  .main-nav a {
    font-size: 0.9rem;
  }

  h1 {
    font-size: clamp(2.7rem, 12vw, 4rem);
  }

  .actions {
    align-items: stretch;
    flex-direction: column;
  }

  .button {
    width: 100%;
  }

  .work-list {
    grid-template-columns: 1fr;
  }

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

  .work-number {
    margin-bottom: 1.5rem;
  }

  .about-grid {
    min-height: 24rem;
  }

  .about-copy {
    max-width: 100%;
  }

  .about-image-slot,
  .about-image-slot.is-visible {
    inset-block: auto -2rem;
    right: -2rem;
    width: 68%;
    height: 7rem;
    padding: 1rem;
    font-size: 0.75rem;
    opacity: 0.25;
  }

  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    gap: 0.35rem;
    width: min(100% - 2rem, 960px);
    min-height: 0;
    padding-block: 1rem;
  }
}

.about-image-slot.reveal-pending:not(.is-visible) {
  opacity: 0;
}

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

  .site-header,
  .work-card,
  .work-detail,
  .reveal-pending {
    transition: none;
  }
}
