/* ============================================
   HOMEPAGE STYLES
   ============================================ */

/* Subtle ambient glow behind everything */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: calc(var(--space-xl) + 2rem) 0 var(--space-lg);
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: -10%;
  right: -10%;
  width: 50vw;
  height: 50vw;
  max-width: 700px;
  max-height: 700px;
  background: radial-gradient(
    circle,
    rgba(61, 111, 180, 0.18) 0%,
    rgba(61, 111, 180, 0) 70%
  );
  pointer-events: none;
}

.hero-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-md);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
  align-items: center;
  position: relative;
  z-index: 2;
}

.hero-headline {
  font-size: clamp(2.6rem, 6vw, 4.2rem);
  margin-bottom: var(--space-sm);
}

.hero-sub {
  font-size: 1.05rem;
  max-width: 480px;
  margin-bottom: var(--space-md);
}

.hero-actions {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

/* ============================================
   SIGNATURE: 3D BUILD STACK
   ============================================ */

.hero-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 1400px;
}

.stack-scene {
  position: relative;
  width: 320px;
  height: 320px;
  transform-style: preserve-3d;
  transform: rotateX(18deg) rotateY(-22deg);
  transition: transform 0.15s ease-out;
  will-change: transform;
}

.stack-layer {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 280px;
  height: 170px;
  border-radius: var(--radius);
  background: var(--carbon-surface-2);
  border: 1px solid var(--border-subtle);
  box-shadow: 0 20px 50px -20px rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: flex-end;
  padding: 1rem 1.2rem;
  opacity: 0;
  animation: layerIn 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.layer-label {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.layer-wire {
  transform: translate(-50%, -50%) translateZ(-60px) translateY(60px);
  background-image:
    linear-gradient(var(--border-subtle) 1px, transparent 1px),
    linear-gradient(90deg, var(--border-subtle) 1px, transparent 1px);
  background-size: 20px 20px;
  animation-delay: 0.1s;
}

.layer-design {
  transform: translate(-50%, -50%) translateZ(-20px) translateY(20px);
  background: linear-gradient(135deg, var(--carbon-surface-2), #20242c);
  animation-delay: 0.3s;
}

.layer-design::before {
  content: "";
  position: absolute;
  top: 1rem;
  left: 1.2rem;
  right: 1.2rem;
  height: 8px;
  border-radius: 4px;
  background: rgba(92, 143, 219, 0.35);
}

.layer-code {
  transform: translate(-50%, -50%) translateZ(20px) translateY(-20px);
  background: #14161b;
  animation-delay: 0.5s;
}

.layer-code::before {
  content: "< />";
  position: absolute;
  top: 1rem;
  left: 1.2rem;
  font-family: monospace;
  font-size: 0.75rem;
  color: var(--steel-blue-light);
  opacity: 0.7;
}

.layer-live {
  transform: translate(-50%, -50%) translateZ(60px) translateY(-60px);
  background: linear-gradient(135deg, var(--steel-blue), #2a4d80);
  border-color: var(--steel-blue-light);
  box-shadow: 0 25px 60px -15px rgba(61, 111, 180, 0.5);
  animation-delay: 0.7s;
}

.layer-live .layer-label {
  color: #fff;
}

.layer-pulse {
  position: absolute;
  top: 1rem;
  right: 1.2rem;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #6fe3a0;
  box-shadow: 0 0 0 0 rgba(111, 227, 160, 0.6);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes layerIn {
  from {
    opacity: 0;
    transform: translate(-50%, -50%) translateZ(var(--tz, 0))
      translateY(var(--ty, 0)) scale(0.9);
  }
  to {
    opacity: 1;
  }
}

@keyframes pulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(111, 227, 160, 0.5);
  }
  50% {
    box-shadow: 0 0 0 8px rgba(111, 227, 160, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .stack-layer {
    animation: none;
    opacity: 1;
  }
  .layer-pulse {
    animation: none;
  }
  .stack-scene {
    transition: none;
  }
}

/* ============================================
   STORY SECTION
   ============================================ */

.story {
  padding: var(--space-xl) 0;
  border-top: 1px solid var(--border-subtle);
}

.story-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: var(--space-lg);
  align-items: start;
}

.story-text p {
  margin-top: var(--space-sm);
}
.story-text p:first-of-type {
  margin-top: 0;
}

.founder-cards {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.founder-card {
  background: var(--carbon-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  padding: var(--space-md);
  transition:
    transform var(--transition),
    border-color var(--transition);
}

.founder-card:hover {
  transform: translateY(-4px);
  border-color: var(--steel-blue);
}

.founder-initial {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(61, 111, 180, 0.18);
  color: var(--steel-blue-light);
  font-family: var(--font-display);
  font-weight: 700;
  margin-bottom: var(--space-xs);
}

.founder-card p {
  font-size: 0.88rem;
}

/* ============================================
   VALUES SECTION
   ============================================ */

.values {
  padding: var(--space-xl) 0;
  background: var(--carbon-surface);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.values h2 {
  max-width: 560px;
}

.values-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-md);
  margin-top: var(--space-lg);
  perspective: 1000px;
}

.value-card {
  background: var(--carbon-black);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  padding: var(--space-md);
  transform-style: preserve-3d;
  transition:
    transform 0.2s ease-out,
    border-color var(--transition);
  will-change: transform;
}

.value-card:hover {
  border-color: var(--steel-blue);
}

.value-icon {
  color: var(--steel-blue-light);
  font-size: 1.3rem;
  margin-bottom: var(--space-sm);
}

.value-card p {
  font-size: 0.9rem;
}

/* ============================================
   REVIEWS SECTION
   ============================================ */

.reviews {
  padding: var(--space-xl) 0;
  border-top: 1px solid var(--border-subtle);
  overflow: hidden;
}

.reviews h2 {
  margin-bottom: var(--space-lg);
}

.reviews-track-wrap {
  overflow: hidden;
  border-radius: var(--radius);
}

.reviews-track {
  display: flex;
  gap: var(--space-md);
  transition: transform 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
  will-change: transform;
}

.review-card {
  min-width: 100%;
  background: var(--carbon-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.review-stars {
  color: #d9a94e;
  font-size: 1.1rem;
  letter-spacing: 0.1em;
}

.review-text {
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--text-primary);
  font-style: italic;
}

.review-author {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-top: var(--space-xs);
}

.review-initial {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(61, 111, 180, 0.18);
  color: var(--steel-blue-light);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.review-author strong {
  display: block;
  font-size: 0.95rem;
  color: var(--text-primary);
}

.review-author span {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.reviews-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  margin-top: var(--space-md);
}

.review-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border-subtle);
  background: var(--carbon-surface);
  color: var(--text-primary);
  font-size: 1rem;
  cursor: pointer;
  transition:
    border-color var(--transition),
    background var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.review-btn:hover {
  border-color: var(--steel-blue);
  background: var(--steel-blue);
}

.review-dots {
  display: flex;
  gap: 0.5rem;
}

.review-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border-subtle);
  border: none;
  cursor: pointer;
  transition:
    background var(--transition),
    transform var(--transition);
}

.review-dot.active {
  background: var(--steel-blue-light);
  transform: scale(1.3);
}

/* ============================================
   CTA BAND
   ============================================ */

.cta-band {
  padding: var(--space-xl) 0;
  text-align: center;
}

.cta-inner {
  max-width: 560px;
  margin: 0 auto;
}

.cta-band p {
  margin-bottom: var(--space-md);
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 960px) {
  .hero-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero-text {
    order: 1;
  }
  .hero-visual {
    order: 0;
    margin-bottom: var(--space-md);
  }
  .hero-sub {
    margin-left: auto;
    margin-right: auto;
  }
  .hero-actions {
    justify-content: center;
  }
  .story-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .hero {
    padding-top: 7rem;
    min-height: auto;
  }
  .stack-scene {
    width: 240px;
    height: 240px;
    transform: rotateX(14deg) rotateY(-18deg) scale(0.85);
  }
  .stack-layer {
    width: 220px;
    height: 140px;
  }
  .values {
    padding: var(--space-lg) 0;
  }
  .story {
    padding: var(--space-lg) 0;
  }
}
