:root {
  --bg: #0a0908;
  --bg-alt: #120e0d;
  --panel: #16110f;
  --panel-raised: #1c1512;
  --border: rgba(255, 235, 225, 0.08);
  --border-strong: rgba(255, 235, 225, 0.16);
  --red: #ff1f3d;
  --red-soft: #ff5a6c;
  --red-deep: #7a0c1e;
  --red-glow: rgba(255, 31, 61, 0.35);
  --text: #f5ede9;
  --text-muted: #a3928c;
  --text-faint: #6d5f5b;
  --success: #35d488;
  --font-display: "Big Shoulders Display", sans-serif;
  --font-body: "Inter", sans-serif;
  --font-mono: "JetBrains Mono", monospace;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html { color-scheme: dark; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

/* ---------- Ambient background ---------- */

.glow {
  position: fixed;
  inset: -20% -10% auto -10%;
  height: 70vh;
  background:
    radial-gradient(60% 60% at 30% 0%, var(--red-glow) 0%, transparent 60%),
    radial-gradient(40% 50% at 80% 10%, rgba(122, 12, 30, 0.28) 0%, transparent 65%);
  pointer-events: none;
  z-index: 0;
}

.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.035;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='140' height='140'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

/* ---------- Layout shell ---------- */

.stage {
  position: relative;
  z-index: 2;
  max-width: 860px;
  margin: 0 auto;
  padding: 26px 20px 64px;
  display: flex;
  flex-direction: column;
  gap: 44px;
}

@media (min-width: 620px) {
  .stage { padding: 32px 24px 80px; gap: 56px; }
}

.section-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 26px;
  letter-spacing: 0.01em;
  margin: 0 0 18px;
}

/* ---------- Top bar ---------- */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 0 3px rgba(255, 31, 61, 0.15), 0 0 14px var(--red);
  animation: pulseDot 2.4s ease-in-out infinite;
}

@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.55; transform: scale(0.85); }
}

.brand__word {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 22px;
  letter-spacing: 0.14em;
}

.platforms {
  list-style: none;
  display: flex;
  gap: 10px;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}

.platforms li {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  font-size: 12px;
  font-family: var(--font-mono);
  border: 1px solid var(--border);
  background: var(--panel);
  border-radius: 100px;
  padding: 6px 10px;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.platforms li:hover { color: var(--text); border-color: var(--border-strong); }

.platforms svg { width: 15px; height: 15px; }

.platforms span { display: none; }

@media (min-width: 660px) {
  .platforms span { display: inline; }
}

/* ---------- Hero ---------- */

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.02em;
  color: var(--text-muted);
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 6px 12px;
  margin-bottom: 18px;
}

.hero__badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 8px rgba(53, 212, 136, 0.8);
}

.hero__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(40px, 9vw, 64px);
  line-height: 1.0;
  margin: 0 0 16px;
  letter-spacing: -0.01em;
}

.hero__title em {
  font-style: normal;
  color: var(--red);
  text-shadow: 0 0 30px rgba(255, 31, 61, 0.45);
}

.hero__sub {
  margin: 0;
  color: var(--text-muted);
  font-size: 16px;
  max-width: 50ch;
  line-height: 1.6;
}

/* ---------- Capture deck ---------- */

.deck {
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: linear-gradient(180deg, rgba(255, 31, 61, 0.06), transparent 60%), var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 18px;
}

@media (min-width: 620px) {
  .deck { padding: 24px; }
}

.capture {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

@media (min-width: 620px) {
  .capture { flex-direction: row; align-items: stretch; }
}

.capture__field {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 6px 8px 6px 16px;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.capture__field:focus-within {
  border-color: var(--red-deep);
  box-shadow: 0 0 0 3px rgba(255, 31, 61, 0.12);
}

.capture__indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-faint);
  flex-shrink: 0;
  transition: background 0.2s ease, box-shadow 0.2s ease;
}

.capture__indicator.live {
  background: var(--red);
  box-shadow: 0 0 10px var(--red);
  animation: pulseDot 1.1s ease-in-out infinite;
}

.capture__input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 15px;
  font-family: var(--font-body);
  padding: 12px 4px;
}

.capture__input::placeholder { color: var(--text-faint); }

.capture__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  border-radius: 12px;
  padding: 13px 18px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.15s ease, filter 0.15s ease, background 0.15s ease;
}

.capture__btn svg { width: 16px; height: 16px; }

.capture__btn--ghost {
  background: var(--panel-raised);
  color: var(--text-muted);
  border: 1px solid var(--border);
  padding: 10px 14px;
}

.capture__btn--ghost:hover { color: var(--text); border-color: var(--border-strong); }

.capture__btn--primary {
  background: var(--red);
  color: #1a0407;
  box-shadow: 0 6px 20px -6px rgba(255, 31, 61, 0.55);
}

.capture__btn--primary:hover { filter: brightness(1.08); transform: translateY(-1px); }
.capture__btn--primary:active { transform: translateY(0); filter: brightness(0.96); }

.capture__btn--primary:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

.capture__turnstile {
  display: flex;
  justify-content: center;
  margin-top: 14px;
}

.capture__btn--ghost span { display: none; }

/* ===== Seletor de formato (vídeo/áudio) — YouTube e TikTok ===== */

.capture__formato {
  display: flex;
  align-items: center;
  gap: 12px;
  animation: formatoIn 0.2s ease;
}

@keyframes formatoIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.capture__formato-label {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
  white-space: nowrap;
}

.formato-toggle {
  display: inline-flex;
  gap: 4px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 4px;
}

.formato-toggle__btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 13px;
  border-radius: 9px;
  padding: 8px 14px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.formato-toggle__btn svg { width: 15px; height: 15px; }

.formato-toggle__btn:hover { color: var(--text); }

.formato-toggle__btn.is-active {
  background: var(--red);
  color: #1a0407;
}

@media (min-width: 520px) {
  .capture__btn--ghost span { display: inline; }
}

.capture__hint {
  margin: 0;
  padding-left: 4px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text-faint);
  letter-spacing: 0.01em;
}

/* ---------- Loading state ---------- */

.loading {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
}

.loading__bars {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 20px;
}

.loading__bars span {
  width: 3px;
  background: var(--red);
  border-radius: 2px;
  animation: bar 0.9s ease-in-out infinite;
}

.loading__bars span:nth-child(1) { height: 40%; animation-delay: 0s; }
.loading__bars span:nth-child(2) { height: 80%; animation-delay: 0.1s; }
.loading__bars span:nth-child(3) { height: 100%; animation-delay: 0.2s; }
.loading__bars span:nth-child(4) { height: 65%; animation-delay: 0.3s; }
.loading__bars span:nth-child(5) { height: 45%; animation-delay: 0.4s; }

@keyframes bar {
  0%, 100% { transform: scaleY(0.4); opacity: 0.6; }
  50% { transform: scaleY(1); opacity: 1; }
}

.loading__text {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-muted);
}

/* ---------- Error ---------- */

.errorbox {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  background: rgba(255, 31, 61, 0.08);
  border: 1px solid rgba(255, 31, 61, 0.3);
  border-radius: 14px;
  color: var(--red-soft);
  font-size: 14px;
}

.errorbox svg { width: 20px; height: 20px; flex-shrink: 0; }

/* ---------- Result ---------- */

.result {
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
  background: var(--panel);
  display: grid;
  grid-template-columns: 1fr;
  animation: reveal 0.55s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes reveal {
  from { opacity: 0; transform: translateY(10px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (min-width: 700px) {
  .result { grid-template-columns: 280px 1fr; }

  .result:has(.result__screen[hidden]) {
    grid-template-columns: 1fr;
  }
}

.result__screen {
  position: relative;
  background: #000;
  aspect-ratio: 16 / 10;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.result__screen.is-audio {
  aspect-ratio: 16 / 9;
  background: radial-gradient(80% 80% at 50% 30%, rgba(255, 31, 61, 0.16), #000 70%);
}

@media (min-width: 700px) {
  .result__screen { aspect-ratio: auto; height: 100%; min-height: 300px; }
}

.result__scanline {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.02) 0px,
    rgba(255, 255, 255, 0.02) 1px,
    transparent 1px,
    transparent 3px
  );
  mix-blend-mode: overlay;
}

.result__media {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

/* Prévia de áudio: equalizador + player nativo */

.result__audiowrap {
  width: 100%;
  padding: 22px 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

.result__audio {
  width: 100%;
  max-width: 340px;
}

.result__eq {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 54px;
}

.result__eq span {
  width: 5px;
  border-radius: 3px;
  background: linear-gradient(180deg, var(--red-soft), var(--red-deep));
  animation: bar 1.2s ease-in-out infinite;
}

.result__eq span:nth-child(1) { height: 40%; animation-delay: 0s; }
.result__eq span:nth-child(2) { height: 70%; animation-delay: 0.12s; }
.result__eq span:nth-child(3) { height: 100%; animation-delay: 0.24s; }
.result__eq span:nth-child(4) { height: 55%; animation-delay: 0.36s; }
.result__eq span:nth-child(5) { height: 85%; animation-delay: 0.18s; }
.result__eq span:nth-child(6) { height: 45%; animation-delay: 0.3s; }
.result__eq span:nth-child(7) { height: 65%; animation-delay: 0.06s; }

.result__loader {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: rgba(0, 0, 0, 0.72);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
}

.result__spinner {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid rgba(255, 31, 61, 0.25);
  border-top-color: var(--red);
  animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.result__info {
  padding: 22px 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.result__head { display: flex; gap: 8px; flex-wrap: wrap; }

.result__tag,
.result__kindtag {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  border-radius: 100px;
  padding: 4px 10px;
}

.result__tag {
  color: var(--red-soft);
  border: 1px solid rgba(255, 31, 61, 0.35);
  background: rgba(255, 31, 61, 0.08);
}

.result__kindtag {
  color: var(--text-muted);
  border: 1px solid var(--border-strong);
  background: var(--panel-raised);
}

.result__title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 23px;
  line-height: 1.22;
  word-break: break-word;
}

.result__meta {
  margin: 0;
  color: var(--text-muted);
  font-size: 13.5px;
}

/* Botão único de download — mesma mídia da prévia */

.result__download {
  margin-top: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  text-decoration: none;
  background: var(--red);
  color: #1a0407;
  font-weight: 700;
  font-size: 14.5px;
  border-radius: 12px;
  padding: 14px 18px;
  box-shadow: 0 6px 20px -6px rgba(255, 31, 61, 0.55);
  transition: filter 0.15s ease, transform 0.15s ease;
}

.result__download:hover { filter: brightness(1.08); transform: translateY(-1px); }
.result__download:active { transform: translateY(0); filter: brightness(0.96); }
.result__download svg { width: 17px; height: 17px; }

@media (max-width: 420px) {
  .result__download { width: 100%; }
}

/* ---------- Como funciona ---------- */

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr;
  counter-reset: step;
}

@media (min-width: 700px) {
  .steps { grid-template-columns: repeat(3, 1fr); }
}

.step {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px 18px;
}

.step__n {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--red-soft);
  letter-spacing: 0.1em;
}

.step h3 {
  margin: 10px 0 6px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
}

.step p {
  margin: 0;
  color: var(--text-muted);
  font-size: 13.5px;
  line-height: 1.55;
}

/* ---------- Cards ---------- */

.cards {
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr;
}

@media (min-width: 700px) {
  .cards { grid-template-columns: repeat(3, 1fr); }
}

.card {
  background: linear-gradient(180deg, rgba(255, 31, 61, 0.05), transparent 55%), var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px 18px;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.card:hover { border-color: var(--border-strong); transform: translateY(-2px); }

.card__icon {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 11px;
  background: rgba(255, 31, 61, 0.1);
  border: 1px solid rgba(255, 31, 61, 0.25);
  color: var(--red-soft);
  margin-bottom: 12px;
}

.card__icon svg { width: 19px; height: 19px; }

.card h3 {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 19px;
}

.card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 13.5px;
  line-height: 1.55;
}

/* ---------- Footer ---------- */

.foot {
  border-top: 1px solid var(--border);
  padding-top: 28px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.foot__top {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px 20px;
  background: linear-gradient(180deg, rgba(255, 31, 61, 0.045), transparent 65%), var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
}

@media (min-width: 620px) {
  .foot__top {
    flex-direction: row;
    align-items: center;
    gap: 20px;
    padding: 20px 24px;
  }
}

.foot__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  opacity: 0.9;
  flex-shrink: 0;
}

.foot__note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0;
  color: var(--text-faint);
  font-size: 12.5px;
  line-height: 1.6;
  max-width: 60ch;
}

.foot__note svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  margin-top: 1px;
  color: var(--red-soft);
  opacity: 0.75;
}

@media (min-width: 620px) {
  .foot__note {
    padding-left: 20px;
    border-left: 1px solid var(--border);
  }
}

.foot__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: var(--text-faint);
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.02em;
  padding-bottom: 4px;
}

.foot__dash {
  opacity: 0.5;
}
