:root {
  --paper: #fbfcfa;
  --ink: #283a39;
  --accent: #456a5e;
  --accent-hover: #2f5143;
  --muted: #68756d;
  --line: #dfe6e0;
  --sans: 'Manrope', sans-serif;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  --space-20: 80px;
  --space-24: 96px;
  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --ease-enter: cubic-bezier(.16, 1, .3, 1);
}

* { box-sizing: border-box; }

html {
  min-height: 100%;
  background: var(--paper);
}

body {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  min-height: 100svh;
  margin: 0;
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection {
  color: #244237;
  background: #d5e3d9;
}

/* Sand stays behind the content and never intercepts input. */
#time-sand {
  position: fixed;
  inset: 0;
  z-index: 0;
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.wrap {
  position: relative;
  z-index: 1;
  width: calc(100% - var(--space-24));
  max-width: 80rem;
  margin-inline: auto;
}

.site-header {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
  min-height: var(--space-24);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: var(--space-3);
}

.brand-icon {
  flex: 0 0 auto;
  width: var(--space-8);
  height: var(--space-8);
  color: var(--accent);
}

.brand-name {
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 2rem;
  letter-spacing: -.04em;
  white-space: nowrap;
}

.brand-name > span { white-space: nowrap; }

.contact-link {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: var(--space-6);
  min-height: var(--space-12);
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--accent);
  border-radius: 4px;
  color: var(--paper);
  background: var(--accent);
  font-size: .875rem;
  font-weight: 600;
  line-height: 1.25rem;
  text-decoration: none;
  transition: background-color 300ms var(--ease-out), border-color 300ms var(--ease-out), transform 500ms var(--ease-out);
}

.contact-arrow {
  flex: 0 0 auto;
  width: var(--space-4);
  height: var(--space-4);
  transition: transform 500ms var(--ease-out);
}

.contact-link:hover {
  border-color: var(--accent-hover);
  background: var(--accent-hover);
}

.contact-link:hover .contact-arrow { transform: translate(2px, -2px); }
.contact-link:active { transform: scale(.98); }

.contact-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: var(--space-1);
}

main {
  display: flex;
  flex: 1 0 auto;
  flex-direction: column;
}

.hero {
  display: grid;
  flex: 1;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  align-items: center;
  gap: var(--space-8);
  min-height: 32rem;
  max-height: 45rem;
  padding: var(--space-16) 0 var(--space-20);
}

.hero-copy {
  position: relative;
  z-index: 1;
  min-width: 0;
}

h1 {
  max-width: 680px;
  margin: 0;
  font-size: 3rem;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -.055em;
  text-wrap: balance;
}

.hero-line {
  display: block;
  text-wrap: balance;
}

.hero-line + .hero-line { margin-top: var(--space-2); }

.hero-description {
  max-width: 680px;
  margin: var(--space-8) 0 0;
  color: var(--muted);
  font-size: 1.125rem;
  line-height: 1.75rem;
  text-wrap: pretty;
}

.hero-visual {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: center;
}

.chamber-scene {
  display: block;
  width: 100%;
  max-width: 40rem;
  height: auto;
  aspect-ratio: 18 / 13;
  object-fit: contain;
  user-select: none;
}

/* Identical group widths keep the continuous marquee seamless. */
.team-line {
  display: grid;
  grid-template-columns: 9rem minmax(0, 1fr);
  align-items: center;
  gap: var(--space-8);
  min-width: 0;
  padding: var(--space-6) 0;
  border-top: 1px solid var(--line);
}

.team-line > p {
  margin: 0;
  color: var(--muted);
  font-size: .875rem;
  line-height: 1.25rem;
  text-wrap: pretty;
}

.logo-marquee {
  min-width: 0;
  overflow: hidden;
}

.logo-track {
  display: flex;
  width: max-content;
  /* Constant velocity preserves the continuous flow requested for this strip. */
  animation: logo-scroll 40s linear infinite;
}

.logo-group {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
}

.logo-item {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 15rem;
  height: var(--space-12);
}

.logo-item img {
  display: block;
  max-width: 11rem;
  max-height: var(--space-10);
  height: auto;
  object-fit: contain;
  filter: grayscale(1);
  opacity: var(--logo-opacity, .6);
  mix-blend-mode: multiply;
  user-select: none;
}

.logo-jump { width: 6.25rem; }
.logo-millennium { width: 10.5625rem; }
.logo-bloomberg { width: 10.375rem; }
.logo-citadel { width: 10.25rem; }
.logo-optiver { width: 9.0625rem; }
.logo-bloomberg { --logo-opacity: .48; }

/* Each whole wordmark fades with its distance from the banner edge. */
.logo-marquee.has-whole-logos img {
  opacity: calc(var(--logo-opacity, .6) * var(--edge-visibility, 0));
}

footer {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  min-height: var(--space-16);
  padding-block: var(--space-6);
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: .75rem;
  line-height: 1rem;
}

.footer-domain { font-weight: 500; }

@keyframes logo-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@keyframes settle-in {
  from { opacity: 0; transform: translateY(6px); filter: blur(2px); }
  to { opacity: 1; transform: translateY(0); filter: blur(0); }
}

@media (prefers-reduced-motion: no-preference) {
  .site-header,
  .hero-line,
  .hero-description,
  .hero-visual,
  .team-line {
    animation: settle-in 800ms var(--ease-enter) both;
  }

  .hero-line:first-child { animation-delay: 60ms; }
  .hero-line:nth-child(2) { animation-delay: 120ms; }
  .hero-description { animation-delay: 180ms; }
  .hero-visual { animation-delay: 240ms; }
  .team-line { animation-delay: 300ms; }
}

@media (min-width: 1200px) {
  h1 { font-size: 3.75rem; }
}

@media (min-width: 1440px) {
  h1 { font-size: 4.5rem; }
}

@media (min-width: 960px) and (max-height: 800px) {
  .hero {
    min-height: 26rem;
    padding: var(--space-12) 0 var(--space-16);
  }

  .chamber-scene {
    width: auto;
    max-width: 100%;
    max-height: 20rem;
  }
}

@media (max-width: 959px) {
  .wrap { width: calc(100% - var(--space-12)); }
  .brand-name { font-size: 1.25rem; line-height: 1.75rem; }

  .hero {
    flex: 0 0 auto;
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-8);
    min-height: 0;
    max-height: none;
    padding: var(--space-16) 0 var(--space-12);
  }

  h1 { font-size: 3.75rem; }
  .chamber-scene { max-width: 36rem; }
  .team-line { grid-template-columns: 8rem minmax(0, 1fr); gap: var(--space-6); }
  .logo-item { width: 13rem; }
  .logo-item img { max-width: 10rem; }
}

@media (max-width: 599px) {
  .site-header { gap: var(--space-3); }
  .brand { gap: var(--space-2); }
  .brand-icon { width: var(--space-6); height: var(--space-8); }
  .brand-name { font-size: 1.125rem; line-height: 1.75rem; white-space: normal; }
  .brand-name > span { display: block; }
  .contact-link { gap: var(--space-2); }
  .contact-arrow { display: none; }
  h1 { font-size: 3rem; }
  .hero-description { margin-top: var(--space-6); font-size: 1rem; line-height: 1.5rem; }
  .hero { gap: var(--space-6); padding: var(--space-12) 0 var(--space-8); }
  .team-line { grid-template-columns: minmax(0, 1fr); gap: var(--space-4); }
  .team-line > p { font-size: .75rem; line-height: 1rem; }
  .logo-item { width: 9rem; height: var(--space-10); }
  .logo-item img { max-width: 7rem; max-height: var(--space-8); }
  .logo-jump { width: 5.5rem; }
  .logo-track { animation-duration: 32s; }
  footer { padding-block: var(--space-4); }
}

@media (max-width: 479px) {
  h1 { font-size: 2.25rem; line-height: 2.5rem; }
  .hero-line + .hero-line { margin-top: 0; }
}

@media (max-width: 359px) {
  .wrap { width: calc(100% - var(--space-8)); }
  .brand-icon { display: none; }
  h1 { font-size: 1.875rem; line-height: 2.25rem; }
  footer { flex-wrap: wrap; gap: var(--space-2); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .logo-track { width: 100%; transform: none; }
  .logo-marquee { overflow: visible; mask-image: none; -webkit-mask-image: none; }
  .logo-group { width: 100%; flex-wrap: wrap; justify-content: space-around; gap: var(--space-4) var(--space-6); }
  .logo-group[aria-hidden='true'] { display: none; }
  .logo-item { width: auto; min-width: 9rem; }
}
