/* ── Fonts ── */
@font-face {
  font-family: 'Satoshi';
  src: url('../assets/Satoshi-Light.ttf') format('truetype');
  font-weight: 300;
  font-display: swap;
}
@font-face {
  font-family: 'Satoshi';
  src: url('../assets/Satoshi-Regular.ttf') format('truetype');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Satoshi';
  src: url('../assets/Satoshi-Medium.ttf') format('truetype');
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: 'Satoshi';
  src: url('../assets/Satoshi-Bold.ttf') format('truetype');
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: 'Satoshi';
  src: url('../assets/Satoshi-Black.ttf') format('truetype');
  font-weight: 900;
  font-display: swap;
}
@font-face {
  font-family: 'JetBrains Mono';
  src: url('../assets/JetBrainsMono.woff2') format('woff2');
  font-weight: 400 800;
  font-display: swap;
}

/* ── Custom Properties (matching handle.run) ── */
:root {
  --background: #fff;
  --foreground: #0a0a0a;
  --muted: #6b6b6b;
  --border: #e5e5e5;
  --surface: #fafafa;
  --font-satoshi: 'Satoshi', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --max-width: 1400px;
  --radius: 0.5rem;
  --transition: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-satoshi);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--foreground);
  background: var(--background);
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* ── Utility classes (handle.run patterns) ── */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem;
}

.mono-label {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.display {
  font-family: var(--font-satoshi);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1.05;
  color: var(--foreground);
}

.divider {
  border: none;
  border-top: 1px solid var(--border);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* ── Nav ── */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow var(--transition);
}

.nav.scrolled {
  box-shadow: 0 1px 8px rgba(0, 0, 0, 0.04);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}

.nav__logo img {
  height: 22px;
  width: auto;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav__links a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted);
  transition: color var(--transition);
}

.nav__links a:hover,
.nav__links a:focus-visible {
  color: var(--foreground);
}

/* ── Hero ── */
.hero {
  padding-top: calc(56px + 4rem);
  padding-bottom: 4rem;
}

.hero__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.hero__image {
  width: 100%;
  border-radius: var(--radius);
  object-fit: cover;
  aspect-ratio: 4 / 3;
}

.hero__content {
  max-width: 600px;
}

.hero__headline {
  font-size: clamp(2.5rem, 5vw, 4rem);
  margin-bottom: 1.5rem;
}

.hero__subtext {
  font-size: 1.125rem;
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 2.5rem;
}

.hero__label {
  margin-bottom: 1.25rem;
}

/* ── Stats bar ── */
.stats {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 2.5rem 0;
}

.stats__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
}

.stat {
  padding-left: 1.5rem;
  border-left: 1px solid var(--border);
}

.stat:first-child {
  border-left: none;
  padding-left: 0;
}

.stat__value {
  font-family: var(--font-satoshi);
  font-weight: 900;
  font-size: 2.25rem;
  letter-spacing: -0.04em;
  line-height: 1.1;
  margin-bottom: 0.25rem;
}

.stat__label {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ── Buttons ── */
.btn {
  display: inline-block;
  padding: 0.625rem 1.5rem;
  border-radius: 100px;
  font-size: 0.875rem;
  font-weight: 500;
  font-family: var(--font-satoshi);
  cursor: pointer;
  transition: all var(--transition);
  border: 1px solid var(--border);
  background: var(--background);
  color: var(--foreground);
}

.btn:hover {
  border-color: var(--foreground);
  background: var(--surface);
}

.btn:focus-visible {
  outline: 2px solid var(--foreground);
  outline-offset: 2px;
}

.btn--primary {
  background: var(--foreground);
  color: var(--background);
  border-color: var(--foreground);
}

.btn--primary:hover {
  background: #333;
  border-color: #333;
}

/* ── What We Build ── */
.what-we-build {
  padding: 6rem 0;
}

.section-heading {
  font-size: clamp(1.875rem, 3vw, 2.25rem);
  margin-bottom: 0.5rem;
}

.section-subheading {
  color: var(--muted);
  font-size: 1.125rem;
  margin-bottom: 3.5rem;
  max-width: 600px;
  line-height: 1.625;
}

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

.card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow var(--transition);
}

.card:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.card__image {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.card__body {
  padding: 1.5rem;
}

.card__label {
  margin-bottom: 0.75rem;
}

.card__title {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}

.card__text {
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.625;
}

/* ── Open Roles ── */
.open-roles {
  padding: 6rem 0;
  border-top: 1px solid var(--border);
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 3rem;
  align-items: center;
}

.filters__group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.filters__label {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-right: 0.5rem;
}

.filters__divider {
  width: 1px;
  height: 20px;
  background: var(--border);
  margin: 0 0.75rem;
}

.filter-pill {
  padding: 0.375rem 0.875rem;
  border-radius: 100px;
  border: 1px solid var(--border);
  background: var(--background);
  font-size: 0.8125rem;
  font-family: var(--font-satoshi);
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  transition: all var(--transition);
}

.filter-pill:hover {
  border-color: var(--foreground);
  color: var(--foreground);
}

.filter-pill:focus-visible {
  outline: 2px solid var(--foreground);
  outline-offset: 2px;
}

.filter-pill.active {
  background: var(--foreground);
  border-color: var(--foreground);
  color: var(--background);
}

/* Job Listings */
.dept-group {
  margin-bottom: 2.5rem;
}

.dept-group__title {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.75rem;
  padding-left: 0.25rem;
}

.job {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 0.5rem;
  overflow: hidden;
  transition: box-shadow var(--transition);
  background: var(--background);
}

.job:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.job__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  cursor: pointer;
  background: none;
  border: none;
  width: 100%;
  font-family: var(--font-satoshi);
  text-align: left;
  color: inherit;
  transition: background var(--transition);
}

.job__header:hover {
  background: var(--surface);
}

.job__header:focus-visible {
  outline: 2px solid var(--foreground);
  outline-offset: -2px;
  border-radius: var(--radius);
}

.job__title {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.job__meta {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-shrink: 0;
}

.job__tag {
  font-size: 0.8125rem;
  color: var(--muted);
}

.job__chevron {
  width: 16px;
  height: 16px;
  transition: transform 0.3s ease;
  color: var(--muted);
}

.job.expanded .job__chevron {
  transform: rotate(180deg);
}

.job__details {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.job__details-inner {
  padding: 0 1.5rem 1.5rem;
  border-top: 1px solid var(--border);
}

.job__summary {
  color: var(--muted);
  margin: 1.25rem 0;
  line-height: 1.7;
  font-size: 0.9375rem;
}

.job__section-title {
  font-size: 0.8125rem;
  font-weight: 600;
  margin: 1.25rem 0 0.5rem;
  letter-spacing: -0.01em;
}

.job__list {
  padding-left: 1.25rem;
  list-style: disc;
}

.job__list li {
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.625;
  margin-bottom: 0.2rem;
}

.job__compensation {
  display: inline-block;
  margin-top: 1.25rem;
  padding: 0.5rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
  font-family: var(--font-mono);
  letter-spacing: -0.01em;
}

.job__apply {
  display: inline-block;
  margin-top: 1.25rem;
}

.no-results {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--muted);
  font-size: 1rem;
}

/* ── Why Handle ── */
.why-handle {
  padding: 6rem 0;
  border-top: 1px solid var(--border);
}

.benefits {
  max-width: 700px;
}

.benefit {
  border-bottom: 1px solid var(--border);
}

.benefit:first-child {
  border-top: 1px solid var(--border);
}

.benefit__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 0;
  cursor: pointer;
  background: none;
  border: none;
  width: 100%;
  font-family: var(--font-satoshi);
  text-align: left;
  color: inherit;
}

.benefit__header:focus-visible {
  outline: 2px solid var(--foreground);
  outline-offset: 2px;
  border-radius: 4px;
}

.benefit__title {
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.benefit__icon {
  width: 16px;
  height: 16px;
  transition: transform 0.3s ease;
  color: var(--muted);
}

.benefit.expanded .benefit__icon {
  transform: rotate(180deg);
}

.benefit__body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.benefit__text {
  padding-bottom: 1.25rem;
  color: var(--muted);
  font-size: 0.9375rem;
  line-height: 1.7;
}

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

.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.footer__logo img {
  height: 18px;
  width: auto;
}

.footer__links {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.footer__links a {
  color: var(--muted);
  font-size: 0.8125rem;
  transition: color var(--transition);
}

.footer__links a:hover {
  color: var(--foreground);
}

.footer__copy {
  color: var(--muted);
  font-size: 0.75rem;
  width: 100%;
  text-align: center;
  margin-top: 0.5rem;
}

/* ── Responsive ── */
@media (max-width: 1024px) {
  .cards {
    grid-template-columns: repeat(2, 1fr);
  }
  .stats__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }
  .stat:nth-child(3) {
    border-left: none;
    padding-left: 0;
  }
}

@media (max-width: 768px) {
  .container {
    padding: 0 1.25rem;
  }

  .hero {
    padding-top: calc(56px + 2.5rem);
    padding-bottom: 2.5rem;
  }

  .hero__grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .hero__image {
    order: -1;
  }

  .hero__headline {
    font-size: 2.25rem;
  }

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

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

  .what-we-build,
  .open-roles,
  .why-handle {
    padding: 4rem 0;
  }

  .job__header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .job__meta {
    width: 100%;
    justify-content: space-between;
  }

  .filters {
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
  }

  .filters__divider {
    display: none;
  }

  .footer__inner {
    flex-direction: column;
    text-align: center;
  }

  .footer__links {
    flex-direction: column;
    gap: 0.75rem;
  }
}
