/* Snipsaur design system v2 - dark AI theme with blue burst hero ------------ */
:root {
  --bg: #0A0D14;
  --bg-elevated: #12161F;
  --bg-elevated-2: #1A2030;
  --text-primary: #F5F7FA;
  --text-secondary: #9AA3B5;
  --text-muted: #6B7386;
  --border: rgba(255,255,255,0.08);
  --border-strong: rgba(255,255,255,0.18);
  --accent: #4C8DFF;
  --accent-bright: #8AB4FF;
  --glow-core: #6EA8FF;
  --glow-mid: rgba(76,141,255,0.35);
  --glow-outer: rgba(27,62,156,0.12);
  --cta: #FF6B35;
  --cta-hover: #FF8555;
  --cta-ink: #1A0800;
  --radius: 14px;
  --font-display: "Archivo Expanded", "Archivo", sans-serif;
  --font-body: "Archivo", -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.12;
  margin: 0 0 12px 0;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}

p { color: var(--text-secondary); margin: 0 0 16px 0; max-width: 60ch; }

a { color: var(--accent-bright); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { max-width: 1080px; margin: 0 auto; padding: 0 24px; }

/* Nav ----------------------------------------------------------------- */
.nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px 24px; max-width: 1080px; margin: 0 auto; position: relative; z-index: 2;
}
.nav .logo { font-family: var(--font-display); font-weight: 700; font-size: 20px; color: var(--text-primary); text-decoration: none; }
.nav .logo .dot { color: var(--cta); }
.nav-links { display: flex; align-items: center; gap: 20px; font-size: 14px; }
.nav-links a { color: var(--text-primary); }
.nav-links a.muted-link { color: var(--text-secondary); }

/* Buttons --------------------------------------------------------------*/
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 12px 24px; border-radius: 999px; font-size: 14px; font-weight: 600;
  border: none; cursor: pointer; text-decoration: none; font-family: var(--font-body);
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--cta); color: var(--cta-ink); }
.btn-primary:hover { background: var(--cta-hover); }
.btn-ghost { background: transparent; color: var(--text-primary); border: 1px solid var(--border-strong); }
.btn-ghost:hover { border-color: var(--accent-bright); }
.btn:disabled { background: var(--bg-elevated-2); color: var(--text-muted); cursor: not-allowed; }

/* Forms ----------------------------------------------------------------*/
input[type=email], input[type=password], input[type=text], input[type=tel] {
  width: 100%; padding: 12px 14px; font-size: 15px; border-radius: 8px;
  border: 1px solid var(--border-strong); background: var(--bg-elevated);
  color: var(--text-primary); margin-bottom: 12px; font-family: var(--font-body);
}
input::placeholder { color: var(--text-muted); }
input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }

.auth-shell { max-width: 380px; margin: 90px auto; padding: 0 24px; }
.error { color: #FF9070; font-size: 14px; margin-bottom: 12px; }
.muted { color: var(--text-secondary); font-size: 14px; }
.mono { font-family: var(--font-mono); }

.upgrade-nudge {
  background: var(--bg-elevated); border: 1px solid var(--border-strong);
  border-radius: var(--radius); padding: 16px; margin-bottom: 12px;
}
.upgrade-message { color: var(--text-primary); font-size: 14px; margin-bottom: 14px; }

.upgrade-plans-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 560px) {
  .upgrade-plans-grid { grid-template-columns: repeat(3, 1fr); }
}

.upgrade-plan-card {
  position: relative; background: var(--bg-elevated-2); border: 1px solid var(--border);
  border-radius: 10px; padding: 16px 14px; display: flex; flex-direction: column; gap: 10px;
}
.upgrade-plan-card.popular { border-color: var(--cta); }
.popular-badge {
  position: absolute; top: -10px; left: 50%; transform: translateX(-50%);
  background: var(--cta); color: var(--cta-ink); font-size: 11px; font-weight: 600;
  padding: 3px 10px; border-radius: 999px; white-space: nowrap;
}
.upgrade-plan-label { font-weight: 600; font-size: 14px; color: var(--text-primary); }
.upgrade-plan-price { font-family: var(--font-mono); font-size: 20px; color: var(--text-primary); }
.upgrade-plan-price span { font-size: 12px; color: var(--text-secondary); }
.upgrade-plan-card .btn { width: 100%; box-sizing: border-box; text-align: center; margin-top: auto; }

.download-all-row { margin: 18px 0 0; }

/* Hero with blue burst ---------------------------------------------------*/
.hero-wrap {
  position: relative;
  overflow: hidden;
  padding-bottom: 20px;
}
.hero-burst {
  position: absolute;
  top: -220px;
  left: 50%;
  transform: translateX(-50%);
  width: 900px;
  height: 900px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--glow-core) 0%, var(--glow-mid) 30%, var(--glow-outer) 50%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}
.hero {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 60px 24px 40px;
  max-width: 760px;
  margin: 0 auto;
}
.hero h1, .hero p {
  text-shadow:
    -1px -1px 2px rgba(6,8,14,0.85),
     1px -1px 2px rgba(6,8,14,0.85),
    -1px  1px 2px rgba(6,8,14,0.85),
     1px  1px 2px rgba(6,8,14,0.85),
     0 6px 18px rgba(0,0,0,0.45);
}
.hero h1 { font-size: 46px; max-width: 16ch; margin-left: auto; margin-right: auto; }
.hero p { margin-left: auto; margin-right: auto; font-size: 17px; color: var(--text-primary); }
.hero-actions { display: flex; gap: 12px; justify-content: center; margin-top: 20px; }

.hero-viz-wrap { position: relative; z-index: 1; max-width: 620px; margin: 20px auto 0; padding: 0 24px; }
#hero-viz { width: 100%; height: auto; }

@media (max-width: 700px) {
  .hero h1 { font-size: 32px; }
  .hero-burst { width: 620px; height: 620px; top: -160px; }
}

/* Sections ---------------------------------------------------------------*/
.section { padding: 60px 24px; max-width: 1080px; margin: 0 auto; }
.section h2 { font-size: 28px; max-width: 20ch; }
.section > h2 { text-align: center; margin-left: auto; margin-right: auto; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 32px; }
.step {
  background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 22px;
}
.step .num { font-family: var(--font-mono); color: var(--cta); font-size: 14px; margin-bottom: 8px; }
.step h3 { font-size: 17px; margin-bottom: 6px; }
.step p { font-size: 14px; margin-bottom: 0; }
@media (max-width: 800px) { .steps { grid-template-columns: 1fr; } }

/* Reviews ------------------------------------------------------------------*/
.reviews-section { position: relative; overflow: visible; }
.reviews-summary { position: relative; z-index: 1; }

.reviews-heading-wrap { position: relative; text-align: center; }
.reviews-heading-wrap h2 { position: relative; z-index: 1; margin-left: auto; margin-right: auto; }

.social-burst {
  position: absolute; top: 50%; left: 50%; width: 0; height: 0; pointer-events: none; z-index: 0;
}
.social-icon {
  position: absolute; top: 0; left: 0; width: 76px; height: 76px;
  color: var(--cta); opacity: 0;
  filter: drop-shadow(0 0 16px rgba(255,107,53,0.65));
  transform: translate(-50%, -50%) scale(0.2);
  animation: icon-burst 4.8s ease-out infinite;
}
.social-icon path, .social-icon rect, .social-icon circle, .social-icon line {
  fill: none; stroke: currentColor; stroke-width: 1.2; stroke-linecap: round; stroke-linejoin: round;
}
@keyframes icon-burst {
  0%   { opacity: 0; transform: translate(-50%, -50%) scale(0.2); }
  14%  { opacity: 0.9; }
  65%  { opacity: 0.5; }
  100% { opacity: 0; transform: translate(calc(-50% + var(--tx)), calc(-50% + var(--ty))) scale(1); }
}
@media (max-width: 700px) {
  .social-burst { transform: scale(0.6); }
}

.reviews-summary { text-align: center; margin: 28px auto 0; }
.reviews-stars { color: var(--cta); font-size: 22px; letter-spacing: 3px; }
.reviews-count { font-family: var(--font-mono); font-size: 13px; color: var(--text-secondary); margin-top: 6px; }

.reviews-belt-wrap {
  width: 100%; overflow: hidden; margin-top: 36px; padding: 4px 0;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
.reviews-belt {
  display: flex; gap: 18px; width: max-content;
  animation: reviews-scroll 46s linear infinite;
}
.reviews-belt-wrap:hover .reviews-belt { animation-play-state: paused; }
@keyframes reviews-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.review-card {
  background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px; width: 260px; flex-shrink: 0;
  display: flex; flex-direction: column;
}
.review-card .stars { color: var(--cta); font-size: 13px; letter-spacing: 2px; margin-bottom: 10px; }
.review-card .review-text { font-size: 14px; color: var(--text-primary); margin-bottom: 14px; }
.review-card .reviewer-name { font-size: 13px; font-weight: 600; color: var(--text-primary); }
.review-card .reviewer-role { font-family: var(--font-mono); font-size: 11px; color: var(--text-muted); margin-top: 2px; }
@media (max-width: 800px) { .review-card { width: 220px; } }

/* Plans ------------------------------------------------------------------*/
.plans { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 28px; }
@media (max-width: 900px) { .plans { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .plans { grid-template-columns: 1fr; } }

.plan-card {
  background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 22px; display: flex; flex-direction: column;
}
.plan-card.featured { border: 2px solid var(--cta); }
.plan-card.current { border-color: var(--accent-bright); }
.plan-card h3 { font-size: 16px; margin-bottom: 2px; }
.plan-card .price { font-family: var(--font-mono); font-size: 24px; margin: 6px 0 14px; color: var(--text-primary); }
.plan-card .price span { font-size: 13px; color: var(--text-secondary); }
.plan-card ul { list-style: none; padding: 0; margin: 0 0 18px 0; font-size: 14px; color: var(--text-secondary); }
.plan-card li { padding: 4px 0; border-top: 1px solid var(--border); }
.plan-card li:first-child { border-top: none; }
.plan-card .btn { margin-top: auto; }

/* App / dashboard ----------------------------------------------------------*/
.app-shell { max-width: 760px; margin: 0 auto; padding: 24px; }
.app-topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 28px; }
.app-topbar .who { font-size: 14px; }
.app-topbar .plan-tag {
  font-family: var(--font-mono); font-size: 11px; color: var(--accent-bright);
  background: rgba(76,141,255,0.12); padding: 3px 8px; border-radius: 999px; margin-left: 8px;
}
.usage-line { font-family: var(--font-mono); font-size: 13px; color: var(--text-secondary); margin-bottom: 10px; }

.usage-counter { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; flex-wrap: wrap; }
.usage-pips { display: flex; gap: 6px; }
.usage-pips .pip {
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--accent-bright); box-shadow: 0 0 8px var(--glow-mid);
  transition: background 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}
.usage-pips .pip.used {
  background: var(--bg-elevated-2); box-shadow: none; transform: scale(0.8);
}
.usage-text { font-family: var(--font-mono); font-size: 13px; color: var(--text-secondary); }

.url-row { display: flex; gap: 10px; margin-bottom: 6px; }
.url-row input { margin-bottom: 0; }

/* AI loader ("clipping in progress") ---------------------------------- */
.loader-wrap { text-align: center; margin: 40px 0 32px; }

.ai-core { position: relative; width: 168px; height: 168px; margin: 0 auto 22px; }

.ai-core-glow {
  position: absolute; inset: 8px; border-radius: 50%;
  background: radial-gradient(circle, var(--glow-core) 0%, var(--glow-mid) 45%, transparent 72%);
  filter: blur(3px);
  animation: aiPulse 2.4s ease-in-out infinite;
}

.ai-ring { position: absolute; border-radius: 50%; border: 2px solid transparent; }
.ai-ring-outer {
  inset: 0; border-top-color: var(--accent-bright); border-right-color: var(--accent-bright);
  animation: aiSpin 3s linear infinite;
}
.ai-ring-mid {
  inset: 20px; border-bottom-color: var(--cta); border-left-color: var(--cta);
  animation: aiSpinReverse 2.1s linear infinite;
}
.ai-ring-inner {
  inset: 40px; border: 1px dashed var(--border-strong);
  animation: aiSpin 7s linear infinite;
}

.ai-core-center {
  position: absolute; inset: 50px; border-radius: 50%;
  background: var(--bg-elevated); display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 26px var(--glow-mid), inset 0 0 12px rgba(110,168,255,0.25);
}
.ai-pct { font-family: var(--font-mono); font-size: 19px; font-weight: 600; color: var(--accent-bright); }

.loader-title { font-family: var(--font-display); font-size: 19px; font-weight: 700; margin-bottom: 8px; }
.loader-stage {
  font-size: 12px; letter-spacing: 0.14em; color: var(--accent-bright); margin-bottom: 16px;
  animation: aiFlicker 1.7s ease-in-out infinite;
}

.loader-bar {
  max-width: 300px; margin: 0 auto; height: 4px; border-radius: 999px;
  background: var(--bg-elevated-2); overflow: hidden;
}
.loader-bar-fill {
  height: 100%; width: 0%; border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--cta));
  transition: width 0.5s ease;
}

@keyframes aiSpin { to { transform: rotate(360deg); } }
@keyframes aiSpinReverse { to { transform: rotate(-360deg); } }
@keyframes aiPulse {
  0%, 100% { opacity: 0.5; transform: scale(0.92); }
  50% { opacity: 1; transform: scale(1.06); }
}
@keyframes aiFlicker {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.55; }
}

@media (prefers-reduced-motion: reduce) {
  .ai-ring, .ai-core-glow, .loader-stage { animation: none !important; }
}

.clip-card {
  background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px; margin-top: 14px; display: flex; gap: 16px;
}
.clip-card video { width: 140px; border-radius: 8px; display: block; background: #000; }
.clip-card .meta { font-family: var(--font-mono); font-size: 12px; color: var(--text-secondary); margin-bottom: 6px; }
.clip-card .quote { font-size: 14px; color: var(--text-primary); margin-bottom: 10px; }

/* Hero waveform-to-clips visualization -------------------------------------*/
.wave-bar { transform-origin: center; opacity: 0; animation: growBar 0.4s ease-out forwards; }
.cut-line { opacity: 0; transform: scaleY(0); transform-origin: center; animation: cutIn 0.35s ease-out forwards; }
.clip-chip { opacity: 0; transform: translateY(20px); animation: riseIn 0.5s ease-out forwards; }

@keyframes growBar { from { opacity: 0; transform: scaleY(0.2); } to { opacity: 1; transform: scaleY(1); } }
@keyframes cutIn { from { opacity: 0; transform: scaleY(0); } to { opacity: 1; transform: scaleY(1); } }
@keyframes riseIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

@media (prefers-reduced-motion: reduce) {
  .wave-bar, .cut-line, .clip-chip { animation: none !important; opacity: 1 !important; transform: none !important; }
}

footer { padding: 40px 24px 60px; max-width: 1080px; margin: 0 auto; font-size: 13px; color: var(--text-muted); text-align: center; }
footer .footer-links { margin-top: 8px; }
footer .footer-links a { color: var(--text-secondary); margin: 0 8px; }
footer .footer-links a:hover { color: var(--accent-bright); }

/* Simple content pages (contact, terms) -------------------------------------*/
.page-section { padding: 60px 24px 80px; max-width: 760px; margin: 0 auto; }
.page-section h1 { font-size: 30px; margin-bottom: 6px; }
.page-section .page-lede { margin-bottom: 32px; }
.page-section h2 { font-size: 19px; margin: 32px 0 10px; }
.page-section p, .page-section li { font-size: 14px; color: var(--text-secondary); line-height: 1.6; }
.page-section ul, .page-section ol { padding-left: 20px; margin: 0 0 16px 0; }
.page-section strong { color: var(--text-primary); }

.contact-form { display: flex; flex-direction: column; gap: 14px; max-width: 420px; margin-top: 24px; }
.contact-form label { font-size: 13px; color: var(--text-secondary); display: flex; flex-direction: column; gap: 6px; }
.contact-form textarea {
  width: 100%; box-sizing: border-box; padding: 12px 14px; border-radius: 10px;
  border: 1px solid var(--border-strong); background: var(--bg-elevated);
  color: var(--text-primary); font-family: var(--font-body); resize: vertical; min-height: 110px;
}
.form-success { background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; color: var(--text-primary); margin-top: 20px; }
.form-error { color: var(--cta); font-size: 13px; margin-top: 10px; }

/* Logo ---------------------------------------------------------------------*/
.logo-inner { display: inline-flex; align-items: center; gap: 9px; }
.logo-mark { width: 36px; height: 36px; flex: none; }
.nav .logo { display: inline-flex; align-items: center; }

/* Keep the nav on one line on phones */
.nav { gap: 16px; }
.nav-links, .nav-links a, .nav .btn { white-space: nowrap; }
@media (max-width: 480px) {
  .nav { padding: 16px 16px; gap: 10px; }
  .nav-links { gap: 12px; }
  .nav .btn { padding: 9px 14px; }
  .logo-mark { width: 30px; height: 30px; }
  .nav .logo { font-size: 18px; }
  .nav .nav-links a.muted-link[href="/pricing"] { display: none; }
}
.logo { text-decoration: none; }
.logo-word { font-family: var(--font-display); font-weight: 700; font-size: 20px; color: var(--text-primary); }
.logo-word .dot { color: var(--cta); }
@media (max-width: 480px) { .logo-word { font-size: 18px; } }

/* Upload from device -------------------------------------------------------*/
.or-divider { text-align: center; color: var(--text-muted); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; margin: 10px 0; }
.upload-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.upload-hint { font-size: 12px; color: var(--text-muted); }
