/* =========================================================
   Landing de Testea — estilos
   Orden: base · cabecera · portada · ventajas · prueba ·
   OpoCalculadora · preguntas · descarga · pie · tablet · móvil
   ========================================================= */

/* ---------- Tipografía (Inter, incluida en /fonts) ---------- */
@font-face {
  font-family: "Inter Web";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(../fonts/inter.woff2) format("woff2");
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212,
    U+2215, U+FEFF, U+FFFD;
}

/* ---------- Colores de marca ---------- */
:root {
  --ink: #27243f; /* texto principal */
  --muted: #68627e; /* texto secundario (contraste AA sobre fondos claros) */
  --orange: #fa5c58; /* coral de marca */
  --paper: #fdfcff; /* fondo */
  --line: #e8e3f0; /* líneas y bordes */
  --green: #5741b1; /* violeta (nombre heredado) */
  --magenta: #aa249b;
  --focus: #ae36a4;
}

/* ---------- Base ---------- */
[hidden] {
  display: none !important;
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font:
    16px/1.6 "Inter Web",
    "Inter",
    Arial,
    sans-serif;
}
a {
  color: inherit;
  text-decoration: none;
}
button {
  font: inherit;
  cursor: pointer;
}
button:disabled {
  cursor: default;
}
button,
a,
summary {
  -webkit-tap-highlight-color: transparent;
}
a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 5px;
}
.wrap {
  max-width: 1180px;
  margin: auto;
  padding: 0 32px;
}
section {
  padding: 85px 0;
}
h2 {
  font-size: 42px;
  line-height: 1.15;
  letter-spacing: -1.6px;
  margin: 16px 0 22px;
}
h3 {
  line-height: 1.35;
  letter-spacing: -0.5px;
}
p {
  color: var(--muted);
}
.eyebrow {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.7px;
  text-transform: uppercase;
}
.small {
  font-size: 11px;
  color: var(--muted);
}
.textlink {
  font-size: 13px;
  font-weight: 600;
  border-bottom: 1px solid #b8b8b4;
  padding: 7px 0;
}

/* Botones */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  padding: 14px 22px;
  border-radius: 8px;
  background: var(--ink);
  color: white;
  font-weight: 600;
  font-size: 14px;
  text-align: center;
  border: 0;
  transition: 0.2s;
}
.btn:hover {
  transform: translateY(-2px);
  background: #454a55;
}
.btn.orange {
  background: linear-gradient(115deg, #ff386b, #c500d7);
  box-shadow: 0 8px 22px #d91a9e18;
}
.btn.orange:hover {
  background: linear-gradient(115deg, #e72c61, #a500bd);
}

/* ---------- Cabecera ---------- */
header {
  background: #fdfcfff2;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 5;
  backdrop-filter: blur(14px);
}
nav {
  height: 88px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 25px;
}
.brand {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -1px;
  color: var(--orange);
  display: flex;
  align-items: center;
  gap: 9px;
}
.brand img {
  display: block;
  width: 42px;
  height: 30px;
}
.navlinks {
  display: flex;
  gap: 34px;
  font-size: 13px;
  font-weight: 600;
}
.menubtn {
  display: none;
}

/* ---------- Portada ---------- */
.hero {
  display: grid;
  grid-template-columns: 1.08fr 1fr;
  gap: 45px;
  align-items: center;
  padding-top: 40px;
  padding-bottom: 55px;
}
.dot {
  height: 7px;
  width: 7px;
  background: var(--orange);
  border-radius: 50%;
}
h1 {
  font-size: clamp(57px, 6.1vw, 83px);
  line-height: 1.05;
  letter-spacing: -3.8px;
  margin: 25px 0;
}
h1 span {
  background: linear-gradient(110deg, #ff7147 5%, #ed329a 58%, #aa0cd6);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
}
.lead {
  color: var(--muted);
  max-width: 425px;
  font-size: 17px;
  line-height: 1.75;
}
.actions {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-top: 30px;
}
.hero .small {
  margin-top: 18px;
}

/* Móvil ilustrativo */
.stage {
  margin-bottom: 25px;
  min-height: 630px;
  background: radial-gradient(ellipse, #e7ddfc 0%, #f9f6ff 60%, #fdfcff 75%);
  border-radius: 35px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  isolation: isolate;
}
.stage::before {
  content: "";
  position: absolute;
  width: 340px;
  height: 340px;
  border: 1px solid #ded3f3;
  border-radius: 50%;
  z-index: -1;
}
.phone {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 292px;
  min-height: 632px;
  padding: 18px 17px 24px;
  border: 8px solid #27272b;
  border-radius: 43px;
  background: #f5f5fb;
  box-shadow: 15px 22px 50px #5741b12b;
  font-size: 11px;
}
.device-status {
  display: flex;
  justify-content: space-between;
  padding: 0 5px 29px;
  font-size: 10px;
}
.camera {
  position: absolute;
  width: 65px;
  height: 17px;
  background: #27272b;
  left: calc(50% - 32px);
  top: 9px;
  border-radius: 12px;
}
.phone-head {
  position: relative;
  font-size: 11px;
  color: #6e6a85;
  text-align: center;
}
.phone-head span {
  position: absolute;
  right: 0;
  top: -6px;
  color: #23213d;
  font-size: 19px;
}
.hello {
  margin: 20px 0 0;
  font-size: 27px;
  font-weight: 400;
  letter-spacing: -0.8px;
  color: #252345;
}
/* Nombre que va cambiando (js/main.js, apartado 3) */
.hello strong {
  display: inline-block;
  transition:
    opacity 0.25s ease,
    transform 0.25s ease;
}
.hello strong.is-out {
  opacity: 0;
  transform: translateY(-30%);
}
.hello strong.is-in {
  opacity: 0;
  transform: translateY(30%);
  transition: none;
}
.practice {
  position: relative;
  overflow: hidden;
  margin: 18px 0 13px;
  padding: 26px 13px 16px;
  border-radius: 16px;
  background: linear-gradient(160deg, #f2453a, #d81b72 52%, #a90ab8);
  color: white;
}
.practice b {
  display: block;
  font-size: 17px;
}
.practice span {
  font-size: 12px;
}
.app-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.app-grid > div {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  min-height: 72px;
  background: white;
  padding: 12px;
  border-radius: 12px;
}
.app-grid b {
  display: block;
  font-size: 11px;
  line-height: 1.3;
  color: #3a3b48;
}
/* Iconos en rombo que asoman por la esquina, como en la app */
.corner {
  position: absolute;
  top: 0;
  right: 0;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
}
.corner::before {
  content: "";
  position: absolute;
  top: -7px;
  right: -10px;
  width: 42px;
  height: 42px;
  border-radius: 11px;
  background: var(--corner);
  transform: rotate(45deg);
}
.corner svg {
  position: relative;
  width: 19px;
  height: 19px;
  fill: none;
  stroke: white;
  stroke-width: 2.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.corner .dot {
  fill: white;
  stroke: none;
}
.corner .teeth {
  stroke-width: 3.6;
  stroke-dasharray: 3.2 2.93;
  stroke-linecap: butt;
}
.corner .hub {
  stroke-width: 3.6;
}
.c-white {
  --corner: white;
}
.c-white svg {
  stroke: #b0138f;
  stroke-width: 1.8;
}
.c-red {
  --corner: linear-gradient(135deg, #e3173d, #f4567a);
}
.c-red svg {
  width: 21px;
  height: 21px;
  stroke-width: 3;
}
.c-orange {
  --corner: linear-gradient(135deg, #e9672b, #f6a464);
}
.c-blue {
  --corner: linear-gradient(135deg, #2b78e4, #63aeff);
}
.c-green {
  --corner: linear-gradient(135deg, #18cc76, #74f1aa);
}
.question-count {
  text-align: center;
  background: white;
  border-radius: 12px;
  margin-top: auto;
  padding: 11px;
  font-size: 12px;
  color: #35344f;
}
.question-count strong {
  font-size: 19px;
}
.bottomnav {
  display: flex;
  justify-content: space-around;
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px solid #ebe8f4;
  color: #676b71;
  font-size: 10px;
}
.bottomnav b,
.bottomnav span {
  display: grid;
  justify-items: center;
  gap: 2px;
  font-weight: 500;
}
.bottomnav b {
  color: #c93733;
}
.bottomnav svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.caption {
  position: absolute;
  bottom: -27px;
  font-size: 10px;
  color: #73668a;
}

/* Franja de ventajas */
.strip {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 22px 0;
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 600;
}
.strip span::before {
  content: "✓";
  color: #bb22ac;
  padding-right: 10px;
}

/* ---------- Por qué Testea ---------- */
.sectiontop {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 30px;
}
.sectiontop p {
  max-width: 330px;
  font-size: 14px;
}
.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 38px;
  margin-top: 36px;
}
.feature {
  border-top: 1px solid #cccfc9;
  padding-top: 24px;
}
.num {
  color: var(--magenta);
  font-size: 12px;
  font-weight: 700;
}
.feature h3 {
  font-size: 21px;
  margin: 18px 0 10px;
}
.feature p {
  font-size: 14px;
}

/* ---------- Prueba: test que imita la app Testea ---------- */
.demoarea {
  background: #f3effb;
}
.demogrid {
  display: grid;
  grid-template-columns: 1fr 1.12fr;
  gap: 65px;
  align-items: center;
}
.democopy p {
  max-width: 350px;
  font-size: 15px;
  text-align: justify;
}
.democopy .demo-note {
  color: #b0127f;
  font-size: 16px;
  font-weight: 700;
}
.democopy .textlink {
  display: inline-block;
  margin-top: 12px;
}

/* Marco de móvil que contiene la «app» */
.app-wrap {
  position: relative;
  justify-self: center;
  width: 100%;
  max-width: 400px;
}
.app {
  --red: #ec3b55;
  --coral: #e5484d;
  --app-bg: #f3f4f8;
  --app-ink: #22262e;
  --app-muted: #4b5260;
  --ok: #22d39a;
  --ko: #f26a70;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-self: center;
  width: 100%;
  max-width: 400px;
  min-height: 680px;
  overflow: hidden;
  border: 8px solid #27272b;
  border-radius: 40px;
  background: var(--app-bg);
  box-shadow: 15px 22px 50px #5741b12b;
  color: var(--app-ink);
  font-size: 12px;
}
.screen {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}
.icon-btn {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  color: #555b66;
  font-size: 18px;
  line-height: 1;
}
button.icon-btn:hover {
  background: #0000000f;
}

/* Cabecera oscura (inicio y resumen) */
.dark-head {
  position: relative;
  padding: 20px 16px 36px;
  background: radial-gradient(120% 90% at 50% 0%, #484a50, #2a2c30 72%);
  color: white;
  text-align: center;
}
.dh-title {
  margin: 0;
  overflow: hidden;
  color: #e9eaee;
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.dh-title.left {
  margin: 12px 0 14px;
  color: white;
  font-size: 11px;
  font-weight: 700;
  text-align: left;
}
.dh-num {
  display: block;
  margin: 2px 0 14px;
  font-size: 44px;
  line-height: 1.1;
}
.pills {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}
.pill {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 6px;
  border-radius: 999px;
  background: white;
  color: var(--app-ink);
  text-align: left;
}
.pill-ico {
  display: grid;
  place-items: center;
  flex: 0 0 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--red);
  color: white;
}
.pill-ico svg,
.timer svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.pill-text {
  display: grid;
  min-width: 0;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.35;
}
.pill-text b {
  overflow: hidden;
  font-size: 11px;
  font-weight: 400;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.stars {
  position: absolute;
  left: 50%;
  bottom: -17px;
  display: flex;
  gap: 3px;
  padding: 6px 14px;
  border-radius: 999px;
  background: #55575d;
  color: #a9abb1;
  font-size: 20px;
  line-height: 1;
  transform: translateX(-50%);
}
.stars .on {
  color: #ffc531;
}

/* 1. Inicio del test */
.start-body {
  display: grid;
  align-content: start;
  gap: 16px;
  flex: 1;
  padding: 34px 16px 18px;
  background: white;
}
.start-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 14px;
  border: 0;
  border-radius: 999px;
  background: #dc2f4b;
  color: white;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.5px;
}
.start-btn:hover {
  background: #c62640;
}
.start-btn .play {
  position: absolute;
  left: 8px;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 2px solid white;
  border-radius: 50%;
  font-size: 10px;
}
.settings {
  display: grid;
  padding: 6px 14px 10px;
  border-radius: 14px;
  background: #eef0f4;
}
.setting {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 46px;
  color: #3a3f4b;
  font-size: 12px;
}
.setting select {
  max-width: 62%;
  padding: 7px 10px;
  border: 0;
  border-radius: 999px;
  background: white;
  color: #3a3f4b;
  font: inherit;
  font-size: 11px;
}
.setting select:focus-visible,
.switch:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}
.switch {
  position: relative;
  flex: 0 0 44px;
  width: 44px;
  height: 26px;
  margin: 0;
  border-radius: 999px;
  background: #c3c7cf;
  cursor: pointer;
  appearance: none;
  transition: background 0.2s;
}
.switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: white;
  transition: transform 0.2s;
}
.switch:checked {
  background: #1e8e3e;
}
.switch:checked::after {
  transform: translateX(18px);
}
.setting-help {
  margin: 4px 0 0;
  color: #5b6270;
  font-size: 10px;
}

/* 2. Test */
.t-head {
  display: grid;
  grid-template-columns: 36px 1fr 36px;
  align-items: center;
  padding: 12px 10px 10px;
  background: white;
}
.t-title {
  display: grid;
  min-width: 0;
  line-height: 1.2;
  text-align: center;
}
.t-title span {
  overflow: hidden;
  color: var(--app-muted);
  font-size: 9px;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.t-title b {
  font-size: 26px;
}
.t-progress {
  /* --progress lo actualiza js/main.js con las preguntas respondidas */
  height: 4px;
  background: linear-gradient(
    90deg,
    #c4128c 0 var(--progress, 0%),
    #e6e8ed var(--progress, 0%)
  );
}
.t-body {
  flex: 1;
  padding: 18px 16px;
  overflow-y: auto;
}
.testmeta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--app-muted);
  font-size: 10px;
}
.timer {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px 4px 6px;
  border-radius: 999px;
  background: white;
  color: var(--app-ink);
  font-size: 11px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.timer svg {
  color: #d0216f;
}
.t-body h3 {
  margin: 14px 0 4px;
  color: var(--app-ink);
  font-size: 14px;
  line-height: 1.45;
  letter-spacing: -0.2px;
}
.note-link {
  padding: 0;
  border: 0;
  background: none;
  color: var(--coral);
  font-size: 10px;
  font-weight: 700;
}
.note-link:hover {
  text-decoration: underline;
}
.answers {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}
.answer {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 54px;
  padding: 9px 12px;
  border: 6px solid #e6e8ee;
  border-left-width: 34px;
  border-radius: 14px;
  background: white;
  color: #3a3f4b;
  font-size: 11px;
  line-height: 1.45;
  text-align: left;
}
.answer::before {
  /* casilla */
  content: "";
  position: absolute;
  left: -25px;
  top: calc(50% - 8px);
  width: 16px;
  height: 16px;
  border-radius: 3px;
  background: white;
  color: white;
  font-size: 12px;
  line-height: 16px;
  text-align: center;
}
.answer:hover {
  border-color: #d5dae2;
}
.answer.selected {
  border-color: #cfd8e4;
  background: #f7fbff;
}
.answer.selected::before {
  background: #627c9b;
}
.answer.correct {
  border-color: var(--ok);
  background: var(--ok);
  color: white;
}
.answer.correct::before {
  content: "✓";
  background: none;
  box-shadow: inset 0 0 0 2px white;
}
.answer.wrong {
  border-color: var(--ko);
  background: #fff4f4;
}
.answer.wrong::before {
  content: "✕";
  background: var(--ko);
}
.t-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  background: #555c68;
}
.bar-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px 6px 6px;
  border: 0;
  border-radius: 999px;
  background: #3f444d;
  color: white;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.3px;
}
.bar-pill:hover {
  background: #353a42;
}
.bar-pill .bar-ico {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #2f333a;
  font-size: 11px;
}
.bar-nav {
  display: flex;
  gap: 6px;
}
.bar-nav button {
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #3f444d;
  color: white;
  font-size: 18px;
  line-height: 1;
}
.bar-nav button:disabled {
  opacity: 0.35;
}

/* 3. Resumen */
.s-top {
  display: grid;
  grid-template-columns: 36px 1fr 36px;
  align-items: center;
  font-size: 12px;
  font-weight: 600;
}
.s-top .icon-btn {
  color: white;
  font-size: 22px;
}
.s-body {
  display: grid;
  align-content: start;
  justify-items: center;
  gap: 12px;
  flex: 1;
  padding: 34px 14px 16px;
  background: white;
}
.s-body .small {
  margin: 0;
}
.chips {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  width: 100%;
  padding: 12px;
  border-radius: 14px;
  background: #eef0f4;
}
.chips button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  padding: 5px 5px 5px 9px;
  border: 0;
  border-radius: 999px;
  background: white;
  color: var(--app-ink);
  font-size: 11px;
  font-weight: 700;
}
.chips button:hover {
  box-shadow: inset 0 0 0 2px #cfd5de;
}
.badge {
  display: grid;
  place-items: center;
  flex: 0 0 20px;
  height: 20px;
  border-radius: 50%;
  background: #9aa0a8;
  color: white;
  font-size: 10px;
  font-weight: 700;
}
.badge.correct {
  background: var(--ok);
}
.badge.wrong {
  background: var(--ko);
}
.badge.empty {
  background: none;
  color: #9aa0a8;
}
/* Llamada a la acción del resumen */
.s-cta {
  display: grid;
  justify-items: center;
  gap: 4px;
  width: 100%;
  padding: 16px 14px;
  border-radius: 16px;
  background: linear-gradient(115deg, #5036a5, #6e50c3);
  color: white;
  text-align: center;
}
.s-cta b {
  font-size: 13px;
}
.s-cta span {
  color: #ebe0ff;
  font-size: 11px;
}
.s-stores {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 8px;
}
.s-stores a {
  display: block;
  transition: transform 0.2s;
}
.s-stores a:hover {
  transform: translateY(-2px);
}
.s-stores img {
  /* misma altura para las dos insignias; el ancho sale de su proporción */
  display: block;
  width: auto;
  height: 37px;
}
.reset {
  padding: 7px 14px;
  border: 0;
  border-radius: 20px;
  background: #647187;
  color: white;
  font-size: 11px;
}

/* Capas: índice, aviso y nota aclaratoria */
.overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
}
.overlay.dim {
  display: grid;
  place-items: center;
  padding: 24px;
  background: #1d1f2499;
}
.overlay.top {
  place-items: start center;
  padding-top: 28px;
}
/* Capa gris clara «Pulsa para probarlo» que tapa el test hasta que se toca */
.overlay.try {
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 8px;
  padding: 32px;
  border: 0;
  background: #eef0f5d9;
  backdrop-filter: blur(3px);
  color: #22262e;
  font: inherit;
  text-align: center;
  cursor: pointer;
  transition: opacity 0.2s;
}
.overlay.try.is-leaving {
  opacity: 0;
}
.try b {
  font-size: 21px;
  letter-spacing: -0.3px;
}
.try-sub {
  max-width: 240px;
  color: #4b5260;
  font-size: 14px;
  line-height: 1.45;
}
.try-btn {
  margin-top: 10px;
  padding: 13px 26px;
  border-radius: 999px;
  background: #dc2f4b;
  box-shadow: 0 8px 20px #dc2f4b40;
  color: white;
  font-size: 14px;
  font-weight: 700;
}
.overlay.try:hover .try-btn,
.overlay.try:focus-visible .try-btn {
  background: #c62640;
}
.try-tap {
  position: relative;
  width: 48px;
  height: 48px;
  margin-bottom: 6px;
  border-radius: 50%;
  background: #dc2f4b1f;
}
.try-tap::before {
  content: "";
  position: absolute;
  inset: 16px;
  border-radius: 50%;
  background: #dc2f4b;
}
.try-tap::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 2px solid #dc2f4b;
  border-radius: 50%;
  animation: try-onda 1.6s ease-out infinite;
}
@keyframes try-onda {
  from {
    transform: scale(0.6);
    opacity: 1;
  }
  to {
    transform: scale(1.7);
    opacity: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .try-tap::after {
    animation: none;
  }
}

/* Etiqueta «Demo interactiva» encima del móvil */
.demo-tag {
  position: absolute;
  top: 0;
  left: 50%;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 15px;
  border-radius: 999px;
  background: white;
  box-shadow: 0 6px 18px #5741b130;
  color: #22262e;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  transform: translate(-50%, -50%);
}
.demo-tag i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #17b26a;
  animation: tag-parpadeo 1.4s ease-in-out infinite;
}
@keyframes tag-parpadeo {
  50% {
    opacity: 0.2;
  }
}
@media (prefers-reduced-motion: reduce) {
  .demo-tag i {
    animation: none;
  }
}
.index {
  display: flex;
  flex-direction: column;
  background: white;
}
.i-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 16px 10px 12px 16px;
  background: #eef0f4;
}
.i-head div {
  display: grid;
  min-width: 0;
}
.i-head span {
  overflow: hidden;
  color: var(--app-muted);
  font-size: 9px;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.i-head b {
  color: var(--coral);
  font-size: 14px;
  font-weight: 500;
}
.i-list {
  margin: 0;
  padding: 0;
  overflow-y: auto;
  list-style: none;
}
.i-list button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 14px 16px;
  border: 0;
  border-bottom: 1px solid #eef0f4;
  background: white;
  color: #2b2f38;
  font-size: 12px;
  text-align: left;
}
.i-list button:hover {
  background: #f7f8fa;
}
.i-text {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.chev {
  color: #c3c7cf;
  font-size: 16px;
}
.dialog {
  width: 100%;
  max-width: 280px;
  padding: 22px 22px 12px;
  border-radius: 24px;
  background: white;
}
.dialog b {
  font-size: 16px;
  font-weight: 500;
}
.dialog p {
  margin: 14px 0 18px;
  color: #3a3f4b;
  font-size: 12px;
}
.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
}
.dialog-actions button {
  padding: 8px 14px;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--coral);
  font-size: 13px;
}
.dialog-actions button:hover {
  background: #fdecef;
}
.note-pop {
  width: 100%;
  max-height: 85%;
  padding: 14px 16px 4px;
  overflow-y: auto;
  border-radius: 18px;
  background: #fde6ee;
  box-shadow: 0 10px 30px #0003;
  color: #3a3f4b;
  font-size: 11.5px;
  line-height: 1.5;
}
.note-pop h4 {
  margin: 0;
  color: var(--app-ink);
  font-size: 12px;
}
.note-pop p {
  margin: 2px 0 10px;
  color: #3a3f4b;
}
.note-pop strong {
  color: var(--app-ink);
}
.note-pop .note-extra {
  font-style: italic;
}
.note-pop a {
  color: var(--app-ink);
  font-weight: 700;
  text-decoration: underline;
}

/* ---------- OpoCalculadora ---------- */
.resource {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 30px;
  padding: 27px 32px;
  margin-top: 38px;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.resource > div {
  flex: 1;
}
.resource .eyebrow {
  font-size: 9px;
}
.resource b {
  font-size: 18px;
}
.resource p {
  margin: 4px 0;
  font-size: 13px;
}
.calc-icon {
  width: 62px;
  height: 62px;
  object-fit: contain;
  border-radius: 13px;
  flex-shrink: 0;
}

/* ---------- Preguntas frecuentes ---------- */
.faqgrid {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 80px;
}
.faq-contact {
  font-size: 14px;
}
details {
  border-bottom: 1px solid var(--line);
  padding: 20px 0;
  font-size: 14px;
}
summary {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  font-weight: 600;
  list-style: none;
  cursor: pointer;
}
summary::-webkit-details-marker {
  display: none; /* oculta el triángulo en Safari */
}
summary::after {
  content: "+";
  font-size: 20px;
  font-weight: 400;
}
details[open] summary::after {
  content: "−";
}
details p {
  font-size: 13px;
  max-width: 500px;
}

/* ---------- Descarga ---------- */
.download {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  padding: 55px;
  margin-bottom: 60px;
  border-radius: 22px;
  background: linear-gradient(115deg, #5036a5, #6e50c3);
  box-shadow: 0 12px 35px #5237a515;
  color: white;
}
.download .eyebrow {
  color: #ffd0ed;
}
.download h2 {
  font-size: 37px;
  margin: 15px 0;
}
.download p {
  color: #ebe0ff;
  font-size: 14px;
}
.stores {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}
.store {
  display: block;
  transition: transform 0.2s;
}
.store:hover {
  transform: translateY(-3px);
}
.store img {
  /* misma altura para las dos insignias; el ancho sale de su proporción */
  display: block;
  width: auto;
  height: 48px;
}

/* ---------- Pie ---------- */
footer {
  border-top: 1px solid var(--line);
  padding: 27px 0 35px;
}
.foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.foot .brand {
  font-size: 24px;
}
.footlinks {
  display: flex;
  gap: 22px;
  font-size: 11px;
  color: var(--muted);
}
.copyright {
  font-size: 10px;
  color: var(--muted);
  margin-top: 12px;
}

/* =========================================================
   Tablet (hasta 1000 px)
   ========================================================= */
@media (max-width: 1000px) {
  .wrap {
    padding: 0 25px;
  }
  .navlinks {
    gap: 20px;
  }
  .hero {
    gap: 30px;
  }
  .download {
    padding: 38px;
    flex-direction: column;
    align-items: start;
  }
}

/* =========================================================
   Móvil (hasta 700 px)
   ========================================================= */
@media (max-width: 700px) {
  .wrap {
    padding: 0 22px;
  }
  section {
    padding: 55px 0;
  }
  h2 {
    font-size: 34px;
  }

  /* Cabecera y menú desplegable */
  nav {
    height: 72px;
  }
  .brand {
    font-size: 26px;
  }
  .navlinks {
    display: none;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--paper);
    padding: 22px;
    flex-direction: column;
    border-bottom: 1px solid var(--line);
  }
  .navlinks.open {
    display: flex;
  }
  .menubtn {
    display: block;
    border: 0;
    background: none;
    font-size: 22px;
    margin-left: auto;
  }
  nav {
    gap: 12px;
  }
  nav > .btn {
    gap: 8px;
    padding: 10px 13px;
    font-size: 11px;
    white-space: nowrap;
  }

  /* Portada */
  .hero {
    grid-template-columns: 1fr;
    gap: 38px;
  }
  h1 {
    font-size: 61px;
    letter-spacing: -3px;
  }
  .lead {
    font-size: 16px;
  }
  .actions {
    gap: 18px;
  }
  .stage {
    min-height: 625px;
    max-width: 440px;
    width: 100%;
    margin: auto auto 27px;
  }
  .phone {
    width: 282px;
  }
  .caption {
    font-size: 9px;
  }
  .strip {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px 8px;
    font-size: 10px;
  }

  /* Por qué Testea */
  .sectiontop {
    display: block;
  }
  .features {
    grid-template-columns: 1fr;
    gap: 18px;
    margin-top: 26px;
  }
  .feature {
    padding-top: 18px;
  }
  .feature h3 {
    margin: 10px 0;
  }

  /* Prueba */
  .demogrid {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  .app {
    min-height: 640px;
    border-width: 7px;
    border-radius: 34px;
  }

  /* OpoCalculadora */
  .resource {
    display: grid;
    grid-template-columns: 48px 1fr;
    align-items: start;
    gap: 14px;
    padding: 23px;
  }
  .calc-icon {
    width: 48px;
    height: 48px;
  }
  .resource > .textlink {
    grid-column: 1 / -1;
    justify-self: start;
  }

  /* Preguntas */
  .faqgrid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  /* Descarga */
  .download {
    padding: 30px 25px;
    margin-bottom: 35px;
    border-radius: 16px;
  }
  .download h2 {
    font-size: 32px;
  }
  .stores {
    flex-wrap: wrap;
  }
  .store img {
    height: 42px;
  }

  /* Pie */
  .foot {
    align-items: start;
    flex-direction: column;
  }
  .footlinks {
    flex-wrap: wrap;
    gap: 14px;
  }
}

/* Usuarios que prefieren menos animación */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    transition: none !important;
  }
}

/* Móviles pequeños: el botón de la cabecera se acorta y, en los más estrechos, se oculta
   (la portada tiene el mismo botón justo debajo) */
@media (max-width: 380px) {
  nav > .btn span {
    display: none;
  }
}
@media (max-width: 340px) {
  nav > .btn {
    display: none;
  }
}
@media (max-width: 400px) {
  .stage::before {
    /* el círculo decorativo no debe ensanchar la página en móviles estrechos */
    width: 280px;
    height: 280px;
  }
}
