:root {
  --navy: #02051e;
  --navy-2: #060a26;
  --teal: #14b8a6;
  --teal-light: #2dd4bf;
  --teal-dark: #0d9488;
  --orange: #fa914b;
  --ink: #e2e8f0;
  --ink-strong: #ffffff;
  --muted: #94a3b8;
  --dim: #64748b;
  --line: rgba(148, 163, 184, 0.16);
  --line-strong: rgba(148, 163, 184, 0.32);

  --paper: #f1f5f9;
  --paper-ink: #0f172a;
  --paper-muted: #475569;
  --paper-line: #cbd5e1;

  --sans: "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --gutter: clamp(16px, 4vw, 48px);
  --max: 1280px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 72px;
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--navy);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body.lock {
  overflow: hidden;
}

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

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

::selection {
  background: var(--teal);
  color: var(--navy);
}

:focus-visible {
  outline: 2px solid var(--teal-light);
  outline-offset: 3px;
}

.wrap {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.mono {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.muted {
  color: var(--dim);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip {
  position: absolute;
  left: 16px;
  top: -48px;
  z-index: 100;
  padding: 8px 14px;
  background: var(--teal);
  color: var(--navy);
  font-weight: 600;
}

.skip:focus {
  top: 12px;
}

/* Signature: the three-bar dash from the logo */
.dash {
  --dash-a: var(--teal);
  display: inline-block;
  flex-shrink: 0;
  width: 46px;
  height: 3px;
  margin-right: 14px;
  background: linear-gradient(
    90deg,
    var(--dash-a) 0 10px,
    transparent 10px 18px,
    var(--orange) 18px 28px,
    transparent 28px 36px,
    var(--dash-a) 36px 46px
  );
}

/* Nav */
.nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  border-bottom: 1px solid transparent;
  transition: background 0.3s, border-color 0.3s, backdrop-filter 0.3s;
}

.nav.scrolled {
  background: rgba(2, 5, 30, 0.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--line);
}

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

.nav-logo img {
  height: 30px;
  width: auto;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  font-size: 0.875rem;
}

.nav-links a {
  color: var(--muted);
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--ink-strong);
}

.nav-links .nav-cta {
  color: var(--navy);
  background: var(--ink-strong);
  padding: 8px 16px;
  border-radius: 999px;
  font-weight: 500;
  transition: background 0.2s;
}

.nav-links .nav-cta:hover {
  color: var(--navy);
  background: var(--teal-light);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  margin-right: -10px;
  background: none;
  border: 0;
  cursor: pointer;
  position: relative;
}

.nav-toggle span {
  position: absolute;
  left: 12px;
  right: 12px;
  height: 1.5px;
  background: var(--ink-strong);
  transition: transform 0.3s var(--ease), top 0.3s var(--ease);
}

.nav-toggle span:first-child {
  top: 18px;
}

.nav-toggle span:last-child {
  top: 25px;
}

.nav-toggle.open span:first-child {
  top: 21.5px;
  transform: rotate(45deg);
}

.nav-toggle.open span:last-child {
  top: 21.5px;
  transform: rotate(-45deg);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  background: var(--teal);
  color: var(--navy);
  font-weight: 600;
  font-size: 0.9375rem;
  border-radius: 999px;
  transition: background 0.2s, transform 0.2s var(--ease);
}

.btn span {
  transition: transform 0.2s var(--ease);
}

.btn:hover {
  background: var(--teal-light);
}

.btn:hover span {
  transform: translateX(3px);
}

.link {
  font-size: 0.9375rem;
  color: var(--ink);
  border-bottom: 1px solid var(--line-strong);
  padding-bottom: 2px;
  transition: border-color 0.2s, color 0.2s;
}

.link:hover {
  color: var(--ink-strong);
  border-color: var(--teal);
}

/* Hero */
.hero {
  position: relative;
  padding: 160px 0 0;
  overflow: hidden;
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: radial-gradient(ellipse 70% 60% at 70% 20%, #000 10%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 70% 20%, #000 10%, transparent 75%);
  opacity: 0.6;
  pointer-events: none;
}

.hero .wrap {
  position: relative;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
  color: var(--muted);
  margin-bottom: 48px;
}

.hero-meta > span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 0 0 rgba(20, 184, 166, 0.6);
  animation: pulse 2.4s infinite;
}

@keyframes pulse {
  70% {
    box-shadow: 0 0 0 8px rgba(20, 184, 166, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(20, 184, 166, 0);
  }
}

.hero-title {
  font-size: clamp(2.75rem, 8.2vw, 7.5rem);
  line-height: 0.98;
  letter-spacing: -0.045em;
  font-weight: 500;
  color: var(--ink-strong);
  max-width: 14ch;
}

.hero-title em {
  font-style: normal;
  color: var(--teal);
}

.hero-foot {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 40px;
  margin-top: 56px;
}

.hero-lede {
  max-width: 44ch;
  font-size: clamp(1.0625rem, 1.4vw, 1.25rem);
  color: var(--muted);
  line-height: 1.55;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 28px;
  flex-shrink: 0;
}

.spec {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-top: 112px;
  border-top: 1px solid var(--line);
}

.spec > div {
  padding: 24px 24px 32px 0;
}

.spec > div + div {
  padding-left: 24px;
  border-left: 1px solid var(--line);
}

.spec dt {
  color: var(--dim);
  margin-bottom: 10px;
}

.spec dd {
  color: var(--muted);
  font-size: 0.9375rem;
}

.spec strong {
  display: block;
  font-size: 2rem;
  line-height: 1.1;
  font-weight: 500;
  letter-spacing: -0.03em;
  color: var(--ink-strong);
  margin-bottom: 4px;
}

/* Sections */
.section {
  padding: clamp(96px, 12vw, 160px) 0;
  position: relative;
}

.section-rule {
  border-top: 1px solid var(--line);
}

.section-head {
  margin-bottom: clamp(48px, 6vw, 80px);
}

.label {
  display: flex;
  align-items: center;
  color: var(--muted);
  margin-bottom: 24px;
}

.section-head h2,
.contact h2 {
  font-size: clamp(2rem, 4.4vw, 3.75rem);
  line-height: 1.05;
  letter-spacing: -0.035em;
  font-weight: 500;
  color: var(--ink-strong);
  max-width: 20ch;
}

.section-lede {
  margin-top: 24px;
  max-width: 42ch;
  color: var(--muted);
  font-size: 1.0625rem;
}

.section-head-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 40px;
}

.section-head-row .section-lede {
  margin-top: 0;
}

/* Work */
.work-list {
  list-style: none;
  border-top: 1px solid var(--line);
}

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

.work-row {
  display: grid;
  grid-template-columns: 56px minmax(180px, 1.1fr) 2fr 180px 32px;
  align-items: baseline;
  gap: 24px;
  padding: 32px 0;
  position: relative;
  transition: padding 0.35s var(--ease), color 0.2s;
}

.work-row::before {
  content: "";
  position: absolute;
  inset: 0 calc(var(--gutter) * -1);
  background: linear-gradient(90deg, rgba(20, 184, 166, 0.08), transparent 70%);
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}

.work-num {
  color: var(--dim);
}

.work-name {
  font-size: clamp(1.625rem, 2.6vw, 2.25rem);
  letter-spacing: -0.03em;
  font-weight: 500;
  color: var(--ink-strong);
  line-height: 1.1;
}

.work-desc {
  color: var(--muted);
  max-width: 52ch;
}

.work-tags {
  color: var(--dim);
  text-align: right;
}

.work-arrow {
  justify-self: end;
  font-size: 1.25rem;
  color: var(--dim);
  transition: transform 0.3s var(--ease), color 0.2s;
}

.work-row:hover::before {
  opacity: 1;
}

.work-row:hover .work-name {
  color: var(--teal-light);
}

.work-row:hover .work-arrow {
  color: var(--teal-light);
  transform: translate(3px, -3px);
}

.work-preview {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 40;
  width: 240px;
  height: 120px;
  display: grid;
  place-items: center;
  padding: 24px;
  background: var(--paper);
  border-radius: 6px;
  pointer-events: none;
  opacity: 0;
  scale: 0.92;
  transition: opacity 0.2s, scale 0.25s var(--ease);
}

.work-preview.show {
  opacity: 1;
  scale: 1;
}

.work-preview img {
  max-height: 44px;
  width: auto;
  object-fit: contain;
}

/* Capabilities */
.section-light {
  background: var(--paper);
  color: var(--paper-ink);
}

.section-light .label {
  color: var(--paper-muted);
}

.section-light .section-head h2 {
  color: var(--paper-ink);
}

.section-light .section-lede {
  color: var(--paper-muted);
}

.section-light .dash {
  --dash-a: var(--teal-dark);
}

.split {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: clamp(40px, 6vw, 96px);
  align-items: start;
}

.sticky {
  position: sticky;
  top: 112px;
  margin-bottom: 0;
}

.cap-table {
  width: 100%;
  border-collapse: collapse;
  border-top: 1px solid var(--paper-ink);
}

.cap-table tr {
  border-bottom: 1px solid var(--paper-line);
}

.cap-table th,
.cap-table td {
  padding: 22px 16px 22px 0;
  vertical-align: baseline;
  text-align: left;
}

.cap-table th {
  font-weight: 500;
  font-size: 1.125rem;
  letter-spacing: -0.015em;
  width: 32%;
}

.cap-table td {
  color: var(--paper-muted);
  font-size: 0.9375rem;
}

.cap-table td.mono {
  color: var(--teal-dark);
  font-size: 0.6875rem;
  white-space: nowrap;
  padding-right: 0;
  text-align: right;
}

.cap-table tr:hover th {
  color: var(--teal-dark);
}

/* Process */
.timeline {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  counter-reset: phase;
}

.timeline li {
  position: relative;
  padding: 36px 32px 0 0;
  border-top: 1px solid var(--line-strong);
}

.timeline li::before {
  content: "";
  position: absolute;
  top: -5px;
  left: 0;
  width: 9px;
  height: 9px;
  background: var(--navy);
  border: 1.5px solid var(--teal);
  border-radius: 50%;
}

.timeline li:last-child::before {
  background: var(--teal);
}

.timeline li > .mono {
  color: var(--dim);
}

.timeline h3 {
  font-size: 1.5rem;
  font-weight: 500;
  letter-spacing: -0.025em;
  color: var(--ink-strong);
  margin: 12px 0 12px;
}

.timeline p {
  color: var(--muted);
  font-size: 0.9375rem;
  max-width: 30ch;
}

.timeline .out {
  margin-top: 20px;
  color: var(--teal);
  font-size: 0.6875rem;
}

/* Principles */
.principles {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  column-gap: clamp(24px, 4vw, 56px);
}

.principles li {
  padding: 32px 0 48px;
  border-top: 1px solid var(--line);
  counter-increment: principle;
}

.principles li::before {
  content: counter(principle, decimal-leading-zero);
  display: block;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--orange);
  margin-bottom: 40px;
}

.principles h3 {
  font-size: clamp(1.375rem, 2vw, 1.75rem);
  font-weight: 500;
  letter-spacing: -0.025em;
  color: var(--ink-strong);
  line-height: 1.15;
  margin-bottom: 12px;
}

.principles p {
  color: var(--muted);
  max-width: 34ch;
}

/* Team */
.team {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(20px, 3vw, 40px);
}

.team-photo {
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--navy-2);
  border-radius: 4px;
}

.team-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.05);
  transition: filter 0.5s, transform 0.8s var(--ease);
}

.team figure:hover .team-photo img {
  filter: grayscale(0);
  transform: scale(1.03);
}

.team figcaption {
  display: grid;
  gap: 6px;
  padding-top: 20px;
}

.team-name {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--ink-strong);
  padding-bottom: 14px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.team-name.mono {
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--dim);
}

.team figcaption strong {
  font-weight: 500;
  color: var(--ink);
}

.team figcaption > span:last-child {
  color: var(--muted);
  font-size: 0.9375rem;
}

/* Contact */
.contact {
  position: relative;
  padding: clamp(112px, 14vw, 200px) 0;
  border-top: 1px solid var(--line);
  overflow: hidden;
}

.contact .hero-grid {
  mask-image: radial-gradient(ellipse 60% 70% at 50% 100%, #000 10%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 60% 70% at 50% 100%, #000 10%, transparent 75%);
}

.contact .wrap {
  position: relative;
}

.contact-mail {
  display: inline-flex;
  align-items: flex-start;
  gap: 0.15em;
  margin-top: 40px;
  font-size: clamp(2.25rem, 8vw, 7rem);
  line-height: 1;
  letter-spacing: -0.05em;
  font-weight: 500;
  color: var(--teal);
  overflow-wrap: anywhere;
  background: linear-gradient(var(--teal-light), var(--teal-light)) left bottom / 0 2px no-repeat;
  padding-bottom: 0.08em;
  transition: color 0.2s, background-size 0.5s var(--ease);
}

.contact-mail span {
  font-size: 0.4em;
  transition: transform 0.3s var(--ease);
}

.contact-mail:hover {
  color: var(--teal-light);
  background-size: 100% 2px;
}

.contact-mail:hover span {
  transform: translate(4px, -4px);
}

.contact-note {
  margin-top: 28px;
  color: var(--muted);
}

/* Footer */
.footer {
  border-top: 1px solid var(--line);
  padding: 32px 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.footer-logo {
  height: 24px;
  width: auto;
}

.footer-links {
  display: flex;
  gap: 24px;
}

.footer-links a {
  color: var(--muted);
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--ink-strong);
}

.footer-copy {
  color: var(--dim);
}

/* Reveal (class added by JS, so content is visible without it) */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

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

/* Responsive */
@media (max-width: 1080px) {
  .work-row {
    grid-template-columns: 48px 1fr 2fr 32px;
  }

  .work-tags {
    display: none;
  }

  .timeline {
    grid-template-columns: repeat(2, 1fr);
    row-gap: 56px;
  }

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

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

  .nav-links {
    position: fixed;
    inset: 72px 0 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 24px var(--gutter);
    background: var(--navy);
    font-size: 1.75rem;
    letter-spacing: -0.02em;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s, visibility 0.25s;
  }

  .nav-links.open {
    opacity: 1;
    visibility: visible;
  }

  .nav-links a {
    width: 100%;
    padding: 14px 0;
    color: var(--ink-strong);
    border-bottom: 1px solid var(--line);
  }

  .nav-links .nav-cta {
    margin-top: 32px;
    width: auto;
    font-size: 1rem;
    padding: 14px 22px;
    border-bottom: 0;
  }

  .hero {
    padding-top: 128px;
  }

  .hero-foot,
  .section-head-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .spec {
    grid-template-columns: repeat(2, 1fr);
    margin-top: 80px;
  }

  .spec > div:nth-child(3) {
    padding-left: 0;
    border-left: 0;
  }

  .spec > div:nth-child(n + 3) {
    border-top: 1px solid var(--line);
  }

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

  .sticky {
    position: static;
  }

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

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-links {
    flex-wrap: wrap;
  }
}

@media (max-width: 640px) {
  .work-row {
    grid-template-columns: 36px 1fr 24px;
    gap: 8px 12px;
    padding: 24px 0;
  }

  .work-desc {
    grid-column: 2 / -1;
    font-size: 0.9375rem;
  }

  .work-arrow {
    grid-row: 1;
    grid-column: 3;
  }

  .cap-table,
  .cap-table tbody,
  .cap-table tr,
  .cap-table th,
  .cap-table td {
    display: block;
    width: auto;
  }

  .cap-table tr {
    padding: 20px 0;
  }

  .cap-table th,
  .cap-table td {
    padding: 0;
  }

  .cap-table td {
    margin-top: 6px;
  }

  .cap-table td.mono {
    text-align: left;
    margin-top: 10px;
  }

  .timeline,
  .principles,
  .team {
    grid-template-columns: 1fr;
  }

  .timeline li {
    padding-right: 0;
  }

  .principles li::before {
    margin-bottom: 20px;
  }

  .hero-actions {
    gap: 20px;
  }
}

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

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

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