:root {
  --bg-soft: linear-gradient(180deg, #f7fbff 0%, #f3f0ff 100%);
  --hero-overlay: linear-gradient(135deg, rgba(15, 23, 42, 0.84), rgba(37, 99, 235, 0.70), rgba(91, 33, 182, 0.72));
  --brand-gradient: linear-gradient(180deg, #3b82f6 0%, #7c3aed 100%);
  --brand-gradient-side: linear-gradient(135deg, #1e293b 0%, #2563eb 48%, #7c3aed 100%);
  --text: #0f172a;
  --text-soft: #475569;
  --white: #ffffff;
  --card-shadow: 0 18px 50px rgba(15, 23, 42, 0.08);
  --card-shadow-strong: 0 28px 80px rgba(15, 23, 42, 0.14);
  --card-radius: 24px;
  --header-bg: rgba(31, 43, 80, 0.96);
  --footer-bg: linear-gradient(135deg, #0b1220 0%, #18284a 52%, #5b21b6 100%);
  --max-width: 1200px;
  --border-soft: #e2e8f0;
  --focus: rgba(59, 130, 246, 0.18);
  --success: #16a34a;
  --danger: #dc2626;
  --warning: #b45309;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(59, 130, 246, 0.11), transparent 30%),
    radial-gradient(circle at bottom right, rgba(124, 58, 237, 0.13), transparent 30%),
    var(--bg-soft);
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
textarea { resize: vertical; }
[hidden] { display: none !important; }

.site-shell { min-height: 100vh; overflow-x: hidden; }
.container { width: min(var(--max-width), calc(100% - 2rem)); margin: 0 auto; }
.section-space { padding: 5.2rem 0; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); border: 0; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(10px);
  background: var(--header-bg);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.15);
}
.header-wrap { min-height: 78px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 1.25rem; }
.brand { display: inline-flex; align-items: center; gap: 0.85rem; min-width: 0; }
.brand-mark { width: 44px; height: 44px; object-fit: contain; }
.brand-copy { display: flex; flex-direction: column; gap: 0.1rem; color: var(--white); }
.brand-copy strong { font-size: 1.05rem; letter-spacing: 0.08em; }
.brand-copy span { font-size: 0.72rem; color: rgba(255,255,255,.82); }
.main-nav { display: flex; justify-content: center; align-items: center; gap: 1.15rem; flex-wrap: wrap; }
.main-nav a { color: rgba(255,255,255,.94); font-size: .96rem; transition: color .2s ease; }
.main-nav a:hover, .main-nav a.active { color: #bfdbfe; }
.header-actions { display: flex; align-items: center; justify-content: flex-end; gap: .7rem; }
.menu-toggle { display: none; border: 0; background: transparent; padding: 0; width: 44px; height: 44px; align-items: center; justify-content: center; flex-direction: column; gap: 5px; }
.menu-toggle span:not(.sr-only) { display: block; width: 24px; height: 2px; border-radius: 999px; background: var(--white); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: .9rem 1.35rem;
  border-radius: 999px;
  border: 0;
  font-weight: 850;
  gap: .5rem;
  transition: transform .2s ease, box-shadow .2s ease, opacity .2s ease, background .2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--brand-gradient); color: var(--white); box-shadow: 0 14px 30px rgba(59, 130, 246, .24); }
.btn-secondary, .btn-card { background: #eff6ff; color: #1d4ed8; border: 1px solid rgba(59, 130, 246, .14); }
.btn-ghost { background: rgba(255,255,255,.12); color: #fff; border: 1px solid rgba(255,255,255,.18); }
.btn.full { width: 100%; }
.btn.compact { min-height: 42px; padding: .65rem 1rem; font-size: .92rem; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .45rem .9rem;
  border-radius: 999px;
  margin-bottom: 1rem;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.18);
  color: var(--white);
  font-size: .9rem;
  font-weight: 850;
}
.eyebrow.soft { color: #1d4ed8; background: rgba(59, 130, 246, .1); border: 1px solid rgba(59, 130, 246, .12); }

.tools-hero {
  position: relative;
  isolation: isolate;
  color: #fff;
  padding: clamp(4rem, 8vw, 6.5rem) 0;
  overflow: hidden;
  background: var(--brand-gradient-side);
}
.tools-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background-image: url('../assets/preview-bg.png');
  background-size: cover;
  background-position: center;
  opacity: .16;
}
.tools-hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--hero-overlay); }
.hero-grid { display: grid; grid-template-columns: minmax(0,1fr) 330px; gap: 1.5rem; align-items: center; }
.tools-hero h1 { margin: 0; font-size: clamp(2.35rem, 5vw, 4.7rem); line-height: 1.02; letter-spacing: -0.04em; }
.tools-hero p { max-width: 820px; color: rgba(255,255,255,.92); line-height: 1.75; font-size: 1.05rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.4rem; }
.hero-stat-card { padding: 1.35rem; border-radius: 28px; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.18); box-shadow: 0 20px 50px rgba(15,23,42,.18); }
.hero-stat-card span, .hero-stat-card small { display: block; color: rgba(255,255,255,.78); }
.hero-stat-card strong { display: block; font-size: 3.1rem; line-height: 1; margin: .45rem 0; }
.stats-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: .8rem; margin-top: 1rem; }
.stat-mini { padding: .9rem; background: rgba(255,255,255,.09); border: 1px solid rgba(255,255,255,.14); border-radius: 18px; }
.stat-mini strong { display: block; font-size: 1.45rem; color: #fff; }

.section-heading { text-align: center; max-width: 760px; margin: 0 auto 2rem; }
.section-heading.left { text-align: left; margin-left: 0; }
.section-heading h2 { margin: 0; line-height: 1.08; font-size: clamp(2rem, 4vw, 3.25rem); letter-spacing: -0.035em; }
.section-heading p { color: var(--text-soft); line-height: 1.7; }

.tools-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.1rem; }
.tool-card {
  position: relative;
  min-height: 310px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(1.35rem, 3vw, 2rem);
  border-radius: 30px;
  background: rgba(255,255,255,.96);
  border: 1px solid rgba(226,232,240,.9);
  box-shadow: var(--card-shadow);
  overflow: hidden;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.tool-card:hover { transform: translateY(-4px); box-shadow: var(--card-shadow-strong); border-color: rgba(59,130,246,.35); }
.tool-card::after { content: ""; position: absolute; width: 160px; height: 160px; right: -60px; top: -50px; border-radius: 50%; background: rgba(59,130,246,.10); }
.tool-card.accent::after { background: rgba(124,58,237,.12); }
.tool-icon {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border-radius: 22px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 1.8rem;
  border: 1px solid rgba(59,130,246,.12);
}
.tool-card h3 { margin: 1.25rem 0 .7rem; font-size: clamp(1.45rem, 2vw, 2rem); letter-spacing: -0.025em; }
.tool-card p { color: var(--text-soft); line-height: 1.7; margin: 0; }
.tool-meta { display: flex; gap: .55rem; flex-wrap: wrap; margin-top: 1rem; }
.pill { display: inline-flex; align-items: center; min-height: 32px; padding: .35rem .7rem; border-radius: 999px; background: #f8fafc; border: 1px solid var(--border-soft); color: #334155; font-size: .83rem; font-weight: 800; }
.tool-actions { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.5rem; }

.info-band { background: #fff; border-top: 1px solid rgba(226,232,240,.7); border-bottom: 1px solid rgba(226,232,240,.7); }
.info-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.info-card { padding: 1.35rem; border-radius: 24px; background: #f8fafc; border: 1px solid var(--border-soft); }
.info-card h3 { margin: 0 0 .45rem; }
.info-card p { margin: 0; color: var(--text-soft); line-height: 1.65; }

.qr-layout { display: grid; grid-template-columns: minmax(0, 1fr) 420px; gap: 1.15rem; align-items: start; }
.panel-card {
  background: rgba(255,255,255,.97);
  border: 1px solid rgba(226,232,240,.92);
  box-shadow: var(--card-shadow);
  border-radius: 30px;
  padding: clamp(1.25rem, 3vw, 2rem);
}
.form-grid { display: grid; gap: 1rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: .9rem; }
.field-group { display: grid; gap: .5rem; }
.field-group label { font-weight: 850; color: #1e293b; }
.field-group input, .field-group select, .field-group textarea {
  width: 100%;
  border: 1px solid var(--border-soft);
  border-radius: 16px;
  background: #fff;
  color: var(--text);
  padding: .95rem 1rem;
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.field-group input:focus, .field-group select:focus, .field-group textarea:focus { border-color: #60a5fa; box-shadow: 0 0 0 4px var(--focus); }
.field-group small { color: #64748b; line-height: 1.5; }
.color-controls { display: flex; flex-wrap: wrap; gap: .7rem; align-items: center; }
.color-chip {
  min-height: 44px;
  padding: .65rem .95rem;
  border-radius: 999px;
  border: 1px solid var(--border-soft);
  background: #fff;
  color: #1e293b;
  font-weight: 850;
}
.color-chip.active { border-color: #60a5fa; box-shadow: 0 0 0 4px var(--focus); }
.color-chip.black { background: #020617; color: #fff; border-color: #020617; }
.color-chip.white { background: #fff; color: #0f172a; }
.color-picker { width: 54px !important; height: 44px; padding: .2rem !important; border-radius: 14px !important; cursor: pointer; }
.form-message { min-height: 28px; margin: .2rem 0 0; padding: .75rem .9rem; border-radius: 16px; font-weight: 750; line-height: 1.5; background: #eff6ff; color: #1d4ed8; border: 1px solid #dbeafe; }
.form-message:empty { display: none; }
.form-message.error { background: #fef2f2; color: #b91c1c; border-color: #fecaca; }
.form-message.success { background: #f0fdf4; color: #15803d; border-color: #bbf7d0; }
.form-actions { display: flex; flex-wrap: wrap; gap: .75rem; }

.preview-card { position: sticky; top: 98px; }
.qr-preview-wrap {
  border-radius: 28px;
  border: 1px solid var(--border-soft);
  background-color: #fff;
  background-image:
    linear-gradient(45deg, #eef2f7 25%, transparent 25%),
    linear-gradient(-45deg, #eef2f7 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #eef2f7 75%),
    linear-gradient(-45deg, transparent 75%, #eef2f7 75%);
  background-size: 22px 22px;
  background-position: 0 0, 0 11px, 11px -11px, -11px 0;
  padding: 1rem;
  min-height: 420px;
  display: grid;
  place-items: center;
  overflow: hidden;
}
#qrPreviewSvg { width: min(100%, 360px); aspect-ratio: 1; display: grid; place-items: center; }
#qrPreviewSvg svg { width: 100%; height: auto; display: block; }
.empty-qr { text-align: center; color: #64748b; line-height: 1.6; padding: 2rem; }
.qr-meta { display: grid; grid-template-columns: repeat(2, 1fr); gap: .65rem; margin: 1rem 0; }
.meta-box { padding: .8rem; background: #f8fafc; border: 1px solid var(--border-soft); border-radius: 16px; }
.meta-box span { display: block; color: #64748b; font-size: .78rem; font-weight: 800; }
.meta-box strong { display: block; margin-top: .15rem; color: #0f172a; }
.download-actions { display: grid; gap: .7rem; }
.canvas-holder { display: none; }

.site-footer { color: #fff; background: var(--footer-bg); padding: 2.5rem 0 1rem; }
.footer-grid { display: grid; grid-template-columns: 1.15fr 1fr 1fr; gap: 1.5rem; align-items: start; }
.footer-column h3 { margin-top: 0; }
.footer-column a, .footer-column p { display: block; color: rgba(255,255,255,.8); margin: .45rem 0; line-height: 1.5; }
.footer-logo-stack { display: flex; align-items: center; gap: .85rem; }
.footer-logo-stack img { width: 54px; height: 54px; object-fit: contain; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); margin-top: 2rem; padding-top: 1rem; text-align: center; color: rgba(255,255,255,.78); }

@media (max-width: 1040px) {
  .header-wrap { grid-template-columns: auto auto; justify-content: space-between; }
  .menu-toggle { display: inline-flex; }
  .main-nav, .header-actions { display: none; }
  body.menu-open .main-nav, body.menu-open .header-actions { display: flex; grid-column: 1 / -1; width: 100%; }
  body.menu-open .main-nav { flex-direction: column; align-items: flex-start; padding: .3rem 0; }
  body.menu-open .header-actions { justify-content: flex-start; padding-bottom: 1rem; }
  .hero-grid, .qr-layout { grid-template-columns: 1fr; }
  .preview-card { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
  .container { width: min(var(--max-width), calc(100% - 1.2rem)); }
  .section-space { padding: 4rem 0; }
  .tools-grid, .info-grid, .form-row, .footer-grid { grid-template-columns: 1fr; }
  .tools-hero { padding: 4rem 0; }
  .hero-actions .btn, .tool-actions .btn, .form-actions .btn, .download-actions .btn { width: 100%; }
  .tool-card, .panel-card { padding: 1.25rem; }
  .qr-preview-wrap { min-height: 330px; }
}

/* Conversor de videos */
.converter-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  gap: 1.15rem;
  align-items: start;
}

.drop-zone {
  min-height: 190px;
  border: 1.5px dashed #bfdbfe;
  border-radius: 24px;
  background:
    radial-gradient(circle at top left, rgba(59, 130, 246, .08), transparent 34%),
    #f8fafc;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 1.35rem;
  cursor: pointer;
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease, background .2s ease;
}

.drop-zone:hover,
.drop-zone.drag-over {
  border-color: #60a5fa;
  box-shadow: 0 0 0 4px var(--focus);
  transform: translateY(-1px);
  background: #ffffff;
}

.drop-zone input { display: none; }
.drop-zone strong { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #0f172a; }
.drop-zone small { color: #64748b; }
.drop-icon {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: var(--brand-gradient);
  color: #fff;
  font-size: 1.45rem;
  box-shadow: 0 16px 30px rgba(59, 130, 246, .22);
}

.converter-status {
  border: 1px solid var(--border-soft);
  border-radius: 20px;
  background: #f8fafc;
  padding: 1rem;
}

.progress-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .8rem;
  margin-bottom: .65rem;
  color: #1e293b;
}

.progress-header span { color: #2563eb; font-weight: 900; }

.progress-track {
  height: 12px;
  border-radius: 999px;
  overflow: hidden;
  background: #e2e8f0;
}

.progress-track span {
  display: block;
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: var(--brand-gradient);
  transition: width .25s ease;
}

.converter-status p {
  margin: .75rem 0 0;
  color: #64748b;
  line-height: 1.5;
}

.converter-status p.message-success { color: #15803d; font-weight: 800; }
.converter-status p.message-error { color: #b91c1c; font-weight: 800; }

.disabled-link {
  opacity: .55;
  pointer-events: none;
  filter: grayscale(.2);
}

.media-preview {
  border-radius: 28px;
  border: 1px solid var(--border-soft);
  background: #f8fafc;
  min-height: 320px;
  display: grid;
  place-items: center;
  padding: 1rem;
  overflow: hidden;
}

.media-preview video,
.media-preview audio {
  width: 100%;
  max-height: 360px;
  border-radius: 20px;
  background: #020617;
}

.converter-note {
  margin-top: 1rem;
  border: 1px solid var(--border-soft);
  border-radius: 20px;
  background: #ffffff;
  padding: 1rem;
}

.converter-note strong {
  display: block;
  color: #0f172a;
  margin-bottom: .35rem;
}

.converter-note p {
  margin: 0;
  color: #64748b;
  line-height: 1.55;
}

@media (max-width: 1040px) {
  .converter-layout { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .drop-zone { min-height: 165px; }
  .media-preview { min-height: 250px; }
}
