/* 
 * Homenexa Inspired Styles
 * Includes Glassmorphism, Neon Glows, and Layouts for GSAP animations
 */

:root {
  --hx-bg-dark: #050505;
  --hx-bg-darker: #000000;
  --hx-glass-bg: rgba(255, 255, 255, 0.03);
  --hx-glass-border: rgba(255, 255, 255, 0.08);
  --hx-glow-amber: rgba(255, 170, 0, 0.15);
  --hx-glow-teal: rgba(0, 255, 200, 0.15);
  --hx-text-primary: #ffffff;
  --hx-text-muted: #888888;
}

/* Base override for darker sections */
.section--hx-dark {
  background-color: var(--hx-bg-darker);
  color: var(--hx-text-primary);
  overflow: hidden;
  position: relative;
}

/* ════════════════ GIANT TEXT ════════════════ */
.hx-giant-text-container {
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--hx-bg-darker);
  position: relative;
  /* overflow: hidden; REMOVED — allows hero gallery cards to overlap visually */
  z-index: 1;  /* sits BELOW .hero */
}

.hx-giant-text {
  font-family: 'Outfit', sans-serif;
  font-size: 15vw;
  font-weight: 900;
  text-transform: uppercase;
  color: var(--hx-text-primary);
  letter-spacing: -0.05em;
  line-height: 1;
  text-align: center;
  /* GSAP will animate scale and opacity */
  will-change: transform, opacity;
  transform-origin: center center;
}

@media (max-width: 768px) {
  .hx-giant-text {
    font-size: 20vw;
  }
}

/* ════════════════ PARALLAX FLOATING CARDS ════════════════ */
.hx-parallax-section {
  padding: 8rem 0;
  background-color: var(--hx-bg-dark);
}

.hx-parallax-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 3rem;
  margin-top: 4rem;
  perspective: 1200px; /* Essential for 3D tilt */
}

.hx-parallax-card {
  background: var(--hx-glass-bg);
  border: 1px solid var(--hx-glass-border);
  border-radius: 20px;
  padding: 3rem 2rem;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  position: relative;
  overflow: hidden;
  transition: border-color 0.4s ease, transform 0.4s ease;
  will-change: transform;
}

.hx-parallax-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(circle at top right, var(--hx-glow-amber), transparent 60%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.hx-parallax-card:hover {
  border-color: rgba(255, 170, 0, 0.4);
}

.hx-parallax-card:hover::before {
  opacity: 1;
}

.hx-parallax-card__icon {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
  display: inline-block;
}

.hx-parallax-card__title {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: #fff;
}

.hx-parallax-card__desc {
  color: var(--hx-text-muted);
  line-height: 1.6;
}

/* Stagger cards vertically via CSS initially, GSAP will take over */
.hx-parallax-grid .hx-parallax-card:nth-child(even) {
  margin-top: 4rem;
}
@media (max-width: 768px) {
  .hx-parallax-grid .hx-parallax-card:nth-child(even) {
    margin-top: 0;
  }
}

/* ════════════════ INTELLIGENT CONTROL GRID ════════════════ */
.hx-control-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 4rem;
}

.hx-control-item {
  background: #111;
  border: 1px solid #222;
  border-radius: 12px;
  padding: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all 0.3s ease;
  cursor: pointer;
}

.hx-control-item:hover {
  background: #1a1a1a;
  border-color: #444;
  transform: translateY(-4px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.hx-control-item__label {
  font-weight: 500;
  letter-spacing: 1px;
  font-size: 0.85rem;
  text-transform: uppercase;
  color: #ccc;
}

.hx-control-item__icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(255,255,255,0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}

.hx-control-item:hover .hx-control-item__icon {
  background: #ffaa00;
  color: #000;
  box-shadow: 0 0 15px rgba(255,170,0,0.4);
}

@media (max-width: 900px) {
  .hx-control-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .hx-control-grid { grid-template-columns: 1fr; }
}

/* ════════════════ SERVICES SCATTER CARD SECTION ════════════════ */

/* Outer section — needs enough scroll height for the pin */
.svc-scatter-section {
  position: relative;
}

/* The pinned viewport window */
.svc-scatter {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #080807;
}

/* Giant scrubbing background text */
.svc-scatter__bg-text {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: clamp(5rem, 15vw, 16rem);
  font-weight: 900;
  letter-spacing: -0.05em;
  text-transform: uppercase;
  color: #fff;
  line-height: 1;
  will-change: transform, opacity;
  pointer-events: none;
  user-select: none;
  white-space: nowrap;
}

/* Eyebrow label in top-left */
.svc-scatter__eyebrow {
  position: absolute;
  top: clamp(1.5rem, 4vh, 3rem);
  left: clamp(1.5rem, 4vw, 4rem);
  z-index: 10;
  opacity: 0;
}

.svc-scatter__tagline {
  font-family: var(--font-heading);
  font-size: clamp(1rem, 1.8vw, 1.4rem);
  font-weight: 700;
  color: rgba(255,255,255,0.85);
  margin: 0.5rem 0 0;
  letter-spacing: -0.02em;
}

/* The arena cards are positioned absolutely inside here */
.svc-scatter__arena {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

/* Individual scatter card — Homenexa style */
.svc-sc-card {
  position: absolute;
  width: clamp(375px, 47.5vw, 612px);
  min-height: clamp(310px, 41.4vh, 483px);
  padding: clamp(2.8rem, 4.5vw, 4rem);
  background: rgba(30, 30, 28, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: clamp(14px, 1.5vw, 20px);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow:
    0 24px 48px rgba(0,0,0,0.55),
    0 1px 0 rgba(255,255,255,0.05) inset;
  will-change: transform, opacity;
  opacity: 0;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Card header: dot + title inline */
.svc-sc-card__header {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 1.5rem;
}

.svc-sc-card__title {
  font-family: var(--font-heading);
  font-size: clamp(1.2rem, 2.2vw, 1.7rem);
  font-weight: 800;
  color: #FAFAF8;
  letter-spacing: -0.04em;
  line-height: 1.1;
  margin: 0;
}

.svc-sc-card__dot {
  display: block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* 2-column bullet grid */
.svc-sc-card__bullets {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 1.2rem;
  margin-bottom: 1.4rem;
}

.svc-sc-card__col {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.svc-sc-card__bullet {
  font-family: var(--font-body);
  font-size: clamp(0.85rem, 1.15vw, 1.05rem);
  line-height: 1.5;
  color: rgba(255,255,255,0.65);
  padding-left: 1.25rem;
  position: relative;
}

.svc-sc-card__bullet::before {
  content: '›';
  position: absolute;
  left: 0;
  color: rgba(255,255,255,0.25);
  font-weight: 600;
}

/* Learn More button */
.svc-sc-card__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
  text-decoration: none;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 999px;
  padding: 0.45rem 1rem;
  transition: color 0.25s, border-color 0.25s, background 0.25s;
  pointer-events: auto;
  align-self: flex-start;
}

.svc-sc-card__cta:hover {
  color: #fff;
  border-color: var(--dot, rgba(255,255,255,0.4));
  background: rgba(255,255,255,0.05);
}



/* Progress bar at bottom */
.svc-scatter__progress {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 2px;
  background: rgba(255,255,255,0.1);
  border-radius: 999px;
  overflow: hidden;
  z-index: 20;
}

.svc-scatter__progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #00A86B, #00D97E);
  border-radius: inherit;
  transition: width 60ms linear;
}

/* Mobile: enable scatter, show pinned interactive stack */
@media (max-width: 768px) {
  .svc-scatter {
    height: 100vh;
    min-height: 550px;
    padding: 0;
    overflow: hidden;
    background: #080807;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .svc-scatter__bg-text { 
    display: flex; 
    font-size: 4.5rem;
    opacity: 0.15 !important; /* Keep it subtle on mobile */
  }

  .svc-scatter__eyebrow { 
    position: absolute; 
    top: 1.5rem; 
    left: 1.25rem; 
    opacity: 0; 
    z-index: 20;
    width: calc(100% - 2.5rem);
  }

  .svc-scatter__arena {
    position: absolute;
    inset: 0;
    pointer-events: none;
    display: block; /* Undo grid */
  }

  .svc-sc-card {
    position: absolute;
    width: 90vw !important;
    max-width: 420px;
    min-height: auto !important;
    padding: 2.25rem 1.75rem !important; /* Slightly more padding for mobile premium feel */
    opacity: 0;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .svc-sc-card__bullets {
    grid-template-columns: 1fr;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
  }

  .svc-sc-card__bullet {
    font-size: 0.9rem;
  }

  .svc-sc-card__title {
    font-size: 1.25rem;
  }

  .svc-scatter__progress { 
    display: block; 
    bottom: 2rem;
    width: 80px;
  }
}


/* ── All-under-one-roof section ─────────────────────────────────── */
.svc-roof {
  background: #080807;
  padding: clamp(5rem, 10vw, 9rem) clamp(1.5rem, 5vw, 4rem);
}

.svc-roof__inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(2.5rem, 5vw, 4rem);
}

.svc-roof__headline {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 5vw, 4rem);
  font-weight: 900;
  letter-spacing: -0.05em;
  color: #fff;
  text-align: center;
  margin: 0;
  line-height: 1;
}

.svc-roof__grid {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(0.75rem, 1.5vw, 1.25rem);
  justify-items: stretch;
}

/* Orphan handling for desktop only */
@media (min-width: 1025px) {
  /* Center the 7th card by placing it directly in Col 2 of the 3-column grid */
  .svc-roof__grid .svc-roof-card:last-child:nth-child(3n + 1) {
    grid-column: 2;
    max-width: none;
    justify-self: stretch;
  }
}

/* Compact service card — title + dot + CTA pill only */
.svc-roof-card {
  background: rgba(30, 30, 28, 0.80);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  padding: clamp(1.2rem, 2vw, 1.75rem) clamp(1.25rem, 2vw, 1.75rem);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: border-color 0.25s, box-shadow 0.25s;
}

/* Ensure no bullet points appear in this section */
.svc-roof-card ul, .svc-roof-card li {
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
}
.svc-roof-card li::before {
  display: none !important;
}

.svc-roof-card:hover {
  border-color: rgba(255,255,255,0.18);
  box-shadow: 0 12px 32px rgba(0,0,0,0.45);
}

.svc-roof-card__header {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.svc-roof-card__dot {
  display: block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
}

.svc-roof-card__title {
  font-family: var(--font-heading);
  font-size: clamp(0.9rem, 1.3vw, 1.15rem);
  font-weight: 700;
  color: #FAFAF8;
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin: 0;
}

/* Logo */
.svc-roof__logo-wrap {
  display: flex;
  justify-content: center;
  padding-top: clamp(0.5rem, 2vw, 1.5rem);
}

.svc-roof__logo-wrap img {
  width: clamp(160px, 22vw, 300px);
  display: block;
  will-change: transform, opacity, filter;
}

/* Tablet: 2 columns */
@media (max-width: 1024px) {
  .svc-roof {
    padding: clamp(4rem, 8vw, 6rem) clamp(1.25rem, 4vw, 2.5rem);
  }
  .svc-roof__grid { 
    grid-template-columns: repeat(2, 1fr); 
    gap: 1rem;
  }
  /* Center orphan if needed for 2cols (e.g. 7th card) */
  .svc-roof__grid .svc-roof-card:last-child:nth-child(odd) {
     grid-column: 1 / -1;
     justify-self: center;
     width: 100%;
     max-width: 500px; /* matched to approximate 1-column width on tablet */
  }
}

/* Mobile: 1 column */
@media (max-width: 768px) {
  .svc-roof {
    padding: 4rem 1.25rem;
    overflow: hidden; /* safety for right-side scroll */
  }
  .svc-roof__grid { 
    grid-template-columns: 1fr; 
    gap: 0.75rem; 
  }
  .svc-roof__logo-wrap img { width: clamp(160px, 58vw, 240px); }
  .svc-roof__headline { font-size: clamp(1.8rem, 7vw, 2.5rem); }

  /* Reset any orphan logic for 1col */
  .svc-roof__grid .svc-roof-card:last-child {
    grid-column: auto !important;
    max-width: none !important;
    justify-self: stretch !important;
  }
}

/* ════════════════ SEQUENTIAL SERVICE CARD STAGE ════════════════ */
.svc-stage {
  position: relative;
  width: 100%;
  height: 80vh;          /* viewport for viewing one card at a time */
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 1200px;
}

.svc-stage__cards {
  position: relative;
  width: 100%;
  max-width: 900px;
  height: 100%;
}

.svc-card {
  position: absolute;
  inset: 5% 0;
  display: flex;
  gap: 3rem;
  align-items: center;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 20px;
  padding: 2.5rem 2.5rem;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  will-change: transform, opacity;
  /* GSAP sets transform, hide all by default */
  opacity: 0;
  transform: rotateY(-28deg) translateY(60px);
  transform-origin: left center;
  transform-style: preserve-3d;
}

.svc-card__img-wrap {
  flex: 0 0 42%;
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 4/3;
}

.svc-card__img-wrap img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}

.svc-card__body {
  flex: 1;
}

.svc-card__title {
  font-size: 1.8rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 1.2rem;
  line-height: 1.2;
}

.svc-card__products {
  list-style: none;
  padding: 0;
  margin: 0;
  columns: 2;
  column-gap: 1rem;
}

.svc-card__products li {
  color: rgba(255,255,255,0.6);
  font-size: 0.85rem;
  padding: 0.3rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.svc-stage__counter {
  position: absolute;
  bottom: 1.5rem;
  right: 2rem;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.3);
  letter-spacing: 2px;
}

@media (max-width: 768px) {
  .svc-card {
    flex-direction: column;
    gap: 1.5rem;
    padding: 1.5rem;
  }
  .svc-card__img-wrap { flex: 0 0 auto; width: 100%; aspect-ratio: 16/9; }
  .svc-card__title { font-size: 1.3rem; }
  .svc-card__products { columns: 1; }
}

/* ════════════════ BRANDS LOGO FADE-IN ════════════════ */
.brands-grid .brand-card {
  will-change: transform, opacity;
}

