/* =============================================================
   Sensi360 — hoja de estilos única
   1 Tokens · 2 Reset · 3 Utilidades · 4 Botones · 5 Cabecera
   6 Hero · 7 Herramienta · 8 Resultado · 9 Tabla comparativa
   10 Anuncios · 11 Contenido · 12 FAQ · 13 Más herramientas
   14 Footer · 15 Responsive · 16 Reduced-motion
   ============================================================= */

/* ===================== 1. TOKENS ===================== */
:root {
  --bg: #0a0c12;
  --surface: #12151f;
  --surface-2: #171b28;
  --ink: #f1f3f9;
  --ink-2: #c7cbdb;
  --muted: #8992a8;
  --line: #262b3d;
  --line-2: #1c2032;
  --accent: #8b5cf6;
  --accent-2: #22d3ee;
  --accent-ink: #0a0c12;
  --accent-soft: rgba(139, 92, 246, .14);
  --dest-soft: rgba(34, 211, 238, .14);
  --ok: #34d399;
  --warn: #f5b942;
  --bad: #f2596b;

  --radius: 14px;
  --radius-sm: 10px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);
  --shadow: 0 8px 24px -8px rgba(0, 0, 0, .5), 0 1px 3px rgba(0, 0, 0, .3);
  --shadow-lg: 0 28px 64px -24px rgba(0, 0, 0, .6), 0 6px 20px -8px rgba(0, 0, 0, .35);
  --ease-out: cubic-bezier(.16, 1, .3, 1);

  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: "Rajdhani", var(--sans);
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --gutter: clamp(1rem, 4vw, 2rem);
  --maxw: 1080px;
}

/* ===================== 2. RESET ===================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 5rem; }
body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  background-image:
    radial-gradient(640px 400px at 90% -6%, color-mix(in srgb, var(--accent) 20%, transparent), transparent 62%),
    radial-gradient(560px 380px at -8% 14%, color-mix(in srgb, var(--accent-2) 14%, transparent), transparent 60%),
    radial-gradient(520px 420px at 100% 60%, color-mix(in srgb, var(--accent) 10%, transparent), transparent 60%);
  background-repeat: no-repeat;
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img, svg, canvas, video { display: block; max-width: 100%; }
img { height: auto; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
p { text-wrap: pretty; }
h1, h2, h3 { text-wrap: balance; line-height: 1.08; letter-spacing: -.01em; font-weight: 700; font-family: var(--display); }
::selection { background: var(--accent); color: #fff; }
:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; border-radius: 6px; }
details > summary { cursor: pointer; list-style: none; }
details > summary::-webkit-details-marker { display: none; }

/* ===================== 3. UTILIDADES ===================== */
.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.container + .container { margin-top: clamp(2rem, 5vw, 3.5rem); }
.skip-link {
  position: fixed; top: -100px; left: 1rem; z-index: 999;
  padding: .6rem 1rem; background: var(--accent); color: #fff;
  border-radius: 8px; font-weight: 600;
}
.skip-link:focus { top: 1rem; }
.section-sub { color: var(--muted); margin-top: .35rem; margin-bottom: 1.25rem; max-width: 62ch; }
.section-tint { background: color-mix(in srgb, var(--surface) 55%, transparent); border-block: 1px solid var(--line-2); }
.noscript-note {
  background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1rem 1.2rem; color: var(--ink-2); margin-bottom: 1rem;
}

/* ===================== 4. BOTONES ===================== */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .7rem 1.15rem; border-radius: var(--radius-sm);
  font-weight: 600; font-size: .93rem;
  transition: background .2s var(--ease-out), color .2s var(--ease-out), border-color .2s var(--ease-out);
}
.copy-btn {
  display: inline-grid; place-items: center; width: 28px; height: 28px;
  border-radius: 8px; color: var(--muted); flex-shrink: 0;
  transition: color .18s var(--ease-out), background .18s var(--ease-out);
}
.copy-btn:hover { color: var(--ink); background: var(--surface-2); }
.copy-btn.is-copied { color: var(--ok); }

/* ===================== 5. CABECERA ===================== */
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; height: 60px; }
.brand { display: inline-flex; align-items: center; gap: .55rem; font-weight: 800; letter-spacing: -.01em; }
.brand-mark {
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px;
  background: linear-gradient(145deg, var(--accent), var(--accent-2)); color: var(--accent-ink);
}
.brand-name { font-size: 1.15rem; font-family: var(--display); letter-spacing: .01em; }
.site-nav { display: none; gap: 1.4rem; font-size: .92rem; font-weight: 500; color: var(--ink-2); }
.site-nav a { padding: .25rem 0; border-bottom: 2px solid transparent; transition: border-color .2s var(--ease-out), color .2s var(--ease-out); }
.site-nav a:hover { color: var(--accent-2); border-bottom-color: var(--accent-2); }
@media (min-width: 720px) { .site-nav { display: flex; } }

/* ===================== 6. HERO ===================== */
.hero { padding-block: clamp(1.75rem, 5vw, 3rem) 1.25rem; position: relative; }
.eyebrow {
  display: inline-flex; align-items: center; gap: .45rem;
  padding: .35rem .75rem; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent-2);
  font-size: .8rem; font-weight: 700; letter-spacing: .02em;
  border: 1px solid color-mix(in srgb, var(--accent-2) 35%, transparent);
  margin-bottom: 1rem;
}
.hero h1 { font-size: clamp(1.9rem, 4.6vw, 2.8rem); max-width: 20ch; }
.hero-sub { margin-top: .85rem; color: var(--ink-2); max-width: 62ch; font-size: 1.05rem; }

/* ===================== 7. HERRAMIENTA ===================== */
.tool-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: clamp(1.1rem, 3vw, 1.75rem); box-shadow: var(--shadow-lg);
}
.tool-dpi-row { display: flex; flex-direction: column; gap: .4rem; max-width: 220px; margin-bottom: 1.1rem; }
.tool-dpi-row label { font-size: .85rem; font-weight: 600; color: var(--ink-2); }
.tool-dpi-row input {
  background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: .65rem .8rem; font-family: var(--mono); font-size: 1rem; font-weight: 600;
}

.convert-grid {
  display: grid; grid-template-columns: 1fr auto 1fr; gap: 1rem; align-items: end;
}
.convert-col { display: flex; flex-direction: column; gap: .4rem; }
.convert-col label { font-size: .85rem; font-weight: 600; color: var(--ink-2); }
.convert-col select, .convert-col input {
  background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: .7rem .85rem; font-size: .98rem;
}
.convert-col select { font-weight: 600; }
.convert-col input { font-family: var(--mono); font-weight: 600; }
.convert-col select:focus, .convert-col input:focus { border-color: var(--accent-2); }

.swap-btn {
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
  color: var(--accent-2); align-self: center; margin-bottom: 2px;
  transition: transform .25s var(--ease-out), background .2s var(--ease-out);
}
.swap-btn:hover { background: color-mix(in srgb, var(--accent) 24%, transparent); transform: scale(1.06) rotate(180deg); }

.privacy-badge { margin-top: 1.25rem; color: var(--ok); font-size: .88rem; font-weight: 500; }
.honest-limit { margin-top: .4rem; color: var(--muted); font-size: .82rem; max-width: 68ch; }

/* ===================== 8. RESULTADO ===================== */
.result-box {
  margin-top: 1.4rem; padding: 1.1rem 1.3rem; border-radius: var(--radius);
  background: linear-gradient(150deg, var(--accent-soft), var(--dest-soft));
  border: 1px solid color-mix(in srgb, var(--accent-2) 30%, transparent);
}
.result-label { font-size: .88rem; color: var(--ink-2); font-weight: 500; }
.result-value { display: flex; align-items: center; gap: .6rem; margin-top: .25rem; }
.result-number {
  font-family: var(--mono); font-weight: 700; font-size: clamp(1.9rem, 6vw, 2.6rem);
  color: var(--ink); letter-spacing: -.01em; line-height: 1;
}
.result-sub { margin-top: .5rem; color: var(--muted); font-size: .88rem; font-family: var(--mono); }

/* ===================== 9. TABLA COMPARATIVA ===================== */
.table-filter {
  width: 100%; max-width: 320px; margin-bottom: .9rem;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: .6rem .85rem; font-size: .92rem;
}
.table-filter:focus { border-color: var(--accent-2); }
.cell-empty { color: var(--muted); text-align: center; padding: 1.4rem !important; }
.table-wrap {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  overflow-x: auto; box-shadow: var(--shadow);
}
.sens-table { width: 100%; border-collapse: collapse; min-width: 480px; }
.sens-table th {
  text-align: left; font-size: .78rem; text-transform: uppercase; letter-spacing: .04em;
  color: var(--muted); font-weight: 700; padding: .9rem 1.1rem; border-bottom: 1px solid var(--line);
}
.sens-table td { padding: .8rem 1.1rem; border-bottom: 1px solid var(--line-2); font-size: .96rem; }
.sens-table tr:last-child td { border-bottom: 0; }
.sens-table tr.is-origin { background: var(--accent-soft); }
.sens-table tr.is-dest { background: var(--dest-soft); }
.cell-game { font-weight: 600; display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.cell-sens { font-family: var(--mono); font-weight: 700; white-space: nowrap; }
.cell-sens { display: table-cell; }
.cell-sens .copy-btn { margin-left: .4rem; }
.cell-cm { color: var(--muted); font-family: var(--mono); white-space: nowrap; }
.row-tag {
  font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em;
  padding: .15rem .5rem; border-radius: 999px;
}
.row-tag--origin { background: color-mix(in srgb, var(--accent) 30%, transparent); color: var(--ink); }
.row-tag--dest { background: color-mix(in srgb, var(--accent-2) 30%, transparent); color: var(--ink); }

/* ===================== 10. ANUNCIOS ===================== */
.ad-slot {
  min-height: 90px; display: grid; place-items: center; gap: .2rem;
  border: 1px dashed var(--line); border-radius: var(--radius-sm);
  color: var(--muted); font-size: .78rem; text-align: center; padding: .75rem;
}
.ad-slot strong { font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.ad-slot--infeed { min-height: 250px; }

/* ===================== 11. CONTENIDO ===================== */
.prose-section { padding-block: clamp(2rem, 5vw, 3.25rem); }
.prose-section h2 { font-size: clamp(1.4rem, 3vw, 1.85rem); margin-bottom: 1.1rem; }
.prose-section p { color: var(--ink-2); margin-top: .9rem; max-width: 74ch; }
.how-it-works { list-style: none; display: grid; gap: .9rem; margin-bottom: 1.5rem; counter-reset: steps; }
.how-it-works li {
  counter-increment: steps; position: relative; padding-left: 2.4rem; color: var(--ink-2);
}
.how-it-works li::before {
  content: counter(steps); position: absolute; left: 0; top: -.1rem;
  width: 1.7rem; height: 1.7rem; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent-2); font-weight: 700; font-family: var(--mono); font-size: .85rem;
}
.how-it-works strong { color: var(--ink); }

h2 { font-size: clamp(1.4rem, 3vw, 1.85rem); margin-bottom: .5rem; }

/* ===================== 12. FAQ ===================== */
.faq-list { display: grid; gap: .6rem; }
.faq-item {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1rem 1.2rem;
}
.faq-item summary {
  font-weight: 600; display: flex; justify-content: space-between; align-items: center; gap: 1rem;
}
.faq-item summary::after { content: "+"; font-size: 1.3rem; color: var(--accent-2); flex-shrink: 0; }
.faq-item[open] summary::after { content: "−"; }
.faq-item p { margin-top: .7rem; color: var(--ink-2); }

/* ===================== 13. MÁS HERRAMIENTAS ===================== */
.more-tools { padding-block: clamp(2rem, 5vw, 3rem); }
.more-tools-grid { display: grid; gap: .9rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.more-tool-card {
  display: flex; flex-direction: column; gap: .35rem;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.1rem 1.2rem; transition: border-color .2s var(--ease-out), transform .2s var(--ease-out);
}
.more-tool-card:hover { border-color: var(--accent-2); transform: translateY(-2px); }
.more-tool-name { font-weight: 700; font-family: var(--display); font-size: 1.05rem; }
.more-tool-desc { color: var(--muted); font-size: .88rem; }

/* ===================== 14. FOOTER ===================== */
.site-footer { padding-block: 2rem; margin-top: clamp(2rem, 5vw, 3.5rem); border-top: 1px solid var(--line); }
.footer-inner { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; align-items: center; }
.footer-brand { color: var(--muted); font-size: .9rem; }
.footer-nav { display: flex; gap: 1.1rem; font-size: .88rem; color: var(--ink-2); }
.footer-nav a:hover { color: var(--accent-2); }

/* ===================== 15. RESPONSIVE ===================== */
@media (max-width: 539px) {
  .convert-grid { grid-template-columns: 1fr; }
  .swap-btn { justify-self: center; transform: rotate(90deg); margin-block: -.3rem; }
  .swap-btn:hover { transform: rotate(90deg) scale(1.06); }
}
@media (min-width: 720px) {
  .tool-dpi-row { max-width: 260px; }
}

/* ===================== 16. REDUCED-MOTION ===================== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .swap-btn { transition: none; }
  .swap-btn:hover { transform: none; }
}
