/* HERO: the First Principles design (GTX-3504), a wire-ribbon sculpture on a dark floor, dark in both themes */
.hero {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0;
  background: #050f1f;
  color: #fff;
  isolation: isolate;
}

/* The First Principles scene (GTX-3504): the floor (with the sculpture's real reflection and shadow) and the sculpture
   are one 3:2 stage, so the sculpture always stands on its reflection. The stage covers the hero like a background
   image, but stops growing at 2.2 times the hero's height so ultra-wide screens don't blow the sculpture up; there its
   left edge fades into the hero's own navy */
.hero-scene {
  position: absolute;
  inset: 0;
  z-index: -1;
  container-type: size;
  background: #060d1c;
}
.hero-stage {
  --floor: 0.81;
  --horizon: 62.4%;
  /* The stage keeps its own size, set by the screen's width, whatever the hero's height; the hero is as tall as its
     text plus its vertical padding, and clips the stage's empty wall above and floor below */
  --stage-w: clamp(1000px, 76vw, 1560px);
  position: absolute;
  /* Positioned without a transform, which the scroll drift below owns: the sculpture's centre (44.5% down the render)
     sits at the hero's vertical centre */
  top: calc(50cqh - var(--stage-w) / 1.5 * 0.445);
  /* The sculpture's right edge (92.45% across the render) lines up with the content column's right edge */
  right: calc(max(var(--gutter), (100cqw - var(--container)) / 2 + var(--gutter)) - var(--stage-w) * 0.0755);
  width: var(--stage-w);
  aspect-ratio: 3 / 2;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 92%, transparent);
  will-change: transform;
}
.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
/* Darkens the floor below the horizon for a moodier reflection than the render gives (GTX-3504). --floor sets the
   strength, 0 to 1; --horizon is where the render's wall meets its floor. It starts clear at the horizon, so no edge
   crosses the sculpture's base, which stands below it (Alex, 2026-11-03) */
.hero-floor-shade {
  position: absolute;
  inset: var(--horizon) 0 0;
  background: linear-gradient(
    to bottom,
    rgba(3, 7, 16, 0) 0%,
    rgba(3, 7, 16, calc(var(--floor) * 0.6)) 30%,
    rgba(3, 7, 16, var(--floor)) 60%,
    rgba(3, 7, 16, calc(var(--floor) * 1.2))
  );
}
/* Dark enough behind the paragraph to read over the snow-lit peaks (GTX-3397 follow-up, 10-23) */
.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(5, 15, 31, 0.78) 0%, rgba(5, 15, 31, 0.55) 45%, rgba(5, 15, 31, 0) 75%);
}
.hero-content {
  position: relative;
  width: 100%;
  padding-top: 81px;
  padding-bottom: 81px;
}
/* Hero text (GTX-3504): Jae's wording, laid out as in Mas's First Principles design */
.hero-eyebrow {
  margin: 0 0 22px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--maps-orange);
}
.hero h1 {
  margin: 0;
  font-size: clamp(44px, 5.4vw, 76px);
  font-weight: 500;
  line-height: 1.04;
  letter-spacing: -1.5px;
  color: #fff;
}
/* Three set lines, as in Mas's design; on phones the breaks switch off and the text wraps naturally */
.hero p.lede {
  margin: 28px 0 40px;
  max-width: 44ch;
  font-size: clamp(17px, 1.4vw, 20px);
  font-weight: 300;
  line-height: 1.45;
  color: var(--cg-90);
  /* A soft halo keeps the light paragraph clear of the floor's bright patches */
  text-shadow:
    0 1px 2px rgba(5, 15, 31, 0.8),
    0 2px 20px rgba(5, 15, 31, 0.6);
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 32px;
}
@media (max-width: 600px) {
  .lede-break {
    display: none;
  }
}
/* The second action is a text link with an orange underline, as in Mas's design */
.hero-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  border-bottom: 2px solid var(--maps-orange);
  color: #fff;
  font-size: 15px;
  font-weight: 500;
}
.hero-link:hover {
  color: var(--maps-orange);
}
/* "Based in New York" follows the buttons instead of being pinned to the hero's bottom edge (GTX-3504) */
.hero-location {
  margin: 72px 0 0;
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.9;
  letter-spacing: 2.4px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.72);
}
.hero-location i {
  display: block;
  width: 32px;
  height: 2px;
  margin-bottom: 14px;
  background: var(--maps-orange);
}

@media (max-width: 900px) and (orientation: portrait) {
  .hero {
    min-height: 680px;
    justify-content: flex-start;
  }
  .hero-content {
    padding-top: 56px;
    padding-bottom: 160px;
  }
  /* Phones and tablets: the portrait render, full width and standing on the hero's bottom edge; any space above it is
     the hero's own navy, which matches the render's dark wall */
  .hero-stage {
    --horizon: 74.4%;
    top: auto;
    bottom: 0;
    right: 0;
    width: 100cqw;
    aspect-ratio: 2 / 3;
    -webkit-mask-image: none;
    mask-image: none;
  }
  .hero-shade {
    background: linear-gradient(180deg, rgba(5, 15, 31, 0.8) 0%, rgba(5, 15, 31, 0.45) 60%, rgba(5, 15, 31, 0) 80%);
  }
}

/* Phones, tablets and foldables (GTX-3605, Alex's QA): the text ends above the sculpture, and "Based in New York" moves
   under it, onto the floor at the hero's bottom edge. The portrait stage is 1.5 times the screen's width and the
   sculpture fills its lower 48.8%, so the text keeps 73.2vw plus a gap clear below it */
@media (max-width: 900px) and (orientation: portrait) {
  .hero-content {
    padding-bottom: calc(73.2vw + 32px);
  }
  .hero-location {
    position: absolute;
    left: var(--gutter);
    bottom: 20px;
    margin: 0;
  }
}

/* Scroll drift (GTX-3605): the sculpture sinks 15px for every 100px scrolled, as the old parallax script did, but the
   browser runs it alongside the scroll itself, so a fast flick on a phone no longer makes it stutter. Browsers without
   scroll-driven animations (Firefox today, older Safari), and visitors who prefer reduced motion, see it still */
@keyframes hero-drift {
  to {
    transform: translate3d(0, 150px, 0);
  }
}
@supports (animation-timeline: scroll()) {
  @media (prefers-reduced-motion: no-preference) {
    .hero-stage {
      animation: hero-drift linear both;
      animation-timeline: scroll(root block);
      animation-range: 0 1000px;
    }
  }
}

/* WHO WE ARE — single declarative block */
.who {
  background: var(--bg-section-alt);
  border-top: 1px solid var(--border-subtle);
}
.who-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 96px;
  align-items: start;
}
.who h2 {
  font-size: 13px;
  font-weight: 500;
  font-family: var(--font-mono);
  letter-spacing: 0.6px;
  text-transform: uppercase;
  margin: 0;
  color: var(--fg-muted);
}
.who-prose .h-statement {
  font-size: 42px;
  line-height: 56px;
  letter-spacing: -1px;
  font-weight: 300;
  color: var(--fg-primary);
  margin: 0 0 40px;
  max-width: 26ch;
}
.who-prose .h-statement .o {
  color: var(--accent);
  font-weight: 400;
}
.who-prose p {
  font-size: 19px;
  line-height: 32px;
  color: var(--fg-secondary);
  margin: 0 0 24px;
  max-width: 60ch;
}
.who-prose p:last-child {
  margin-bottom: 0;
}

/* WHAT WE DO — three pillar blocks */
.what {
  background: var(--bg-page);
  border-top: 1px solid var(--border-subtle);
}
.what-head {
  max-width: 760px;
  margin-bottom: 96px;
}
.what-head h2 {
  font-size: 56px;
  line-height: 68px;
  letter-spacing: -1.4px;
  font-weight: 300;
  margin: 0;
  color: var(--fg-primary);
}
.what-head h2 .o {
  color: var(--accent);
  font-weight: 400;
}
.what-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 56px;
}
.what-item {
  border-top: 1px solid var(--border-strong);
  padding-top: 28px;
}
.what-item .num {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.6px;
  color: var(--accent-num);
  text-transform: uppercase;
  margin-bottom: 24px;
}
.what-item h3 {
  font-size: 26px;
  line-height: 34px;
  font-weight: 500;
  margin: 0 0 18px;
  color: var(--fg-primary);
  letter-spacing: -0.3px;
}
.what-item p {
  margin: 0;
  font-size: 16px;
  line-height: 28px;
  color: var(--fg-secondary);
}

/* MARKETS — wide statement band */
.markets {
  background: var(--bg-section-alt);
  border-top: 1px solid var(--border-subtle);
}
.stat {
  padding-top: 32px;
}
@keyframes ticker {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

/* TECHNOLOGY */
.tech {
  background: var(--bg-page);
  border-top: 1px solid var(--border-subtle);
}

/* CONNECT — careers + contact */
.careers {
  background: var(--bg-section-alt);
  border-top: 1px solid var(--border-subtle);
  padding: 160px 0;
}
.connect {
  background: var(--bg-page);
  border-top: 1px solid var(--border-subtle);
  padding: 160px 0;
}
.connect-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
}
.connect-card {
  border-top: 2px solid var(--accent);
  padding-top: 40px;
}
/* Right-hand panels */
.roles-panel {
  border-top: 1px solid var(--border-strong);
  padding-top: 40px;
}
.roles-panel .label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--fg-muted);
  margin-bottom: 28px;
}
.recruiter-notice {
  margin: 36px 0 0;
  padding-top: 28px;
  border-top: 1px solid var(--border-mid);
  font-size: 13px;
  line-height: 21px;
  color: var(--fg-muted);
  max-width: 64ch;
}
.recruiter-notice .recruiter-label {
  display: block;
  margin-bottom: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--fg-secondary);
}
.recruiter-notice a {
  color: var(--fg-primary);
  border-bottom: 1px solid var(--accent-rule);
  transition:
    color 0.15s,
    border-color 0.15s;
}
.recruiter-notice a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}
/* Contact directory */
.contact-directory {
  border-top: 1px solid var(--border-strong);
  padding-top: 40px;
}
.offices {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin-top: 8px;
}
.offices .office .city {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--accent-rule);
  margin-bottom: 8px;
}
.offices .office .addr {
  color: var(--fg-primary);
  font-size: 14px;
  line-height: 22px;
  font-weight: 300;
}
.connect-card .label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--accent-rule);
  margin-bottom: 28px;
}
.connect-card h3 {
  font-size: 38px;
  line-height: 48px;
  letter-spacing: -0.8px;
  font-weight: 300;
  color: var(--fg-primary);
  margin: 0 0 24px;
  max-width: 16ch;
}
.connect-card p {
  font-size: 17px;
  line-height: 28px;
  color: var(--fg-secondary);
  margin: 0 0 36px;
  max-width: 62ch;
  text-wrap: pretty;
}
.connect-card a.action {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--fg-primary);
  font-size: 15px;
  font-weight: 500;
  border-bottom: 1px solid var(--accent);
  padding-bottom: 4px;
  transition: color 0.15s;
}
.connect-card a.action:hover {
  color: var(--accent);
}
.connect-card .meta {
  margin-top: 28px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--fg-muted);
}

.contact-form-wrap {
  position: relative;
}
.contact-form {
  background: var(--bg-section-alt);
  border: 1px solid var(--border-subtle);
  padding: 40px;
  box-shadow: var(--shadow-card);
}
.contact-form .field {
  display: block;
  margin-bottom: 24px;
}
.contact-form .field:last-of-type {
  margin-bottom: 0;
}
.contact-form .field label {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--fg-secondary);
  margin: 0 0 10px;
}
.contact-form .field label .req {
  color: var(--accent);
}
.contact-form .field input[type="text"],
.contact-form .field input[type="email"],
.contact-form .field select,
.contact-form .field textarea {
  width: 100%;
  font: 400 16px/24px var(--font-sans);
  color: var(--fg-primary);
  background: var(--bg-page);
  border: 1px solid var(--border-mid);
  padding: 14px 16px;
  box-sizing: border-box;
  -webkit-appearance: none;
  appearance: none;
  border-radius: 0;
  transition:
    border-color 0.15s,
    box-shadow 0.15s;
}
.contact-form .field textarea {
  min-height: 140px;
  resize: vertical;
  font-family: var(--font-sans);
}
.contact-form .field select {
  background-image:
    linear-gradient(45deg, transparent 50%, var(--fg-secondary) 50%),
    linear-gradient(-45deg, transparent 50%, var(--fg-secondary) 50%);
  background-position:
    calc(100% - 22px) calc(50% - 2px),
    calc(100% - 16px) calc(50% - 2px);
  background-size:
    6px 6px,
    6px 6px;
  background-repeat: no-repeat;
  padding-right: 44px;
  cursor: pointer;
}
.contact-form .field input:hover,
.contact-form .field select:hover,
.contact-form .field textarea:hover {
  border-color: var(--border-strong);
}
.contact-form .field input:focus,
.contact-form .field select:focus,
.contact-form .field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-tint);
}
.contact-form .field .error {
  margin: 8px 0 0;
  font-size: 12px;
  line-height: 18px;
  color: #d93b3b;
  display: none;
}
.contact-form .field.is-invalid input,
.contact-form .field.is-invalid select,
.contact-form .field.is-invalid textarea {
  border-color: #d93b3b;
}
.contact-form .field.is-invalid .error {
  display: block;
}

.contact-form .field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 24px;
}
.contact-form .field-grid .field {
  margin-bottom: 0;
}

.contact-form .form-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--border-subtle);
  flex-wrap: wrap;
}
.contact-form .privacy {
  font-size: 12px;
  line-height: 18px;
  color: var(--fg-muted);
  margin: 0;
  max-width: 36ch;
}
.contact-form .privacy a {
  color: var(--fg-secondary);
  border-bottom: 1px solid var(--border-strong);
  padding-bottom: 1px;
}
.contact-form .privacy a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}
.contact-form .submit-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 14px 28px;
  background: var(--accent);
  color: #fff;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  border: 0;
  cursor: pointer;
  transition: background 0.15s;
}
.contact-form .submit-btn:hover {
  background: var(--accent-hover);
}

/* Inline success state */

.connect-card .connect-meta {
  margin-top: 32px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.4px;
  color: var(--fg-muted);
}

@media (max-width: 720px) {
  .contact-form {
    padding: 28px 24px;
  }
  .contact-form .field-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .contact-form .field-grid .field {
    margin-bottom: 24px;
  }
  .form-success {
    padding: 56px 24px;
  }
}

/* ---- 768px — homepage sections ---- */
@media (max-width: 768px) {
  .careers,
  .connect {
    padding: 80px 0;
  }
  .hero-actions {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
  .hero-actions .btn-primary {
    justify-content: center;
    width: 100%;
  }
  .who-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .who-prose .h-statement {
    font-size: clamp(22px, 6vw, 42px);
    line-height: 1.3;
    letter-spacing: -0.5px;
  }
  .who-prose p {
    font-size: 16px;
    line-height: 26px;
  }
  .what-head {
    margin-bottom: 48px;
  }
  .what-head h2 {
    font-size: clamp(32px, 8vw, 56px);
    line-height: 1.2;
    letter-spacing: -1px;
  }
  .what-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .connect-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }
}

/* Phones held sideways in Safari (GTX-3605, Alex's and Joel's QA): Safari leaves room for the notch, so the page is
   about 730px wide and the 768px rule would stretch the button across the sculpture beside the text. Keep the buttons
   side by side as on desktop, keep the hero's height (the extra bottom padding below replaces the stacked buttons),
   and draw the sculpture 20% smaller so it sits clear of the text */
@media (max-width: 900px) and (orientation: landscape) {
  .hero-actions {
    flex-direction: row;
    align-items: center;
    gap: 32px;
  }
  .hero-actions .btn-primary {
    width: auto;
  }
  .hero-stage {
    --stage-w: 800px;
  }
}
/* Only where the 768px rule had stacked the buttons: the extra padding keeps the hero the height it had */
@media (max-width: 768px) and (orientation: landscape) {
  .hero-content {
    padding-bottom: 141px;
  }
}

/* ---- 480px — homepage ---- */
@media (max-width: 480px) {
  .markets-stats {
    grid-template-columns: 1fr;
  }
}
