/* ============================================================
   Tektome — Homepage hero
   White stage, copy on the left, live Three.js wireframe tower
   on the right (recreates the site's background video).
   Loaded after nav.css / button.css. Tokens from
   design-system/colors_and_type.css.
   ============================================================ */

.home {
  flex: 1;
  background: var(--color-draft-white);
  font-family: var(--font-sans);
  color: var(--fg-primary);
}

.hero {
  position: relative;
  background: var(--color-draft-white);
  overflow: hidden;
  min-height: clamp(620px, 86vh, 920px);
  display: flex;
  align-items: center;
}

/* ---- Three.js canvas, full-bleed ---- */
.hero__canvas-wrap {
  position: absolute;
  inset: 0;
  z-index: 0;
}
#hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
/* Left-to-right white veil so the copy column stays clean and the
   tower reads strongest on the right — mirrors the source video. */
.hero__fade {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg,
      var(--color-draft-white) 0%,
      var(--color-draft-white) 26%,
      rgba(255,255,255,0.72) 42%,
      rgba(255,255,255,0) 60%),
    linear-gradient(0deg,
      rgba(255,255,255,0.9) 0%,
      rgba(255,255,255,0) 22%);
}

/* ---- Copy ---- */
.hero__inner {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: var(--site-width, 1300px);
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  align-items: center;
  min-height: clamp(620px, 86vh, 920px);
}
.hero__copy {
  max-width: 700px;
}
.hero__title {
  font-family: var(--font-display);
  font-weight: var(--fw-light);
  font-size: clamp(26px, 5.5vw, 64px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--color-data-black);
  margin: 0;
}
.hero__title-accent {
  color: var(--color-arch-purple);
}
.hero__lede {
  font-size: 18px;
  line-height: 1.6;
  color: var(--fg-secondary);
  margin: 28px 0 0;
  max-width: 44ch;
  text-wrap: pretty;
}
.hero__actions {
  margin-top: 40px;
}

/* ---- Responsive ----
   Below 900px keep the left-text / right-tower layout. Instead of a frosted
   capsule (which either reads as a blank panel over the white area, or smears
   the wireframe when it overlaps it), protect the copy with a HORIZONTAL
   white→transparent veil — the same technique as the desktop hero. Solid
   white sits behind the text on the left; the right side stays fully clear so
   the wireframe tower reads crisp and is never hidden. */
@media (max-width: 900px) {
  .hero {
    overflow: hidden;
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 88px 0 72px;
  }
  /* Tower remains the full-bleed background behind the copy */
  .hero__canvas-wrap {
    position: absolute;
    inset: 0;
    order: 0;
    height: auto;
    margin: 0;
  }
  /* Horizontal veil: opaque white behind the text, clear over the tower.
     The solid-white band is sized to cover the copy column so body text
     never runs across the wireframe lines. */
  .hero__fade {
    background: linear-gradient(90deg,
      var(--color-draft-white) 0%,
      var(--color-draft-white) 48%,
      rgba(255,255,255,0.9) 66%,
      rgba(255,255,255,0) 88%);
  }
  .hero__inner {
    position: relative;
    order: 0;
    min-height: 0;
    align-items: center;
    padding: 0 24px;
  }
  /* No capsule — copy sits directly on the veil, dark-on-white. Capped to
     the white band so the body line wraps before reaching the tower. */
  .hero__copy {
    max-width: min(540px, 62vw);
    background: transparent;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    border: 0;
    border-radius: 0;
    padding: 0;
  }
  .hero__lede { max-width: none; }
}
@media (max-width: 560px) {
  .hero { padding: 80px 0 60px; }
  .hero__inner { padding: 0 18px; }
  /* Smallest screens: copy spans a bit more of the width and the white band
     widens to match, so text stays on clean white. The tower keeps the
     right edge and the lower-right sweep visible. */
  .hero__fade {
    background: linear-gradient(90deg,
      var(--color-draft-white) 0%,
      var(--color-draft-white) 56%,
      rgba(255,255,255,0.85) 74%,
      rgba(255,255,255,0) 94%);
  }
  .hero__copy { padding: 0; max-width: 74vw; }
  .hero__title { font-size: clamp(26px, 8vw, 38px); }
  .hero__lede { font-size: 16px; }
  .hero__actions { margin-top: 28px; }
}
