/* Itervia web — tokens de docs/investigacion-diseno-2026-10.md §3 (morado de marca en
   escala accesible, un solo color de acción, chips con texto AA). Sin dependencias. */
:root {
  --brand-50: #F3ECF4;
  --brand-500: #966B9D;
  --brand-600: #7A4F82;
  --brand-800: #4A2F52;
  --bg: #F2F2F7;
  --surface: #FFFFFF;
  --ink: #1C1C1E;
  --muted: #6C6C70;
  --line: #E5E5EA;
  --action: var(--brand-600);
  --on-action: #FFFFFF;
  --perfect-bg: var(--brand-50);
  --perfect-ink: var(--brand-600);
  --shadow: 0 10px 30px rgba(60, 30, 70, .10);
  --radius: 22px;
  --gutter: 16px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #17121A; --surface: #211A24; --ink: #E9E4EC; --muted: #A79CAB; --line: #33293A;
    --action: #B79BBE; --on-action: #17121A; --perfect-bg: #2C2230; --perfect-ink: #C9A3D0;
    --shadow: 0 10px 30px rgba(0, 0, 0, .35); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #17121A; --surface: #211A24; --ink: #E9E4EC; --muted: #A79CAB; --line: #33293A;
  --action: #B79BBE; --on-action: #17121A; --perfect-bg: #2C2230; --perfect-ink: #C9A3D0;
  --shadow: 0 10px 30px rgba(0, 0, 0, .35); color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 17px/1.45 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", Roboto, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { line-height: 1.08; letter-spacing: -0.02em; margin: 0; }
.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: 560px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--action); outline-offset: 2px; border-radius: 8px; }

/* ----- barra superior */
.topbar { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid var(--line); }
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; height: 60px; gap: 12px; }
.mark { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 19px; text-decoration: none; }
.mark img { width: 34px; height: 34px; border-radius: 9px; background: #F7F7F9; }

/* ----- botones */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px;
  border-radius: 999px; border: 0; font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; white-space: nowrap; }
.btn-primary { background: var(--action); color: var(--on-action); }
.btn-ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--line); }
.btn-small { min-height: 38px; padding: 0 16px; font-size: 15px; }
.btn-block { width: 100%; }
.btn[aria-disabled="true"] { opacity: .55; cursor: default; }
.store-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ----- portada */
.hero { padding: 48px 0 32px; }
.hero .wrap { display: grid; gap: 36px; align-items: center; }
@media (min-width: 860px) { .hero .wrap { grid-template-columns: 1.1fr .9fr; } .hero { padding: 72px 0 56px; } }
.kicker { display: inline-block; background: var(--perfect-bg); color: var(--perfect-ink); font-weight: 700; font-size: 14px;
  letter-spacing: .04em; text-transform: uppercase; padding: 6px 12px; border-radius: 999px; }
.hero h1 { font-size: clamp(44px, 10vw, 84px); font-weight: 800; margin: 18px 0 16px; }
.hero h1 em { font-style: normal; color: var(--action); }
.hero p.lead { font-size: clamp(18px, 2.4vw, 22px); color: var(--muted); max-width: 34ch; margin: 0 0 28px; }
.hero .fine { margin-top: 14px; font-size: 14px; color: var(--muted); }
.hero-card { max-width: 380px; width: 100%; justify-self: center; }

section.block { padding: 44px 0; }
.block h2 { font-size: clamp(30px, 5vw, 44px); font-weight: 800; }
.block .sub { color: var(--muted); margin: 10px 0 24px; max-width: 52ch; }
.steps { display: grid; gap: 14px; margin-top: 24px; }
@media (min-width: 760px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.step { background: var(--surface); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.step b { display: block; font-size: 19px; margin: 10px 0 6px; }
.step span.n { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
  background: var(--perfect-bg); color: var(--perfect-ink); font-weight: 800; }
.step p { margin: 0; color: var(--muted); }

.band { background: var(--brand-800); color: #fff; border-radius: 28px; padding: 32px 24px; display: grid; gap: 18px; }
@media (min-width: 760px) { .band { grid-template-columns: 1.3fr 1fr; align-items: center; padding: 44px; } }
.band h2 { color: #fff; }
.band p { margin: 0; color: #E3D6E6; }
.band .btn-primary { background: #fff; color: var(--brand-800); }

.promise { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); margin-top: 20px; }
.promise div { background: var(--surface); border-radius: 18px; padding: 16px 18px; font-weight: 600; }
.promise div small { display: block; font-weight: 400; color: var(--muted); margin-top: 4px; }

/* ----- grid tipo perfil de Instagram */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; border-radius: 16px; overflow: hidden; }
@media (min-width: 760px) { .grid { gap: 6px; } }
.tile { position: relative; aspect-ratio: 4 / 5; background: var(--line); overflow: hidden; display: block; text-decoration: none; color: #fff; }
.tile img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.tile:hover img { transform: scale(1.03); }
.tile .cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 22px 8px 8px; font-size: 13px; font-weight: 700; line-height: 1.2;
  background: linear-gradient(transparent, rgba(0,0,0,.72)); }
.tile .cap small { display: block; font-weight: 500; opacity: .85; }
.tile.gate { display: grid; place-items: center; text-align: center; padding: 10px; background: var(--brand-600); color: #fff; font-weight: 700; font-size: 14px; border: 0; font-family: inherit; cursor: pointer; }
.tile.gate span { display: block; font-size: 26px; margin-bottom: 4px; }
.tile.skeleton { animation: pulse 1.2s ease-in-out infinite alternate; }
@keyframes pulse { from { opacity: .55; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .tile.skeleton { animation: none; } .tile img { transition: none; } }

/* ----- publicación (lugar) */
.post { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.post-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; }
.avatar { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; background: var(--perfect-bg); flex: none; display: grid; place-items: center;
  font-weight: 800; color: var(--perfect-ink); overflow: hidden; }
.who { flex: 1; min-width: 0; line-height: 1.2; }
.who a, .who b { font-weight: 700; text-decoration: none; font-size: 15px; }
.who small { display: block; color: var(--muted); font-size: 13px; }
.badge { display: inline-block; margin-left: 4px; font-size: 11px; font-weight: 800; color: var(--perfect-ink); background: var(--perfect-bg);
  border-radius: 6px; padding: 2px 6px; vertical-align: 2px; }
.media { position: relative; aspect-ratio: 4 / 5; background: var(--line); }
.slides { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; height: 100%; scrollbar-width: none; }
.slides::-webkit-scrollbar { display: none; }
.slides > * { flex: 0 0 100%; scroll-snap-align: center; height: 100%; }
.slides img { width: 100%; height: 100%; object-fit: cover; }
.slides .more { display: grid; place-items: center; text-align: center; background: var(--brand-800); color: #fff; padding: 24px; }
.slides .more b { font-size: 22px; display: block; margin: 8px 0; }
.dots { position: absolute; left: 0; right: 0; bottom: 10px; display: flex; justify-content: center; gap: 6px; pointer-events: none; }
.dots i { width: 7px; height: 7px; border-radius: 50%; background: rgba(255,255,255,.55); }
.dots i.on { background: #fff; }
.actions { display: flex; align-items: center; gap: 4px; padding: 6px 8px 0; }
.icon-btn { width: 44px; height: 44px; display: grid; place-items: center; border: 0; background: transparent; color: var(--ink); cursor: pointer; border-radius: 12px; }
.icon-btn svg { width: 26px; height: 26px; }
.icon-btn:hover { background: var(--perfect-bg); }
.actions .spacer { flex: 1; }
.social-proof { padding: 0 16px; font-size: 14px; font-weight: 600; }
.post-body { padding: 8px 16px 18px; }
.post-body h1 { font-size: 28px; font-weight: 800; }
.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 10px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 10px; font-size: 14px; font-weight: 600; }
.price { background: #E3F7E8; color: #1B6B33; }
.perfect { margin-top: 14px; background: var(--perfect-bg); color: var(--perfect-ink); border-radius: 14px; padding: 12px 14px; font-size: 17px; }
.perfect b { font-weight: 800; }
.desc { margin: 14px 0 0; }
.zone { color: var(--muted); font-size: 15px; margin-top: 12px; }
.locked { margin-top: 14px; display: flex; gap: 10px; align-items: center; padding: 12px 14px; border: 1.5px dashed var(--line); border-radius: 14px; color: var(--muted); font-size: 15px; cursor: pointer; background: none; width: 100%; font: inherit; text-align: left; }

/* ----- perfil */
.profile { display: flex; gap: 18px; align-items: center; padding: 26px 0 10px; }
.profile .avatar { width: 86px; height: 86px; font-size: 32px; }
.profile h1 { font-size: 24px; font-weight: 800; }
.profile .handle { color: var(--muted); }
.stats { display: flex; gap: 22px; margin: 14px 0 18px; }
.stats b { display: block; font-size: 19px; }
.stats span { color: var(--muted); font-size: 13px; }

/* ----- barra fija inferior (móvil) */
.sticky-cta { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; padding: 10px var(--gutter) calc(10px + env(safe-area-inset-bottom));
  background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--line); display: flex; align-items: center; gap: 12px; }
.sticky-cta img { width: 40px; height: 40px; border-radius: 10px; background: #F7F7F9; flex: none; }
.sticky-cta div { flex: 1; min-width: 0; font-size: 14px; line-height: 1.25; }
.sticky-cta b { display: block; font-size: 15px; }
.has-sticky { padding-bottom: 96px; }

/* ----- hoja "esto se hace en la app" */
.sheet-backdrop { position: fixed; inset: 0; z-index: 50; background: rgba(10, 5, 12, .5); display: none; }
.sheet-backdrop.open { display: block; }
.sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 51; background: var(--surface); border-radius: 26px 26px 0 0;
  padding: 10px 20px calc(24px + env(safe-area-inset-bottom)); transform: translateY(105%); transition: transform .25s ease; max-width: 560px; margin: 0 auto; }
.sheet.open { transform: none; }
@media (prefers-reduced-motion: reduce) { .sheet { transition: none; } }
.sheet .grab { width: 40px; height: 5px; border-radius: 3px; background: var(--line); margin: 0 auto 16px; }
.sheet img.logo { width: 64px; height: 64px; border-radius: 16px; background: #F7F7F9; }
.sheet h2 { font-size: 24px; margin: 14px 0 6px; }
.sheet p { color: var(--muted); margin: 0 0 18px; }
.sheet .stack { display: grid; gap: 10px; }

/* ----- varios */
.notice { background: #FFF4D6; color: #6B4E00; border-radius: 12px; padding: 10px 14px; font-size: 14px; margin: 12px 0; }
.empty { text-align: center; padding: 60px 10px; color: var(--muted); }
.empty h1 { color: var(--ink); font-size: 28px; margin-bottom: 8px; }
footer { padding: 40px 0 56px; color: var(--muted); font-size: 14px; }
footer nav { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-bottom: 12px; }
footer a { text-decoration: none; }
footer a:hover { text-decoration: underline; }

/* ----- escritorio: el grid no crece más que un perfil de Instagram y la barra fija sobra */
@media (min-width: 860px) {
  #featured { max-width: 760px; }
  .sticky-cta { display: none; }
  .has-sticky { padding-bottom: 0; }
}

/* ----- páginas de texto (privacidad, soporte, eliminar cuenta) */
.doc { padding-top: 28px; padding-bottom: 8px; }
.doc h1 { font-size: clamp(32px, 6vw, 44px); font-weight: 800; margin-bottom: 8px; }
.doc .updated { color: var(--muted); font-size: 15px; margin: 0 0 24px; }
.doc h2 { font-size: 22px; font-weight: 800; margin: 32px 0 10px; }
.doc p, .doc li { max-width: 68ch; }
.doc ul, .doc ol { padding-left: 22px; }
.doc li { margin: 6px 0; }
.doc a { color: var(--action); font-weight: 600; }
.doc .card { background: var(--surface); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow); margin: 16px 0; }
.doc table { border-collapse: collapse; width: 100%; font-size: 15px; }
.doc th, .doc td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.doc details { background: var(--surface); border-radius: 16px; padding: 14px 18px; margin: 10px 0; box-shadow: var(--shadow); }
.doc summary { font-weight: 700; cursor: pointer; }
.doc details p { margin: 10px 0 0; color: var(--muted); }
