/* Emulsion · manual de usuario
   Misma estética que la app: negro, un único acento amarillo, etiquetas en mayúsculas con tracking. */

:root {
  color-scheme: dark;
  --bg: #000;
  --surface: rgba(255, 255, 255, 0.06);
  --surface-strong: rgba(255, 255, 255, 0.1);
  --line: rgba(255, 255, 255, 0.12);
  --text: #f5f5f7;
  --muted: rgba(245, 245, 247, 0.62);
  --faint: rgba(245, 245, 247, 0.4);
  --accent: #ffcc0a;
  --radius: 14px;
  --gutter: 20px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", system-ui, "Segoe UI", Roboto, sans-serif;
  --serif: ui-serif, "New York", "Iowan Old Style", Georgia, serif;
  --mono: ui-monospace, "SF Mono", Menlo, monospace;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 76px; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
a:focus-visible, summary:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

img { max-width: 100%; display: block; }

/* ---------- Barra superior ---------- */

.bar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 14px;
  height: 56px; padding: 0 var(--gutter);
  background: rgba(0, 0, 0, 0.72);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--line);
}
.bar .brand { display: flex; align-items: center; gap: 12px; color: var(--text); }
.bar .brand img { height: 17px; width: auto; }
.bar .brand:hover { text-decoration: none; }
.label {
  font-size: 11px; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted);
}
.bar .label { padding-left: 12px; border-left: 1px solid var(--line); }

/* ---------- Portada ---------- */

.hero { max-width: 1080px; margin: 0 auto; padding: 72px var(--gutter) 40px; }
.hero .label { color: var(--accent); }
.hero h1 {
  margin: 14px 0 18px;
  font-size: clamp(38px, 7vw, 68px); line-height: 1.04; letter-spacing: -0.03em; font-weight: 700;
  max-width: 14ch;
}
.hero p.lead { max-width: 56ch; margin: 0; font-size: clamp(18px, 2.2vw, 21px); color: var(--muted); line-height: 1.5; }

.start {
  display: grid; gap: 10px; margin: 40px 0 0; padding: 0; list-style: none;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}
.start a {
  display: block; height: 100%; padding: 18px 18px 20px;
  background: var(--surface); border-radius: var(--radius); color: var(--text);
  transition: background 0.2s;
}
.start a:hover { background: var(--surface-strong); text-decoration: none; }
.start .label { display: block; margin-bottom: 8px; }
.start strong { display: block; font-size: 19px; font-weight: 600; letter-spacing: -0.01em; }
.start span.d { display: block; margin-top: 4px; font-size: 15px; color: var(--muted); line-height: 1.4; }

@media (max-width: 560px) {
  .hero { padding-top: 48px; }
  .start { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 32px; }
  .start span.d { display: none; }
  .start a { padding: 16px 16px 18px; }
}

/* ---------- Maquetación ---------- */

.layout {
  max-width: 1080px; margin: 0 auto; padding: 0 var(--gutter) 96px;
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 56px;
}
@media (min-width: 960px) {
  .layout { grid-template-columns: 220px minmax(0, 1fr); }
}

/* Índice: desplegable en el móvil, lateral fijo en pantallas anchas */
.toc { margin: 12px 0 8px; }
.toc details { background: var(--surface); border-radius: var(--radius); }
.toc summary {
  list-style: none; cursor: pointer; padding: 14px 16px;
  display: flex; align-items: center; justify-content: space-between;
}
.toc summary::-webkit-details-marker { display: none; }
.toc summary::after {
  content: ""; width: 8px; height: 8px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted);
  transform: rotate(45deg) translate(-2px, -2px); transition: transform 0.2s;
}
.toc details[open] summary::after { transform: rotate(-135deg); }
.toc ol { list-style: none; margin: 0; padding: 0 8px 10px; }
.toc a {
  display: flex; gap: 12px; padding: 8px 10px; border-radius: 8px;
  color: var(--muted); font-size: 15px; line-height: 1.3;
}
.toc a:hover { color: var(--text); text-decoration: none; background: var(--surface); }
.toc a .n { font-variant-numeric: tabular-nums; color: var(--faint); min-width: 1.4em; }
.toc a[aria-current="true"] { color: var(--text); }
.toc a[aria-current="true"] .n { color: var(--accent); }

@media (min-width: 960px) {
  .toc { position: sticky; top: 76px; align-self: start; margin: 0; max-height: calc(100vh - 96px); overflow: auto; }
  .toc details { background: none; }
  .toc summary { display: none; }
  .toc ol { padding: 0; }
}

/* ---------- Contenido ---------- */

main { min-width: 0; max-width: 720px; }

section { padding-top: 64px; }
section:first-of-type { padding-top: 24px; }
@media (min-width: 960px) { section:first-of-type { padding-top: 0; } }

section > .label { color: var(--accent); }
h2 {
  margin: 8px 0 14px;
  font-size: clamp(30px, 4.6vw, 40px); line-height: 1.1; letter-spacing: -0.025em; font-weight: 700;
}
h3 {
  margin: 40px 0 8px;
  font-size: 21px; line-height: 1.25; letter-spacing: -0.012em; font-weight: 650;
}
h3 + p, h3 + .rows { margin-top: 8px; }
p { margin: 0 0 14px; }
p.lead { font-size: 19px; color: var(--muted); line-height: 1.5; }
strong { font-weight: 600; }
ul, ol.steps { margin: 0 0 16px; padding-left: 1.25em; }
li { margin: 5px 0; padding-left: 2px; }
li::marker { color: var(--faint); }

/* Nombre de un botón o ajuste tal y como aparece en la app */
.ui {
  display: inline-block; padding: 0 7px; margin: 0 1px;
  background: var(--surface-strong); border-radius: 6px;
  font-size: 0.86em; font-weight: 600; letter-spacing: 0.01em; white-space: nowrap;
}
.y { color: var(--accent); }

/* Pasos numerados */
ol.steps { list-style: none; padding: 0; counter-reset: s; }
ol.steps li {
  counter-increment: s; position: relative; margin: 0; padding: 14px 0 14px 46px; border-top: 1px solid var(--line);
}
ol.steps li:last-child { border-bottom: 1px solid var(--line); }
ol.steps li::before {
  content: counter(s); position: absolute; left: 0; top: 14px;
  width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--accent); color: #000; font-size: 14px; font-weight: 700;
}

/* Gesto → resultado */
.rows { margin: 12px 0 20px; background: var(--surface); border-radius: var(--radius); overflow: hidden; }
.row { display: grid; grid-template-columns: minmax(0, 11.5em) minmax(0, 1fr); gap: 4px 18px; padding: 13px 16px; }
.row + .row { border-top: 1px solid var(--line); }
.row > :first-child { font-weight: 600; }
.row > :last-child { color: var(--muted); }
.row > :last-child b, .row > :last-child strong { color: var(--text); font-weight: 600; }
@media (max-width: 560px) { .row { grid-template-columns: 1fr; } }

/* Notas */
.note {
  margin: 20px 0; padding: 14px 16px 14px 18px;
  background: var(--surface); border-radius: var(--radius);
  border-left: 3px solid var(--accent);
  font-size: 16px; color: var(--muted);
}
.note p:last-child { margin-bottom: 0; }
.note .label { display: block; margin-bottom: 4px; color: var(--accent); }
.note strong { color: var(--text); }

/* Tablas */
.table-wrap { margin: 12px 0 20px; overflow-x: auto; border-radius: var(--radius); background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: 16px; }
th, td { padding: 12px 16px; text-align: left; vertical-align: top; }
th { font-size: 11px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
tr + tr td { border-top: 1px solid var(--line); }
td:first-child { font-weight: 600; }
@media (min-width: 561px) { td:first-child { white-space: nowrap; } }
td { color: var(--muted); }
td:first-child { color: var(--text); }

/* Preguntas frecuentes */
.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary {
  cursor: pointer; list-style: none; padding: 16px 28px 16px 0; position: relative; font-weight: 600;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 4px; top: 12px; font-size: 24px; font-weight: 300; color: var(--muted);
}
.faq details[open] summary::after { content: "−"; }
.faq details > :not(summary) { color: var(--muted); }
.faq details > p:last-child { margin-bottom: 18px; }

/* Pie */
footer {
  max-width: 1080px; margin: 0 auto; padding: 28px var(--gutter) 56px;
  border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; align-items: center;
  color: var(--faint); font-size: 14px;
}
footer img { height: 14px; width: auto; opacity: 0.9; }

@media print {
  :root { color-scheme: light; --bg: #fff; --text: #000; --muted: #444; --faint: #777; --surface: #f2f2f2; --surface-strong: #e6e6e6; --line: #ccc; --accent: #a06a00; }
  .bar, .toc { display: none; }
  .layout { display: block; }
}

/* ---------- Capturas ---------- */

/* Una captura con números sobre ella y la lista que los explica al lado */
.feature {
  display: grid; gap: 22px 36px; align-items: start; margin: 24px 0 28px;
  grid-template-columns: minmax(0, 1fr);
}
@media (min-width: 640px) {
  .feature { grid-template-columns: 280px minmax(0, 1fr); }
  .feature.flip { grid-template-columns: minmax(0, 1fr) 280px; }
  .feature.flip .shot { order: 2; }
}

.shot {
  position: relative; margin: 0; width: 100%; max-width: 280px;
  --w: 920; --h: 2000; --oy: 0;
}
@media (max-width: 639px) { .shot { margin-inline: auto; max-width: 300px; } }
.shot img {
  width: 100%; height: auto; display: block;
  border-radius: 30px; border: 1px solid var(--line);
  box-shadow: 0 24px 60px -24px rgba(0, 0, 0, 0.9);
  background: #111;
}
.shot.crop img { border-radius: 22px; }

/* El número que señala un elemento de la captura */
.pin {
  position: absolute; z-index: 2;
  left: calc(var(--x) / var(--w) * 100%);
  top: calc((var(--y) - var(--oy)) / var(--h) * 100%);
  width: 22px; height: 22px; margin: -11px 0 0 -11px;
  display: grid; place-items: center;
  background: var(--accent); color: #000;
  border-radius: 50%; border: 1.5px solid #000;
  font-size: 12px; font-weight: 700; line-height: 1;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
  pointer-events: none;
}

.callouts { list-style: none; margin: 0; padding: 0; counter-reset: c; }
.callouts li {
  counter-increment: c; position: relative; margin: 0; padding: 12px 0 12px 38px;
  border-top: 1px solid var(--line); color: var(--muted); font-size: 16px; line-height: 1.5;
}
.callouts li:last-child { border-bottom: 1px solid var(--line); }
.callouts li::before {
  content: counter(c); position: absolute; left: 0; top: 13px;
  width: 22px; height: 22px; display: grid; place-items: center;
  background: var(--accent); color: #000; border-radius: 50%;
  font-size: 12px; font-weight: 700;
}
.callouts strong { color: var(--text); }

/* Varias capturas sueltas, con su pie */
.shots {
  display: grid; gap: 14px; margin: 20px 0 28px;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}
.shots figure { margin: 0; }
.shots img {
  width: 100%; height: auto; display: block;
  border-radius: 24px; border: 1px solid var(--line); background: #111;
}
figcaption { margin-top: 8px; font-size: 14px; color: var(--muted); line-height: 1.4; }
.shots figcaption { text-align: center; }
.shots.two { max-width: 580px; }
.shots.three { max-width: 780px; }
.shots.crops { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.shots.crops img { border-radius: 20px; }

/* Portada con capturas */
.hero-shots { display: flex; gap: 14px; margin-top: 44px; align-items: flex-start; }
.hero-shots img {
  width: min(240px, 44vw); height: auto; border-radius: 28px; border: 1px solid var(--line);
  box-shadow: 0 30px 70px -30px rgba(0, 0, 0, 0.95); background: #111;
}
.hero-shots img + img { margin-top: 36px; }

/* Las películas */
.looks {
  display: grid; gap: 14px; margin: 18px 0 26px; padding: 0; list-style: none;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
}
.looks li { margin: 0; padding: 0; }
.look { background: var(--surface); border-radius: var(--radius); overflow: hidden; height: 100%; }
.look img { width: 100%; aspect-ratio: 360 / 377; object-fit: cover; display: block; }
.look div { padding: 10px 12px 14px; }
.look b { display: block; font-size: 16px; font-weight: 650; letter-spacing: -0.01em; }
.look span { display: block; margin-top: 2px; font-size: 13.5px; line-height: 1.4; color: var(--muted); }
.look .label { font-size: 10px; letter-spacing: 0.18em; color: var(--accent); margin-bottom: 3px; display: block; }

/* Tono */
.tip {
  margin: 20px 0; padding: 14px 16px 14px 18px; border-radius: var(--radius);
  background: var(--surface); border-left: 3px solid var(--accent); font-size: 16px; color: var(--muted);
}
.tip .label { display: block; margin-bottom: 4px; color: var(--accent); }
.tip strong { color: var(--text); }
