/* ============================================================
   SCRIPT DETAIL PAGE STYLES
   ============================================================ */

/* ===== HERO ===== */
.sp-hero {
  position: relative;
  padding: 140px 0 80px;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}
.sp-hero__glow {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}
.sp-hero__glow--1 {
  width: 700px; height: 700px;
  background: radial-gradient(circle, rgba(56,189,248,0.1) 0%, transparent 65%);
  top: -200px; left: -200px;
  animation: floatGlow 16s ease-in-out infinite;
}
.sp-hero__glow--2 {
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(129,140,248,0.09) 0%, transparent 65%);
  bottom: -100px; right: -100px;
  animation: floatGlow 22s ease-in-out infinite reverse;
}

.sp-hero__inner {
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 60px;
  align-items: center;
}

.sp-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--muted);
  margin-bottom: 24px;
  transition: color var(--ease);
}
.sp-back:hover { color: var(--acc); }

.sp-hero__tag {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.sp-badge {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 100px;
  border: 1px solid var(--border);
  color: var(--muted);
}
.sp-badge--fw {
  border-color: rgba(56,189,248,0.3);
  color: var(--acc);
  background: rgba(56,189,248,0.08);
}
.sp-badge--feat {
  border-color: rgba(129,140,248,0.4);
  color: var(--acc2);
  background: rgba(129,140,248,0.08);
}

.sp-hero__title {
  font-family: var(--font-h);
  font-size: clamp(2.8rem, 5vw, 5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin-bottom: 10px;
}
.sp-hero__codename {
  font-family: 'Courier New', monospace;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  color: var(--acc);
  opacity: 0.7;
  margin-bottom: 20px;
}
.sp-hero__desc {
  font-size: 1rem;
  color: var(--muted);
  line-height: 1.82;
  max-width: 560px;
  margin-bottom: 36px;
}
.sp-hero__desc code {
  font-family: 'Courier New', monospace;
  font-size: 0.88rem;
  color: var(--acc);
  background: rgba(56,189,248,0.08);
  padding: 1px 7px;
  border-radius: 3px;
}
.sp-hero__btns {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.btn--lg {
  padding: 15px 34px;
  font-size: 0.95rem;
}

/* Preview box */
.sp-hero__preview { flex-shrink: 0; }
.sp-preview-box {
  background: var(--sur);
  border: 1px solid rgba(56,189,248,0.2);
  border-radius: 16px;
  padding: 40px 36px;
  text-align: center;
  width: 260px;
  box-shadow: 0 0 60px rgba(56,189,248,0.06);
}
.sp-preview-icon {
  font-size: 3.5rem;
  line-height: 1;
  margin-bottom: 18px;
}
.sp-preview-name {
  font-family: 'Courier New', monospace;
  font-size: 0.82rem;
  color: var(--acc);
  margin-bottom: 20px;
  opacity: 0.8;
}
.sp-preview-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  justify-content: center;
  list-style: none;
}
.sp-preview-tags li {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--muted);
  border: 1px solid var(--border);
  padding: 3px 10px;
  border-radius: 100px;
}

/* ===== IMAGE GALLERY (replaces preview box when images load) ===== */
.sp-gallery {
  width: 420px;
  flex-shrink: 0;
  position: relative;
}
@media (max-width: 900px) { .sp-gallery { width: 100%; } }
.sp-gallery__frame {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  background: var(--sur);
  border: 1px solid rgba(56,189,248,0.18);
  aspect-ratio: 16/9;
  box-shadow: 0 24px 70px rgba(0,0,0,0.55);
}
.sp-gallery__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
  cursor: pointer;
}
.sp-gallery__img.active { display: block; }
.sp-gallery__prev,
.sp-gallery__next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(7,8,13,0.75);
  border: 1px solid rgba(255,255,255,0.12);
  color: var(--text);
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
  transition: background var(--ease);
  opacity: 0;
  transition: opacity var(--ease);
}
.sp-gallery__frame:hover .sp-gallery__prev,
.sp-gallery__frame:hover .sp-gallery__next { opacity: 1; }
.sp-gallery__prev { left: 10px; }
.sp-gallery__next { right: 10px; }
.sp-gallery__dots {
  display: flex;
  justify-content: center;
  gap: 7px;
  margin-top: 12px;
}
.sp-gallery__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--border);
  cursor: pointer;
  transition: background var(--ease), transform var(--ease);
}
.sp-gallery__dot.active {
  background: var(--acc);
  transform: scale(1.4);
}

/* ===== QUICK STATS ===== */
.sp-stats {
  background: var(--sur);
  border-bottom: 1px solid var(--border);
}
.sp-stats__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}
.sp-stats__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px 16px;
  border-right: 1px solid var(--border);
  text-align: center;
  gap: 5px;
}
.sp-stats__item:last-child { border-right: none; }
.sp-stats__item strong {
  font-family: var(--font-h);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--acc);
  line-height: 1;
}
.sp-stats__item span {
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ===== FEATURE SECTIONS ===== */
.sp-section { padding: 100px 0; }

.sp-feature {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 70px;
  align-items: center;
  padding: 70px 0;
  border-bottom: 1px solid var(--border);
}
.sp-feature:last-child { border-bottom: none; }
.sp-feature--reverse {
  grid-template-columns: 340px 1fr;
}
.sp-feature--reverse .sp-feature__text { order: 2; }
.sp-feature--reverse .sp-feature__visual { order: 1; }

.sp-feature__title {
  font-family: var(--font-h);
  font-size: clamp(1.6rem, 2.5vw, 2.2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 16px;
  margin-top: 10px;
}
.sp-feature__desc {
  font-size: 0.97rem;
  color: var(--muted);
  line-height: 1.82;
  margin-bottom: 24px;
  max-width: 520px;
}

.sp-check-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.sp-check-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.5;
}
.sp-check-list li::before {
  content: '✓';
  color: var(--acc);
  font-weight: 700;
  font-size: 0.82rem;
  flex-shrink: 0;
  margin-top: 1px;
}

.sp-feature__visual {
  display: flex;
  align-items: center;
  justify-content: center;
}
.sp-visual-card {
  width: 100%;
  max-width: 420px;
  aspect-ratio: 16 / 9;
  background: var(--sur);
  border: 1px solid rgba(56,189,248,0.15);
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 0 40px rgba(56,189,248,0.08);
}
.sp-visual-card .sp-visual-icon {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
}
.sp-visual-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.sp-visual-card p {
  font-family: var(--font-h);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.04em;
  text-align: center;
  padding: 0 16px;
}

/* ===== ALL FEATURES GRID ===== */
.sp-allfeats {
  padding: 100px 0;
  background: var(--sur);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.sp-feat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.sp-feat-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.88rem;
  color: var(--muted);
  transition: border-color var(--ease), color var(--ease);
}
.sp-feat-item:hover {
  border-color: rgba(56,189,248,0.22);
  color: var(--text);
}
.sp-feat-item span {
  color: var(--acc);
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
}

/* ===== REQUIREMENTS ===== */
.sp-req { padding: 100px 0; }
.sp-req__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
.sp-req__item {
  background: var(--sur);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px 22px;
  text-align: center;
  transition: border-color var(--ease);
}
.sp-req__item:hover { border-color: rgba(56,189,248,0.22); }
.sp-req__icon { font-size: 2rem; margin-bottom: 14px; line-height: 1; }
.sp-req__item h4 {
  font-family: var(--font-h);
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 8px;
}
.sp-req__item p {
  font-size: 0.84rem;
  color: var(--muted);
  line-height: 1.6;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 960px) {
  .sp-hero__inner         { grid-template-columns: 1fr; }
  .sp-hero__preview       { display: none; }
  .sp-feature,
  .sp-feature--reverse    { grid-template-columns: 1fr; gap: 40px; }
  .sp-feature--reverse .sp-feature__text  { order: 1; }
  .sp-feature--reverse .sp-feature__visual { order: 2; }
  .sp-feat-grid           { grid-template-columns: repeat(2, 1fr); }
  .sp-req__grid           { grid-template-columns: repeat(2, 1fr); }
  .sp-stats__grid         { grid-template-columns: repeat(2, 1fr); }
  .sp-stats__item:nth-child(2) { border-right: none; }
  .sp-stats__item:nth-child(3) { border-top: 1px solid var(--border); }
  .sp-stats__item:nth-child(4) { border-top: 1px solid var(--border); border-right: none; }
}

@media (max-width: 540px) {
  .sp-feat-grid  { grid-template-columns: 1fr; }
  .sp-req__grid  { grid-template-columns: 1fr; }
  .sp-hero__btns { flex-direction: column; align-items: stretch; }
}
