/* Mirako — centriqalabs.com/mirako
   Una sola hoja para la página del producto y la de privacidad. */

:root {
  --paper: #eef1f7;
  --surface: #ffffff;
  --ink: #141a2e;
  --ink-soft: #4a5370;
  --line: #d5dbe8;
  --blue: #3d6bff;
  --blue-deep: #2a4fd6;
  --violet: #7a4df0;
  --record: #e5484d;
  --night: #121829;
  --night-soft: #a9b3cf;

  --display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --body: "Figtree", "Segoe UI", system-ui, sans-serif;

  --measure: 62ch;
  --gutter: clamp(20px, 5vw, 56px);
  --wide: 1120px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 650;
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0;
  text-wrap: balance;
}

h1 { font-size: clamp(2.4rem, 5.4vw, 4.1rem); }
h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); }
h3 { font-size: 1.2rem; letter-spacing: -0.01em; line-height: 1.25; }

p { margin: 0; max-width: var(--measure); }

a { color: var(--blue-deep); text-underline-offset: 0.18em; }
a:hover { color: var(--ink); }

:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
  border-radius: 6px;
}

.wrap {
  width: 100%;
  max-width: var(--wide);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---- Cabecera -------------------------------------------------------- */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-block: 22px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--ink);
  text-decoration: none;
  font-family: var(--display);
  font-weight: 650;
  font-size: 1.3rem;
  letter-spacing: -0.02em;
}

.brand img { width: 34px; height: 34px; display: block; }

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(14px, 3vw, 30px);
  font-size: 0.98rem;
}

.site-nav a:not(.button) { color: var(--ink-soft); text-decoration: none; }
.site-nav a:not(.button):hover { color: var(--ink); text-decoration: underline; }

/* ---- Botones --------------------------------------------------------- */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 24px;
  border: 2px solid var(--ink);
  border-radius: 14px;
  background: var(--ink);
  color: #fff;
  font: 600 1.02rem var(--body);
  text-decoration: none;
  cursor: pointer;
}

.button:hover { background: var(--blue-deep); border-color: var(--blue-deep); color: #fff; }

.button.quiet { background: transparent; color: var(--ink); }
.button.quiet:hover { background: var(--ink); color: #fff; border-color: var(--ink); }

.button.small { min-height: 42px; padding: 0 16px; font-size: 0.95rem; border-radius: 11px; }

/* Sin archivo publicado todavía: el botón lo dice en vez de llevar a ninguna parte. */
.button[aria-disabled="true"] {
  background: transparent;
  border-style: dashed;
  border-color: var(--ink-soft);
  color: var(--ink-soft);
  cursor: default;
}

.on-night .button { border-color: #fff; background: #fff; color: var(--night); }

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

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  align-items: center;
  gap: clamp(28px, 5vw, 72px);
  padding-block: clamp(24px, 5vw, 64px) clamp(56px, 8vw, 104px);
}

.hero-copy > * + * { margin-top: 22px; }

.hero-lede { font-size: 1.2rem; color: var(--ink-soft); max-width: 44ch; }

.actions { display: flex; flex-wrap: wrap; gap: 12px; }

.fine { font-size: 0.93rem; color: var(--ink-soft); }

/* La demostración: una ventana de PC y el celular que refleja. */

.stage { position: relative; padding-bottom: 12%; }

.pc {
  position: relative;
  margin-left: 16%;
  border-radius: 14px;
  background: #17171a;
  box-shadow: 0 30px 60px -28px rgba(20, 26, 46, 0.55);
  overflow: hidden;
  color: #f2f2f5;
}

.pc-bar {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 11px 14px;
  font-size: 0.78rem;
  color: #9a9aa6;
}

.pc-bar img { width: 16px; height: 16px; }

.pc-body { display: grid; grid-template-columns: 1fr 34px; gap: 10px; padding: 0 10px 12px 12px; }

.pc-rail { display: flex; flex-direction: column; gap: 12px; align-items: center; padding-top: 8px; }

.pc-rail i {
  display: block;
  width: 16px;
  height: 16px;
  border: 2px solid #c8c8d2;
  border-radius: 5px;
}

.pc-rail i.rec { border-radius: 50%; border-color: var(--record); background: var(--record); }

.screen {
  position: relative;
  aspect-ratio: 9 / 16;
  border-radius: 12px;
  overflow: hidden;
  background: linear-gradient(160deg, #4f8cff 0%, #7a4df0 62%, #2b1d6b 100%);
  cursor: crosshair;
  touch-action: none;
}

.pc .screen { max-height: 440px; margin-inline: auto; width: min(100%, 248px); }

.screen-clock {
  position: absolute;
  inset: 9% 0 auto 0;
  text-align: center;
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(1.5rem, 4.4vw, 2.6rem);
  color: #fff;
  letter-spacing: -0.03em;
  pointer-events: none;
}

.screen-apps {
  position: absolute;
  inset: auto 12% 12% 12%;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12%;
  pointer-events: none;
}

.screen-apps span {
  aspect-ratio: 1;
  border-radius: 28%;
  background: rgba(255, 255, 255, 0.9);
}

.screen-apps span:nth-child(2) { background: #ffd166; }
.screen-apps span:nth-child(4) { background: #9be7c4; }
.screen-apps span:nth-child(6) { background: #ffb3c1; }

/* El punto de toque: en la ventana es el cursor; en el celular, el dedo. */
.touch {
  position: absolute;
  left: 50%;
  top: 60%;
  width: 22px;
  height: 22px;
  margin: -11px 0 0 -11px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.28);
  pointer-events: none;
  transition: transform 0.12s ease;
}

.touch.down { transform: scale(0.72); }

.phone {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 31%;
  padding: 3.2%;
  border-radius: 13% / 6.5%;
  background: var(--ink);
  box-shadow: 0 26px 44px -22px rgba(20, 26, 46, 0.7);
}

.phone .screen { border-radius: 9% / 4.6%; cursor: default; }
.phone .touch { width: 16px; height: 16px; margin: -8px 0 0 -8px; }

.stage-note {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 60%;
  font-size: 0.93rem;
  color: var(--ink-soft);
  text-align: right;
}

/* ---- Secciones -------------------------------------------------------- */

.section { padding-block: clamp(56px, 8vw, 104px); }
.section + .section { border-top: 1px solid var(--line); }

.section-head > * + * { margin-top: 14px; }
.section-head p { color: var(--ink-soft); font-size: 1.1rem; }
.section .section-body { margin-top: clamp(28px, 4vw, 48px); }

/* Comparación cable / Wi-Fi: una tabla, porque es una comparación. */

.compare { width: 100%; border-collapse: collapse; background: var(--surface); border-radius: 16px; overflow: hidden; }

.compare th, .compare td { padding: 16px 20px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.compare tr:last-child th, .compare tr:last-child td { border-bottom: 0; }

.compare thead th { font-family: var(--display); font-size: 1.25rem; font-weight: 650; letter-spacing: -0.01em; }
.compare tbody th { width: 26%; font-weight: 600; color: var(--ink-soft); font-size: 0.98rem; }

.table-scroll { overflow-x: auto; border-radius: 16px; }
.table-scroll .compare { min-width: 560px; }

/* Lo que puedes hacer: se elige una función y la ventana la muestra. */

.explore { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.85fr); gap: clamp(28px, 6vw, 88px); align-items: center; }

.explore-list button {
  display: block;
  width: 100%;
  padding: 18px 0;
  border: 0;
  border-top: 2px solid var(--line);
  background: none;
  color: var(--ink-soft);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.explore-list button:last-child { border-bottom: 2px solid var(--line); }
.explore-list button:hover { color: var(--ink); }
.explore-list button[aria-selected="true"] { border-top-color: var(--ink); color: var(--ink); }

.explore-title { display: block; font-family: var(--display); font-weight: 650; font-size: 1.25rem; letter-spacing: -0.01em; line-height: 1.25; }
.explore-text { display: none; margin-top: 6px; color: var(--ink-soft); max-width: 46ch; }
.explore-list button[aria-selected="true"] .explore-text { display: block; }

.explore-stage { display: flex; justify-content: center; }
.pc.demo { margin-left: 0; width: min(100%, 380px); }
.pc.demo .screen { width: min(100%, 236px); transition: transform 0.35s ease; }

/* Cada efecto se muestra solo con su función. */
.fx { display: none; }

[data-feature="ver"] .screen { transform: scale(1.06); }
[data-feature="ver"] .fx-key,
[data-feature="grabar"] .fx-rec { display: inline-flex; }
[data-feature="control"] .fx-cursor,
[data-feature="capturar"] .fx-flash,
[data-feature="capturar"] .fx-saved { display: block; }
[data-feature="sonido"] .fx-eq,
[data-feature="cifrado"] .fx-lock { display: flex; }

.fx-key, .fx-rec {
  margin-left: auto;
  align-items: center;
  gap: 7px;
  padding: 3px 9px;
  border-radius: 7px;
  font-size: 0.78rem;
  font-weight: 600;
  color: #f2f2f5;
}

.fx-key { border: 1px solid #55555f; }
.fx-rec { background: rgba(229, 72, 77, 0.2); }
.fx-rec i { width: 8px; height: 8px; border-radius: 50%; background: var(--record); animation: blink 1.2s steps(2, jump-none) infinite; }
.fx-rec b { font-variant-numeric: tabular-nums; }

.fx-cursor {
  position: absolute;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.28);
  animation: tap 2.6s ease-in-out infinite;
}

.fx-eq { position: absolute; inset: auto 0 34% 0; justify-content: center; align-items: flex-end; gap: 6px; height: 28%; }
.fx-eq i { width: 7px; height: 100%; border-radius: 4px; background: #fff; transform-origin: bottom; animation: level 0.9s ease-in-out infinite alternate; }
.fx-eq i:nth-child(2) { animation-duration: 0.6s; }
.fx-eq i:nth-child(3) { animation-duration: 1.1s; }
.fx-eq i:nth-child(4) { animation-duration: 0.7s; }
.fx-eq i:nth-child(5) { animation-duration: 1s; }
.fx-eq i:nth-child(6) { animation-duration: 0.65s; }
.fx-eq i:nth-child(7) { animation-duration: 0.85s; }

.fx-flash { position: absolute; inset: 0; background: #fff; opacity: 0; animation: flash 2.4s ease-out infinite; }

.fx-saved {
  position: absolute;
  right: 8%;
  bottom: 6%;
  padding: 6px 10px;
  border-radius: 8px;
  background: #17171a;
  color: #f2f2f5;
  font-size: 0.78rem;
  font-weight: 600;
}

.fx-lock {
  position: absolute;
  inset: 34% 10% auto 10%;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px 10px;
  border-radius: 14px;
  background: rgba(18, 24, 41, 0.86);
  color: #fff;
  font-family: var(--display);
  font-weight: 650;
  font-size: 1.15rem;
  letter-spacing: 0.04em;
}

@keyframes blink { 0% { opacity: 1; } 100% { opacity: 0.25; } }
@keyframes level { from { transform: scaleY(0.25); } to { transform: scaleY(1); } }
@keyframes flash { 0%, 100% { opacity: 0; } 4% { opacity: 0.85; } 22% { opacity: 0; } }
@keyframes tap {
  0% { left: 22%; top: 30%; transform: scale(1); }
  40% { left: 50%; top: 67%; transform: scale(1); }
  48% { left: 50%; top: 67%; transform: scale(0.7); }
  58% { left: 50%; top: 67%; transform: scale(1); }
  100% { left: 22%; top: 30%; transform: scale(1); }
}

/* Versiones: una línea de tiempo corta. */

.releases { list-style: none; margin: 0; padding: 0; }
.releases > li { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 12px clamp(24px, 5vw, 64px); padding: 26px 0; border-top: 2px solid var(--ink); }
.releases > li.upcoming { border-top-style: dashed; }

.release-id strong { display: block; font-family: var(--display); font-weight: 650; font-size: 2rem; line-height: 1; letter-spacing: -0.02em; }
.release-id span, .release-id time, .release-id em { display: block; color: var(--ink-soft); font-size: 0.95rem; font-style: normal; }
.release-id span { margin-top: 8px; color: var(--ink); font-weight: 600; }
.release-id em { margin-top: 8px; display: inline-block; padding: 2px 9px; border-radius: 999px; background: var(--ink); color: #fff; font-size: 0.8rem; font-weight: 600; }
.upcoming .release-id strong { font-size: 1.5rem; }

.releases ul { margin: 0; padding-left: 1.1em; max-width: var(--measure); list-style: disc; }
.releases ul li + li { margin-top: 6px; }

/* Pasos: numerados porque el orden importa. */

.steps { list-style: none; counter-reset: step; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 4vw, 44px); }

.steps li { counter-increment: step; }

.steps li::before {
  content: counter(step);
  display: block;
  font-family: var(--display);
  font-weight: 650;
  font-size: 3.4rem;
  line-height: 1;
  color: var(--blue);
  margin-bottom: 14px;
}

.steps h3 + p { margin-top: 8px; color: var(--ink-soft); }

/* Franja oscura: la única, para la privacidad. */

.on-night { background: var(--night); color: #fff; border-top: 0 !important; }
.on-night p { color: var(--night-soft); }
.on-night a { color: #fff; }
.on-night + .section { border-top: 0; }

.privacy-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 6vw, 80px); align-items: start; }
.privacy-grid ul { margin: 0; padding: 0; list-style: none; }
.privacy-grid li { padding: 14px 0; border-top: 1px solid rgba(255, 255, 255, 0.16); color: var(--night-soft); }
.privacy-grid li strong { color: #fff; font-weight: 600; }
.privacy-grid .section-head > * + * { margin-top: 18px; }

/* Preguntas */

.faq { max-width: 760px; }
.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; padding: 18px 0; font-weight: 600; font-size: 1.08rem; list-style-position: outside; }
.faq details p { padding: 0 0 20px; color: var(--ink-soft); }

/* Descarga */

.download { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(20px, 4vw, 40px); }
.download article { background: var(--surface); border-radius: 18px; padding: clamp(22px, 3vw, 32px); }
.download article > * + * { margin-top: 12px; }
.download p { color: var(--ink-soft); }
.download .button { margin-top: 20px; }

/* Pie */

.site-footer { padding-block: 36px 48px; border-top: 1px solid var(--line); font-size: 0.95rem; color: var(--ink-soft); }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 14px 28px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 22px; }

/* ---- Documento (privacidad) ------------------------------------------ */

.doc { padding-block: clamp(24px, 5vw, 56px) clamp(56px, 8vw, 96px); max-width: 760px; }
.doc h1 { font-size: clamp(2.1rem, 4.6vw, 3.2rem); }
.doc h2 { font-size: 1.5rem; margin-top: 44px; }
.doc h1 + p { margin-top: 16px; color: var(--ink-soft); }
.doc h2 + p, .doc p + p, .doc ul + p, .doc p + ul { margin-top: 14px; }
.doc ul { margin: 0; padding-left: 1.2em; max-width: var(--measure); }
.doc li + li { margin-top: 8px; }

/* ---- Pantallas angostas ---------------------------------------------- */

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; }
  .stage { max-width: 520px; }
  .explore, .steps, .privacy-grid, .download { grid-template-columns: 1fr; }
  .explore-stage { order: -1; }
  .releases > li { grid-template-columns: 1fr; }
  .site-nav a.hide-narrow { display: none; }
}

@media (max-width: 480px) {
  body { font-size: 1rem; }
  .pc { margin-left: 12%; }
  .phone { width: 34%; }
  .stage-note { width: 58%; font-size: 0.86rem; }
  .actions .button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .touch { transition: none; }
  .pc.demo .screen { transition: none; }
  .fx-rec i, .fx-cursor, .fx-eq i, .fx-flash { animation: none; }
  .fx-cursor { left: 50%; top: 67%; }
  .fx-eq i:nth-child(odd) { transform: scaleY(0.5); }
}
