/* hero.css — Cockpit dashboard, GSAP elements, glitch text */

/* ==========================================================================
   HERO LAYOUT & BACKGROUND
   ========================================================================== */
.hero-section {
  position: relative;
  height: 100vh;
  min-height: 800px;
  width: 100%;
  background-color: var(--bg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.hero-section::before,
.hero-section::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.hero-section::before {
  background-image:
    repeating-linear-gradient(45deg, #080a0c 25%, transparent 25%, transparent 75%, #080a0c 75%, #080a0c),
    repeating-linear-gradient(45deg, #080a0c 25%, #0c0e10 25%, #0c0e10 75%, #080a0c 75%, #080a0c);
  background-size: 20px 20px;
  opacity: 0.4;
}

.hero-section::after {
  background-image: repeating-linear-gradient(135deg, transparent, transparent 10px, rgba(255, 255, 255, 0.02) 10px, rgba(255, 255, 255, 0.02) 11px);
  background-size: 100% 100%;
  opacity: 0.3;
}

.mousetrail-container {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}

.mousetrail-tag {
  position: absolute;
  transform: translate(-50%, -50%);
  padding: 0.25rem 0.75rem;
  border: 1px solid rgba(232, 255, 0, 0.2);
  border-radius: 100px;
  background: rgba(13, 17, 23, 0.55);
  backdrop-filter: blur(4px);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: var(--font-size-min);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.8s ease-out;
}

/* ==========================================================================
   TELEMETRY & COCKPIT GRID
   ========================================================================== */
.telemetry-corner {
  position: absolute;
  z-index: 5;
  font-size: 11px;
  letter-spacing: 0.2em;
  opacity: 0;
  pointer-events: none;
}

.telemetry-corner.top-left {
  top: 2rem;
  left: 2rem;
}

.telemetry-corner.top-right {
  top: 2rem;
  right: 2rem;
  width: 60px;
}

.telemetry-line {
  width: 100%;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: var(--font-size-min);
  letter-spacing: 0.15em;
  text-align: right;
  white-space: nowrap;
}

.hero-cockpit {
  position: relative;
  z-index: 10;
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-columns: 280px 1fr 280px;
  gap: 2rem;
  padding: 6rem 2rem 2rem 2rem;
  max-width: 1600px;
  margin: 0 auto;
}

.hero-center {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.hero-sidebar {
  position: relative;
  height: 100%;
  opacity: 0;
}

.hero-sidebar.left .gauge-arc {
  right: 0;
}

.hero-sidebar.right .gauge-arc {
  left: 0;
}

/* Unified Stat Block */
.stat-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.4rem;
  flex: 1;
  min-width: 160px;
}

.stat-label {
  font-family: var(--font-mono);
  font-size: var(--font-size-min);
  color: var(--muted);
  text-transform: uppercase;
}

.stat-value {
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--text-bright);
  line-height: 1;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
}

/* ==========================================================================
   GAUGE ARCS
   ========================================================================== */
.gauge-arc {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 180px;
  height: 400px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.arc-svg {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  pointer-events: none;
}

/* Chevron Arc — Stroke rendering */
.arc-outline {
  stroke-linecap: butt;
  stroke-linejoin: miter;
}

.arc-fill {
  stroke-linecap: butt;
  stroke-linejoin: miter;
}

/* Perpetual micro-pulse (stitch-design-taste §8) */
@keyframes arc-pulse {

  0%,
  100% {
    opacity: 0.88;
  }

  50% {
    opacity: 1;
  }
}

/* Subtle breathing pulse applied after entrance */
.arc-fill.is-pulsing {
  animation: arc-pulse 4s ease-in-out infinite alternate;
}

/* Redline tension glow */
@keyframes redline-pulse {

  0%,
  100% {
    opacity: 0.7;
  }

  50% {
    opacity: 1;
  }
}

.arc-redline {
  animation: redline-pulse 2.5s ease-in-out infinite;
}

.arc-label-container {
  position: relative;
  cursor: pointer;
  pointer-events: auto;
  text-align: center;
  height: 2rem;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 20;
}

.arc-label,
.arc-reveal {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  transition: opacity 0.3s ease;
}

.arc-label {
  font-size: 1.25rem;
  color: var(--text-default);
  letter-spacing: 0.1em;
}

.arc-reveal {
  font-size: 0.85rem;
  white-space: nowrap;
  opacity: 0;
}

.arc-label-container:hover .arc-label,
.arc-label-container.is-revealed .arc-label {
  opacity: 0;
}

.arc-label-container:hover .arc-reveal,
.arc-label-container.is-revealed .arc-reveal {
  opacity: 1;
}

/* ==========================================================================
   RECON PANEL & STATUS
   ========================================================================== */
.recon-panel {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 160px;
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0.5rem;
}

.recon-terminal {
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.6) 0%, rgba(0, 0, 0, 0.85) 100%);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: calc(var(--radius-lg) - 0.5rem);
  padding: 1.25rem;
  height: 100%;
  width: 100%;
  overflow: hidden;
  /* Tactile Soft Depth: Recessed screen */
  box-shadow: inset 0 4px 16px rgba(0, 0, 0, 0.8),
    inset 0 1px 4px rgba(0, 0, 0, 0.6),
    0 1px 0 rgba(255, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.recon-content {
  font-size: 11px;
  line-height: 1.8;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.recon-line {
  color: var(--accent);
  opacity: 0;
  animation: fade-in-up 0.3s ease forwards;
}

@keyframes fade-in-up {
  from {
    opacity: 0;
    transform: translateY(5px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.status-line {
  margin-top: 1rem;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  opacity: 0;
}

.status-dot {
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
  animation: pulse-dot 1.5s infinite ease-in-out;
}

@keyframes pulse-dot {

  0%,
  100% {
    opacity: 0.3;
    box-shadow: 0 0 0 rgba(232, 255, 0, 0);
  }

  50% {
    opacity: 1;
    box-shadow: 0 0 8px rgba(232, 255, 0, 0.6);
  }
}

/* ==========================================================================
   GLITCH TEXT
   ========================================================================== */
.glitch-wrapper {
  position: relative;
  z-index: 2;
  overflow: hidden;
}

.glitch-text {
  display: inline-block;
  font-family: var(--font-display);
  font-size: clamp(3rem, 12vw, 8rem);
  color: var(--text-bright);
  letter-spacing: 0.05em;
  position: relative;
  z-index: 1;
  line-height: 1;
  margin: 0;
  text-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
  animation: glitch-anim-main 4s infinite linear;
}

.glitch-text::before,
.glitch-text::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  color: transparent;
  z-index: -1;
}

.glitch-text::before {
  left: 0;
  text-shadow: -2px 0 var(--accent2);
  animation: glitch-anim 4s infinite linear;
}

.glitch-text::after {
  left: 0;
  text-shadow: -2px 0 var(--accent);
  animation: glitch-anim2 4s infinite linear;
}

/* Idle tension glitch (happens occasionally) */
@keyframes glitch-anim-main {

  0%,
  94% {
    transform: translateX(0) skewX(0);
  }

  95% {
    transform: translateX(-2px) skewX(1deg);
  }

  96% {
    transform: translateX(2px) skewX(-1deg);
  }

  97% {
    transform: translateX(0) skewX(0);
  }

  100% {
    transform: translateX(0);
  }
}

@keyframes glitch-anim {

  0%,
  94% {
    transform: translateX(0);
    opacity: 0;
    filter: none;
  }

  95% {
    transform: translateX(-4px);
    opacity: 0.8;
    filter: blur(2px);
  }

  97% {
    transform: translateX(3px);
    opacity: 0.8;
    filter: blur(1px);
  }

  99% {
    transform: translateX(-2px);
    opacity: 0.8;
    filter: blur(2px);
  }

  100% {
    transform: translateX(0);
    opacity: 0;
    filter: none;
  }
}

@keyframes glitch-anim2 {

  0%,
  94% {
    transform: translateX(0);
    opacity: 0;
    filter: none;
  }

  95% {
    transform: translateX(3px);
    opacity: 0.8;
    filter: blur(2px);
  }

  97% {
    transform: translateX(-4px);
    opacity: 0.8;
    filter: blur(1px);
  }

  99% {
    transform: translateX(2px);
    opacity: 0.8;
    filter: blur(2px);
  }

  100% {
    transform: translateX(0);
    opacity: 0;
    filter: none;
  }
}

/* ==========================================================================
   SCROLLERS & INDICATORS
   ========================================================================== */
.title-scroller {
  margin-top: 0.5rem;
  overflow: hidden;
  height: 1.5rem;
}

/* Hero subtitle — script font human name under the codename */
.hero-subtitle {
  font-family: var(--font-script);
  font-size: clamp(1.25rem, 2vw + 0.5rem, 1.75rem);
  font-weight: 500;
  color: var(--text);
  letter-spacing: 0.02em;
  margin: 0.25rem 0 0;
  opacity: 0;
  line-height: 1.2;
}

.subtitle {
  font-size: 1rem;
  letter-spacing: 0.1em;
  margin: 0;
}

.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  opacity: 0;
}

.scroll-line {
  width: 1px;
  height: 40px;
  background: var(--dim);
  position: relative;
  overflow: hidden;
}

.scroll-line::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--accent);
  animation: scroll-pulse 2s infinite ease-in-out;
}

@keyframes scroll-pulse {
  0% {
    transform: translateY(-100%);
  }

  50% {
    transform: translateY(0);
  }

  100% {
    transform: translateY(100%);
  }
}

/* ==========================================================================
   CTA ZONE
   ========================================================================== */
.cta-zone {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--bg);
  padding: 6rem 2rem;
  overflow: hidden;
}

.cta-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 800px;
  height: 800px;
  transform: translate(-50%, -50%);
  background: radial-gradient(ellipse at center, rgba(232, 255, 0, 0.04) 0%, rgba(232, 255, 0, 0.01) 40%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.cta-container {
  position: relative;
  z-index: 1;
  max-width: 720px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2.5rem;
}

.cta-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 1rem;
  border: 1px solid rgba(232, 255, 0, 0.2);
  border-radius: 100px;
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(232, 255, 0, 0.04);
}

.cta-headline {
  font-family: var(--font-display);
  font-size: clamp(3rem, 8vw, 6rem);
  color: var(--text-bright);
  text-align: center;
  line-height: 0.95;
  letter-spacing: 0.04em;
  text-wrap: balance;
}

.cta-description {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--muted);
  text-align: center;
  max-width: 480px;
  line-height: 1.6;
}

.cta-description kbd {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.5rem;
  border: 1px solid var(--dim);
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}

.cta-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  width: 100%;
  max-width: 900px;
}

.cta-card-wrapper {
  display: flex;
  transform-style: preserve-3d;
}

/* Asymmetrical Bento: Make the first card span both columns and act as a large focal point */
.hero-cta-card {
  grid-column: 1 / -1;
}

.hero-cta-card .cta-card-inner {
  padding: 3rem 2rem;
  flex-direction: column;
  justify-content: center;
  text-align: center;
}

.hero-cta-card .cta-card-icon {
  width: 80px;
  height: 80px;
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.hero-cta-card .cta-card-title {
  font-size: 1.5rem;
}

.hero-cta-card .cta-card-desc {
  font-size: 1rem;
}

.hero-cta-card .cta-card-arrow {
  margin-top: 1rem;
}

.cta-card {
  display: flex;
  flex: 1;
  text-decoration: none;
  padding: 1.25rem;
  /* Generous padding ensures inner core doesn't clip when magnetically shifted */
  border-radius: 1.5rem;
  /* Large outer squircle radius */
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.02) 100%);
  border: 1px solid rgba(255, 255, 255, 0.05);
  /* Tactile Drop Shadow for elevated hardware look */
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4),
    0 1px 2px rgba(0, 0, 0, 0.6);
  /* Motion Framer Spring Physics via cubic-bezier */
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1),
    border-color 0.4s ease,
    box-shadow 0.4s ease;
  transform-style: preserve-3d;
}

.cta-card:hover {
  transform: scale(1.02);
  /* Spring physics lift */
  border-color: rgba(232, 255, 0, 0.4);
  /* Tactile Lift */
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6),
    0 5px 15px rgba(232, 255, 0, 0.08);
}

.cta-card:active {
  transform: scale(0.98);
}

.cta-card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.cta-card-inner {
  display: flex;
  flex: 1;
  align-items: center;
  gap: 1.25rem;
  padding: 1.5rem 1.75rem;
  border-radius: 1rem;
  /* Mathematically calculated smaller inner radius */
  background-color: rgba(232, 255, 0, 0.02);
  background-image: linear-gradient(135deg, rgba(255, 255, 255, 0.06) 0%, transparent 100%);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.15),
    inset 0 -1px 1px rgba(0, 0, 0, 0.4);
  transition: background-color 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  transform: translateZ(30px);
  position: relative;
  overflow: hidden;
}

/* Large faint background number */
.cta-card-number {
  position: absolute;
  top: -1rem;
  right: 0rem;
  font-family: var(--font-display);
  font-size: 10rem;
  color: rgba(232, 255, 0, 0.05);
  /* Yellow accent faint */
  line-height: 1;
  pointer-events: none;
  user-select: none;
  transform: translateZ(5px);
  transition: color 0.4s ease;
  z-index: 0;
}

.cta-card:hover .cta-card-number {
  color: rgba(232, 255, 0, 0.1);
}

.cta-card:hover .cta-card-inner {
  /* State-based color system: Hover overlay (lighter/more opaque) */
  background-color: rgba(232, 255, 0, 0.10);
}

.cta-card:active .cta-card-inner {
  /* State-based color system: Active overlay (pressed/darker) */
  background-color: rgba(232, 255, 0, 0.06);
  transform: translateZ(30px) scale(0.98);
  /* Physical button pressing */
}


.cta-card-content {
  flex: 1;
  min-width: 0;
  transform: translateZ(10px);
}

.cta-card-status {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-mono);
  font-size: var(--font-size-min);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.status-dot {
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {

  0%,
  100% {
    opacity: 1;
    box-shadow: 0 0 4px var(--accent);
  }

  50% {
    opacity: 0.3;
    box-shadow: 0 0 0 transparent;
  }
}

.cta-card-title {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--text-bright);
  letter-spacing: 0.15em;
  margin-bottom: 0.25rem;
}

.cta-card-desc {
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.5);
  line-height: 1.4;
  transition: color 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.cta-card-arrow {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15);
  color: var(--accent);
  font-size: 1.1rem;
  transform: translateZ(20px);
  transition: transform 0.4s cubic-bezier(0.32, 0.72, 0, 1), background 0.3s ease, border-color 0.3s ease, color 0.3s ease, box-shadow 0.4s ease;
}

.cta-card:hover .cta-card-arrow {
  background: rgba(232, 255, 0, 0.18);
  border-color: rgba(232, 255, 0, 0.3);
  color: var(--accent);
  box-shadow: inset 0 1px 0 rgba(232, 255, 0, 0.4), 0 0 15px rgba(232, 255, 0, 0.3);
  transform: translateZ(20px) translate(4px, -4px) scale(1.08);
  /* Kinetic diagonal tension */
}

.cta-card:hover .cta-card-desc {
  color: rgba(255, 255, 255, 0.85);
}

.touch-tags-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 2rem;
  max-width: 400px;
  opacity: 0;
}

.touch-tag {
  padding: 0.25rem 0.5rem;
  border: 1px solid var(--dim);
  border-radius: 100px;
  background: rgba(13, 17, 23, 0.55);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 10px;
}

/* ==========================================================================
   STATS STRIP
   ========================================================================== */
.stats-strip-section {
  position: relative;
  width: 100%;
  background: var(--surface-dim, #0d1117);
  border-top: 1px solid var(--dim);
  border-bottom: 1px solid var(--dim);
  z-index: 10;
}

.stats-strip {
  display: flex;
  justify-content: space-around;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 2rem;
  flex-wrap: wrap;
  gap: 2rem;
  width: 100%;
}

/* ==========================================================================
   MEDIA QUERIES
   ========================================================================== */
/* Tablet (1024px) */
@media (max-width: 1024px) {
  .hero-cockpit {
    grid-template-columns: 180px 1fr 180px;
    gap: 1rem;
    padding: 6rem 1rem 2rem 1rem;
  }

  .gauge-arc {
    width: 140px;
  }

  .hero-sidebar {
    text-align: center;
  }
}

/* Mobile (768px) */
@media (max-width: 768px) {
  .hero-section {
    min-height: 100dvh;
    height: auto;
  }

  .hero-cockpit {
    display: flex;
    flex-direction: column;
    min-height: 100dvh;
    padding-top: 8rem;
    padding-bottom: 4rem;
    gap: 2rem;
  }

  .hero-center {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .hero-sidebar.left {
    display: none; /* Hide left gauge on mobile */
  }

  .hero-sidebar.right {
    width: 100%;
    margin-top: auto; /* Push to bottom */
  }

  .gauge-arc {
    display: none; /* Hide all gauge arcs on mobile to save space */
  }

  .telemetry-corner {
    display: none; /* Hide telemetry corners */
  }

  .recon-panel {
    width: 100%;
    height: auto;
    min-height: 150px;
  }

  .stats-strip {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    padding: 2rem 1rem;
  }
}

/* Mobile Small (480px) */
@media (max-width: 480px) {
  .stats-strip {
    grid-template-columns: 1fr;
  }
  
  .recon-panel {
    font-size: 10px;
  }
}

/* CTA Mobile Responsive (moved from tablet to mobile breakpoint) */
@media (max-width: 768px) {
  .cta-zone {
    padding: 4rem 1rem;
    min-height: auto;
  }

  .cta-grid {
    grid-template-columns: 1fr;
  }

  .cta-card-wrapper:first-child {
    grid-column: span 1;
  }

  .cta-headline {
    font-size: clamp(2.5rem, 10vw, 4rem);
  }

  .cta-card-inner {
    padding: 1.25rem;
    gap: 1rem;
  }

  .cta-card-icon {
    width: 40px;
    height: 40px;
    font-size: 0.9rem;
  }
}

/* Unified Reduced Motion Block */
@media (prefers-reduced-motion: reduce) {

  .glitch-text::before,
  .glitch-text::after {
    animation: none;
    display: none;
  }

  .scroll-line::after,
  .status-dot,
  .recon-line,
  .recon-cursor {
    animation: none;
  }

  .cta-card,
  .cta-card-icon,
  .cta-card-arrow {
    transition: none;
  }

  .arc-fill.is-pulsing,
  .arc-redline {
    animation: none;
  }
}