/* O2S1 v2 — additions layered over the original build. Same palette, type and layout. */

::selection {
  background: var(--acc);
  color: #fff;
}
html {
  scrollbar-color: #2a3040 var(--bg);
}
p,
.out-note,
.card figcaption span {
  text-wrap: pretty;
}
.sig-value,
.stat-n,
.row-i {
  font-variant-numeric: tabular-nums;
}

/* ---------- Top bar: glass once past the film, page progress hairline, active section ---------- */
body.past .top {
  background: color-mix(in srgb, var(--bg) 74%, transparent);
  -webkit-backdrop-filter: blur(16px) saturate(1.5);
  backdrop-filter: blur(16px) saturate(1.5);
}
.top::after {
  content: "";
  position: absolute;
  inset: auto 0 -1px 0;
  height: 1px;
  background: linear-gradient(90deg, var(--acc), var(--acc2));
  transform-origin: 0 50%;
  transform: scaleX(var(--page, 0));
  opacity: 0;
  transition: opacity 0.5s var(--ease);
}
body.past .top::after {
  opacity: 1;
}
.nav a {
  position: relative;
  padding-block: 6px;
  transition:
    color 0.4s var(--ease),
    opacity 0.4s var(--ease);
}
.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--acc);
  transform: scaleX(0);
  transform-origin: 100% 50%;
  transition: transform 0.5s var(--ease);
}
.nav a:hover::after,
.nav a[data-on]::after {
  transform: scaleX(1);
  transform-origin: 0 50%;
}
.nav a[data-on] {
  color: var(--acc2);
}

/* ---------- Buttons: a single soft sheen on hover ---------- */
.btn,
.pill {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.btn::after,
.pill::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(
    105deg,
    transparent 35%,
    rgba(255, 255, 255, 0.34) 50%,
    transparent 65%
  );
  transform: translateX(-120%);
  transition: transform 0.9s var(--ease);
}
.btn:hover::after,
.pill:hover::after {
  transform: translateX(120%);
}
.btn:hover,
.pill:hover {
  box-shadow: 0 14px 34px -14px rgba(77, 143, 214, 0.75);
}
.btn,
.pill {
  transition:
    transform 0.4s var(--ease),
    filter 0.4s var(--ease),
    box-shadow 0.4s var(--ease);
}

/* ---------- Hero: keep long lines readable over the film ---------- */
.beat h2,
.beat p,
.hello-p {
  text-shadow: 0 1px 24px rgba(4, 7, 12, 0.55);
}

/* ---------- About: stat tiles ---------- */
.stat {
  position: relative;
}
.stat::before {
  content: "";
  position: absolute;
  inset: -1px 0 auto 0;
  height: 1px;
  background: linear-gradient(90deg, var(--acc), transparent);
  transform-origin: 0 50%;
  transition: transform 1.6s var(--ease);
}
.stat.pre::before {
  transform: scaleX(0);
}
.stat:nth-child(2)::before {
  transition-delay: 0.12s;
}
.stat:nth-child(3)::before {
  transition-delay: 0.24s;
}
.stat:nth-child(4)::before {
  transition-delay: 0.36s;
}
.stat-n[data-suf]::after {
  content: attr(data-suf);
  color: var(--acc2);
  font-size: 0.62em;
  vertical-align: 0.42em;
  margin-left: 0.04em;
  letter-spacing: 0;
}
.story {
  position: relative;
  overflow: hidden;
}
.story::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  width: min(1100px, 90vw);
  height: 420px;
  transform: translateX(-50%);
  background: radial-gradient(
    ellipse at 50% 0%,
    rgba(77, 143, 214, 0.16),
    transparent 68%
  );
  pointer-events: none;
}
.story > .wrap {
  position: relative;
}

/* ---------- Engagement panel: cursor-following edge light ---------- */
.panel {
  position: relative;
  box-shadow:
    0 40px 80px -40px rgba(8, 9, 12, 0.55),
    0 2px 0 rgba(255, 255, 255, 0.04) inset;
}
.panel::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: radial-gradient(
    380px circle at var(--mx, 50%) var(--my, 0%),
    rgba(157, 185, 209, 0.95),
    rgba(77, 143, 214, 0.55) 35%,
    transparent 70%
  );
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask:
    linear-gradient(#000 0 0) content-box exclude,
    linear-gradient(#000 0 0);
  opacity: var(--spot, 0);
  transition: opacity 0.6s var(--ease);
  pointer-events: none;
}
.chip {
  transition:
    background 0.3s var(--ease),
    color 0.3s var(--ease),
    border-color 0.3s var(--ease),
    transform 0.3s var(--ease);
}
.chip:active {
  transform: scale(0.97);
}
.stage {
  position: relative;
}
.stage.on {
  box-shadow: 0 0 22px -8px rgba(77, 143, 214, 0.9);
}
.range::-webkit-slider-thumb {
  box-shadow: 0 0 0 6px rgba(77, 143, 214, 0.16);
  transition: box-shadow 0.3s var(--ease);
}
.range:active::-webkit-slider-thumb {
  box-shadow: 0 0 0 10px rgba(77, 143, 214, 0.22);
}

/* ---------- What we build: card depth ---------- */
/* the new headline is longer: keep it on one line on desktop and clear of the top bar */
.hs-stage {
  padding-top: 64px;
}
.hs-head h2 {
  font-size: clamp(30px, 4.1vw, 68px);
}
.card-img {
  box-shadow: 0 30px 60px -34px rgba(0, 0, 0, 0.9);
}
.card-img::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.07);
  background: linear-gradient(to top, rgba(8, 9, 12, 0.38), transparent 42%);
  pointer-events: none;
}
.card-tag {
  z-index: 1;
  box-shadow: 0 6px 18px -6px rgba(77, 143, 214, 0.9);
}
.card figcaption b {
  transition: color 0.5s var(--ease);
}
.card:hover figcaption b {
  color: var(--acc2);
}

/* ---------- Founders ---------- */
.who {
  position: relative;
  overflow: hidden;
}
.who::before {
  content: "";
  position: absolute;
  right: -22vw;
  top: -14vw;
  width: 78vw;
  aspect-ratio: 1;
  border-radius: 50%;
  background: repeating-radial-gradient(
    circle,
    transparent 0 54px,
    rgba(77, 143, 214, 0.13) 54px 55px
  );
  -webkit-mask: radial-gradient(circle, #000 12%, transparent 68%);
  mask: radial-gradient(circle, #000 12%, transparent 68%);
  pointer-events: none;
}
.who > .wrap {
  position: relative;
}
.who-grid {
  align-items: start;
}
.who-card {
  display: grid;
  gap: clamp(22px, 3vh, 34px);
}
.who-photo {
  position: relative;
  width: min(100%, 440px);
  margin: 0;
}
.who-frame {
  position: relative;
  z-index: 1;
  display: block;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: 16px;
  background: #0b0e14;
  clip-path: inset(0 round 16px);
  transform: perspective(1000px) rotateX(var(--rx, 0deg))
    rotateY(var(--ry, 0deg));
  transition:
    clip-path 1.5s var(--ease) 0.1s,
    transform 0.7s var(--ease),
    box-shadow 0.7s var(--ease);
  box-shadow: 0 40px 80px -44px rgba(0, 0, 0, 0.95);
}
.who-card.pre .who-frame {
  clip-path: inset(0 0 100% 0 round 16px);
}
.who-frame img {
  width: 100%;
  max-width: none;
  height: 100%;
  object-fit: cover;
  object-position: 50% 20%;
  transform: scale(1.08);
  filter: saturate(0.82) contrast(1.03);
  transition: filter 0.9s var(--ease);
}
.who-card:hover .who-frame img {
  filter: saturate(1) contrast(1.03);
}
.who-card:hover .who-frame {
  box-shadow:
    0 40px 80px -44px rgba(0, 0, 0, 0.95),
    0 0 70px -24px rgba(77, 143, 214, 0.7);
}
/* shared grade so two different photographs read as one set */
.who-frame::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(to top, rgba(8, 9, 12, 0.6), transparent 38%),
    linear-gradient(160deg, rgba(77, 143, 214, 0.16), transparent 55%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  border-radius: inherit;
  pointer-events: none;
}
/* glare that follows the pointer */
.who-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background: radial-gradient(
    340px circle at var(--mx, 50%) var(--my, 30%),
    rgba(190, 215, 240, 0.2),
    transparent 62%
  );
  opacity: var(--spot, 0);
  transition: opacity 0.6s var(--ease);
  pointer-events: none;
}
/* orbit ring with the O2S1 star riding it, tucked behind the portrait */
.who-orbit {
  position: absolute;
  z-index: 0;
  top: -11%;
  right: -17%;
  width: 62%;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1px solid rgba(77, 143, 214, 0.5);
  box-shadow:
    0 0 0 22px rgba(77, 143, 214, 0.035),
    inset 0 0 40px -12px rgba(77, 143, 214, 0.5);
  animation: o2-orbit 48s linear infinite;
}
.who-card:nth-child(2) .who-orbit {
  animation-duration: 64s;
  animation-direction: reverse;
}
.who-orbit::before {
  content: "";
  position: absolute;
  inset: 13%;
  border-radius: 50%;
  border: 1px dashed rgba(157, 185, 209, 0.3);
}
.who-orbit-star {
  position: absolute;
  top: -9px;
  left: 50%;
  width: 18px;
  height: 18px;
  margin-left: -9px;
  color: var(--acc);
  filter: drop-shadow(0 0 8px rgba(77, 143, 214, 0.95));
}
@keyframes o2-orbit {
  to {
    transform: rotate(360deg);
  }
}
.who-role {
  display: flex;
  align-items: center;
  gap: 10px;
}
.who-role::before {
  content: "";
  width: 22px;
  height: 1px;
  background: var(--acc);
  flex: none;
}
.who-card p:not(.who-role) {
  max-width: 46ch;
  font-size: 16.5px;
  line-height: 1.65;
}
@media (min-width: 981px) {
  .who-card:nth-child(2) {
    margin-top: clamp(48px, 9vh, 110px);
  }
}

/* ---------- How we work ---------- */
.row {
  position: relative;
}
.row::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 1px;
  background: linear-gradient(90deg, var(--acc), var(--acc2) 60%, transparent);
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform 0.9s var(--ease);
  pointer-events: none;
}
.row:hover::after,
.row:focus-visible::after {
  transform: scaleX(1);
}
.row-who {
  gap: 10px;
  min-width: 10.5em;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 12px;
  white-space: nowrap;
}
.row-note {
  max-width: 36ch;
  text-wrap: balance;
}
.row-hello .row-who {
  text-transform: none;
  letter-spacing: 0.02em;
  font-size: 13px;
}
.row-hello .row-n {
  color: var(--acc2);
}
.row-hello:hover .row-n {
  color: inherit;
}

/* ---------- Footer ---------- */
.foot {
  position: relative;
  overflow: hidden;
}
.foot::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -46vw;
  width: 110vw;
  aspect-ratio: 1;
  transform: translateX(-50%);
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(77, 143, 214, 0.2), transparent 58%),
    repeating-radial-gradient(
      circle,
      transparent 0 64px,
      rgba(77, 143, 214, 0.09) 64px 65px
    );
  -webkit-mask: radial-gradient(circle, #000 20%, transparent 66%);
  mask: radial-gradient(circle, #000 20%, transparent 66%);
  pointer-events: none;
}
.foot > .wrap {
  position: relative;
}
.foot-mark .mark-star {
  animation: o2-star 5s ease-in-out infinite;
}
@keyframes o2-star {
  0%,
  100% {
    filter: drop-shadow(0 0 0 rgba(77, 143, 214, 0));
  }
  50% {
    filter: drop-shadow(0 0 14px rgba(77, 143, 214, 0.95));
  }
}

/* ---------- Small screens ---------- */
@media (max-width: 980px) {
  .who-photo {
    width: min(100%, 380px);
  }
  .who-orbit {
    right: -12%;
  }
  .row-who {
    min-width: 0;
  }
}
@media (max-width: 640px) {
  .who-photo {
    width: 78%;
  }
  .row-who {
    font-size: 11px;
    letter-spacing: 0.06em;
  }
  .row-mark {
    display: none;
  }
  .row-hello .row-who {
    display: block;
    font-size: 12px;
  }
  .stat-l {
    font-size: 13px;
  }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .who-orbit,
  .foot-mark .mark-star {
    animation: none;
  }
  .who-card.pre .who-frame {
    clip-path: inset(0 round 16px);
  }
  .who-frame {
    transform: none;
  }
  .who-frame img {
    transform: none;
  }
  .stat.pre::before {
    transform: none;
  }
  .btn::after,
  .pill::after {
    display: none;
  }
}
