/**
 * Index landing page content styles (hero, sections, cards, CTA).
 * Theme variables (--bg0, --hero-image, etc.) are set in index.php.
 */

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { height: 100%; margin: 0; }

body {
  font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, sans-serif;
  color: var(--text);
  background: var(--bg0);
  overflow-x: hidden;
  line-height: 1.5;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse 100% 60% at 50% 0%, rgba(139, 92, 246, 0.06) 0%, transparent 50%),
    radial-gradient(ellipse 80% 40% at 80% 80%, rgba(59, 130, 246, 0.05) 0%, transparent 45%);
}

.index-wrap { position: relative; z-index: 1; }
.index-wrap a { color: inherit; text-decoration: none; }
.index-wrap a:focus,
.index-wrap a:focus-visible,
.index-wrap button:focus,
.index-wrap button:focus-visible {
  outline: none !important;
  outline-width: 0 !important;
  box-shadow: none !important;
}

.index-wrap a:active {
  outline: none !important;
  outline-width: 0 !important;
}

.index-wrap button:active {
  outline: none !important;
  outline-width: 0 !important;
  box-shadow: none !important;
}

.index-content { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }

/* Buttons (shared by header and landing) – same size as app primary/secondary */
.index-wrap .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 4px;
  font-weight: 500;
  font-size: 0.875rem;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition), background var(--transition);
  border: 1px solid var(--stroke);
  background: var(--card);
  color: var(--text);
}
.index-wrap .btn:hover { transform: translateY(-1px); }
.index-wrap .btn-outline {
  background: transparent;
  border-color: rgba(255,255,255,0.2);
  color: var(--text);
}
.index-wrap .btn-outline:hover { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.25); }
.index-wrap .btn-primary {
  border: 1px solid rgba(139, 92, 246, 0.4);
  background: linear-gradient(180deg, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0.06) 35%, transparent 50%),  linear-gradient(135deg, rgb(50 136 127 / 50%), rgb(57 199 179 / 35%));
  color: #fff;
  box-shadow: 0 0 20px var(--glow), 0 0 40px var(--glow-blue), inset 0 1px 0 rgba(255,255,255,0.15);
}
.index-wrap .btn-primary:hover {
  background: linear-gradient(180deg, rgba(255,255,255,0.22) 0%, rgba(255,255,255,0.08) 35%, transparent 50%), linear-gradient(135deg, rgba(139, 92, 246, 0.55), rgba(59, 130, 246, 0.4));
  box-shadow: 0 0 28px var(--glow), 0 0 48px var(--glow-blue), inset 0 1px 0 rgba(255,255,255,0.2);
  border-color: rgba(139, 92, 246, 0.5);
}
.index-wrap .btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  color: #e5e7eb;
}
.index-wrap .btn-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
}

/* ----- Hero ----- */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px 24px 100px;
  position: relative;
  width: 100vw;
  max-width: none;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  box-sizing: border-box;
}
/* Content readability overlay: darker behind headline/subtitle, does not affect header */
.lv2-hero.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;

}
.hero-bg {
  position: absolute;
  inset: 0;
  background-color: var(--bg0);
  background-image: var(--hero-image);
  background-size: cover;
  background-position: center;
  z-index: -2;
}
/* Video background (same as sources 1.2.8 home.php) */
.hero .hero-video-background.index-hero-video {
  position: absolute;
  inset: 0;
  z-index: -2;
  overflow: hidden;
  opacity: 0;
  transition: opacity 0.5s ease;
}
.hero .hero-video-background.index-hero-video video {
  position: absolute;
  top: 50%;
  left: 50%;
  min-width: 100%;
  min-height: 100%;
  width: 100%;
  height: 100%;
  transform: translate(-50%, -50%);
  object-fit: cover;
}
.hero .hero-video-background.index-hero-video .hero-video-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(12, 12, 15, 0.2) 0%, rgba(12, 12, 15, 0.35), rgba(12, 12, 15, 0.6) 100%);
  z-index: 1;
}
.hero-overlay {
  position: absolute;
  inset: 0;

  z-index: -1;
}
@media (max-width: 768px) {
  .hero-overlay {
    background: linear-gradient(180deg, rgba(12, 12, 15, 0.4) 0%, rgba(12, 12, 15, 0.58) 50%, var(--bg0) 100%);
  }
}
.hero h1 {
  font-size: clamp(2.75rem, 6vw, 4.5rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.1;
  margin: 0 0 12px;
  color: var(--text);
}
.hero h1 .logo-gradient {
  background: linear-gradient(90deg, #e879f9 0%, #a855f7 45%, #6366f1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 20px rgba(168, 85, 247, 0.25));
}
.hero h1 .highlight { color: var(--text); }
.hero .tagline {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--muted);
  margin: 0 0 8px;
  font-weight: 500;
}
.hero .subheadline {
  font-size: clamp(0.95rem, 1.8vw, 1.1rem);
  color: var(--muted);
  max-width: 560px;
  margin: 0 auto 36px;
  line-height: 1.6;
}
.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-bottom: 48px;
}
.hero-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  color: var(--muted-strong);
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--stroke);
}
.chip svg { width: 14px; height: 14px; opacity: 0.7; }

/* ----- Sections ----- */
.index-main section {  padding: 60px 24px; }
.section-title {
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  text-align: center;
  margin: 0 0 56px;
  color: var(--text);
}

/* Why MediaSnap cards */
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  max-width: var(--max-w);
  margin: 0 auto;
}
.card {
  padding: 36px 28px;
  background: rgba(26, 26, 30, 0.95);
  border: 1px solid var(--stroke);
  border-radius: var(--radius-lg);
  transition: border-color var(--transition), box-shadow var(--transition);
  position: relative;
  overflow: hidden;
  text-align: center;
}
.card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  opacity: 0.8;
  pointer-events: none;
  background: linear-gradient(90deg, transparent 0%, rgba(139, 92, 246, 0.5) 30%, rgba(59, 130, 246, 0.5) 70%, transparent 100%);
}
.card::after {
  content: "";
  position: absolute;
  top: 0; left: 0; bottom: 0;
  width: 1px;
  opacity: 0.5;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(139, 92, 246, 0.35) 0%, transparent 60%);
}
.card:hover {
  border-color: rgba(255,255,255,0.12);
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}
.card-icon {
  width: 52px; height: 52px;
  margin: 0 auto 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  position: relative;
}
.card-icon img { width: 28px; height: 28px; object-fit: contain; }
.card--production .card-icon {
  background: linear-gradient(135deg, rgba(135, 206, 250, 0.2) 0%, rgba(184, 134, 211, 0.15) 100%);
  border: 1px solid rgba(135, 206, 250, 0.35);
  box-shadow: 0 0 16px rgba(135, 206, 250, 0.12);
}
.card--production .card-icon img { filter: drop-shadow(0 0 6px rgba(135, 206, 250, 0.5)); }
.card--engine .card-icon {
  background: linear-gradient(135deg, rgba(157, 78, 221, 0.25) 0%, rgba(30, 144, 255, 0.15) 50%, rgba(144, 238, 144, 0.12) 100%);
  border: 1px solid rgba(199, 21, 133, 0.4);
  box-shadow: 0 0 20px rgba(157, 78, 221, 0.2);
}
.card--engine .card-icon img { filter: drop-shadow(0 0 8px rgba(199, 125, 255, 0.5)); }
.card--movie .card-icon {
  background: linear-gradient(135deg, rgba(70, 130, 180, 0.25) 0%, rgba(64, 224, 208, 0.2) 100%);
  border: 1px solid rgba(70, 130, 180, 0.4);
  box-shadow: 0 0 16px rgba(64, 224, 208, 0.15);
}
.card--movie .card-icon img { filter: drop-shadow(0 0 6px rgba(64, 224, 208, 0.4)); }
.card h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin: 0 0 12px;
  color: rgba(255, 255, 255, 0.95);
  line-height: 1.3;
  letter-spacing: -0.02em;
}
.card p {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.5);
  margin: 0;
  line-height: 1.5;
  max-width: 280px;
  margin-left: auto;
  margin-right: auto;
}

/* How it works */
.workflow {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 40px 32px;
  background: var(--card);
  border: 1px solid var(--stroke);
  border-radius: var(--radius-lg);
  position: relative;
}
.workflow-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  position: relative;
  z-index: 1;
}
.workflow-step { text-align: center; }
.workflow-step .num {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted-strong);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.workflow-step .label {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 16px;
}
.workflow-image-wrap {
  margin-top: 24px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--stroke);
  background: rgba(0,0,0,0.2);
}
.workflow-image-wrap img {
  width: 100%;
  height: auto;
  display: block;
  vertical-align: middle;
}

/* Made for */
.made-for {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 48px;
  max-width: var(--max-w);
  margin: 0 auto 32px;
}
.made-for-col h3 {
  font-size: 1.35rem;
  font-weight: 700;
  margin: 0 0 16px;
  color: var(--text);
}
.made-for-col ul { list-style: none; padding: 0; margin: 0; }
.made-for-col li {
  padding: 6px 0;
  color: var(--muted);
  font-size: 0.98rem;
  position: relative;
  padding-left: 20px;
}
.made-for-col li::before {
  content: "";
  position: absolute;
  left: 0; top: 12px;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  opacity: 0.8;
}
.made-for-statement {
  text-align: center;
  font-size: 1.1rem;
  color: var(--muted);
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.6;
}

/* Final CTA */
.cta-section {
  padding: 120px 24px;
  text-align: center;
  background: linear-gradient(180deg, var(--bg0) 0%, var(--bg1) 100%);
  border-top: 1px solid var(--stroke);
}
.cta-section h2 {
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 0 0 32px;
  color: var(--text);
}
.cta-section .btns {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 14px;
}

/* Responsive (landing only) */
@media (max-width: 1024px) {
  .cards { grid-template-columns: 1fr; }
  .workflow-steps { grid-template-columns: repeat(2, 1fr); }
  .made-for { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .workflow-steps { grid-template-columns: 1fr; }
  .workflow-step .label { margin-bottom: 8px; }
  .index-main section { padding: 34px 20px; }
  .cta-section { padding: 80px 20px; }
}
