/* ============ Tipografías (guardadas en /fonts, sin Google) ============ */
@font-face { font-family: "Geist"; src: url("fonts/geist.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Instrument Serif"; src: url("fonts/instrument-serif.woff2") format("woff2"); font-style: normal; font-display: swap; }
@font-face { font-family: "Instrument Serif"; src: url("fonts/instrument-serif-italic.woff2") format("woff2"); font-style: italic; font-display: swap; }

/* ============ Colores y medidas (se cambian aquí, en un solo lugar) ============ */
:root {
  color-scheme: dark;
  --bg: #07070b;
  --panel: rgba(255, 255, 255, 0.04);
  --panel-strong: rgba(255, 255, 255, 0.07);
  --border: rgba(255, 255, 255, 0.09);
  --text: #f2f2f5;
  --muted: #9a9aa8;
  --accent: #9dffb0;       /* verde menta: "seguro" */
  --accent-2: #7cc4ff;     /* azul cielo */
  --accent-3: #c79bff;     /* lavanda */
  --danger: #ff8a8a;
  --radius: 22px;
  --sans: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Instrument Serif", Georgia, serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; } /* "hidden" siempre gana, aunque la caja tenga display: flex */
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
em { font-family: var(--serif); font-style: italic; font-weight: 400; }
button { font: inherit; }

/* ============ Fondo aurora ============ */
.aurora { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.nav, main, .footer { position: relative; z-index: 1; }
.aurora span {
  position: absolute; width: 60vmax; height: 60vmax; border-radius: 50%;
  filter: blur(90px); opacity: .22; animation: float 22s ease-in-out infinite alternate;
}
.aurora span:nth-child(1) { background: var(--accent); top: -30vmax; left: -15vmax; }
.aurora span:nth-child(2) { background: var(--accent-2); top: -20vmax; right: -25vmax; animation-delay: -7s; }
.aurora span:nth-child(3) { background: var(--accent-3); bottom: -40vmax; left: 20vmax; animation-delay: -14s; opacity: .14; }
@keyframes float {
  to { transform: translate(8vmax, 6vmax) scale(1.15); }
}
/* Ruido sutil encima para que el degradado no se vea "plástico" */
body::before {
  content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: .05;
  background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence baseFrequency='.8' numOctaves='3'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

/* ============ Navegación ============ */
.nav {
  max-width: 1080px; margin: 0 auto; padding: 20px 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.logo { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 600; font-size: 18px; letter-spacing: -.02em; }
.status {
  display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted);
  padding: 7px 12px; border: 1px solid var(--border); border-radius: 999px; background: var(--panel);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 12px var(--accent); animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .4; } }
.status.offline { color: var(--accent); border-color: rgba(157, 255, 176, .35); }

/* ============ Hero ============ */
main { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.hero { text-align: center; padding: 56px 0 36px; }
.eyebrow {
  display: inline-block; margin: 0 0 22px; font-size: 13px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--accent); padding: 6px 14px; border-radius: 999px; background: rgba(157, 255, 176, .08); border: 1px solid rgba(157, 255, 176, .2);
}
h1 {
  margin: 0; font-size: clamp(38px, 7vw, 76px); line-height: 1.02; letter-spacing: -.045em; font-weight: 600;
  text-wrap: balance;
}
h1 em {
  background: linear-gradient(90deg, var(--accent), var(--accent-2) 55%, var(--accent-3));
  -webkit-background-clip: text; background-clip: text; color: transparent; padding-right: .06em;
}
.lead { max-width: 620px; margin: 24px auto 0; font-size: clamp(16px, 2vw, 19px); color: var(--muted); text-wrap: pretty; }
.lead strong { color: var(--text); font-weight: 500; }

/* ============ Herramienta ============ */
.tool {
  max-width: 760px; margin: 0 auto; padding: 14px; border-radius: calc(var(--radius) + 8px);
  background: var(--panel); border: 1px solid var(--border);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 40px 120px -40px rgba(0, 0, 0, .8), inset 0 1px 0 rgba(255, 255, 255, .06);
}
.drop {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: 250px; padding: 32px 20px; border-radius: var(--radius); cursor: pointer; text-align: center;
  background: rgba(0, 0, 0, .25); border: 1.5px dashed rgba(255, 255, 255, .16);
  transition: border-color .25s, background .25s, transform .25s;
}
.drop:hover, .drop.over { border-color: var(--accent); background: rgba(157, 255, 176, .05); }
.drop.over { transform: scale(1.01); }
.drop:focus-within { outline: 2px solid var(--accent); outline-offset: 3px; }
.drop-icon {
  display: grid; place-items: center; width: 76px; height: 76px; border-radius: 22px; margin-bottom: 18px;
  color: var(--bg); background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 12px 40px -8px rgba(157, 255, 176, .5); transition: transform .3s;
}
.drop:hover .drop-icon, .drop.over .drop-icon { transform: translateY(-4px) rotate(-4deg); }
.drop-title { margin: 0; font-size: 19px; font-weight: 500; }
.drop-title u { text-decoration-color: var(--accent); text-underline-offset: 4px; text-decoration-thickness: 2px; }
.only-mobile { display: none; }
.drop-sub { margin: 8px 0 0; color: var(--muted); font-size: 14px; }

.controls { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; padding: 16px 8px 4px; }
.quality { display: flex; align-items: center; gap: 12px; font-size: 14px; color: var(--muted); }
.quality output { color: var(--text); font-variant-numeric: tabular-nums; min-width: 38px; }
input[type="range"] { -webkit-appearance: none; appearance: none; width: 150px; height: 4px; border-radius: 4px; background: rgba(255, 255, 255, .14); outline: none; }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; border-radius: 50%; background: var(--accent); cursor: pointer; box-shadow: 0 0 0 4px rgba(157, 255, 176, .18); }
input[type="range"]::-moz-range-thumb { width: 18px; height: 18px; border: 0; border-radius: 50%; background: var(--accent); cursor: pointer; }
/* Selector JPG | PDF */
.format { display: inline-flex; padding: 3px; border-radius: 12px; background: rgba(0, 0, 0, .3); border: 1px solid var(--border); }
.format label { position: relative; cursor: pointer; }
.format input { position: absolute; opacity: 0; pointer-events: none; }
.format span {
  display: block; padding: 6px 16px; border-radius: 9px; font-size: 13px; font-weight: 600; letter-spacing: .04em;
  color: var(--muted); transition: background .2s, color .2s;
}
.format input:checked + span { background: var(--accent); color: #062310; }
.format input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.controls { row-gap: 12px; }
.controls > .format + .quality { margin-right: auto; }

/* Opciones de PDF */
.pdf-options {
  display: flex; align-items: center; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap;
  margin: 12px 0 0; padding: 12px 16px; border-radius: 14px; background: rgba(157, 255, 176, .05); border: 1px solid rgba(157, 255, 176, .15);
  font-size: 14px; animation: in .3s ease both;
}
.toggle { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; }
.toggle input { position: absolute; opacity: 0; pointer-events: none; }
.toggle-track { position: relative; width: 36px; height: 20px; border-radius: 999px; background: rgba(255, 255, 255, .16); transition: background .2s; flex: none; }
.toggle-track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%; background: var(--text); transition: transform .2s; }
.toggle input:checked + .toggle-track { background: var(--accent); }
.toggle input:checked + .toggle-track::after { transform: translateX(16px); background: #062310; }
.toggle input:focus-visible + .toggle-track { outline: 2px solid var(--accent); outline-offset: 2px; }
.page-size { display: inline-flex; align-items: center; gap: 10px; color: var(--muted); }
.page-size select {
  font: inherit; color: var(--text); background: var(--panel-strong); border: 1px solid var(--border);
  border-radius: 10px; padding: 6px 10px; cursor: pointer;
}
.page-size select:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.chip { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--accent); padding: 6px 12px; border-radius: 999px; background: rgba(157, 255, 176, .08); }

/* Medidor de privacidad */
.meter {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px;
  margin: 14px 0 0; padding: 16px 20px; border-radius: 16px; background: rgba(0, 0, 0, .25); border: 1px solid var(--border);
}
.meter > div { display: flex; flex-direction: column; gap: 2px; }
.meter > div:last-child { text-align: right; }
.meter-label { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.meter-value { font-size: 26px; font-weight: 600; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.meter-value.zero { color: var(--accent); text-shadow: 0 0 24px rgba(157, 255, 176, .45); }
.meter-sep { width: 1px; height: 40px; background: var(--border); }

/* Resultados */
.results { margin-top: 14px; }
.results-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 8px 8px 12px; font-size: 14px; color: var(--muted); }
.results-actions { display: flex; gap: 8px; }
.btn {
  border: 0; border-radius: 12px; padding: 10px 16px; font-size: 14px; font-weight: 500; cursor: pointer;
  transition: transform .15s, opacity .2s, background .2s;
}
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.btn.primary { background: var(--accent); color: #062310; }
.btn.primary:not(:disabled):hover { background: #b8ffc6; }
.btn.ghost { background: var(--panel-strong); color: var(--text); }
.btn.ghost:hover { background: rgba(255, 255, 255, .12); }

.list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.item {
  display: grid; grid-template-columns: 52px 1fr auto; align-items: center; gap: 14px;
  padding: 10px; border-radius: 16px; background: var(--panel); border: 1px solid var(--border);
  animation: in .35s cubic-bezier(.2, .8, .2, 1) both;
}
@keyframes in { from { opacity: 0; transform: translateY(8px); } }
.thumb { width: 52px; height: 52px; border-radius: 11px; object-fit: cover; background: var(--panel-strong); }
.thumb.loading { background: linear-gradient(90deg, rgba(255,255,255,.04), rgba(255,255,255,.12), rgba(255,255,255,.04)); background-size: 200% 100%; animation: shimmer 1.2s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
.info { min-width: 0; }
.name { font-size: 14px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.meta { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.meta .ok { color: var(--accent); }
.meta .err { color: var(--danger); }
.dl {
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; border: 0; cursor: pointer;
  color: var(--accent); background: rgba(157, 255, 176, .1); text-decoration: none; transition: background .2s;
}
.dl:hover { background: rgba(157, 255, 176, .2); }
.spinner { width: 20px; height: 20px; margin: 10px; border-radius: 50%; border: 2px solid rgba(255,255,255,.15); border-top-color: var(--accent); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ============ Secciones informativas ============ */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 96px 0 0; }
.card { padding: 26px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--border); }
.card-icon { font-size: 26px; margin-bottom: 14px; }
.card h3 { margin: 0 0 6px; font-size: 18px; font-weight: 600; letter-spacing: -.02em; }
.card p { margin: 0; color: var(--muted); font-size: 15px; }

h2 { font-size: clamp(28px, 4.5vw, 44px); letter-spacing: -.04em; font-weight: 600; line-height: 1.1; margin: 0 0 28px; text-align: center; text-wrap: balance; }
.compare { margin-top: 110px; }
.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--border); background: var(--panel); }
table { width: 100%; border-collapse: collapse; font-size: 15px; min-width: 520px; }
th, td { padding: 16px 20px; text-align: left; border-bottom: 1px solid var(--border); }
tr:last-child td { border-bottom: 0; }
th { font-size: 13px; color: var(--muted); font-weight: 500; }
th.us { color: var(--accent); }
td.us { background: rgba(157, 255, 176, .04); }
.yes { color: var(--accent); font-weight: 500; }
.no { color: var(--muted); }

.faq { max-width: 760px; margin: 110px auto 0; }
details { border-bottom: 1px solid var(--border); }
summary { list-style: none; cursor: pointer; padding: 20px 4px; font-size: 17px; font-weight: 500; display: flex; justify-content: space-between; gap: 16px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; color: var(--accent); font-size: 22px; line-height: 1; transition: transform .25s; }
details[open] summary::after { transform: rotate(45deg); }
details p { margin: 0 4px 20px; color: var(--muted); }

/* Cómo convertir: 3 pasos reales, por eso van numerados */
.howto { margin-top: 110px; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; counter-reset: step; }
.steps li { counter-increment: step; padding: 26px; border-top: 1px solid var(--border); }
.steps li::before {
  content: counter(step); display: block; margin-bottom: 14px;
  font-family: var(--serif); font-style: italic; font-size: 44px; line-height: 1; color: var(--accent);
}
.steps h3 { margin: 0 0 6px; font-size: 18px; font-weight: 600; letter-spacing: -.02em; }
.steps p { margin: 0; color: var(--muted); font-size: 15px; }
.steps strong { color: var(--text); font-weight: 500; }

/* HEIC vs JPG */
.versus { max-width: 860px; margin: 110px auto 0; }
.versus-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.versus-grid > div { padding: 26px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--border); }
.versus-grid h3 { margin: 0 0 8px; font-size: 22px; letter-spacing: -.02em; }
.versus-grid > div:last-child h3 { color: var(--accent); }
.versus-grid p { margin: 0; color: var(--muted); font-size: 15px; }
.versus-grid strong { color: var(--text); font-weight: 500; }
.versus-note { max-width: 620px; margin: 22px auto 0; text-align: center; color: var(--muted); }

.versus-note a, .legal a { color: var(--accent); text-underline-offset: 3px; }

/* Más herramientas: enlaces internos (ayudan a Google y al visitante) */
.tools { margin-top: 110px; }
.tools-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.tool-card {
  display: flex; flex-direction: column; gap: 4px; padding: 20px 22px; border-radius: 18px;
  background: var(--panel); border: 1px solid var(--border); color: var(--text); text-decoration: none;
  transition: border-color .2s, background .2s, transform .2s;
}
.tool-card:hover { border-color: rgba(157, 255, 176, .4); background: rgba(157, 255, 176, .05); transform: translateY(-2px); }
.tool-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.tool-card strong { font-size: 17px; font-weight: 600; letter-spacing: -.02em; }
.tool-card strong::after { content: " →"; color: var(--accent); }
.tool-card span { font-size: 14px; color: var(--muted); }

@media (max-width: 900px) { .tools-grid { grid-template-columns: repeat(2, 1fr); } }

.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 18px; max-width: 640px; margin: 0 auto; }

/* Página legal */
.legal { max-width: 700px; padding-top: 40px; }
.legal h1 { font-size: clamp(36px, 6vw, 56px); }
.legal h2 { text-align: left; font-size: 22px; letter-spacing: -.02em; margin: 40px 0 10px; }
.legal p { color: var(--muted); font-size: 16px; margin: 0 0 14px; }
.legal strong { color: var(--text); font-weight: 500; }
.updated { font-size: 14px !important; margin-top: 14px !important; }
.nav .btn { text-decoration: none; }

.footer { text-align: center; padding: 80px 20px 40px; color: var(--muted); font-size: 14px; }
.footer p { margin: 0 0 10px; }
.footer-links a { color: var(--muted); text-underline-offset: 3px; }
.footer-links a:hover { color: var(--accent); }

/* ============ Teléfono ============ */
@media (max-width: 720px) {
  .hero { padding: 36px 0 28px; }
  .features { grid-template-columns: 1fr; margin-top: 64px; }
  .compare, .faq, .howto, .versus, .tools { margin-top: 72px; }
  .tools-grid { grid-template-columns: 1fr; }
  .steps, .versus-grid { grid-template-columns: 1fr; }
  .steps li { padding: 20px 4px; }
  .only-desktop { display: none; }
  .only-mobile { display: inline; }
  .drop { min-height: 200px; }
  .meter { padding: 14px 16px; }
  .meter-value { font-size: 21px; }
  .status { font-size: 12px; }
  .controls { justify-content: center; }
  .controls > .format + .quality { margin-right: 0; }
  .pdf-options { justify-content: center; }
}
@media (max-width: 400px) {
  #netText { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
