/* ---------------------------------------------------------------------------
   Hero - particle logo frame, title/sub, stats + logo
   marquee, reviews carousel.

   Plain CSS on the tokens in css/tokens.css. The `sm:` breakpoint is 640px.
   The few non-token colours (review star gold, the white hairline alphas) are kept
   as local custom properties below.
   --------------------------------------------------------------------------- */

:root {
  --hero-star: #f5b90a; /* review stars */
  --hero-clamp-fade: #1c1c1d; /* clamped-quote fade: card tint over #0f0f10 */
  --hero-tw-transition: cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Hero section ------------------------ */

.hero-section {
  position: relative;
  display: flex;
  flex-direction: column;
  padding-bottom: 80px;
  background: var(--color-bg);
}

/* Dot grid + Gear Snap click effect layer (js/engines/ */
.hero-grid {
  pointer-events: none;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

@media (min-width: 640px) {
  .hero-section {
    padding-bottom: 160px;
  }
}

/* Globe wrapper: in normal flow, NOT fixed */
.hero-globe {
  position: relative;
  height: 100svh;
  width: 100%;
  opacity: 0;
  transition: opacity 1000ms var(--ease-out);
}

.hero-globe.is-ready {
  opacity: 1;
}

.hero-globe__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* Hero text pulled up over the globe */
.hero__content {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  margin-top: calc(-100svh + max(38svh, min(33vmin, 256px) + 120px) + min(33vmin, 256px) + 28px);
}

.hero-copy {
  margin: 0 auto;
  width: 100%;
  padding: 0 16px;
  text-align: center;
}

.hero-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--text-display-xl);
  font-weight: 800;
  line-height: 1;
  letter-spacing: var(--tracking-display);
  color: var(--color-fg);
  will-change: transform;
}

.hero-sub {
  margin: 24px auto 0;
  max-width: 560px;
  font-family: var(--font-mono);
  font-size: var(--text-body);
  line-height: 1.7;
  font-weight: 300;
  color: var(--color-fg);
  will-change: transform;
}

/* --- Socials ----------------------------- */
/* Dark glass discs in the same material language as the nav pill: hairline
   edge, inset top highlight, no fill of their own. Hover inverts the disc to
   cream with the glyph knocked out, and springs it up - the overshoot is what
   makes it feel physical rather than a CSS hover. Tokens only: one accent. */

.hero-socials {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
  will-change: transform;
}

.hero-social {
  --disc: color-mix(in srgb, var(--color-surface) 40%, transparent);
  position: relative;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 999px;
  border: var(--hairline) solid color-mix(in srgb, var(--color-fg) 16%, transparent);
  background: var(--disc);
  box-shadow: inset 0 0.5px 0 rgb(255 255 255 / 0.1);
  -webkit-backdrop-filter: blur(12px) saturate(140%);
  backdrop-filter: blur(12px) saturate(140%);
  color: var(--color-fg-secondary);
  transition:
    transform 420ms var(--ease-spring),
    background-color 260ms var(--ease-out),
    border-color 260ms var(--ease-out),
    color 260ms var(--ease-out);
}

.hero-social svg {
  width: 19px;
  height: 19px;
  /* The glyph rides a touch slower than the disc, so the lift reads as depth. */
  transition: transform 420ms var(--ease-spring);
}

.hero-social:hover {
  background: var(--color-fg);
  border-color: var(--color-fg);
  color: var(--color-bg);
  transform: translateY(-5px);
}

.hero-social:hover svg {
  transform: scale(1.08);
}

.hero-social:active {
  transform: translateY(-2px) scale(0.97);
}

.hero-social:focus-visible {
  outline: var(--hairline) solid var(--color-fg);
  outline-offset: 4px;
}

@media (max-width: 767px) {
  .hero-socials {
    gap: 12px;
    margin-top: 24px;
  }

  .hero-social {
    width: 46px;
    height: 46px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-social,
  .hero-social svg {
    transition: background-color 260ms var(--ease-out), color 260ms var(--ease-out);
  }

  .hero-social:hover,
  .hero-social:active,
  .hero-social:hover svg {
    transform: none;
  }
}

/* blurWordReveal wordsClass "inline-block [will-change:filter,opacity]" */
.hero-word {
  display: inline-block;
  will-change: filter, opacity;
}

/* --- Stats row --------------------------- */

.hero-stats {
  position: relative;
  margin: 48px auto 0;
  display: flex;
  width: 100%;
  min-height: 72px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding: 0 16px;
  will-change: transform;
}

.hero-stats__marquee {
  pointer-events: none;
  position: absolute;
  inset: 0;
  display: none;
}

.hero-stats__row-marquee {
  position: relative;
  z-index: 10;
  height: 40px;
  width: 100%;
}

@media (min-width: 640px) {
  .hero-stats {
    margin-top: 80px;
    flex-direction: row;
    gap: 0;
    padding: 0;
  }
  .hero-stats__marquee {
    display: block;
  }
  .hero-stats__row-marquee {
    display: none;
  }
}

/* --- Logo marquee --------------------------- */

.logo-marquee {
  pointer-events: none;
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.logo-marquee--row {
  -webkit-mask-image: linear-gradient(to right, transparent 0px, rgba(0, 0, 0, 0.3) 16px, #000 56px, #000 calc(100% - 56px), rgba(0, 0, 0, 0.3) calc(100% - 16px), transparent 100%);
  mask-image: linear-gradient(to right, transparent 0px, rgba(0, 0, 0, 0.3) 16px, #000 56px, #000 calc(100% - 56px), rgba(0, 0, 0, 0.3) calc(100% - 16px), transparent 100%);
}

.logo-marquee__track {
  display: flex;
  align-items: center;
  white-space: nowrap;
  will-change: transform;
}

.logo-marquee__group {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  gap: 40px;
  padding-right: 40px;
}

/* BrewedOps: tool logo + name (same set as the portfolio's ToolsMarquee). Opacity .6 -> 1 on hover is the. */
.logo-marquee__item {
  pointer-events: auto;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: var(--text-label-l);
  font-weight: 600;
  line-height: 20px;
  letter-spacing: var(--tracking-label-tight);
  color: var(--color-fg);
  opacity: 0.6;
  transition: opacity 300ms var(--ease-out);
}

.logo-marquee__item:hover {
  opacity: 1;
}

/* Fixed 20px boxes so the marquee's loop width is right before the images decode. */
.logo-marquee__img,
.logo-marquee__icon {
  display: block;
  flex-shrink: 0;
  width: 20px;
  height: 20px;
}

.logo-marquee__img {
  object-fit: contain;
}

/* Single-colour SVG silhouettes, tinted with the text colour: several brand colours (Codex, Cursor, Hermes)
   are near-black and vanish on the black hero. The mask-image is set inline in the markup: a url() passed
   through a custom property resolves against this stylesheet, not the page. */
.logo-marquee__icon {
  background: var(--color-fg);
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
}

/* --- Reviews carousel -------------------- */

.hero-carousel {
  position: relative;
  z-index: 20;
  margin-top: 48px;
  width: 100%;
  overflow-x: clip;
  padding: 32px 0 96px;
  will-change: transform;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 12%, #000 88%, transparent 100%);
  mask-image: linear-gradient(to right, transparent 0%, #000 12%, #000 88%, transparent 100%);
}

.hero-carousel__track {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
  will-change: transform;
}

/* Review card */
.hero-review {
  flex-shrink: 0;
  padding: 16px 12px;
}

.hero-review__body {
  display: flex;
  min-height: 220px;
  width: 400px;
  flex-direction: column;
  overflow: hidden;
  border-radius: 14px;
  border: var(--hairline) solid var(--color-border);
  padding: 24px;
  will-change: transform;
  -webkit-backdrop-filter: blur(24px) saturate(1.5);
  backdrop-filter: blur(24px) saturate(1.5);
  background: linear-gradient(135deg, rgba(242, 239, 233, 0.07) 0%, rgba(242, 239, 233, 0.025) 100%);
}

.hero-review__body.is-expandable {
  cursor: pointer;
}

.hero-review__source {
  display: flex;
  align-items: center;
  gap: 8px;
  will-change: transform;
}

.hero-review__source p {
  margin: 0;
  font-family: var(--font-mono);
  font-size: var(--text-label-s);
  line-height: 1.4;
  letter-spacing: var(--tracking-label-tight);
  text-transform: uppercase;
  color: color-mix(in srgb, var(--color-fg) 45%, transparent);
}

.hero-review__stars {
  margin: 12px 0 0;
  font-family: var(--font-mono);
  font-size: var(--text-body-sm);
  line-height: 1.6;
  letter-spacing: 2px;
  color: var(--hero-star);
  will-change: transform;
}

.hero-review__stars span {
  color: color-mix(in srgb, var(--color-fg) 15%, transparent);
}

.hero-review__quote {
  position: relative;
  margin: 16px 0 0;
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: var(--text-body-sm);
  line-height: 1.6;
  font-weight: 300;
  font-style: italic;
  color: var(--color-fg);
  will-change: transform;
}

/* a.css [data-review-quote][data-clamped]:after */
.hero-review__quote[data-clamped]::after {
  content: '\2026';
  position: absolute;
  bottom: 0;
  right: 0;
  padding-left: 2rem;
  color: var(--color-fg);
  pointer-events: none;
  background: linear-gradient(90deg, color-mix(in srgb, var(--hero-clamp-fade) 0%, transparent) 0%, color-mix(in srgb, var(--hero-clamp-fade) 55%, transparent) 70%, color-mix(in srgb, var(--hero-clamp-fade) 85%, transparent) 100%);
}

.hero-review__more {
  margin-top: 8px;
  align-self: flex-start;
  font-family: var(--font-mono);
  font-size: var(--text-label-s);
  line-height: 1.4;
  letter-spacing: var(--tracking-label-tight);
  text-transform: uppercase;
  color: var(--color-accent);
}

.hero-review__more[hidden] {
  display: none;
}

.hero-review__footer {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  border-top: var(--hairline) solid var(--color-border-soft);
  padding-top: 12px;
  will-change: transform;
}

.hero-review__avatar {
  display: flex;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  border: var(--hairline) solid var(--color-border);
  background: color-mix(in srgb, var(--color-fg) 5%, transparent);
  font-family: var(--font-mono);
  font-size: 10px;
  color: color-mix(in srgb, var(--color-fg) 70%, transparent);
}

.hero-review__byline {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.5;
  color: color-mix(in srgb, var(--color-fg) 55%, transparent);
}

.hero-review__byline span {
  color: color-mix(in srgb, var(--color-fg) 25%, transparent);
}

@media (min-width: 640px) {
  .hero-review__avatar {
    width: 36px;
    height: 36px;
    font-size: 11px;
  }
}
