/* ==========================================================================
   Home / Landing Page Styles
   ========================================================================== */

/* ---------- Hero ---------- */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  padding-top: var(--navbar-height);
  overflow: hidden;
}

.hero--dark {
  /* Gradient reconstructed from image edge-color samples so the
     platform-architecture.png melts seamlessly into the background.
     Left edge is nearly flat #037cc0; right edge brightens at top
     (#1f9fdb — lighthouse beam) and darkens toward the bottom. */
  background:
    /* 1. Top-right radial glow — lighthouse beam area */
    radial-gradient(ellipse 40% 35% at 92% 15%,
      #1f9fdb 0%,
      rgba(12, 138, 198, 0.4) 40%,
      transparent 70%),
    /* 2. Right-side horizontal brightness strip (fades left) */
    linear-gradient(to right,
      transparent 40%,
      rgba(10, 135, 200, 0.18) 75%,
      rgba(15, 140, 205, 0.12) 100%),
    /* 3. Base vertical gradient matching left-edge color progression */
    linear-gradient(to bottom,
      #047ec1 0%,
      #037cc0 30%,
      #037abf 55%,
      #0378bc 80%,
      #0376b8 100%);
  color: var(--color-text-inverse);
}

/* Disable the decorative overlay so it doesn't interfere with
   the matched background gradient behind the hero image. */
.hero__bg {
  position: absolute;
  inset: 0;
  background: transparent;
  pointer-events: none;
}

.hero__inner {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: var(--space-8);
  align-items: center;
  position: relative;
  z-index: 1;
  padding: var(--space-8) 0;
}

.hero__badges {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-6);
}

.hero__title {
  font-size: clamp(2.5rem, 5vw, 3.75rem);
  font-weight: 800;
  line-height: 1.1;
  color: var(--color-text-inverse);
  margin-bottom: var(--space-6);
  letter-spacing: -0.02em;
}

.hero__subtitle {
  font-size: var(--font-size-lg);
  line-height: 1.7;
  opacity: 0.85;
  max-width: 520px;
  margin-bottom: var(--space-8);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}

.hero__image {
  margin-right: calc(-1 * var(--space-8));
  overflow: visible;
}

.hero__image img {
  width: auto;
  max-width: 120%;
  max-height: calc(100vh - var(--navbar-height) - var(--space-8) * 2);
  height: auto;
  border-radius: 0;
  box-shadow: none;
  display: block;
  /* Feather all four edges so the image dissolves into the
     background gradient. On desktop the right fade falls inside
     the overflow-clipped zone (invisible); on mobile it provides
     the necessary blend since the image can't bleed past the viewport. */
  -webkit-mask-image:
    linear-gradient(to right, transparent 0%, black 7%, black 93%, transparent 100%),
    linear-gradient(to bottom, transparent 0%, black 8%, black 92%, transparent 100%);
  -webkit-mask-composite: destination-in;
  mask-image:
    linear-gradient(to right, transparent 0%, black 7%, black 93%, transparent 100%),
    linear-gradient(to bottom, transparent 0%, black 8%, black 92%, transparent 100%);
  mask-composite: intersect;
}

/* Hero Mockup (CSS-only dashboard illustration) */
.hero__mockup {
  background: #0f2b3d;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255,255,255,0.1);
  transform: perspective(1200px) rotateY(-5deg) rotateX(2deg);
  transition: transform 0.6s var(--ease);
}

.hero__mockup:hover {
  transform: perspective(1200px) rotateY(-2deg) rotateX(1deg);
}

.hero__mockup-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  background: #0a1f2d;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.hero__mockup-bar > span:nth-child(-n+3) {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.hero__mockup-bar > span:nth-child(1) { background: #ef4444; }
.hero__mockup-bar > span:nth-child(2) { background: #f59e0b; }
.hero__mockup-bar > span:nth-child(3) { background: #10b981; }

.hero__mockup-url {
  font-family: var(--font-mono);
  font-size: 11px;
  color: rgba(255,255,255,0.35);
  margin-left: auto;
}

.hero__mockup-content {
  display: flex;
  min-height: 280px;
}

.hero__mockup-sidebar {
  width: 50px;
  background: rgba(255,255,255,0.03);
  border-right: 1px solid rgba(255,255,255,0.06);
  padding: 10px 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.hero__mockup-item {
  height: 8px;
  border-radius: 4px;
  background: rgba(255,255,255,0.08);
}

.hero__mockup-item.active {
  background: var(--color-primary);
}

.hero__mockup-main {
  flex: 1;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.hero__mockup-header {
  height: 14px;
  width: 40%;
  background: rgba(255,255,255,0.12);
  border-radius: 4px;
}

.hero__mockup-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.hero__mockup-card {
  height: 60px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 6px;
}

.hero__mockup-table {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.hero__mockup-row {
  height: 10px;
  background: rgba(255,255,255,0.04);
  border-radius: 3px;
}

.hero__mockup-row:first-child {
  background: rgba(255,255,255,0.08);
}

/* ---------- Hero → Platform transition ---------- */
#platform {
  border-top: none;
  box-shadow: inset 0 80px 60px -60px rgba(3, 120, 188, 0.25);
}

/* ---------- Platform Stack ---------- */
.platform-stack {
  max-width: 900px;
  margin: 0 auto;
}

/* ---------- Architecture Connectors ---------- */
.arch-connector {
  text-align: center;
  padding: 0.75rem 0;
  color: var(--color-text-muted);
  font-size: 1.5rem;
}

.arch-connector i {
  animation: pulse-arrow 2s ease-in-out infinite;
}

@keyframes pulse-arrow {
  0%, 100% { opacity: 0.3; transform: translateY(0); }
  50% { opacity: 1; transform: translateY(3px); }
}

/* ---------- Architecture Diagram ---------- */
.arch-diagram {
  max-width: 420px;
  margin: var(--space-8) auto var(--space-4);
}

.arch-diagram svg {
  width: 100%;
  height: auto;
}

/* ---------- Logo Strip Override for Home ---------- */
.logo-strip {
  justify-content: center;
  gap: var(--space-8);
  padding: var(--space-4) 0;
}

.logo-strip__item {
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity var(--transition);
}

.logo-strip__item:hover i {
  opacity: 0.8 !important;
}

/* ---------- Responsive Hero ---------- */
@media (max-width: 1024px) {
  .hero__inner {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero__subtitle {
    margin-left: auto;
    margin-right: auto;
  }

  .hero__badges {
    justify-content: center;
  }

  .hero__actions {
    justify-content: center;
  }

  .hero__image {
    max-width: 600px;
    margin: 0 auto;
    margin-right: auto;
  }

  .hero__image img {
    width: 100%;
  }

  .hero__mockup {
    transform: perspective(1200px) rotateY(0deg) rotateX(3deg);
  }
}

@media (max-width: 640px) {
  .hero {
    min-height: auto;
    padding-top: calc(var(--navbar-height) + var(--space-8));
    padding-bottom: var(--space-8);
  }

  .hero__inner {
    padding: var(--space-4) 0;
  }

  .hero__mockup-grid { grid-template-columns: repeat(2, 1fr); }
}
