/* ═══════════════════════════════════════════════
   Layout — Sections, Grid, Containers
   ═══════════════════════════════════════════════ */

/* ─── Section Base ─── */
.section {
  position: relative;
  overflow: hidden;
  padding: 8rem 2rem 6rem;
}
.section--full { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.section--auto { min-height: auto; }
.section-inner {
  max-width: var(--max-w);
  width: 100%;
  margin: 0 auto;
  text-align: center;
  position: relative;
  z-index: 2;
}
.section-inner--narrow { max-width: var(--max-w-narrow); }

/* ─── Section Backgrounds ─── */
.section--dark { background: var(--bg); }
.section--darker { background: var(--bg1); }
.section--card { background: var(--bg2); }

/* ─── Section Divider (gradient line) ─── */
.section-divider {
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(167,139,250,0.2) 30%, rgba(96,165,250,0.2) 70%, transparent);
  position: relative;
}
.section-divider::after {
  content: '';
  position: absolute;
  top: -1px;
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 3px;
  background: var(--gradient);
  border-radius: 2px;
}

/* ─── Grid Layouts ─── */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: rgba(255,255,255,0.04); border-radius: var(--radius); overflow: hidden; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }

/* ─── Flex Utilities ─── */
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-col { display: flex; flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }
.gap-4 { gap: 2rem; }
.gap-6 { gap: 3rem; }

/* ─── Hero ─── */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 52px 2rem 4rem;
  overflow: hidden;
}
.hero-content {
  position: relative;
  z-index: 3;
  text-align: center;
  max-width: 900px;
}
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
}
.hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.hero-orbs {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  will-change: transform;
}
.hero-orb--violet {
  width: 600px; height: 600px;
  background: rgba(167,139,250,0.12);
  top: -15%; left: 10%;
}
.hero-orb--blue {
  width: 500px; height: 500px;
  background: rgba(96,165,250,0.1);
  bottom: -10%; right: 5%;
}
.hero-orb--pink {
  width: 400px; height: 400px;
  background: rgba(244,114,182,0.08);
  top: 30%; right: 25%;
}

/* ─── Hero Grid Pattern ─── */
.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.015) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
}

/* ─── Hero Meta Stats ─── */
.hero-meta {
  display: flex;
  gap: 4rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 4rem;
  padding-top: 3rem;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.hero-stat { text-align: center; min-width: 100px; }
.hero-stat-num {
  font-size: 3rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
}
.hero-stat-label {
  font-size: 0.78rem;
  color: var(--text3);
  margin-top: 0.5rem;
  letter-spacing: 0.02em;
}

/* ─── Two Column Layout ─── */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  max-width: var(--max-w);
  margin: 0 auto;
}
.split--reverse { direction: rtl; }
.split--reverse > * { direction: ltr; }
.split-content { text-align: left; }
.split-visual { position: relative; display: flex; align-items: center; justify-content: center; }

/* ─── Scroll Gallery ─── */
.gallery-track {
  display: flex;
  gap: 1.5rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding: 2rem 0;
  scrollbar-width: none;
}
.gallery-track::-webkit-scrollbar { display: none; }
.gallery-item {
  flex: 0 0 auto;
  scroll-snap-align: center;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.06);
  transition: transform 0.4s var(--ease), border-color 0.4s;
}
.gallery-item:hover {
  transform: scale(1.02);
  border-color: rgba(167,139,250,0.2);
}

/* ─── Timeline ─── */
.timeline {
  position: relative;
  max-width: 700px;
  margin: 3rem auto 0;
  text-align: left;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 28px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--violet), var(--blue), var(--cyan));
  opacity: 0.3;
}
.timeline-item {
  position: relative;
  padding-left: 72px;
  padding-bottom: 3rem;
}
.timeline-item:last-child { padding-bottom: 0; }
.timeline-dot {
  position: absolute;
  left: 20px;
  top: 4px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--violet);
  box-shadow: 0 0 20px rgba(167,139,250,0.3);
}
.timeline-step {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--violet);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.4rem;
}
.timeline-title {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
}
.timeline-desc {
  font-size: 0.88rem;
  color: var(--text3);
  line-height: 1.6;
}

/* ─── Responsive ─── */
@media (max-width: 1024px) {
  .split { grid-template-columns: 1fr; gap: 2.5rem; text-align: center; }
  .split--reverse { direction: ltr; }
  .split-content { text-align: center; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .section { padding: 5rem 1.2rem 3.5rem; }
  .hero { padding: 52px 1.2rem 3rem; }
  .hero-meta { gap: 2rem; }
  .hero-stat-num { font-size: 2.2rem; }
  .grid-2 { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: 1fr; }
}
