/* mmtik.online — estilos (lenguaje visual inspirado en las HIG de Apple) */
:root {
  --bg: #f5f5f7;
  --surface: #ffffff;
  --surface-2: #f2f2f4;
  --ink: #1d1d1f;
  --ink-2: #6e6e73;
  --line: rgba(0, 0, 0, 0.09);
  --fill: rgba(118, 118, 128, 0.12);
  --accent: #5b3df5;
  --accent-hover: #4a2ee0;
  --accent-ring: rgba(91, 61, 245, 0.18);
  --accent-soft: rgba(91, 61, 245, 0.08);
  --on-accent: #ffffff;
  --green: #1a7f37;  --green-bg: rgba(26, 127, 55, 0.10);
  --amber: #a35400;  --amber-bg: rgba(163, 84, 0, 0.10);
  --red: #c4231a;    --red-bg: rgba(196, 35, 26, 0.08);
  --glass: rgba(255, 255, 255, 0.72);
  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.04), 0 4px 14px rgba(0, 0, 0, 0.05);
  --shadow-2: 0 2px 6px rgba(0, 0, 0, 0.05), 0 18px 40px rgba(0, 0, 0, 0.08);
  --r-sm: 10px; --r-field: 12px; --r: 18px; --r-lg: 24px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue", "Segoe UI", Roboto, Arial, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #000000; --surface: #1c1c1e; --surface-2: #232326;
    --ink: #f5f5f7; --ink-2: #a1a1a6;
    --line: rgba(255, 255, 255, 0.12); --fill: rgba(118, 118, 128, 0.24);
    --accent: #9b8cff; --accent-hover: #b2a6ff; --accent-ring: rgba(155, 140, 255, 0.28); --accent-soft: rgba(155, 140, 255, 0.12);
    --on-accent: #0b0820;
    --green: #30d158; --green-bg: rgba(48, 209, 88, 0.14);
    --amber: #ffb340; --amber-bg: rgba(255, 179, 64, 0.14);
    --red: #ff6961;   --red-bg: rgba(255, 105, 97, 0.14);
    --glass: rgba(22, 22, 23, 0.72);
    --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.5); --shadow-2: 0 18px 40px rgba(0, 0, 0, 0.6);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #000000; --surface: #1c1c1e; --surface-2: #232326;
  --ink: #f5f5f7; --ink-2: #a1a1a6;
  --line: rgba(255, 255, 255, 0.12); --fill: rgba(118, 118, 128, 0.24);
  --accent: #9b8cff; --accent-hover: #b2a6ff; --accent-ring: rgba(155, 140, 255, 0.28); --accent-soft: rgba(155, 140, 255, 0.12);
  --on-accent: #0b0820;
  --green: #30d158; --green-bg: rgba(48, 209, 88, 0.14);
  --amber: #ffb340; --amber-bg: rgba(255, 179, 64, 0.14);
  --red: #ff6961;   --red-bg: rgba(255, 105, 97, 0.14);
  --glass: rgba(22, 22, 23, 0.72);
  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.5); --shadow-2: 0 18px 40px rgba(0, 0, 0, 0.6);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font); font-size: 17px; line-height: 1.47; letter-spacing: -0.012em;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--accent); }
button, input { font: inherit; letter-spacing: inherit; }
.tnum { font-variant-numeric: tabular-nums; }

.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 32px; } }
.prose { max-width: 72ch; }

.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 60; background: var(--accent); color: var(--on-accent); padding: 10px 16px; border-radius: 999px; font-weight: 600; text-decoration: none; }
.skip:focus { top: 12px; }
:focus-visible { outline: 3px solid var(--accent-ring); outline-offset: 2px; border-radius: 8px; }

/* ---------- Barra de vidrio ---------- */
.topbar {
  position: sticky; top: 0; z-index: 40;
  background: var(--glass);
  -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--line);
}
.topbar__inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 56px; }
.brand { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; color: var(--ink); }
.brand__mark { width: 30px; height: 30px; color: var(--accent); flex: none; }
.brand__name { font-weight: 700; font-size: 1.12rem; letter-spacing: -0.03em; }
.brand__tld { color: var(--ink-2); font-weight: 500; }
.topbar__right { display: flex; align-items: center; gap: 6px; }
.nav { display: none; gap: 22px; margin-right: 10px; font-size: 0.88rem; }
.nav a { color: var(--ink-2); text-decoration: none; transition: color .15s ease; }
.nav a:hover { color: var(--ink); }
@media (min-width: 760px) { .nav { display: flex; } }

.iconbtn {
  display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 999px;
  border: 0; background: transparent; color: var(--ink); cursor: pointer; transition: background .15s ease;
}
.iconbtn:hover { background: var(--fill); }
.iconbtn svg { width: 19px; height: 19px; }

/* Selector de idioma */
.lang { position: relative; }
.lang summary {
  list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 6px;
  min-height: 40px; padding: 0 12px; border-radius: 999px; font-size: 0.86rem; font-weight: 600;
  color: var(--ink); transition: background .15s ease;
}
.lang summary::-webkit-details-marker { display: none; }
.lang summary:hover, .lang[open] summary { background: var(--fill); }
.lang summary svg { width: 17px; height: 17px; }
.lang__menu {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 190px; padding: 6px; margin: 0; list-style: none;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-2);
}
.lang__menu a {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: var(--r-sm); color: var(--ink); text-decoration: none; font-size: 0.94rem;
}
.lang__menu a:hover { background: var(--fill); }
.lang__menu a[aria-current="true"] { font-weight: 600; }
.lang__menu a[aria-current="true"]::after { content: "✓"; color: var(--accent); }

/* Aviso de idioma sugerido */
.langbar { background: var(--surface); border-bottom: 1px solid var(--line); font-size: 0.92rem; }
.langbar__inner { display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap; min-height: 48px; padding: 6px 0; }
.langbar a { font-weight: 600; text-decoration: none; padding: 6px 14px; border-radius: 999px; background: var(--accent); color: var(--on-accent); }
.langbar button { border: 0; background: var(--fill); color: var(--ink); width: 32px; height: 32px; border-radius: 999px; cursor: pointer; }

/* ---------- Hero ---------- */
.hero { padding: 56px 0 40px; text-align: center; }
@media (min-width: 720px) { .hero { padding: 88px 0 56px; } }
.eyebrow {
  display: inline-flex; align-items: center; gap: 9px; margin: 0 0 20px; padding: 6px 14px;
  border-radius: 999px; background: var(--surface); border: 1px solid var(--line);
  font-size: 0.84rem; color: var(--ink-2); box-shadow: var(--shadow-1);
}
.live { position: relative; width: 8px; height: 8px; border-radius: 50%; background: var(--green); flex: none; }
.live::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--green); animation: ping 1.8s ease-out infinite; }
@keyframes ping { 0% { transform: scale(1); opacity: .6; } 80%, 100% { transform: scale(2.6); opacity: 0; } }

h1, .h1 {
  font-size: clamp(2rem, 4.6vw, 3.4rem); line-height: 1.07; letter-spacing: -0.03em; font-weight: 700;
  margin: 0 auto 16px; max-width: 18ch;
}
h1 em { font-style: normal; color: var(--accent); }
.hero__lead { color: var(--ink-2); font-size: clamp(1.02rem, 2vw, 1.2rem); max-width: 52ch; margin: 0 auto 32px; }

/* ---------- Buscador ---------- */
.grab {
  display: flex; flex-direction: column; gap: 8px; max-width: 760px; margin: 0 auto; padding: 8px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-2);
}
@media (min-width: 640px) { .grab { flex-direction: row; align-items: center; } }
.grab__field {
  flex: 1; display: flex; align-items: center; min-height: 52px; border-radius: var(--r-field);
  background: var(--surface-2); transition: box-shadow .15s ease;
}
.grab__field:focus-within { box-shadow: 0 0 0 4px var(--accent-ring); }
.grab__icon { width: 20px; height: 20px; margin-left: 14px; color: var(--ink-2); flex: none; }
.grab__field input { flex: 1; min-width: 0; height: 52px; padding: 0 8px 0 10px; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 1rem; }
.grab__field input::placeholder { color: var(--ink-2); opacity: .8; }
.grab__paste {
  flex: none; margin-right: 6px; min-height: 40px; padding: 0 14px; border-radius: 999px; border: 0;
  background: var(--fill); color: var(--ink); font-weight: 600; font-size: 0.88rem; cursor: pointer; transition: background .15s ease;
}
.grab__paste:hover { background: var(--line); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 0 28px;
  border-radius: 999px; border: 0; cursor: pointer; text-decoration: none; font-weight: 600; font-size: 1rem;
  background: var(--accent); color: var(--on-accent); transition: background .15s ease, transform .12s ease;
}
.btn:hover { background: var(--accent-hover); }
.btn:active { transform: scale(.98); }
.btn svg { width: 19px; height: 19px; }
.btn[disabled] { cursor: progress; opacity: .8; }
.btn.is-loading svg { display: none; }
.btn.is-loading::after { content: ""; width: 17px; height: 17px; border-radius: 50%; border: 2.5px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.grab__msg { min-height: 1.5em; margin: 14px auto 0; max-width: 760px; font-size: 0.94rem; color: var(--ink-2); }
.grab__msg.is-error { color: var(--red); }
.grab__msg.is-ok { color: var(--green); }

/* ---------- Resultado ---------- */
.result {
  max-width: 760px; margin: 16px auto 0; text-align: left; padding: 16px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-2);
  animation: rise .2s ease;
}
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.result__top { display: grid; grid-template-columns: 96px 1fr; gap: 16px; }
@media (min-width: 560px) { .result__top { grid-template-columns: 136px 1fr; } }
.result__cover { width: 100%; aspect-ratio: 9 / 13; object-fit: cover; border-radius: var(--r-field); background: var(--surface-2); }
.result__author { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.result__avatar { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; background: var(--surface-2); }
.result__nick { font-weight: 600; line-height: 1.2; }
.result__user { color: var(--ink-2); font-size: 0.85rem; }
.result__title { margin: 0 0 10px; color: var(--ink); font-size: 0.94rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

.settings { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.settings li { display: flex; justify-content: space-between; gap: 12px; padding: 9px 12px; background: var(--surface-2); font-size: 0.88rem; }
.settings li:first-child { border-radius: 12px 12px 0 0; }
.settings li:last-child { border-radius: 0 0 12px 12px; }
.settings li:only-child { border-radius: 12px; }
.settings span { color: var(--ink-2); }
.settings strong { font-weight: 600; font-variant-numeric: tabular-nums; }

.result__actions { display: grid; gap: 8px; margin-top: 16px; }
@media (min-width: 560px) { .result__actions { grid-template-columns: 1fr 1fr; } }
.dl {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; padding: 10px 18px;
  border-radius: 999px; text-decoration: none; font-weight: 600; color: var(--ink);
  background: var(--fill); transition: background .15s ease, transform .12s ease;
}
.dl small { display: block; font-weight: 400; color: var(--ink-2); font-size: 0.78rem; font-variant-numeric: tabular-nums; }
.dl svg { width: 20px; height: 20px; flex: none; }
.dl:hover { background: var(--line); }
.dl:active { transform: scale(.99); }
.dl--primary { background: var(--accent); color: var(--on-accent); }
.dl--primary small { color: inherit; opacity: .8; }
.dl--primary:hover { background: var(--accent-hover); }

.result__images { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; margin-top: 16px; }
.shot { position: relative; border-radius: var(--r-field); overflow: hidden; background: var(--surface-2); }
.shot img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; }
.shot a { position: absolute; left: 6px; right: 6px; bottom: 6px; text-align: center; padding: 7px; background: var(--accent); color: var(--on-accent); border-radius: 999px; font-weight: 600; font-size: 0.8rem; text-decoration: none; }
.result__again { display: block; width: 100%; margin-top: 10px; min-height: 44px; border-radius: 999px; background: transparent; border: 1px solid var(--line); color: var(--ink-2); font-weight: 500; cursor: pointer; transition: color .15s ease, background .15s ease; }
.result__again:hover { color: var(--ink); background: var(--fill); }

/* ---------- Respuesta rápida (AEO) ---------- */
.answer {
  max-width: 760px; margin: 28px auto 0; text-align: left; padding: 16px 18px;
  background: var(--accent-soft); border-radius: var(--r); font-size: 0.97rem;
}
.answer__label { display: block; font-size: 0.76rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--accent); margin-bottom: 4px; }
.answer p { margin: 0; }
.answer time { color: var(--ink-2); font-size: 0.82rem; display: block; margin-top: 6px; }

/* ---------- Secciones ---------- */
.section { padding: 56px 0; }
@media (min-width: 720px) { .section { padding: 72px 0; } }
.section--alt { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.4rem); line-height: 1.1; letter-spacing: -0.028em; font-weight: 700; margin: 0 0 12px; max-width: 28ch; }
.section__lead { color: var(--ink-2); margin: 0 0 28px; max-width: 72ch; }

.cards { display: grid; gap: 14px; margin: 0; padding: 0; list-style: none; }
@media (min-width: 640px) { .cards--2 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .cards--3 { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 640px) and (max-width: 899px) { .cards--3 { grid-template-columns: repeat(2, 1fr); } }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 22px;
  box-shadow: var(--shadow-1); transition: transform .18s ease, box-shadow .18s ease;
}
.section--alt .card { background: var(--bg); }
.card:hover { transform: translateY(-1px); box-shadow: var(--shadow-2); }
.card h3 { margin: 0 0 6px; font-size: 1.06rem; letter-spacing: -0.02em; }
.card p { margin: 0; color: var(--ink-2); font-size: 0.95rem; }
.step-n { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 999px; background: var(--accent); color: var(--on-accent); font-weight: 700; font-size: 0.9rem; margin-bottom: 12px; font-variant-numeric: tabular-nums; }
.perk-ico { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); margin-bottom: 12px; }
.perk-ico svg { width: 20px; height: 20px; }

/* Tabla de formatos */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: 0.94rem; min-width: 520px; }
th, td { text-align: left; padding: 13px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 0.8rem; font-weight: 600; color: var(--ink-2); background: var(--surface-2); }
tr:last-child td { border-bottom: 0; }
td:first-child { font-weight: 600; white-space: nowrap; }

/* FAQ */
.faq { max-width: 820px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; position: relative; padding: 18px 44px 18px 0; font-weight: 600; font-size: 1.04rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 2px; top: 50%; width: 28px; height: 28px; margin-top: -14px;
  display: grid; place-items: center; border-radius: 999px; background: var(--fill); color: var(--ink);
  font-size: 1.2rem; font-weight: 400; line-height: 1; transition: transform .2s ease;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 0 0 18px; color: var(--ink-2); max-width: 72ch; }

/* Migas */
.crumbs { font-size: 0.84rem; color: var(--ink-2); padding-top: 24px; }
.crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.crumbs li + li::before { content: "›"; margin-right: 6px; color: var(--ink-2); }
.crumbs a { color: var(--ink-2); text-decoration: none; }
.crumbs a:hover { color: var(--ink); }

/* Páginas de texto */
.page { padding: 24px 0 72px; }
.page h1 { margin: 12px 0 8px; max-width: none; }
.page h2 { font-size: 1.24rem; margin: 32px 0 8px; }
.page p, .page li { color: var(--ink-2); max-width: 72ch; }
.page .updated { font-size: 0.88rem; margin: 0 0 28px; }

/* ---------- Pie ---------- */
.foot { padding: 40px 0 32px; font-size: 0.84rem; color: var(--ink-2); border-top: 1px solid var(--line); }
.foot__grid { display: grid; gap: 24px; }
@media (min-width: 760px) { .foot__grid { grid-template-columns: 1.4fr 1fr 1fr; } }
.foot h2 { font-size: 0.8rem; font-weight: 600; color: var(--ink); letter-spacing: 0; margin: 0 0 10px; }
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.foot a { color: var(--ink-2); text-decoration: none; }
.foot a:hover { color: var(--ink); text-decoration: underline; }
.foot__brand { font-weight: 700; color: var(--ink); font-size: 1rem; letter-spacing: -0.02em; margin: 0 0 8px; }
.foot__note { margin: 0; max-width: 60ch; }
.foot__copy { margin: 28px 0 0; padding-top: 16px; border-top: 1px solid var(--line); }
.foot__langs { display: flex; flex-wrap: wrap; gap: 6px 14px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* Logo: el trazo interior sigue el contraste del acento en claro y oscuro */
.brand__mark path { stroke: var(--on-accent); }
