/* LapseCam landing page. Same values as the app's purple theme
   (src/renderer/styles.css) so the site and the app look related. */

:root {
  --bg: #12121a;
  --panel: #1b1b27;
  --panel-header: #222230;
  --border: #2c2c3e;
  --text: #e8e8f0;
  --muted: #a4a4b8;
  --btn-bg: #262636;
  --btn-hover: #303044;
  --accent: #7c5cff;
  --accent-hover: #8d71ff;
  --accent-blue: #4a9eff;
  --rec: #ff4d5e;
  --glow: rgba(124, 92, 255, 0.25);
  --stage-bg: #0d0d14;
  --max: 920px;
  --font: "Plus Jakarta Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  position: relative;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(900px 600px at 10% 20%, rgba(124, 92, 255, 0.07), transparent 60%),
    radial-gradient(700px 500px at 90% 60%, rgba(74, 158, 255, 0.05), transparent 55%),
    radial-gradient(500px 400px at 50% 90%, rgba(124, 92, 255, 0.04), transparent 50%);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.025;
  background-image: radial-gradient(circle at 1px 1px, rgba(255, 255, 255, 0.9) 0.5px, transparent 0);
  background-size: 24px 24px;
}

::selection { background: rgba(124, 92, 255, 0.35); }

a { color: var(--accent); }
a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

h1, h2, h3, .btn, .brand, .nav-links a, #faq summary {
  font-family: var(--font);
}

/* ---------------- nav ---------------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(18, 18, 26, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  max-width: var(--max);
  margin: 0 auto;
  padding: 14px 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 17px;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.01em;
}

.nav-links {
  display: flex;
  gap: 22px;
  margin-left: auto;
}

.nav-links a {
  position: relative;
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  padding-bottom: 2px;
  transition: color 0.2s;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 2px;
  border-radius: 1px;
  background: linear-gradient(90deg, var(--accent), var(--accent-blue));
  transform: scaleX(0);
  transition: transform 0.25s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  transform: scaleX(1);
}

.nav-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: transparent;
  overflow: hidden;
}

.nav-progress-fill {
  width: 100%;
  height: 100%;
  transform-origin: left;
  transform: scaleX(0);
  background: linear-gradient(90deg, var(--accent), var(--accent-blue));
  box-shadow: 0 0 8px var(--glow);
  transition: transform 0.08s linear;
}

/* ---------------- buttons ---------------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 20px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  background: var(--btn-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  text-decoration: none;
  transition: background 0.2s, border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.btn:hover {
  background: var(--btn-hover);
  border-color: #3a3a52;
}

.btn.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.btn.primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  box-shadow: 0 4px 20px var(--glow);
}

.btn.ghost {
  background: rgba(124, 92, 255, 0.12);
  border-color: rgba(124, 92, 255, 0.35);
  color: var(--text);
}

.btn.ghost:hover {
  background: rgba(124, 92, 255, 0.2);
  border-color: rgba(124, 92, 255, 0.55);
  box-shadow: 0 4px 16px rgba(124, 92, 255, 0.15);
}

.btn.small { padding: 7px 14px; font-size: 13px; }

/* ---------------- hero ---------------- */

.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 58px);
  min-height: calc(100svh - 58px);
  padding: 48px 24px 72px;
  text-align: center;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(920px 480px at 50% -8%, rgba(124, 92, 255, 0.38), transparent 62%),
    radial-gradient(580px 380px at 12% 28%, rgba(74, 158, 255, 0.12), transparent 68%),
    radial-gradient(660px 420px at 88% 38%, rgba(124, 92, 255, 0.1), transparent 68%);
  pointer-events: none;
}

.hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 120px;
  background: linear-gradient(to bottom, transparent, var(--bg));
  pointer-events: none;
}

.hero-inner {
  position: relative;
  will-change: opacity, transform;
}

.hero h1 {
  font-size: clamp(34px, 6vw, 56px);
  line-height: 1.25;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
  padding-bottom: 0.08em;
  font-weight: 700;
  color: var(--text);
  background: linear-gradient(135deg, #f0eeff 0%, #c4b5ff 40%, var(--accent-blue) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  overflow: visible;
}

.hero-sub {
  max-width: 640px;
  margin: 0 auto 32px;
  font-size: 17px;
  color: var(--muted);
}

.hero-buttons {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-note {
  display: inline-block;
  margin-top: 22px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 999px;
}

/* ---------------- sections ---------------- */

.section {
  max-width: var(--max);
  margin: 0 auto;
  padding: 64px 24px;
  border-top: 1px solid transparent;
  border-image: linear-gradient(
    90deg,
    transparent,
    var(--border) 15%,
    var(--border) 85%,
    transparent
  ) 1;
}

.section h2 {
  position: relative;
  font-size: clamp(26px, 3vw, 34px);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 30px;
  padding-bottom: 12px;
}

.section h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 48px;
  height: 3px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-blue));
}

.section-wide h2::after {
  left: 50%;
  transform: translateX(-50%);
}

.section > p {
  max-width: 720px;
  color: var(--muted);
  margin-bottom: 16px;
}

/* ---------------- demo ----------------
   The demo sits on a full-height stage with no divider. The sticky panel
   inside fades and lifts in on the way down, then fades out as you scroll on. */

.demo-stage {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.demo-stage .sticky-panel {
  border-top: none;
  padding: 32px 24px;
  width: 100%;
  will-change: opacity, transform;
}

@media (min-width: 861px) {
  html.intro-motion .demo-stage .sticky-panel {
    opacity: 0;
  }
}

.section-wide { max-width: 1300px; }
.section-wide h2 { text-align: center; }

.demo-frame {
  width: min(100%, calc(66vh * 16 / 9));
  width: min(100%, calc(66svh * 16 / 9));
  aspect-ratio: 16 / 9;
  margin: 0 auto;
  border: 1px solid rgba(124, 92, 255, 0.25);
  border-radius: 14px;
  overflow: hidden;
  background: var(--stage-bg);
  display: flex;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.04) inset,
    0 8px 40px rgba(0, 0, 0, 0.45),
    0 0 60px rgba(124, 92, 255, 0.12);
}

.demo-frame video { width: 100%; height: 100%; }

.demo-placeholder {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background: linear-gradient(160deg, var(--panel) 0%, var(--stage-bg) 100%);
  color: var(--muted);
  font-size: 15px;
  overflow: hidden;
}

.demo-placeholder::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    transparent 40%,
    rgba(124, 92, 255, 0.06) 50%,
    transparent 60%
  );
  background-size: 200% 100%;
  animation: shimmer 4s ease-in-out infinite;
}

@keyframes shimmer {
  0%, 100% { background-position: 200% 0; }
  50% { background-position: -200% 0; }
}

.demo-placeholder img {
  position: relative;
  opacity: 0.85;
  filter: drop-shadow(0 4px 12px rgba(124, 92, 255, 0.3));
}

.demo-placeholder p { position: relative; }

.demo-caption {
  margin-top: 16px;
  font-size: 13px;
  color: var(--muted);
  text-align: center;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 500;
}

/* ---------------- feature cards ---------------- */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.card {
  padding: 22px;
  background: linear-gradient(165deg, rgba(34, 34, 48, 0.6) 0%, var(--panel) 100%);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.card:hover {
  transform: translateY(-2px);
  border-color: rgba(124, 92, 255, 0.35);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25), 0 0 20px rgba(124, 92, 255, 0.08);
}

.card h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}

.card p { font-size: 14px; color: var(--muted); }

/* ---------------- steps ---------------- */

.steps {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  counter-reset: step;
}

.steps li {
  counter-increment: step;
  padding: 22px;
  background: linear-gradient(165deg, rgba(34, 34, 48, 0.6) 0%, var(--panel) 100%);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.steps li:hover {
  transform: translateY(-2px);
  border-color: rgba(124, 92, 255, 0.35);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25), 0 0 20px rgba(124, 92, 255, 0.08);
}

.steps li::before {
  content: counter(step);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  margin-bottom: 12px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-blue));
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  box-shadow: 0 2px 8px var(--glow);
}

.steps h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 6px;
  letter-spacing: -0.01em;
}

.steps p { font-size: 14px; color: var(--muted); }

/* ---------------- built section ---------------- */

.chips {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 20px 0;
}

.chips li {
  padding: 5px 12px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  background: var(--btn-bg);
  border: 1px solid var(--border);
  border-radius: 999px;
  transition: border-color 0.2s, background 0.2s;
}

.chips li:hover {
  border-color: rgba(124, 92, 255, 0.4);
  background: rgba(124, 92, 255, 0.08);
}

.text-link {
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s;
}

.text-link:hover { text-decoration: underline; }

/* ---------------- faq ---------------- */

#faq details {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--panel);
  margin-bottom: 10px;
  overflow: hidden;
  transition: border-color 0.2s, background 0.2s;
}

#faq details:hover {
  border-color: rgba(124, 92, 255, 0.3);
  background: rgba(27, 27, 39, 0.9);
}

#faq summary {
  padding: 14px 18px;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

#faq summary::-webkit-details-marker { display: none; }

#faq summary::after {
  content: "+";
  color: var(--muted);
  font-size: 18px;
  line-height: 1;
  transition: transform 0.2s;
}

#faq details[open] summary::after {
  content: "\2212";
}

#faq .faq-body {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.3s ease;
}

#faq details[open] .faq-body {
  grid-template-rows: 1fr;
}

#faq .faq-body > div {
  overflow: hidden;
}

#faq details p {
  padding: 0 18px 16px;
  font-size: 14px;
  color: var(--muted);
}

/* ---------------- support + footer ---------------- */

.support {
  text-align: center;
  max-width: var(--max);
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 48px;
  padding: 48px 40px;
  border-top: none;
  border-image: none;
  background: linear-gradient(165deg, rgba(34, 34, 48, 0.5) 0%, var(--panel) 100%);
  border: 1px solid rgba(124, 92, 255, 0.2);
  border-radius: 16px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2), 0 0 40px rgba(124, 92, 255, 0.06);
}

.support h2::after {
  left: 50%;
  transform: translateX(-50%);
}

.support p { margin: 0 auto 24px; }

.footer {
  max-width: var(--max);
  margin: 0 auto;
  padding: 48px 24px 56px;
  border-top: 1px solid transparent;
  border-image: linear-gradient(
    90deg,
    transparent,
    var(--border) 20%,
    var(--border) 80%,
    transparent
  ) 1;
  text-align: center;
  font-size: 14px;
  color: var(--muted);
}

.footer a { color: var(--muted); transition: color 0.2s; }
.footer a:hover { color: var(--text); }

.footer-links {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin: 14px 0;
}

.footer-fine { font-size: 12px; opacity: 0.8; }

/* ---------------- small screens ---------------- */

@media (max-width: 860px) {
  .demo-stage { min-height: 0; }
  .demo-stage .sticky-panel { padding: 56px 24px; }
  .support {
    margin-left: 24px;
    margin-right: 24px;
    margin-bottom: 40px;
    padding: 40px 24px;
  }
}

@media (max-width: 620px) {
  .nav-inner { gap: 16px; }
  .nav-links { display: none; }
  .nav-inner .btn.small { margin-left: auto; }
  .hero { padding-top: 56px; }
  .hero-buttons .btn { width: 100%; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  .hero-inner,
  .demo-stage .sticky-panel {
    will-change: auto;
  }

  .nav-progress-fill {
    transition: none;
  }

  .demo-placeholder::before {
    animation: none;
  }

  .card:hover,
  .steps li:hover {
    transform: none;
  }

  .btn:hover {
    transform: none;
  }

  #faq .faq-body {
    transition: none;
  }
}
