:root {
  --indigo: #4f46e5;
  --indigo-dark: #4338ca;
  --indigo-light: #eef2ff;
  --red: #ef4444;
  --red-dark: #dc2626;
  --ink: #0f172a;
  --slate: #475569;
  --muted: #94a3b8;
  --line: #e2e8f0;
  --bg: #f8fafc;
  --card: #ffffff;
  --radius: 18px;
  --shadow: 0 10px 30px -12px rgba(15, 23, 42, 0.18);
  --shadow-lg: 0 24px 60px -20px rgba(79, 70, 229, 0.35);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.container {
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: 0 20px;
}

a { color: inherit; text-decoration: none; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 66px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.1rem; }
.brand-mark { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: linear-gradient(135deg, var(--indigo), #7c3aed); color: #fff; }
.site-nav { display: flex; gap: 26px; font-weight: 500; color: var(--slate); }
.site-nav a:hover { color: var(--indigo); }

/* Language switcher */
.lang-switch { display: flex; align-items: center; gap: 2px; margin-left: 18px; }
.lang-switch a {
  font-size: 0.8rem; font-weight: 600; color: var(--muted); text-transform: uppercase;
  letter-spacing: 0.03em; padding: 5px 8px; border-radius: 8px; transition: all .15s;
}
.lang-switch a:hover { color: var(--indigo); background: var(--indigo-light); }
.lang-switch a[aria-current="true"] { color: var(--indigo); background: var(--indigo-light); }
.header-inner .right { display: flex; align-items: center; }
@media (max-width: 620px) {
  .lang-switch { margin-left: 0; gap: 0; }
  .lang-switch a { padding: 5px 5px; font-size: 0.74rem; }
}

/* Hero */
.hero { padding: 56px 0 26px; text-align: center; }
.eyebrow {
  display: inline-block; font-size: 0.82rem; font-weight: 600; letter-spacing: 0.02em;
  color: var(--indigo-dark); background: var(--indigo-light);
  padding: 7px 15px; border-radius: 999px; margin-bottom: 18px;
}
.hero h1 { font-size: clamp(2.1rem, 5.5vw, 3.4rem); font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; }
.hero h1 span { background: linear-gradient(120deg, var(--indigo), #a855f7); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.hero-sub { max-width: 620px; margin: 16px auto 0; font-size: 1.08rem; color: var(--slate); }

/* Recorder */
.recorder-section { padding: 20px 0 46px; }
.recorder-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 24px;
  box-shadow: var(--shadow-lg); padding: 34px 28px 30px; text-align: center;
}
.recorder-card.is-recording { border-color: rgba(239, 68, 68, 0.4); }
.recorder-status { display: inline-flex; align-items: center; gap: 9px; font-weight: 600; color: var(--slate); font-size: 0.95rem; }
.status-dot { width: 11px; height: 11px; border-radius: 50%; background: var(--muted); transition: background .2s; }
.recorder-card.is-recording .status-dot { background: var(--red); animation: pulse 1.3s infinite; }
.recorder-card.is-paused .status-dot { background: #f59e0b; animation: none; }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(239,68,68,.5);} 50% { box-shadow: 0 0 0 8px rgba(239,68,68,0);} }

.timer { font-size: clamp(3rem, 10vw, 4.4rem); font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: 0.01em; margin: 10px 0 6px; color: var(--ink); }

.visualizer { width: 100%; height: 120px; display: block; margin: 4px 0 22px; }

.controls { display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap; }
.btn-record {
  display: inline-flex; align-items: center; gap: 11px; cursor: pointer;
  background: linear-gradient(135deg, var(--red), var(--red-dark)); color: #fff;
  border: none; font-weight: 700; font-size: 1.05rem; padding: 15px 30px; border-radius: 999px;
  box-shadow: 0 12px 24px -8px rgba(239, 68, 68, 0.6); transition: transform .12s, box-shadow .2s;
}
.btn-record:hover { transform: translateY(-1px); }
.btn-record:active { transform: translateY(0); }
.rec-icon { width: 15px; height: 15px; border-radius: 50%; background: #fff; }
.recorder-card.is-recording .btn-record { background: linear-gradient(135deg, #64748b, #475569); box-shadow: 0 12px 24px -8px rgba(71,85,105,.5); }
.recorder-card.is-recording .rec-icon { border-radius: 3px; }

.btn-secondary {
  cursor: pointer; background: #fff; color: var(--ink); border: 1px solid var(--line);
  font-weight: 600; font-size: 0.98rem; padding: 14px 22px; border-radius: 999px; transition: all .15s;
}
.btn-secondary:hover:not(:disabled) { border-color: var(--indigo); color: var(--indigo); background: var(--indigo-light); }
.btn-secondary:disabled { opacity: .45; cursor: not-allowed; }

.hint { margin-top: 20px; color: var(--muted); font-size: 0.92rem; }
.hint.error { color: var(--red-dark); font-weight: 500; }

/* Features */
.section-title { font-size: 1.5rem; font-weight: 800; margin-top: 40px; text-align: center; }
.features { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 20px; }
.features li { display: flex; gap: 11px; align-items: flex-start; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 14px; }
.features .feat-ico { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 10px; background: var(--indigo-light); color: var(--indigo); }
.features .feat-ico svg { width: 22px; height: 22px; }
.features strong { display: block; font-size: 0.94rem; }
.features span { display: block; font-size: 0.82rem; color: var(--muted); }

/* Recordings */
.recordings-section { padding: 20px 0 40px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 18px; flex-wrap: wrap; }
.section-head h2 { font-size: 1.5rem; font-weight: 800; }
.section-head-actions { display: flex; align-items: center; gap: 14px; }
.storage-info { font-size: 0.82rem; color: var(--muted); }
.btn-ghost { cursor: pointer; background: none; border: 1px solid var(--line); color: var(--red-dark); font-weight: 600; font-size: 0.85rem; padding: 8px 14px; border-radius: 10px; transition: all .15s; }
.btn-ghost:hover { background: #fef2f2; border-color: var(--red); }

.recordings-list { display: flex; flex-direction: column; gap: 12px; }
.recording-item {
  display: flex; align-items: center; gap: 14px; background: var(--card);
  border: 1px solid var(--line); border-radius: 14px; padding: 13px 16px; box-shadow: var(--shadow);
}
.recording-item.playing { border-color: var(--indigo); }
.play-btn {
  flex: 0 0 auto; width: 46px; height: 46px; border-radius: 50%; border: none; cursor: pointer;
  background: var(--indigo-light); color: var(--indigo); display: grid; place-items: center; transition: all .15s;
}
.play-btn:hover { background: var(--indigo); color: #fff; }
.recording-main { flex: 1 1 auto; min-width: 0; }
.recording-name { font-weight: 600; font-size: 0.98rem; outline: none; border-radius: 6px; padding: 1px 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.recording-name[contenteditable="true"] { background: var(--indigo-light); white-space: normal; }
.recording-meta { font-size: 0.8rem; color: var(--muted); margin-top: 2px; }
.progress { height: 4px; background: var(--line); border-radius: 4px; margin-top: 9px; overflow: hidden; }
.progress-bar { height: 100%; width: 0; background: var(--indigo); border-radius: 4px; transition: width .1s linear; }
.recording-actions { flex: 0 0 auto; display: flex; gap: 4px; }
.recording-actions .act { cursor: pointer; background: none; border: none; display: inline-flex; align-items: center; justify-content: center; line-height: 1; padding: 8px; border-radius: 9px; color: var(--slate); transition: all .15s; }
.recording-actions .act:hover { background: var(--bg); }
.recording-actions .mp3 { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.02em; color: var(--indigo); border: 1px solid var(--line); padding: 6px 8px; }
.recording-actions .mp3:hover { background: var(--indigo-light); border-color: var(--indigo); }
.recording-actions .mp3:disabled { opacity: .6; cursor: progress; }
.recording-actions .delete:hover { background: #fef2f2; color: var(--red-dark); }

.empty-state { text-align: center; padding: 40px 20px; color: var(--slate); }
.empty-state .empty-ico { display: flex; justify-content: center; color: var(--indigo); }
.empty-state p { font-weight: 600; margin-top: 8px; }
.empty-state span { font-size: 0.88rem; color: var(--muted); }

/* FAQ */
.faq-section { padding: 30px 0 60px; }
.faq-section h2 { font-size: 1.5rem; font-weight: 800; margin-bottom: 16px; }
.faq-section details { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 15px 18px; margin-bottom: 10px; }
.faq-section summary { cursor: pointer; font-weight: 600; list-style: none; position: relative; padding-right: 24px; }
.faq-section summary::after { content: "+"; position: absolute; right: 2px; top: -2px; font-size: 1.3rem; color: var(--indigo); font-weight: 400; }
.faq-section details[open] summary::after { content: "–"; }
.faq-section details p { margin-top: 10px; color: var(--slate); font-size: 0.95rem; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 26px 0; text-align: center; color: var(--muted); font-size: 0.88rem; }
.footer-nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 20px; margin-bottom: 14px; }
.footer-nav a { color: var(--slate); font-weight: 500; }
.footer-nav a:hover { color: var(--indigo); }

/* Content pages (Sobre, Contato, Termos, Privacidade) */
.page { padding: 46px 0 56px; }
.page .container { max-width: 760px; }
.page h1 { font-size: clamp(1.9rem, 4.5vw, 2.6rem); font-weight: 800; letter-spacing: -0.02em; margin-bottom: 8px; }
.page .updated { color: var(--muted); font-size: 0.88rem; margin-bottom: 26px; }
.page h2 { font-size: 1.3rem; font-weight: 700; margin: 30px 0 10px; }
.page h3 { font-size: 1.05rem; font-weight: 700; margin: 20px 0 6px; }
.page p, .page li { color: var(--slate); font-size: 1rem; margin-bottom: 12px; }
.page ul { padding-left: 22px; margin-bottom: 12px; }
.page li { margin-bottom: 6px; }
.page a:not(.btn-cta) { color: var(--indigo); text-decoration: underline; }
.page a:not(.btn-cta):hover { color: var(--indigo-dark); }
.page .lead { font-size: 1.1rem; color: var(--ink); }
.page .card {
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 22px 24px; margin: 18px 0; box-shadow: var(--shadow);
}
.contact-email { font-weight: 700; font-size: 1.05rem; }
.back-home { display: inline-block; margin-top: 30px; font-weight: 600; text-decoration: none; }
.back-home:hover { color: var(--indigo-dark); }

/* Blog */
.page.article .container { max-width: 760px; }
.article .eyebrow { font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); margin-bottom: 6px; }
.article .eyebrow a { color: var(--indigo); text-decoration: none; }
.article .eyebrow a:hover { text-decoration: underline; }
.article-meta { color: var(--muted); font-size: 0.9rem; margin-bottom: 26px; }
.article-body p, .article-body li { color: var(--slate); font-size: 1.02rem; line-height: 1.8; }
.article-body h2 { font-size: 1.3rem; font-weight: 700; margin: 32px 0 10px; }
.article-cta { margin-top: 30px; }
.article-hero { margin: 4px 0 26px; border-radius: 16px; overflow: hidden; box-shadow: var(--shadow); line-height: 0; }
.article-hero img { width: 100%; height: auto; display: block; }
.btn-cta { display: inline-block; background: var(--indigo); color: #fff; text-decoration: none; font-weight: 700; padding: 12px 22px; border-radius: 12px; transition: background .15s; }
.btn-cta:hover { background: var(--indigo-dark); color: #fff; }
.blog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; margin: 28px 0 6px; }
.blog-card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 0; overflow: hidden; display: flex; flex-direction: column; transition: box-shadow .15s, transform .15s; }
.blog-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.blog-card-thumb { display: block; line-height: 0; }
.blog-card-thumb img { width: 100%; height: auto; display: block; aspect-ratio: 12 / 5; object-fit: cover; }
.blog-card-body { padding: 16px 20px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.blog-card-cat { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--indigo); margin: 0; }
.blog-card h2 { font-size: 1.05rem; font-weight: 700; margin: 0; }
.blog-card h2 a { color: var(--ink); text-decoration: none; }
.blog-card h2 a:hover { color: var(--indigo); }
.blog-card p { font-size: 0.9rem; color: var(--muted); margin: 0; }
.blog-card-meta { font-size: 0.78rem; color: var(--muted); margin-top: auto; padding-top: 6px; }
.related { margin-top: 46px; }
.related > h2 { font-size: 1.25rem; font-weight: 800; margin: 0 0 16px; }
.related-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; margin: 0; }

/* Toast */
.toast {
  position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%) translateY(20px);
  background: var(--ink); color: #fff; padding: 12px 20px; border-radius: 12px; font-size: 0.9rem;
  font-weight: 500; box-shadow: var(--shadow-lg); opacity: 0; pointer-events: none; transition: all .25s; z-index: 100;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* Responsive */
@media (max-width: 760px) {
  .site-nav { display: none; }
  .features { grid-template-columns: repeat(2, 1fr); }
  .recorder-card { padding: 26px 18px; }
}
@media (max-width: 460px) {
  .features { grid-template-columns: 1fr; }
  .controls { gap: 10px; }
  .btn-record { padding: 14px 24px; }
  .recording-actions { flex-direction: column; }
}
