:root {
  --ink: #34343f;
  --muted: #5d5a62;
  --paper: #ffffff;
  --band: #f7f7f7;
  --nav: #f5f5f5;
  --button: #363541;
  --blue-soft: #a9c6d2;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "Avenir Next", Avenir, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.75;
  letter-spacing: 0;
}

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

button,
input,
textarea {
  font: inherit;
}

.site-header {
  --header-progress: 1;
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  align-items: center;
  gap: 24px;
  min-height: 66px;
  padding: 0 clamp(18px, 4vw, 48px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
  opacity: var(--header-progress);
  transform: translateY(calc((1 - var(--header-progress)) * -12px));
  transition: opacity 80ms linear, transform 80ms linear;
}

body.home-route .site-header {
  --header-progress: 0;
}

.scroll-cue {
  --cue-progress: 0;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 19;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 66px;
  color: rgba(52, 52, 63, 0.72);
  font-size: 14px;
  letter-spacing: 0;
  opacity: var(--cue-progress);
  pointer-events: none;
  animation: cue-flash 1.35s ease-in-out infinite;
}

body:not(.home-route) .scroll-cue {
  display: none;
}

.scroll-arrow {
  font-size: 20px;
  line-height: 1;
  transform: translateY(-1px);
}

@keyframes cue-flash {
  0%,
  100% {
    filter: opacity(0.45);
    transform: translateY(0);
  }

  50% {
    filter: opacity(1);
    transform: translateY(3px);
  }
}

.brand-title {
  display: inline-flex;
  align-items: center;
  min-height: 66px;
  font-size: clamp(16px, 1.75vw, 22px);
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: 0;
  white-space: nowrap;
}

.site-nav {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: clamp(18px, 2.8vw, 34px);
  min-height: 66px;
  padding: 0;
  background: transparent;
  color: #393942;
  font-size: 14px;
  line-height: 1.2;
}

.site-nav a {
  transition: color 160ms ease;
}

.site-nav a:hover,
.site-nav a.is-active {
  color: #839ead;
}

.menu-button {
  display: none;
}

main {
  min-height: 48vh;
}

.page {
  animation: fade-in 180ms ease;
}

.coin-flow {
  position: relative;
  z-index: 1;
  overflow: clip;
  isolation: isolate;
  background:
    linear-gradient(90deg, rgba(52, 52, 63, 0.035) 1px, transparent 1px) 0 0 / 92px 92px,
    linear-gradient(0deg, rgba(52, 52, 63, 0.028) 1px, transparent 1px) 0 0 / 92px 92px,
    #fff;
}

.coin-flow::before,
.coin-flow::after {
  position: fixed;
  inset: 0;
  z-index: 0;
  content: "";
  pointer-events: none;
}

.coin-flow::before {
  background:
    radial-gradient(circle at 14% 22%, transparent 0 132px, rgba(52, 52, 63, 0.14) 133px 135px, transparent 136px),
    radial-gradient(circle at 82% 18%, transparent 0 92px, rgba(199, 154, 52, 0.24) 93px 95px, transparent 96px),
    radial-gradient(circle at 70% 82%, transparent 0 178px, rgba(52, 52, 63, 0.1) 179px 181px, transparent 182px),
    linear-gradient(135deg, transparent 0 47%, rgba(52, 52, 63, 0.055) 47.2% 47.6%, transparent 47.8%),
    linear-gradient(35deg, transparent 0 58%, rgba(199, 154, 52, 0.13) 58.2% 58.6%, transparent 58.8%);
  opacity: 0.82;
}

.coin-flow::after {
  background:
    conic-gradient(from 45deg at 24% 78%, transparent 0 24%, rgba(52, 52, 63, 0.08) 24.4% 25.2%, transparent 25.6% 100%),
    conic-gradient(from 0deg at 88% 58%, transparent 0 12%, rgba(199, 154, 52, 0.14) 12.4% 13.2%, transparent 13.6% 100%),
    linear-gradient(90deg, transparent 0 82%, rgba(52, 52, 63, 0.06) 82.2% 82.45%, transparent 82.7%),
    linear-gradient(0deg, transparent 0 76%, rgba(199, 154, 52, 0.11) 76.2% 76.45%, transparent 76.7%);
  opacity: 0.72;
}

.home-hero {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  min-height: 240vh;
}

.home-copy {
  position: sticky;
  top: 66px;
  z-index: 2;
  align-self: start;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 560px;
  height: calc(100vh - 66px);
  min-height: calc(100vh - 66px);
  padding: 70px 70px 70px clamp(44px, 7vw, 90px);
}

.home-copy h1 {
  margin: 0 0 32px;
  font-size: clamp(30px, 3.7vw, 44px);
  font-weight: 600;
  line-height: 1.12;
  white-space: nowrap;
}

.home-copy p {
  max-width: 455px;
  margin: 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.82;
}

.hero-description {
  min-height: 264px;
}

.fall-word {
  display: inline-block;
  opacity: 0;
  transform-origin: 50% 70%;
  will-change: transform, opacity;
}

.button-row {
  --actions-progress: 0;
  display: flex;
  align-items: center;
  gap: 24px;
  margin-top: 70px;
}

.hero-actions {
  opacity: var(--actions-progress);
  pointer-events: none;
  transform: translateY(calc((1 - var(--actions-progress)) * 18px));
  transition: opacity 80ms linear, transform 80ms linear;
}

.hero-actions[aria-hidden="false"] {
  pointer-events: auto;
}

.solid-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 125px;
  min-height: 46px;
  padding: 0 24px;
  border: 0;
  color: #fff;
  background: var(--button);
  cursor: pointer;
  transition: background 160ms ease, transform 160ms ease;
}

.solid-button:hover {
  background: #272731;
  transform: translateY(-1px);
}

.mail-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 47px;
  height: 47px;
  border-radius: 50%;
  color: var(--ink);
  background: var(--blue-soft);
  transition: transform 160ms ease, background 160ms ease;
}

.mail-button:hover {
  background: #95b8c6;
  transform: translateY(-1px);
}

.mail-button svg {
  width: 27px;
  height: 27px;
  stroke-width: 1.8;
}

.coin-stage {
  position: fixed;
  top: 66px;
  left: 0;
  right: 0;
  z-index: 1;
  display: grid;
  place-items: center;
  height: calc(100vh - 66px);
  min-height: 560px;
  overflow: hidden;
  perspective: 1050px;
  pointer-events: none;
}

.coin-canvas,
.r3f-coin-canvas {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  min-height: inherit;
}

.coin-canvas canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
}

.coin-stage::before,
.coin-stage::after {
  position: absolute;
  content: "";
  border-radius: 50%;
  pointer-events: none;
}

.coin-stage::before {
  width: 520px;
  height: 520px;
  border: 1px solid rgba(52, 52, 63, 0.08);
  transform: translate(2%, -18%);
}

.coin-stage::after {
  width: 680px;
  height: 680px;
  background: radial-gradient(circle, rgba(185, 193, 201, 0.18), transparent 62%);
  transform: translate(-4%, -12%);
}

.home-story {
  --story-progress: 0;
  position: relative;
  z-index: 2;
  min-height: 220vh;
  background: transparent;
}

.story-sticky {
  position: sticky;
  top: 66px;
  display: grid;
  min-height: calc(100vh - 66px);
  place-items: center;
  padding: 80px clamp(28px, 8vw, 120px);
}

.story-panel {
  grid-area: 1 / 1;
  width: min(760px, 100%);
  text-align: center;
  transition: opacity 120ms linear, transform 120ms linear;
}

.story-quote {
  opacity: calc(1 - min(1, var(--story-progress) * 1.35));
  transform: translateY(calc(var(--story-progress) * -24px));
}

.story-description {
  opacity: max(0, calc((var(--story-progress) - 0.18) / 0.82));
  transform: translateY(calc((1 - var(--story-progress)) * 24px));
}

.story-quote h2 {
  margin: 0;
  font-size: clamp(30px, 4.8vw, 56px);
  font-style: italic;
  font-weight: 500;
  line-height: 1.18;
}

.story-quote p {
  margin: 24px 0 0;
  color: var(--muted);
  font-size: clamp(18px, 2vw, 24px);
}

.story-description p {
  margin: 0 auto 28px;
  color: var(--muted);
  font-size: clamp(18px, 2.1vw, 24px);
  line-height: 1.75;
}

.home-services {
  position: relative;
  z-index: 1;
  background: transparent;
}

.intro-page {
  background: var(--band);
  padding: 44px 40px 92px;
  text-align: center;
}

.intro-page h1 {
  max-width: 1100px;
  margin: 0 auto 18px;
  font-size: clamp(32px, 4.1vw, 44px);
  font-weight: 400;
  line-height: 1.2;
}

.kicker {
  margin: 0 0 8px;
  font-size: 18px;
}

.intro-copy {
  max-width: 960px;
  margin: 0 auto 46px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.85;
}

.team-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  max-width: 1120px;
  margin: 0 auto;
}

.team-member {
  display: grid;
  grid-template-rows: auto auto 1fr;
  height: 760px;
  min-height: 760px;
  margin: 0;
  overflow: hidden;
  text-align: left;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(20, 20, 20, 0.12);
  box-shadow: 0 18px 48px rgba(24, 27, 31, 0.1);
  backdrop-filter: blur(14px);
}

.team-member img {
  display: block;
  width: min(260px, 72%);
  height: 340px;
  margin: 28px auto 18px;
  object-fit: contain;
  object-position: center;
}

.team-member h2 {
  margin: 0 32px 6px;
  font-size: 23px;
  font-weight: 400;
  line-height: 1.35;
  text-transform: none;
  text-align: center;
}

.team-member h2.caps {
  text-transform: uppercase;
}

.member-bio {
  min-height: 0;
  padding: 0 32px 30px;
  overflow: auto;
}

.team-member .role {
  margin: 0 0 12px;
  font-size: 17px;
  text-align: center;
}

.team-member p {
  max-width: none;
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.72;
}

.team-member p:not(.role):last-child {
  margin-bottom: 0;
}

.team-member p:not(.role) {
  overflow-wrap: anywhere;
}

@media (max-width: 760px) {
  .team-list {
    grid-template-columns: 1fr;
  }

  .team-member {
    height: auto;
    min-height: auto;
  }

  .member-bio {
    overflow: visible;
  }
}

.services-scroll {
  position: relative;
  min-height: 520vh;
}

.services-sticky {
  position: sticky;
  top: 66px;
  z-index: 1;
  height: calc(100vh - 66px);
  min-height: 560px;
  overflow: hidden;
}

.services-canvas,
.r3f-services-canvas {
  width: 100%;
  height: 100%;
  min-height: inherit;
}

.services-canvas canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
}

.services-title {
  position: absolute;
  top: clamp(26px, 5vh, 52px);
  left: 0;
  right: 0;
  z-index: 2;
  color: rgba(52, 52, 63, 0.62);
  font-size: clamp(34px, 5vw, 58px);
  font-weight: 400;
  line-height: 1.1;
  text-align: center;
  pointer-events: none;
}

.services-track {
  position: relative;
  z-index: 0;
}

.service-step {
  display: grid;
  min-height: 100vh;
  place-items: end center;
  padding: 0 24px 7vh;
  text-align: center;
}

.service-step h3,
.service-step p {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.contact-page {
  display: grid;
  grid-template-columns: minmax(260px, 420px) minmax(300px, 460px);
  justify-content: center;
  gap: 34px;
  padding: 46px 40px 70px;
}

.contact-page h1 {
  margin: 0;
  font-size: clamp(36px, 4.1vw, 44px);
  font-weight: 400;
  line-height: 1.25;
  text-align: center;
}

.contact-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 15px;
}

.form-field {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.form-field.full {
  grid-column: 1 / -1;
}

.form-field label {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
}

.required::after {
  content: " *";
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  border: 0;
  border-bottom: 1px solid #383842;
  border-radius: 0;
  outline: 0;
  padding: 8px 4px 10px;
  color: var(--ink);
  background: transparent;
  font-size: 14px;
}

.contact-form textarea {
  min-height: 134px;
  resize: vertical;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-bottom-color: #9dbbc7;
}

.contact-form .solid-button {
  grid-column: 1 / -1;
  width: 100%;
  margin-top: 12px;
  font-size: 17px;
}

.form-status {
  grid-column: 1 / -1;
  min-height: 26px;
  margin: 4px 0 0;
  color: #527584;
  font-size: 14px;
  text-align: center;
}

.form-status.error {
  color: #9a3a3a;
}

.site-footer {
  padding: 48px 20px 16px;
  text-align: center;
}

.site-footer p {
  margin: 0 0 6px;
  font-size: clamp(22px, 2.35vw, 27px);
  line-height: 1.35;
}

.site-footer small {
  font-size: 13px;
}

@keyframes fade-in {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@media (max-width: 800px) {
  .site-header {
    grid-template-columns: minmax(0, 1fr) auto;
    min-height: 64px;
    padding-inline: 18px;
  }

  .brand-title {
    min-height: 64px;
    font-size: 15px;
    white-space: normal;
  }

  .menu-button {
    position: static;
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 38px;
    height: 38px;
    border: 0;
    background: transparent;
    cursor: pointer;
  }

  .menu-button span {
    display: block;
    width: 24px;
    height: 1px;
    background: var(--ink);
  }

  .site-nav {
    grid-column: 1 / -1;
    display: none;
    flex-direction: column;
    gap: 12px;
    min-height: auto;
    padding: 0 0 18px;
  }

  body.menu-open .site-nav {
    display: flex;
  }

  .home-hero,
  .contact-page {
    grid-template-columns: 1fr;
  }

  .home-copy {
    max-width: none;
    top: 64px;
    height: calc(100vh - 64px);
    min-height: calc(100vh - 64px);
    padding: 42px 24px 56px;
  }

  .home-copy h1 {
    width: max-content;
    max-width: 100%;
    margin-bottom: 24px;
    font-size: clamp(25px, 7vw, 36px);
    line-height: 1.1;
  }

  .hero-description {
    min-height: 360px;
    max-width: 420px;
  }

  .button-row {
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 32px;
  }

  .coin-stage {
    top: 64px;
    height: calc(100vh - 64px);
    min-height: 520px;
  }

  .coin-canvas,
  .r3f-coin-canvas {
    height: 100%;
    min-height: inherit;
  }

  .home-story {
    min-height: 210vh;
  }

  .story-sticky {
    top: 64px;
    min-height: calc(100vh - 64px);
    padding: 52px 28px;
  }

  .services-scroll {
    min-height: 500vh;
  }

  .services-sticky {
    top: 64px;
    height: calc(100vh - 64px);
    min-height: 520px;
  }

  .services-title {
    top: 24px;
    padding: 0 22px;
    font-size: clamp(28px, 8vw, 42px);
  }

  .intro-page {
    padding: 38px 24px 64px;
  }

  .intro-page h1 {
    font-size: clamp(28px, 8vw, 38px);
  }

  .intro-copy {
    margin-bottom: 34px;
    font-size: 14px;
    line-height: 1.75;
  }

  .team-list {
    gap: 20px;
  }

  .team-member img {
    width: min(240px, 76%);
    height: 320px;
    margin-top: 24px;
  }

  .contact-page {
    gap: 28px;
    padding: 42px 24px 64px;
  }

  .contact-page h1 {
    font-size: clamp(30px, 9vw, 38px);
  }

  .contact-form {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  body {
    font-size: 15px;
  }

  .scroll-cue {
    min-height: 64px;
    padding-inline: 16px;
    font-size: 13px;
  }

  .brand-title {
    font-size: 13px;
  }

  .home-copy {
    padding: 38px 18px 48px;
  }

  .home-copy h1 {
    font-size: clamp(22px, 6.4vw, 28px);
  }

  .home-copy p {
    font-size: 15px;
    line-height: 1.72;
  }

  .hero-description {
    min-height: 390px;
  }

  .solid-button {
    min-width: 118px;
    min-height: 44px;
    padding-inline: 18px;
  }

  .mail-button {
    width: 44px;
    height: 44px;
  }

  .intro-page {
    padding: 34px 18px 56px;
  }

  .team-member {
    box-shadow: 0 12px 34px rgba(24, 27, 31, 0.09);
  }

  .team-member img {
    width: min(220px, 78%);
    height: 300px;
    margin: 22px auto 16px;
  }

  .team-member h2 {
    margin-inline: 22px;
    font-size: 21px;
  }

  .member-bio {
    padding: 0 22px 26px;
  }

  .story-sticky {
    padding: 44px 20px;
  }

  .story-quote h2 {
    font-size: clamp(26px, 9vw, 34px);
  }

  .story-description p {
    font-size: 17px;
    line-height: 1.65;
  }

  .services-title {
    font-size: clamp(24px, 8vw, 34px);
  }

  .contact-page {
    padding: 34px 18px 56px;
  }

  .site-footer p {
    font-size: 20px;
  }
}

@media (max-width: 360px) {
  .home-copy h1 {
    font-size: 20px;
  }

  .hero-description {
    min-height: 430px;
  }

  .team-member img {
    width: min(200px, 82%);
    height: 280px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .page {
    animation: none;
  }
}
