@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;600;700;800&family=DM+Sans:opsz,wght@9..40,300;9..40,400;9..40,500;9..40,600&display=swap');

/* ── Reset ────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── Tokens ───────────────────────────────────────── */
:root {
  --bg:           #030c18;
  --bg2:          #061426;
  --card:         rgba(6, 22, 48, 0.75);
  --card-border:  rgba(90, 200, 250, 0.16);
  --primary:      #7bd8f6;
  --primary-dim:  rgba(123, 216, 246, 0.12);
  --accent:       #00ccf5;
  --accent-glow:  rgba(0, 204, 245, 0.32);
  --text:         #dceeff;
  --muted:        #6fa3bf;
  --success:      #4eebb4;
  --danger:       #ff5e7a;
  --radius:       14px;
  --ease:         0.2s ease;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── Ambient glow layers ──────────────────────────── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 90% 55% at 50% -5%, rgba(0, 160, 240, 0.13) 0%, transparent 65%),
    radial-gradient(ellipse 55% 40% at 85% 95%, rgba(0, 80, 180, 0.09) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}

body > * { position: relative; z-index: 1; }

/* ── Accessibility ────────────────────────────────── */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  background: var(--accent);
  color: #001520;
  font-weight: 700;
  padding: 0.55rem 1.1rem;
  border-radius: 0 0 8px 8px;
  z-index: 9999;
  transition: top var(--ease);
  text-decoration: none;
}
.skip-link:focus { top: 0; }

/* ── Header ───────────────────────────────────────── */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 62px;
  padding: 0 clamp(1rem, 5vw, 3rem);
  background: rgba(3, 12, 24, 0.88);
  border-bottom: 1px solid var(--card-border);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 1.3rem;
  letter-spacing: -0.025em;
  color: var(--primary);
  text-decoration: none;
}

.logo-mark {
  width: 28px; height: 28px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 7px;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.9rem;
  flex-shrink: 0;
  box-shadow: 0 0 12px var(--accent-glow);
}

nav { display: flex; gap: 0.15rem; }

nav a {
  color: var(--muted);
  text-decoration: none;
  padding: 0.38rem 0.8rem;
  border-radius: 7px;
  font-size: 0.88rem;
  font-weight: 500;
  transition: color var(--ease), background var(--ease);
  white-space: nowrap;
}
nav a:hover         { color: var(--primary); background: var(--primary-dim); }
nav a[aria-current] { color: var(--primary); background: var(--primary-dim); }

/* ── Layout ───────────────────────────────────────── */
main {
  max-width: 820px;
  margin: 0 auto;
  padding: 3rem clamp(1rem, 5vw, 2rem) 5rem;
}

/* ── Cards ────────────────────────────────────────── */
.card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: clamp(1.5rem, 4vw, 2.5rem);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 2px 48px rgba(0,0,0,0.45), inset 0 1px 0 rgba(255,255,255,0.035);
  animation: fadeUp 0.45s ease both;
}

.card + .card { margin-top: 1.25rem; }

/* ── Typography ───────────────────────────────────── */
h1, h2, h3 { font-family: 'Syne', sans-serif; line-height: 1.2; }

h1 {
  font-size: clamp(2rem, 5.5vw, 3.1rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 1rem;
}

h1 em {
  font-style: normal;
  background: linear-gradient(100deg, var(--primary) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

h2 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--primary);
  margin: 2rem 0 0.55rem;
}
h2:first-child { margin-top: 0; }

h3 { font-size: 1rem; font-weight: 700; color: var(--text); }

p  { color: var(--muted); margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }
strong { color: var(--text); font-weight: 600; }

/* ── Hero ─────────────────────────────────────────── */
.hero {
  padding: 2.75rem 0 2rem;
  text-align: center;
}

.hero p {
  font-size: 1.08rem;
  max-width: 540px;
  margin: 0 auto 2rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.28rem 0.85rem;
  background: var(--primary-dim);
  border: 1px solid rgba(123, 216, 246, 0.28);
  border-radius: 99px;
  font-size: 0.73rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 1.2rem;
}

.badge-dot {
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 6px var(--accent);
  animation: pulse 2s ease infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.4; }
}

/* ── Buttons ──────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  background: linear-gradient(130deg, var(--primary) 0%, var(--accent) 100%);
  color: #011a2e;
  font-family: 'DM Sans', sans-serif;
  font-weight: 700;
  font-size: 0.98rem;
  padding: 0.78rem 1.9rem;
  border: none;
  border-radius: 9px;
  cursor: pointer;
  text-decoration: none;
  letter-spacing: 0.01em;
  box-shadow: 0 0 22px var(--accent-glow);
  transition: opacity var(--ease), transform var(--ease), box-shadow var(--ease);
}
.btn:hover:not(:disabled) {
  opacity: 0.9;
  transform: translateY(-2px);
  box-shadow: 0 6px 30px var(--accent-glow);
}
.btn:active:not(:disabled) { transform: translateY(0); }
.btn:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}
.btn:disabled {
  background: rgba(255,255,255,0.07);
  color: var(--muted);
  cursor: not-allowed;
  box-shadow: none;
}

.btn-secondary {
  background: var(--primary-dim);
  color: var(--primary);
  border: 1px solid var(--card-border);
  box-shadow: none;
}
.btn-secondary:hover:not(:disabled) {
  background: rgba(123,216,246,0.2);
  box-shadow: none;
}

/* ── Features grid ────────────────────────────────── */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 1rem;
  margin: 2.5rem 0;
}

.feature {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 1.4rem 1.2rem;
  text-align: center;
  backdrop-filter: blur(8px);
  animation: fadeUp 0.5s ease both;
}
.feature:nth-child(2) { animation-delay: 0.07s; }
.feature:nth-child(3) { animation-delay: 0.14s; }
.feature:nth-child(4) { animation-delay: 0.21s; }

.feature-icon { font-size: 1.6rem; margin-bottom: 0.6rem; display: block; }
.feature h3   { font-size: 0.88rem; margin-bottom: 0.3rem; }
.feature p    { font-size: 0.8rem; margin: 0; }

/* ── How it works ─────────────────────────────────── */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
  margin-top: 1.25rem;
}

.step {
  padding: 1.25rem;
  background: var(--primary-dim);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  text-align: center;
}

.step-num {
  width: 32px; height: 32px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 0.85rem;
  color: #011a2e;
  margin: 0 auto 0.7rem;
}

.step h3 { font-size: 0.88rem; margin-bottom: 0.25rem; }
.step p  { font-size: 0.78rem; margin: 0; }

/* ── Upload zone ──────────────────────────────────── */
.upload-zone {
  position: relative;
  border: 2px dashed var(--card-border);
  border-radius: var(--radius);
  padding: 2.5rem 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: border-color var(--ease), background var(--ease);
}
.upload-zone:hover,
.upload-zone.drag-over {
  border-color: var(--primary);
  background: var(--primary-dim);
}

.upload-zone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%; height: 100%;
}

.upload-icon  { font-size: 2.4rem; margin-bottom: 0.6rem; display: block; }
.upload-label { font-weight: 600; color: var(--text); display: block; margin-bottom: 0.3rem; }
.upload-sub   { font-size: 0.82rem; }
.upload-name  {
  display: none;
  margin-top: 0.75rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  gap: 0.35rem;
  align-items: center;
  justify-content: center;
}
.upload-name.visible { display: flex; }

/* ── Controls ─────────────────────────────────────── */
.controls-section { margin-top: 1.75rem; }

.controls-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem 2rem;
  margin-top: 1rem;
}

@media (max-width: 580px) { .controls-grid { grid-template-columns: 1fr; } }

.control-group { display: flex; flex-direction: column; gap: 0.45rem; }

.control-label-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.control-label-row label {
  font-size: 0.87rem;
  font-weight: 600;
  color: var(--text);
}

.ctl-val {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--accent);
  min-width: 3.2rem;
  text-align: right;
}

.control-hint {
  font-size: 0.74rem;
  color: var(--muted);
  line-height: 1.4;
}

/* ── Range inputs ─────────────────────────────────── */
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 99px;
  outline: none;
  cursor: pointer;
  /* initial background set via JS */
  background: rgba(123,216,246,0.13);
}

input[type="range"]::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 99px;
  background: linear-gradient(
    to right,
    var(--accent) var(--pct, 50%),
    rgba(123,216,246,0.13) var(--pct, 50%)
  );
}

input[type="range"]::-moz-range-track {
  height: 6px;
  border-radius: 99px;
  background: rgba(123,216,246,0.13);
}

input[type="range"]::-moz-range-progress {
  background: var(--accent);
  height: 6px;
  border-radius: 99px;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: #fff;
  border: 2.5px solid var(--accent);
  box-shadow: 0 0 10px var(--accent-glow);
  margin-top: -6px;
  cursor: pointer;
  transition: box-shadow var(--ease);
}
input[type="range"]::-moz-range-thumb {
  width: 18px; height: 18px;
  border-radius: 50%;
  background: #fff;
  border: 2.5px solid var(--accent);
  box-shadow: 0 0 10px var(--accent-glow);
  cursor: pointer;
}
input[type="range"]:focus-visible::-webkit-slider-thumb {
  box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px var(--accent);
}
input[type="range"]:focus-visible::-moz-range-thumb {
  box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px var(--accent);
}

/* ── Divider ──────────────────────────────────────── */
.divider {
  height: 1px;
  background: var(--card-border);
  margin: 1.75rem 0;
}

/* ── Status ───────────────────────────────────────── */
.status-block {
  min-height: 1.5rem;
  margin: 1.25rem 0 0;
}

#status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.88rem;
  color: var(--muted);
  min-height: 1.4rem;
}
#status.processing { color: var(--accent); }
#status.done       { color: var(--success); }
#status.error      { color: var(--danger); }

.spinner {
  display: inline-block;
  width: 14px; height: 14px;
  border: 2px solid rgba(0,204,245,0.25);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }

.progress-wrap {
  height: 4px;
  background: rgba(123,216,246,0.1);
  border-radius: 99px;
  overflow: hidden;
  margin-top: 0.7rem;
  display: none;
}
.progress-wrap.show { display: block; }

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: 99px;
  width: 0%;
  transition: width 0.35s ease;
  position: relative; overflow: hidden;
}
.progress-fill::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.22), transparent);
  animation: shimmer 1.3s infinite;
}
@keyframes shimmer {
  from { transform: translateX(-100%); }
  to   { transform: translateX(200%); }
}

/* ── Preview player ───────────────────────────────── */
.preview-area {
  display: none;
  margin-top: 1.25rem;
  padding: 1.1rem 1.25rem;
  background: rgba(0,204,245,0.05);
  border: 1px solid rgba(0,204,245,0.18);
  border-radius: var(--radius);
}
.preview-area.show { display: block; }

.preview-area p {
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 0.65rem;
}

audio {
  width: 100%;
  height: 38px;
  border-radius: 6px;
  accent-color: var(--accent);
  outline: none;
}
audio:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ── Download row ─────────────────────────────────── */
.download-row {
  display: none;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 1.1rem;
}
.download-row.show { display: flex; }

/* ── Ad container ─────────────────────────────────── */
.ad-container {
  margin: 2rem 0;
  min-height: 90px;
  background: rgba(255,255,255,0.02);
  border: 1px dashed rgba(255,255,255,0.08);
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,0.18);
  font-size: 0.73rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* ── FAQ ──────────────────────────────────────────── */
.faq-list { list-style: none; }

.faq-item {
  border-bottom: 1px solid var(--card-border);
  padding: 1.5rem 0;
}
.faq-item:first-child { padding-top: 0; }
.faq-item:last-child  { border-bottom: none; padding-bottom: 0; }

.faq-item h2 { margin: 0 0 0.55rem; font-size: 1.05rem; }
.faq-item p  { font-size: 0.93rem; margin: 0; }

/* ── Trust pills ──────────────────────────────────── */
.trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1.25rem;
  justify-content: center;
  margin: 2.25rem 0;
}

.trust-pill {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  color: var(--muted);
}
.trust-pill .dot { color: var(--success); }

/* ── GDPR banner ──────────────────────────────────── */
#gdpr-banner {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 1rem clamp(1rem, 5vw, 2.5rem);
  background: rgba(2, 10, 22, 0.97);
  border-top: 1px solid var(--card-border);
  backdrop-filter: blur(16px);
  z-index: 999;
}
#gdpr-banner.show { display: flex; }
#gdpr-banner p {
  margin: 0; font-size: 0.83rem; color: var(--muted);
  max-width: 580px; flex: 1;
}
#gdpr-banner a { color: var(--primary); text-decoration: underline; text-underline-offset: 2px; }
.gdpr-btns { display: flex; gap: 0.5rem; flex-shrink: 0; }

/* ── Footer ───────────────────────────────────────── */
footer {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--muted);
  font-size: 0.78rem;
  border-top: 1px solid var(--card-border);
}
footer a { color: var(--muted); text-decoration: underline; text-underline-offset: 2px; }

/* ── Animations ───────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: no-preference) {
  .hero h1   { animation: fadeUp 0.5s ease both; }
  .hero p    { animation: fadeUp 0.5s ease 0.1s both; }
  .hero .badge { animation: fadeUp 0.5s ease 0.04s both; }
  .hero .btn { animation: fadeUp 0.5s ease 0.18s both; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ── Responsive ───────────────────────────────────── */
@media (max-width: 480px) {
  nav a { padding: 0.35rem 0.55rem; font-size: 0.82rem; }
  .logo span { display: none; }
  .btn { padding: 0.72rem 1.4rem; font-size: 0.92rem; }
}
