/**
 * Themeable TSTP home hero — colors via Theme Manager tokens only.
 * FILE_PATH: public/assets/css/hero.css
 *
 * --color-* aliases map to existing TSTP theme vars so palette changes
 * paint blobs, wordmark, circuits, and buttons without component edits.
 */

:root {
  --color-background: var(--header-bg, var(--bg, var(--hero-from, #0B0C10)));
  --color-surface: var(--hero-mid, var(--bg-soft, var(--panel, #14151B)));
  --color-primary: var(--teal, #5B5FEF);
  --color-secondary: var(--teal-deep, #2F8F86);
  --color-accent: var(--accent, #B99B3E);
  --color-text: var(--chrome-text, #F3F1EA);
  --color-text-muted: var(--chrome-muted, #9AA3C7);
  --color-border: var(--chrome-text, #F3F1EA);
  --hero-font-display: "Space Grotesk", "Syne", "Franklin Gothic Medium", sans-serif;
  --hero-font-mono: "JetBrains Mono", "IBM Plex Mono", ui-monospace, monospace;
  --hero-font-body: "IBM Plex Sans", "Inter", "Segoe UI", sans-serif;
}

.hero.tstp-hero,
.tstp-hero {
  --hero-bg: var(--color-background, #0B0C10);
  --hero-surface: var(--color-surface, #14151B);
  --hero-primary: var(--color-primary, #5B5FEF);
  --hero-secondary: var(--color-secondary, #2F8F86);
  --hero-accent: var(--color-accent, #B99B3E);
  --hero-text: var(--color-text, #F3F1EA);
  --hero-text-muted: var(--color-text-muted, #9AA3C7);
  --hero-border: color-mix(in srgb, var(--color-border, #F3F1EA) 18%, transparent);

  position: relative;
  width: 100%;
  min-height: var(--hero-min-height, 86vh);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: var(--hero-bg);
  color: var(--hero-text);
  isolation: isolate;
  place-items: unset;
}

.tstp-hero .hero-bg {
  display: none;
}

.tstp-hero .hero-field {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.tstp-hero .hero-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  mix-blend-mode: screen;
  pointer-events: none;
}

.tstp-hero .hero-blob.b1 {
  width: 44vw;
  height: 44vw;
  top: -14%;
  left: -10%;
  background: radial-gradient(circle, var(--hero-secondary), transparent 65%);
  opacity: 0.4;
  animation: hero-drift1 32s ease-in-out infinite;
}

.tstp-hero .hero-blob.b2 {
  width: 38vw;
  height: 38vw;
  bottom: -18%;
  right: -8%;
  background: radial-gradient(circle, var(--hero-accent), transparent 65%);
  opacity: 0.32;
  animation: hero-drift2 38s ease-in-out infinite;
}

.tstp-hero .hero-blob.b3 {
  width: 26vw;
  height: 26vw;
  top: 28%;
  left: 58%;
  background: radial-gradient(circle, var(--hero-primary), transparent 65%);
  opacity: 0.22;
  animation: hero-drift3 44s ease-in-out infinite;
}

@keyframes hero-drift1 {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(5vw, 6vh); }
}
@keyframes hero-drift2 {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(-4vw, -5vh); }
}
@keyframes hero-drift3 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-3vw, 4vh) scale(1.15); }
}

.tstp-hero .hero-gridlines {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background-image:
    linear-gradient(color-mix(in srgb, var(--hero-text) 5%, transparent) 1px, transparent 1px),
    linear-gradient(90deg, color-mix(in srgb, var(--hero-text) 5%, transparent) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at 50% 45%, black 30%, transparent 80%);
}

.tstp-hero .hero-circuits {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.tstp-hero .hero-circuits path {
  fill: none;
  stroke: color-mix(in srgb, var(--hero-text) 12%, transparent);
  stroke-width: 1.2;
}

.tstp-hero .hero-vignette {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: radial-gradient(ellipse at 50% 40%, transparent 35%, var(--hero-bg) 90%);
}

.tstp-hero .hero-content {
  position: relative;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 4.5rem 4vw 3.5rem;
  width: 100%;
  max-width: none;
  margin: 0;
}

.tstp-hero .hero-eyebrow,
.tstp-hero .eyebrow {
  font-family: var(--hero-font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--hero-text-muted);
  margin: 0 0 1.1rem;
  opacity: 0;
  animation: hero-fadeUp 0.7s ease forwards;
  animation-delay: 0.1s;
}

.tstp-hero .hero-wordmark,
.tstp-hero .hero-brand {
  font-family: var(--hero-font-display);
  font-weight: 700;
  font-size: clamp(3.4rem, 16vw, 11rem);
  line-height: 0.85;
  letter-spacing: -0.02em;
  margin: 0;
  background: linear-gradient(
    100deg,
    var(--hero-primary),
    var(--hero-secondary) 35%,
    var(--hero-accent) 65%,
    var(--hero-primary)
  );
  background-size: 300% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: hero-hue 14s linear infinite, hero-riseWord 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  opacity: 0;
  transform: translateY(18px);
}

@keyframes hero-riseWord {
  to { opacity: 1; transform: translateY(0); }
}
@keyframes hero-hue {
  to { background-position: 300% 0; }
}
@keyframes hero-fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.tstp-hero .hero-tagline,
.tstp-hero .hero-lead {
  margin-top: clamp(0.5rem, 1.4vw, 1.1rem);
  margin-bottom: 0;
  max-width: 36rem;
  font-size: clamp(1rem, 1.6vw, 1.3rem);
  line-height: 1.45;
  color: var(--hero-secondary);
  opacity: 0;
  animation: hero-fadeUp 0.8s ease forwards;
  animation-delay: 0.5s;
}

.tstp-hero .hero-actions,
.tstp-hero .hero-cta {
  margin-top: 2.4rem;
  display: flex;
  gap: 1.1rem;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  opacity: 0;
  animation: hero-fadeUp 0.8s ease forwards;
  animation-delay: 0.75s;
}

.tstp-hero .hero-btn {
  font-family: var(--hero-font-body);
  font-weight: 500;
  font-size: 0.9rem;
  padding: 0.95rem 1.7rem;
  min-height: 46px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: var(--hero-primary);
  color: var(--hero-text);
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: 0.2s ease;
}

/* Shared layout primitives for CTA hero-btn clones (colors live in site_cta.css). */
.site-cta-band .hero-btn {
  font-family: var(--hero-font-body, "IBM Plex Sans", "Segoe UI", sans-serif);
  font-weight: 500;
  font-size: 0.9rem;
  padding: 0.95rem 1.7rem;
  min-height: 46px;
  border-radius: 8px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: 0.2s ease;
  cursor: pointer;
}

.tstp-hero .hero-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px -10px color-mix(in srgb, var(--hero-primary) 55%, transparent);
}

.tstp-hero .hero-btn.ghost {
  background: transparent;
  color: var(--hero-text);
  border-color: var(--hero-border);
}

.tstp-hero .hero-btn.ghost:hover {
  transform: none;
  box-shadow: none;
  border-color: var(--hero-text);
}

.tstp-hero.hero-motion-off .hero-blob,
.tstp-hero.hero-motion-off .hero-wordmark,
.tstp-hero.hero-motion-off .hero-brand {
  animation: none !important;
  opacity: 1;
  transform: none;
  background-position: 0 0;
}

.tstp-hero.hero-motion-off .hero-eyebrow,
.tstp-hero.hero-motion-off .eyebrow,
.tstp-hero.hero-motion-off .hero-tagline,
.tstp-hero.hero-motion-off .hero-lead,
.tstp-hero.hero-motion-off .hero-actions,
.tstp-hero.hero-motion-off .hero-cta {
  animation: none;
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  .tstp-hero .hero-blob,
  .tstp-hero .hero-wordmark,
  .tstp-hero .hero-brand {
    animation: none !important;
    opacity: 1;
    transform: none;
    background-position: 0 0;
  }
  .tstp-hero .hero-eyebrow,
  .tstp-hero .eyebrow,
  .tstp-hero .hero-tagline,
  .tstp-hero .hero-lead,
  .tstp-hero .hero-actions,
  .tstp-hero .hero-cta {
    animation: none;
    opacity: 1;
  }
}

@media (max-width: 640px) {
  .tstp-hero {
    min-height: min(var(--hero-min-height, 86vh), 92vh);
  }
  .tstp-hero .hero-content {
    padding: 3.25rem 1.15rem 2.75rem;
  }
  .tstp-hero .hero-actions,
  .tstp-hero .hero-cta {
    gap: 0.75rem;
    width: 100%;
  }
  .tstp-hero .hero-btn {
    width: 100%;
    max-width: 20rem;
  }
  .tstp-hero .hero-blob.b1,
  .tstp-hero .hero-blob.b2,
  .tstp-hero .hero-blob.b3 {
    filter: blur(70px);
  }
}

@supports not (color: color-mix(in srgb, white 50%, black)) {
  .tstp-hero {
    --hero-border: rgba(243, 241, 234, 0.18);
  }
  .tstp-hero .hero-gridlines {
    background-image:
      linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
      linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  }
  .tstp-hero .hero-circuits path {
    stroke: rgba(255, 255, 255, 0.12);
  }
  .tstp-hero .hero-btn:hover {
    box-shadow: 0 12px 28px -10px rgba(91, 95, 239, 0.45);
  }
}
