:root {
  --background: #f8f8f5;
  --ink: #050505;
  --muted: #242424;
  --soft: #4e4e4e;
  --line: rgba(0, 0, 0, 0.13);
  --blue: #125cff;
  /* one design pixel, expressed relative to the viewport so the whole hero
     composition scales proportionally (reference artboard = 1586 x 933px).
     Because every position — text from the left, portrait from the right — is a
     multiple of --s, their relationship (and the SCALE/photo alignment) is
     preserved at any resolution. The vh term contain-scales it so the header +
     hero + metrics always fit in one screen (no scroll); whichever axis is
     tighter wins. 0.105vh ≈ 100vh / 933 with a little headroom. */
  --s: min(0.063052vw, 0.105vh);
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 18% 10%, rgba(255, 255, 255, 0.7), transparent 31rem),
    linear-gradient(180deg, #fafafa 0%, #f8f8f7 55%, #f6f6f5 100%);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  text-rendering: geometricPrecision;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  background-image:
    linear-gradient(rgba(0, 0, 0, 0.016) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 0, 0, 0.009) 1px, transparent 1px);
  background-size: 100% 8px, 8px 100%;
  opacity: 0.25;
}

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

.page-shell {
  /* Lock the whole composition to the design width and centre it. When width is
     the binding axis this equals 100vw (full-bleed); when height binds (wide or
     short screens) it's narrower than the viewport and centres as one unit, so
     the left-anchored text and right-anchored portrait never drift apart. */
  width: calc(1586 * var(--s));
  max-width: 100%;
  margin: 0 auto;
}

.site-header {
  position: relative;
  z-index: 20;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  min-height: calc(72 * var(--s));
  padding: 0 calc(72 * var(--s));
}

.brand,
.header-actions,
.availability,
.connect-link {
  display: flex;
  align-items: center;
}

.brand-mark {
  font-size: calc(24 * var(--s));
  font-weight: 850;
  line-height: 1;
  letter-spacing: -0.05em;
}

.header-actions {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: calc(28 * var(--s));
}

.availability,
.connect-link {
  color: #111318;
  font-size: calc(11 * var(--s));
  font-weight: 850;
  line-height: 1;
  letter-spacing: 0.18em;
  white-space: nowrap;
}

.connect-link {
  gap: calc(12 * var(--s));
  letter-spacing: 0.16em;
}

.connect-link svg {
  width: calc(13 * var(--s));
  height: calc(13 * var(--s));
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.dot {
  width: calc(6 * var(--s));
  height: calc(6 * var(--s));
  margin-left: calc(14 * var(--s));
  flex: 0 0 auto;
  border-radius: 999px;
  background: var(--blue);
}

.connect-link:hover,
.hero-links a:hover {
  color: var(--blue);
}

.connect-link:focus-visible,
.hero-links a:focus-visible {
  outline: 3px solid rgba(18, 92, 255, 0.26);
  outline-offset: 6px;
}

.hero-artboard {
  position: relative;
  min-height: calc(693 * var(--s));
  margin: 0;
  overflow: hidden;
}

.masthead {
  position: absolute;
  top: calc(40 * var(--s));
  left: calc(56 * var(--s));
  width: calc(1490 * var(--s));
  margin: 0;
  color: #050505;
  font-family: "Inter Tight", "Arial Black", "Helvetica Neue", Inter, system-ui, sans-serif;
  font-size: calc(252 * var(--s));
  font-weight: 800;
  line-height: 0.85;
  letter-spacing: -0.006em;
  text-transform: uppercase;
  transform: none;
}

.masthead-back {
  z-index: 2;
}

.masthead-front {
  z-index: 4;
  pointer-events: none;
  /* blend the whole front layer against the photo + page so SCALE knocks
     itself out (near-black over light, light-grey over the dark portrait) */
  mix-blend-mode: difference;
}

.word {
  display: block;
  width: fit-content;
  white-space: nowrap;
}

.word-systems {
  margin-left: 0;
}

.masthead-back .word-systems {
  color: transparent;
  background: linear-gradient(90deg, #050505 0%, #050505 74%, #171717 81%, #3b3b38 91%, #6f6f6b 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

.word-that {
  margin-left: calc(318 * var(--s));
}

.masthead-back .word-that {
  color: transparent;
  background: linear-gradient(90deg, #050505 0%, #050505 82%, #171717 90%, #555552 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

.word-scale {
  margin-left: calc(435 * var(--s));
}

.masthead-back .word-scale {
  color: transparent;
}

.masthead-front .word-systems,
.masthead-front .word-that {
  visibility: hidden;
}

/* SCALE knocks itself out against the photo the way the mockup was composited:
   a single word blended with `difference` reads black over the light page and
   light-grey over the dark portrait, and the soft seam comes from the photo. */
.masthead-front .word-scale {
  position: relative;
  /* Horizontal tone split so the difference blend renders "SC" (over the light
     page) black, and "ALE" (over the dark portrait) light-grey. The dark stop
     matches the portrait wall (~#dddddb) so the letters read pure black over
     BOTH the light page and the grey wall (difference→0 on each), killing the
     vertical seam through the "A". Transition sits on the field edge (51.4%). */
  color: transparent;
  background: linear-gradient(90deg, #f8f8f7 0%, #f8f8f7 51.4%, #dddddb 51.4%, #dddddb 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* the front square would invert with the blended layer; keep it for spacing
   but invisible, and draw a real blue square above the photo instead */
.masthead-front .blue-square,
.masthead-back .blue-square {
  visibility: hidden;
}

.accent-square {
  position: absolute;
  z-index: 5;
  top: calc(632 * var(--s));
  left: calc(1298 * var(--s));
  width: calc(36 * var(--s));
  height: calc(36 * var(--s));
  background: var(--blue);
  pointer-events: none;
}

.blue-square {
  display: inline-block;
  width: 0.105em;
  height: 0.105em;
  margin-left: 0.045em;
  background: var(--blue);
  vertical-align: 0.02em;
}

.portrait-field {
  position: absolute;
  z-index: 1;
  top: calc(8 * var(--s));
  right: calc(72 * var(--s));
  width: calc(590 * var(--s));
  height: calc(666 * var(--s));
  border: none;
  background: radial-gradient(125% 130% at 0% 100%, #d9d9d7 0%, #e0e0de 48%, #e8e8e6 100%);
  opacity: 1;
  mix-blend-mode: normal;
}

.portrait {
  position: absolute;
  z-index: 3;
  top: calc(42 * var(--s));
  right: calc(37 * var(--s));
  width: calc(625 * var(--s));
  height: auto;
  filter: grayscale(1) contrast(1.05);
  clip-path: inset(0 calc(35 * var(--s)) calc(51 * var(--s)) 0);
  pointer-events: none;
  user-select: none;
  transform: none;
}

.intro-card {
  position: absolute;
  z-index: 5;
  top: calc(410 * var(--s));
  left: calc(72 * var(--s));
  width: calc(330 * var(--s));
}

.intro-name,
.intro-role {
  margin: 0;
  font-size: calc(11 * var(--s));
  font-weight: 850;
  letter-spacing: 0.22em;
  line-height: 1.2;
}

.intro-role {
  margin-top: calc(7 * var(--s));
  color: var(--blue);
}

.intro-copy {
  margin: calc(34 * var(--s)) 0 0;
  color: var(--muted);
  font-size: calc(16 * var(--s));
  line-height: 1.68;
}

.hero-links {
  display: flex;
  align-items: center;
  gap: calc(34 * var(--s));
  margin-top: calc(36 * var(--s));
}

.hero-links a {
  font-size: calc(11 * var(--s));
  font-weight: 900;
  letter-spacing: 0.2em;
  white-space: nowrap;
}

.hero-links a:first-child {
  color: var(--blue);
}

.hero-links span {
  margin-left: calc(15 * var(--s));
  letter-spacing: 0;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  min-height: calc(156 * var(--s));
  margin: 0 calc(72 * var(--s));
  border-top: 1px solid rgba(0, 0, 0, 0.13);
}

.metric {
  display: flex;
  position: relative;
  min-height: calc(156 * var(--s));
  flex-direction: column;
  justify-content: center;
  padding: calc(34 * var(--s)) 0;
}

.metric + .metric {
  border-left: 0;
  padding-left: calc(60 * var(--s));
}

.metric + .metric::before {
  position: absolute;
  top: 50%;
  left: 0;
  width: 1px;
  height: calc(80 * var(--s));
  background: rgba(0, 0, 0, 0.12);
  content: "";
  transform: translateY(-50%);
}

.metric strong {
  display: block;
  font-size: calc(66 * var(--s));
  font-weight: 920;
  line-height: 0.95;
  letter-spacing: -0.055em;
}

.metric span {
  display: block;
  margin-top: calc(22 * var(--s));
  color: var(--soft);
  font-size: calc(11 * var(--s));
  font-weight: 850;
  letter-spacing: 0.26em;
}

.reveal,
.reveal.is-visible {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

@media (max-width: 640px) {
  :root {
    --s: 1px; /* fixed layout below; mobile rules use explicit px */
  }

  .site-header {
    min-height: 78px;
    padding: 0 24px;
  }

  .availability {
    display: none;
  }

  .hero-artboard {
    display: flex;
    min-height: 0;
    flex-direction: column;
    padding: 22px 24px 34px;
    overflow: hidden;
  }

  .masthead,
  .portrait-field,
  .portrait,
  .intro-card {
    position: relative;
    inset: auto;
  }

  .masthead {
    top: auto;
    left: auto;
    width: 100%;
    font-size: min(16.5vw, 108px);
    line-height: 0.82;
    letter-spacing: -0.02em;
    z-index: 4; /* text sits on top of the portrait it overlaps */
  }

  .masthead-front {
    display: none;
  }

  /* front layer (which carries the blended SCALE on desktop) is hidden here,
     so let the back layer paint SCALE in solid black again */
  .masthead-back .word-scale {
    color: #050505;
  }

  .masthead-back .blue-square {
    visibility: visible;
  }

  .accent-square {
    display: none;
  }

  .page-shell {
    width: 100%;
  }

  .brand-mark {
    font-size: 24px;
  }

  .availability,
  .connect-link,
  .intro-name,
  .intro-role,
  .hero-links a,
  .metric span {
    font-size: 11px;
  }

  .intro-copy {
    font-size: 16px;
  }

  .word-that,
  .word-scale {
    margin-left: 0;
  }

  /* full-bleed wall (no side gap), pulled up so its top overlaps the lower text
     lines; sits behind the text so SYSTEMS THAT SCALE reads over its light top */
  .portrait-field {
    order: 2;
    width: 100%;
    height: auto;
    aspect-ratio: 46 / 52;
    margin: -7vw 0 0 0;
    z-index: 1;
  }

  /* portrait matches the field width and aligns its bottom to the field bottom
     (width * 1226/1122 = the cutout's rendered height) */
  .portrait {
    order: 3;
    width: 100%;
    height: auto;
    margin: calc(100% * -1.0927) 0 0 0;
    clip-path: none;
    z-index: 1;
  }

  .intro-card {
    order: 4;
    width: min(100%, 360px);
    margin-top: 28px;
  }

  /* metrics as a 2 x 2 grid with the same dividers as the desktop row */
  .metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: 0 24px;
  }

  .metric {
    min-height: 0;
    padding: 26px 0;
  }

  .metric strong {
    font-size: min(10.5vw, 54px);
  }

  .metric span {
    letter-spacing: 0.14em;
  }

  .metric + .metric {
    padding-left: 0;
  }

  /* right-hand cells get the vertical divider + a little left gutter */
  .metric:nth-child(even) {
    padding-left: 18px;
  }

  .metric:nth-child(even)::before {
    display: block;
    left: 0;
    height: 54px;
  }

  .metric:nth-child(odd)::before {
    display: none;
  }

  /* horizontal divider between the two rows */
  .metric:nth-child(n + 3) {
    border-top: 1px solid rgba(0, 0, 0, 0.1);
  }
}

@media (max-width: 620px) {
  .site-header {
    padding: 0 14px;
  }

  .connect-link {
    font-size: 10px;
  }

  .connect-link svg {
    display: none;
  }

  .hero-artboard {
    padding: 18px 14px 30px;
  }

  .masthead {
    font-size: 60px;
  }

  .hero-links {
    flex-wrap: wrap;
    gap: 18px;
  }

  /* keep the 2 x 2 grid; just tighten the outer gutter on small phones */
  .metrics {
    margin: 0 14px;
  }
}

@media (hover: none), (pointer: coarse) {
  .masthead,
  .portrait {
    transition: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 1ms !important;
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
  }

  .masthead,
  .portrait {
    transform: none !important;
  }
}
