:root {
  --background: #fafaf8;
  --surface: #ffffff;
  --ink: #11110f;
  --muted: #706e68;
  --faint: #9a9891;
  --line: rgba(17, 17, 15, 0.11);
  --line-strong: rgba(17, 17, 15, 0.18);
  --page-width: 1240px;
  --side-padding: clamp(1.35rem, 4vw, 3.75rem);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
  background: var(--background);
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--background);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection {
  background: #deddd7;
  color: var(--ink);
}

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

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 100;
  padding: 0.6rem 0.85rem;
  border-radius: 999px;
  background: var(--ink);
  color: white;
  font-size: 0.82rem;
  transform: translateY(-160%);
  transition: transform 180ms ease;
}

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

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 20;
  border-bottom: 1px solid transparent;
  transition: background-color 300ms ease, border-color 300ms ease, backdrop-filter 300ms ease;
}

.site-header.is-scrolled {
  border-color: var(--line);
  background: rgba(250, 250, 248, 0.84);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
}

.nav-shell,
.hero-inner,
.work,
.site-footer,
.divider {
  width: min(calc(100% - (var(--side-padding) * 2)), var(--page-width));
  margin-inline: auto;
}

.nav-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}

.wordmark {
  font-size: 0.95rem;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.nav-links {
  display: flex;
  gap: clamp(1.4rem, 3vw, 2.5rem);
}

.nav-links a,
.text-link {
  position: relative;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 520;
  transition: color 220ms ease;
}

.nav-links a::after,
.text-link::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -0.3rem;
  left: 0;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 320ms var(--ease);
}

.nav-links a:hover,
.text-link:hover {
  color: var(--ink);
}

.nav-links a:hover::after,
.text-link:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

.hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: max(740px, 96svh);
  padding: 9rem 0 7rem;
}

.hero-inner {
  margin-top: 2rem;
}

.eyebrow {
  margin: 0 0 2.25rem;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

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

h1 {
  max-width: 1040px;
  margin-bottom: 2rem;
  font-size: clamp(3.35rem, 7.3vw, 7.2rem);
  font-weight: 570;
  letter-spacing: -0.066em;
  line-height: 0.97;
  text-wrap: balance;
}

.hero-copy {
  max-width: 670px;
  margin-bottom: 2.5rem;
  color: var(--muted);
  font-size: clamp(1.05rem, 1.4vw, 1.3rem);
  letter-spacing: -0.02em;
  line-height: 1.55;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

.button {
  display: inline-flex;
  align-items: center;
  gap: 1.75rem;
  padding: 0.92rem 1.05rem 0.92rem 1.25rem;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: var(--ink);
  color: white;
  font-size: 0.88rem;
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
  transition: transform 300ms var(--ease), box-shadow 300ms ease, background-color 300ms ease;
}

.button .arrow {
  display: inline-block;
  font-size: 1rem;
  transition: transform 300ms var(--ease);
}

.button:hover {
  transform: translateY(-2px);
  background: #292925;
  box-shadow: 0 10px 28px rgba(17, 17, 15, 0.14);
}

.button:hover .arrow {
  transform: translate(2px, -2px);
}

.text-link span {
  display: inline-block;
  margin-left: 0.15rem;
  transition: transform 300ms var(--ease);
}

.text-link:hover span {
  transform: translate(2px, -2px);
}

.scroll-cue {
  position: absolute;
  right: var(--side-padding);
  bottom: 2.5rem;
  width: 1px;
  height: 48px;
  overflow: hidden;
  background: var(--line);
}

.scroll-cue span {
  display: block;
  width: 100%;
  height: 45%;
  background: var(--ink);
  animation: scroll-cue 2.4s var(--ease) infinite;
}

@keyframes scroll-cue {
  0% { transform: translateY(-120%); }
  55%, 100% { transform: translateY(230%); }
}

.divider {
  height: 1px;
  background: var(--line);
}

.work {
  padding-block: clamp(6rem, 11vw, 10rem);
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) 3fr;
  align-items: end;
  margin-bottom: clamp(3.5rem, 7vw, 6rem);
}

.section-number {
  margin-bottom: 0.55rem;
  color: var(--faint);
  font-size: 0.72rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.12em;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(2.25rem, 4.2vw, 4.25rem);
  font-weight: 560;
  letter-spacing: -0.055em;
  line-height: 1;
}

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

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 390px;
  overflow: hidden;
  padding: 1.6rem;
  border: 1px solid var(--line);
  border-radius: 1.25rem;
  background: rgba(255, 255, 255, 0.5);
  box-shadow: 0 1px 1px rgba(17, 17, 15, 0.02);
  transition: transform 420ms var(--ease), border-color 300ms ease, box-shadow 420ms ease, background-color 300ms ease;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(420px circle at var(--pointer-x, 50%) var(--pointer-y, 50%), rgba(17, 17, 15, 0.035), transparent 55%);
  opacity: 0;
  transition: opacity 300ms ease;
}

.card:hover {
  transform: translateY(-5px);
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 20px 50px rgba(38, 36, 31, 0.07);
}

.card:hover::before {
  opacity: 1;
}

.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-index {
  color: var(--faint);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
}

.card-mark {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ink);
  box-shadow: 0 0 0 5px rgba(17, 17, 15, 0.06);
  transition: box-shadow 300ms ease;
}

.card:hover .card-mark {
  box-shadow: 0 0 0 8px rgba(17, 17, 15, 0.055);
}

.card h3 {
  margin-bottom: 0.9rem;
  font-size: clamp(1.35rem, 2vw, 1.7rem);
  font-weight: 560;
  letter-spacing: -0.035em;
}

.card p {
  max-width: 330px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.96rem;
  line-height: 1.6;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 2.4rem 3rem;
  color: var(--muted);
  font-size: 0.78rem;
}

.site-footer p {
  margin: 0;
}

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 850ms var(--ease) var(--delay, 0ms), transform 850ms var(--ease) var(--delay, 0ms);
}

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

a:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 4px;
}

@media (max-width: 820px) {
  .hero {
    min-height: 800px;
    padding-top: 8rem;
  }

  h1 {
    max-width: 720px;
    font-size: clamp(3rem, 11.5vw, 5.6rem);
  }

  .section-heading {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

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

  .card {
    min-height: 300px;
  }
}

@media (max-width: 560px) {
  .nav-shell {
    height: 68px;
  }

  .nav-links {
    gap: 1.25rem;
  }

  .hero {
    min-height: 100svh;
    padding: 7.5rem 0 5rem;
  }

  .hero-inner {
    margin-top: 0;
  }

  .eyebrow {
    max-width: 220px;
    margin-bottom: 1.6rem;
    line-height: 1.55;
  }

  h1 {
    margin-bottom: 1.5rem;
    font-size: clamp(2.9rem, 13.2vw, 4.3rem);
    line-height: 0.98;
  }

  .hero-copy {
    margin-bottom: 2rem;
    font-size: 1rem;
  }

  .hero-actions {
    align-items: flex-start;
    gap: 1.5rem;
  }

  .scroll-cue {
    display: none;
  }

  .work {
    padding-block: 5.5rem;
  }

  .card {
    min-height: 270px;
    padding: 1.35rem;
  }

  .site-footer {
    align-items: flex-start;
    padding-block: 2rem 2.5rem;
  }
}

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

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

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