/* ==========================================================================
   Home Hero — Dark-mode, full-width hero section
   Mobile-first. Breakpoints: 768 px, 1024 px.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Hero-scoped design tokens
   Defined here so they stay co-located with the component and can be
   overridden by the child theme's tokens.css if needed.
   -------------------------------------------------------------------------- */
:root {
  /* Dark canvas */
  --color-hero-bg:               #080d17;

  /* Headline gradient stops */
  --color-hero-headline-from:    #ffffff;
  --color-hero-headline-mid:     #93c5fd;   /* blue-300 */
  --color-hero-headline-to:      #a78bfa;   /* violet-400 */

  /* Subheadline & secondary text */
  --color-hero-subheadline:      #94a3b8;   /* slate-400 */

  /* Badge */
  --color-hero-badge-text:       #93c5fd;

  /* Ghost button text */
  --color-hero-btn-secondary-text: #cbd5e1; /* slate-300 */

  /* Chart card text */
  --color-hero-chart-text:       #e2e8f0;   /* slate-200 */

  /* Status colours inside the card */
  --color-hero-up:               #34d399;   /* emerald-400 */
  --color-hero-down:             #f87171;   /* red-400 */
}

/* --------------------------------------------------------------------------
   Section shell
   -------------------------------------------------------------------------- */
.home-hero {
  position: relative;
  overflow: hidden;
  background-color: var(--color-hero-bg);
  color: var(--color-text-inverse);
  padding-block: var(--space-8) var(--space-8);
  min-height: 100svh;
  display: flex;
  align-items: center;
}

/* Optional custom background image */
.home-hero--has-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: var(--hero-bg-image);
  background-size: cover;
  background-position: center;
  opacity: 0.12;
  z-index: 0;
}

/* --------------------------------------------------------------------------
   Decorative gradient orbs
   -------------------------------------------------------------------------- */
.home-hero__orb {
  position: absolute;
  border-radius: var(--radius-full);
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
}

.home-hero__orb--blue {
  width: 480px;
  height: 480px;
  top: -120px;
  left: -120px;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.35) 0%, transparent 70%);
}

.home-hero__orb--purple {
  width: 400px;
  height: 400px;
  bottom: -100px;
  right: -80px;
  background: radial-gradient(circle, rgba(124, 58, 237, 0.30) 0%, transparent 70%);
}

/* --------------------------------------------------------------------------
   Container — two-column grid on wider screens
   -------------------------------------------------------------------------- */
.home-hero__container {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-7);
  align-items: center;
  width: 100%;

  /* Generous vertical breathing room on mobile */
  padding-block: var(--space-7);
}

@media (min-width: 1024px) {
  .home-hero__container {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-8);
    padding-block: var(--space-8);
  }
}

/* --------------------------------------------------------------------------
   Content column
   -------------------------------------------------------------------------- */
.home-hero__content {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  text-align: center;
}

@media (min-width: 1024px) {
  .home-hero__content {
    text-align: left;
  }
}

/* --------------------------------------------------------------------------
   Badge
   -------------------------------------------------------------------------- */
.home-hero__badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  align-self: center;
  padding: var(--space-1) var(--space-4);
  background: rgba(37, 99, 235, 0.18);
  border: 1px solid rgba(37, 99, 235, 0.40);
  border-radius: var(--radius-full);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  color: var(--color-hero-badge-text);
  letter-spacing: 0.02em;
  width: fit-content;
}

@media (min-width: 1024px) {
  .home-hero__badge {
    align-self: flex-start;
  }
}

.home-hero__badge-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
  background-color: var(--color-brand-primary);
  animation: hero-badge-pulse 2s ease-in-out infinite;
}

@keyframes hero-badge-pulse {
  0%, 100% { opacity: 1;    transform: scale(1);    }
  50%       { opacity: 0.5; transform: scale(0.85); }
}

/* --------------------------------------------------------------------------
   Headline
   -------------------------------------------------------------------------- */
.home-hero__headline {
  font-family: var(--font-family-heading);
  font-size: clamp(2.5rem, 7vw, 4.5rem);
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-tight);
  letter-spacing: -0.03em;
  margin: 0;
  background: linear-gradient(
    135deg,
    var(--color-hero-headline-from) 30%,
    var(--color-hero-headline-mid)  70%,
    var(--color-hero-headline-to)  100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* --------------------------------------------------------------------------
   Subheadline
   -------------------------------------------------------------------------- */
.home-hero__subheadline {
  font-family: var(--font-family-body);
  font-size: clamp(var(--font-size-base), 2vw, var(--font-size-lg));
  font-weight: var(--font-weight-normal);
  line-height: var(--line-height-normal);
  color: var(--color-hero-subheadline);
  max-width: 48ch;
  margin: 0;
}

@media (min-width: 1024px) {
  .home-hero__subheadline {
    max-width: 42ch;
  }
}

/* --------------------------------------------------------------------------
   CTA buttons
   -------------------------------------------------------------------------- */
.home-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  justify-content: center;
}

@media (min-width: 1024px) {
  .home-hero__actions {
    justify-content: flex-start;
  }
}

.home-hero__btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-md);
  font-family: var(--font-family-body);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-medium);
  text-decoration: none;
  transition:
    filter        var(--transition-normal),
    transform     var(--transition-fast),
    box-shadow    var(--transition-normal),
    background    var(--transition-normal),
    border-color  var(--transition-normal);
  cursor: pointer;
  white-space: nowrap;
}

/* Primary — solid brand blue */
.home-hero__btn--primary {
  background-color: var(--color-brand-primary);
  color: var(--color-text-inverse);
  box-shadow:
    0 0 24px rgba(37, 99, 235, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.home-hero__btn--primary:hover,
.home-hero__btn--primary:focus-visible {
  filter: brightness(1.1);
  transform: translateY(-2px);
  box-shadow:
    0 0 36px rgba(37, 99, 235, 0.60),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.home-hero__btn--primary:active {
  filter: brightness(0.9);
  transform: translateY(0);
}

/* Secondary — ghost outline */
.home-hero__btn--secondary {
  background-color: transparent;
  color: var(--color-hero-btn-secondary-text);
  border: 1px solid rgba(226, 232, 240, 0.30);
}

.home-hero__btn--secondary:hover,
.home-hero__btn--secondary:focus-visible {
  background-color: rgba(255, 255, 255, 0.07);
  border-color: rgba(226, 232, 240, 0.60);
  transform: translateY(-2px);
}

.home-hero__btn--secondary:active {
  transform: translateY(0);
}

/* Arrow nudge on hover */
.home-hero__btn-arrow {
  display: inline-block;
  transition: transform var(--transition-fast);
}

.home-hero__btn--primary:hover .home-hero__btn-arrow,
.home-hero__btn--primary:focus-visible .home-hero__btn-arrow {
  transform: translateX(4px);
}

/* Focus ring — accessibility */
.home-hero__btn:focus-visible {
  outline: 2px solid var(--color-brand-primary);
  outline-offset: 3px;
}

/* --------------------------------------------------------------------------
   Trust indicators
   -------------------------------------------------------------------------- */
.home-hero__trust {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3) var(--space-5);
  justify-content: center;
  padding-top: var(--space-2);
}

@media (min-width: 1024px) {
  .home-hero__trust {
    justify-content: flex-start;
  }
}

.home-hero__trust-item {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
}

.home-hero__trust-icon {
  color: var(--color-status-success);
  flex-shrink: 0;
}

/* --------------------------------------------------------------------------
   Visual column — chart card
   -------------------------------------------------------------------------- */
.home-hero__visual {
  display: flex;
  justify-content: center;
  align-items: center;
}

.home-hero__chart-card {
  width: 100%;
  max-width: 420px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  box-shadow:
    var(--shadow-lg),
    0 0 60px rgba(37, 99, 235, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  animation: hero-card-float 6s ease-in-out infinite;
}

@keyframes hero-card-float {
  0%, 100% { transform: translateY(0);    }
  50%       { transform: translateY(-8px); }
}

/* --------------------------------------------------------------------------
   Chart card — header row
   -------------------------------------------------------------------------- */
.home-hero__chart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-4);
}

.home-hero__chart-title {
  font-family: var(--font-family-mono);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-bold);
  color: var(--color-hero-chart-text);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.home-hero__chart-badge {
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-bold);
  padding: 2px var(--space-2);
  border-radius: var(--radius-sm);
  letter-spacing: 0.04em;
}

.home-hero__chart-badge--up {
  background: rgba(16, 185, 129, 0.18);
  color: var(--color-hero-up);
  border: 1px solid rgba(16, 185, 129, 0.30);
}

.home-hero__chart-badge--down {
  background: rgba(239, 68, 68, 0.18);
  color: var(--color-hero-down);
  border: 1px solid rgba(239, 68, 68, 0.30);
}

/* --------------------------------------------------------------------------
   Chart SVG
   -------------------------------------------------------------------------- */
.home-hero__chart-svg {
  width: 100%;
  height: auto;
  display: block;
  margin-bottom: var(--space-4);
}

/* --------------------------------------------------------------------------
   Stat row
   -------------------------------------------------------------------------- */
.home-hero__stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3);
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  padding-top: var(--space-4);
}

.home-hero__stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.home-hero__stat-label {
  font-size: var(--font-size-xs);
  color: var(--color-text-secondary);
  font-family: var(--font-family-body);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.home-hero__stat-value {
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-bold);
  font-family: var(--font-family-mono);
  color: var(--color-hero-chart-text);
}

.home-hero__stat-value--success {
  color: var(--color-hero-up);
}

/* --------------------------------------------------------------------------
   Reduced-motion: strip animations
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .home-hero__badge-dot {
    animation: none;
  }

  .home-hero__chart-card {
    animation: none;
  }

  .home-hero__btn,
  .home-hero__btn-arrow {
    transition: none;
  }
}
