/* ============ Base & theme ============ */
:root {
  --bg: #05060a;
  --bg-soft: #0b0d14;
  --text: #e8eaf2;
  --text-dim: #9aa1b5;
  --accent: #8ea2ff;
  --accent-warm: #c9a7ff;
  --line: rgba(142, 162, 255, 0.18);
  --card: rgba(13, 16, 26, 0.72);
  --radius: 14px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.65;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }

/* ============ Starfield background ============ */
.starfield {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 20% -10%, rgba(38, 44, 84, 0.35), transparent 55%),
    radial-gradient(ellipse at 85% 15%, rgba(70, 40, 100, 0.18), transparent 50%),
    var(--bg);
}

.stars {
  position: absolute;
  inset: -50% -50%;
  background-repeat: repeat;
  animation: drift 10s linear infinite;
}

.stars-small {
  background-image:
    radial-gradient(1px 1px at 25px 35px, rgba(255,255,255,0.9), transparent),
    radial-gradient(1px 1px at 160px 90px, rgba(255,255,255,0.6), transparent),
    radial-gradient(1px 1px at 300px 200px, rgba(255,255,255,0.75), transparent),
    radial-gradient(1px 1px at 90px 260px, rgba(255,255,255,0.5), transparent),
    radial-gradient(1px 1px at 380px 120px, rgba(255,255,255,0.65), transparent),
    radial-gradient(1px 1px at 220px 330px, rgba(255,255,255,0.55), transparent);
  background-size: 420px 420px;
}

.stars-medium {
  background-image:
    radial-gradient(1.6px 1.6px at 70px 140px, rgba(255,255,255,0.95), transparent),
    radial-gradient(1.4px 1.4px at 250px 60px, rgba(200,215,255,0.85), transparent),
    radial-gradient(1.6px 1.6px at 340px 280px, rgba(255,255,255,0.8), transparent),
    radial-gradient(1.3px 1.3px at 150px 320px, rgba(230,235,255,0.7), transparent);
  background-size: 480px 480px;
  animation-duration: 60s;
}

.stars-large {
  background-image:
    radial-gradient(2.4px 2.4px at 110px 80px, rgba(255,255,255,1), transparent),
    radial-gradient(2px 2px at 300px 190px, rgba(190,205,255,0.95), transparent),
    radial-gradient(2.2px 2.2px at 30px 300px, rgba(255,245,225,0.9), transparent);
  background-size: 520px 520px;
  animation-duration: 40s;
  filter: drop-shadow(0 0 4px rgba(255,255,255,0.5));
}

@keyframes drift {
  from { transform: translate3d(0, 0, 0); }
  to   { transform: translate3d(-210px, 105px, 0); }
}

.nebula {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.5;
  animation: breathe 18s ease-in-out infinite alternate;
}

.nebula-1 {
  width: 45vw; height: 45vw;
  left: -12vw; top: -10vw;
  background: radial-gradient(circle, rgba(88, 78, 178, 0.28), transparent 70%);
}

.nebula-2 {
  width: 40vw; height: 40vw;
  right: -10vw; top: 45vh;
  background: radial-gradient(circle, rgba(150, 70, 140, 0.16), transparent 70%);
  animation-delay: -9s;
}

@keyframes breathe {
  from { opacity: 0.35; transform: scale(1); }
  to   { opacity: 0.6; transform: scale(1.08); }
}

@media (prefers-reduced-motion: reduce) {
  .stars, .nebula { animation: none; }
  html { scroll-behavior: auto; }
}

/* ============ Hero ============ */
.hero {
  min-height: 92vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4rem 1.5rem;
}

.hero-kicker {
  text-transform: uppercase;
  letter-spacing: 0.35em;
  font-size: 0.75rem;
  color: var(--accent);
  margin-bottom: 1rem;
}

.hero h1 {
  font-size: clamp(2.6rem, 8vw, 5.5rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.05;
  background: linear-gradient(180deg, #ffffff 30%, var(--accent) 75%, var(--accent-warm));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 60px rgba(142, 162, 255, 0.25);
}

.hero-sub {
  max-width: 34rem;
  margin-top: 1.25rem;
  color: var(--text-dim);
  font-size: 1.1rem;
}

.hero-cta {
  display: inline-block;
  margin-top: 2.25rem;
  padding: 0.75rem 1.75rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text);
  text-decoration: none;
  font-size: 0.95rem;
  transition: border-color 0.25s, box-shadow 0.25s, transform 0.25s;
  backdrop-filter: blur(4px);
  background: rgba(255, 255, 255, 0.03);
}

.hero-cta:hover {
  border-color: var(--accent);
  box-shadow: 0 0 24px rgba(142, 162, 255, 0.25);
  transform: translateY(-2px);
}

/* ============ Spec bar ============ */
.spec-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 1.75rem;
}

.spec-chip {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  color: var(--text-dim);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.35rem 0.85rem;
  white-space: nowrap;
}

/* ============ Sections ============ */
main { max-width: 62rem; margin: 0 auto; padding-bottom: 4rem; }

.section {
  padding: 4.5rem 1.5rem 1.5rem;
}

.step-header {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.9rem;
}

.step-number {
  flex-shrink: 0;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  font-size: 0.72rem;
  color: var(--accent-warm);
  white-space: nowrap;
}

.step-header h2 {
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  font-weight: 650;
  letter-spacing: 0.01em;
}

.step-body {
  max-width: 46rem;
  color: var(--text-dim);
  margin-bottom: 2rem;
}

.step-body p + p { margin-top: 1rem; }

.step-body strong {
  color: var(--text);
  font-weight: 600;
}

.section-final .step-body { color: var(--text-dim); }

/* ============ Image frames ============ */
.frame {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.75rem;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.55);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.frame:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 55px rgba(0, 0, 0, 0.65), 0 0 32px rgba(142, 162, 255, 0.08);
}

.frame img {
  width: 100%;
  border-radius: calc(var(--radius) - 5px);
}

.frame figcaption,
figcaption {
  padding: 0.8rem 0.5rem 0.3rem;
  font-size: 0.85rem;
  color: var(--text-dim);
  text-align: center;
}

.frame-wide img { aspect-ratio: auto; }

/* Full-size image links */
.shot-link {
  display: block;
  cursor: zoom-in;
  border-radius: calc(var(--radius) - 5px);
}

/* ============ Before/after slider ============ */
.slider-wrap { margin-top: 0.5rem; }

.ba-slider {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.55);
  user-select: none;
  touch-action: pan-y;
  cursor: ew-resize;
}

.ba-slider img {
  width: 100%;
  pointer-events: none;
}

.ba-after-wrap {
  position: absolute;
  inset: 0;
  overflow: hidden;
  /* width driven by JS custom property */
  clip-path: inset(0 0 0 var(--ba-pos, 50%));
}

.ba-after-wrap img {
  position: absolute;
  inset: 0;
  height: 100%;
  object-fit: cover;
}

.ba-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--ba-pos, 50%);
  width: 0;
  outline: none;
}

.ba-handle-line {
  position: absolute;
  top: 0;
  bottom: 0;
  left: -1px;
  width: 2px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 0 14px rgba(142, 162, 255, 0.8);
}

.ba-handle-knob {
  position: absolute;
  top: 50%;
  left: 0;
  transform: translate(-50%, -50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(10, 12, 22, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.7);
  color: #fff;
  font-size: 0.65rem;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
  box-shadow: 0 0 18px rgba(142, 162, 255, 0.4);
  cursor: ew-resize;
}

.ba-label {
  position: absolute;
  top: 1rem;
  padding: 0.3rem 0.8rem;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  background: rgba(5, 6, 10, 0.65);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text);
  pointer-events: none;
  backdrop-filter: blur(4px);
}

.ba-label-left { left: 1rem; }
.ba-label-right { right: 1rem; }

.ba-slider:focus-within .ba-handle-line {
  background: var(--accent);
  box-shadow: 0 0 20px rgba(142, 162, 255, 1);
}

/* ============ Lightbox ============ */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.5rem;
  background: rgba(3, 4, 8, 0.93);
  backdrop-filter: blur(10px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.lightbox.open {
  opacity: 1;
  visibility: visible;
}

.lightbox img {
  max-width: min(1920px, 94vw);
  max-height: 88vh;
  width: auto;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.8);
}

.lightbox-close {
  position: absolute;
  top: 1.1rem;
  right: 1.1rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(10, 12, 22, 0.85);
  color: var(--text);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  transition: border-color 0.2s;
}

.lightbox-close:hover,
.lightbox-close:focus-visible {
  border-color: var(--accent);
  outline: none;
}

.lightbox-hint {
  position: absolute;
  bottom: 1.4rem;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  .lightbox { transition: none; }
}

/* ============ Footer ============ */
.footer {
  text-align: center;
  padding: 3rem 1.5rem 4rem;
  color: var(--text-dim);
  font-size: 0.85rem;
  border-top: 1px solid var(--line);
  max-width: 62rem;
  margin: 0 auto;
}

.footer p + p { margin-top: 0.55rem; }

.footer a {
  color: var(--text);
  text-decoration-color: var(--line);
  text-underline-offset: 3px;
}

.footer a:hover { color: var(--accent); }

.footer-label {
  color: var(--accent-warm);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.68rem;
  margin-right: 0.35rem;
}

/* ============ Scroll reveal ============ */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ============ Small screens ============ */
@media (max-width: 600px) {
  .step-header { flex-direction: column; gap: 0.3rem; }
  .section { padding-top: 3.5rem; }
}
