/* CDI Baby Memories · sitio público
   Tinta índigo de pantalla de ultrasonido, fondo lila muy claro, rosa de aluminio anodizado
   para el llavero y los botones, y ámbar solo para la barra del latido. */

@font-face {
  font-family: "Bricolage";
  src: url("/fonts/bricolage.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}
@font-face {
  font-family: "Atkinson";
  src: url("/fonts/atkinson-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Atkinson";
  src: url("/fonts/atkinson-700.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

:root {
  --ink: #1c2240;
  --ink-2: #2b3258;
  --paper: #f5f3fa;
  --mist: #e4e0ef;
  --muted: #555c7c;
  --rose: #a63e63;
  --rose-deep: #8a2f50;
  --amber: #f2a541;
  --white: #ffffff;
  --display: "Bricolage", "Avenir Next", "Segoe UI", sans-serif;
  --text: "Atkinson", "Segoe UI", Roboto, sans-serif;
  --wrap: 1120px;
  --measure: 34rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--text);
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--rose-deep); text-underline-offset: 0.18em; }
a:hover { color: var(--rose); }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; border-radius: 4px; }

.wrap { width: min(var(--wrap), 100% - 2.5rem); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: var(--white); padding: .6rem 1rem; z-index: 10; }
.skip:focus { left: 1rem; top: 1rem; }

h1, h2, h3 { font-family: var(--display); color: var(--ink); margin: 0; }
h1 {
  font-size: clamp(2.5rem, 5.4vw, 4.25rem);
  line-height: 1.02;
  font-weight: 700;
  letter-spacing: -0.025em;
  font-variation-settings: "wdth" 88;
  max-width: 12ch;
}
h2 {
  font-size: clamp(1.75rem, 3.2vw, 2.5rem);
  line-height: 1.1;
  font-weight: 650;
  letter-spacing: -0.02em;
  max-width: 20ch;
}
h3 { font-size: 1.25rem; line-height: 1.25; font-weight: 650; letter-spacing: -0.01em; }
p { margin: 0; max-width: var(--measure); }
p + p { margin-top: 0.9em; }

/* Barra superior */
.top { padding: 1.25rem 0; }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: .65rem; text-decoration: none; color: var(--ink); font: 700 1.125rem/1 var(--display); letter-spacing: -0.01em; }
.brand svg { width: 42px; height: 22px; }
.brand svg rect { fill: var(--ink); }
.brand svg rect.beat { fill: var(--amber); }
.top nav { display: flex; gap: 1.25rem; align-items: center; font-size: 0.98rem; }
.top nav a { color: var(--ink); text-decoration: none; }
.top nav a:hover { color: var(--rose); text-decoration: underline; }

/* Botones */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  min-height: 3.25rem; padding: .85rem 1.5rem;
  border-radius: 999px; border: 2px solid transparent;
  font: 700 1.02rem/1.1 var(--text); text-decoration: none; cursor: pointer;
  transition: background-color .15s ease, color .15s ease;
}
.btn-primary { background: var(--rose); color: var(--white); }
.btn-primary:hover { background: var(--rose-deep); color: var(--white); }
.btn-quiet { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn-quiet:hover { background: var(--ink); color: var(--white); }
.btn svg { width: 1.2rem; height: 1.2rem; fill: currentColor; }
.actions { display: flex; flex-wrap: wrap; gap: .85rem; margin-top: 2rem; }

/* Portada */
.hero { padding: 2.5rem 0 4.5rem; }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 3rem; align-items: center; }
.hero .lead { font-size: 1.2rem; color: var(--ink-2); margin-top: 1.5rem; max-width: 30rem; }
.hero .already { margin-top: 1.6rem; font-size: .98rem; color: var(--muted); }

.stage { position: relative; aspect-ratio: 1 / 1.18; max-width: 520px; justify-self: end; width: 100%; }
.phone {
  position: absolute; right: 4%; top: 0; width: 56%; aspect-ratio: 1 / 2;
  background: var(--ink); border-radius: 15% / 7.5%; padding: 4.6%;
  box-shadow: 0 30px 50px rgba(28, 34, 64, .28);
}
.screen { height: 100%; border-radius: 11% / 5.3%; background: #070a17; overflow: hidden; display: flex; flex-direction: column; }
.screen-head { display: flex; justify-content: space-between; align-items: center; gap: .5rem; padding: 12% 9% 6%; }
.screen-head .t { display: block; color: #fff; font: 650 clamp(.8rem, 1.5vw, 1.05rem)/1.2 var(--display); }
.screen-head .w { display: block; color: #b9bdd3; font-size: clamp(.65rem, 1.1vw, .8rem); }
.screen-head svg { width: 26%; flex: none; }
.screen-head .t { white-space: nowrap; }
.us { position: relative; aspect-ratio: 1 / 1; background: #000; }
.us video, .us img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.us img { display: none; }
.screen-foot { padding: 7% 9%; color: #b9bdd3; font-size: clamp(.62rem, 1vw, .78rem); }
.screen-foot .bar { display: block; height: 3px; border-radius: 2px; background: #2b3258; margin-bottom: .7rem; overflow: hidden; }
.screen-foot .bar i { display: block; height: 100%; width: 35%; background: #f2a541; }
@media (prefers-reduced-motion: reduce) {
  .us video { display: none; }
  .us img { display: block; }
}
.keychain { position: absolute; left: 0; bottom: 1%; width: 86%; transform: rotate(-7deg); filter: drop-shadow(0 18px 24px rgba(28, 34, 64, .25)); }
.keychain .plate { fill: url(#anod); }
.keychain .bars rect { fill: #f3e3ea; }
.keychain .bars rect.beat { fill: var(--amber); }
.keychain .caption { fill: #f3e3ea; font: 600 13px/1 var(--display); letter-spacing: .32em; }
.keychain .sweep { fill: url(#sweep); opacity: 0; }

@media (prefers-reduced-motion: no-preference) {
  .keychain .sweep { animation: sweep 2.2s cubic-bezier(.45, 0, .2, 1) .5s 1 both; }
  .keychain .bars .beat, .screen-head .pulse { animation: beat 1.25s ease-in-out 2.8s infinite; transform-box: fill-box; transform-origin: center; }
  .screen-foot .bar i { animation: progress 7s linear infinite; }
}
@keyframes sweep { 0% { opacity: 0; transform: translateX(-60px); } 15% { opacity: 1; } 85% { opacity: 1; } 100% { opacity: 0; transform: translateX(400px); } }
@keyframes appear { from { opacity: 0; } to { opacity: 1; } }
@keyframes beat { 0%, 60%, 100% { transform: scaleY(1); } 12% { transform: scaleY(1.18); } 26% { transform: scaleY(.96); } 38% { transform: scaleY(1.1); } }

/* Secciones */
.section { padding: 5rem 0; }
.section > .wrap > p.intro { margin-top: 1rem; color: var(--ink-2); font-size: 1.12rem; }
.dark { background: var(--ink); color: #e9e7f3; }
.dark h2, .dark h3 { color: var(--white); }
.dark a { color: #f4c7d6; }
.dark p.intro { color: #cfcde0; }
.band { background: var(--mist); }

/* Pasos (secuencia real) */
.steps { list-style: none; counter-reset: paso; padding: 0; margin: 3rem 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2.5rem; }
.steps.four { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2rem; }
.steps li { counter-increment: paso; position: relative; padding-top: 3.6rem; }
.steps li::before {
  content: counter(paso);
  position: absolute; top: 0; left: 0;
  font: 700 2.6rem/1 var(--display); color: var(--rose);
}
.steps li::after { content: ""; position: absolute; top: 1.3rem; left: 2.6rem; right: -1.5rem; height: 2px; background: var(--mist); }
.steps li:last-child::after { display: none; }
.steps h3 { margin-bottom: .5rem; }
.steps p { color: var(--ink-2); }

/* Contenido del llavero */
.holds { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 4rem; align-items: start; }
.holds dl { margin: 0; display: grid; gap: 1.6rem; }
.holds dt { font: 650 1.2rem/1.25 var(--display); }
.holds dd { margin: .3rem 0 0; color: var(--ink-2); max-width: 30rem; }

/* Privacidad */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 4rem; align-items: start; }
.facts { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.4rem; }
.facts li { padding-left: 1.6rem; position: relative; }
.facts li::before { content: ""; position: absolute; left: 0; top: .55em; width: .55rem; height: .55rem; border-radius: 2px; background: var(--amber); }
.facts strong { display: block; font: 650 1.12rem/1.3 var(--display); color: inherit; margin-bottom: .2rem; }
.dark .facts strong { color: var(--white); }

/* Ubicación */
.place { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 3rem; align-items: start; }
.address { font-style: normal; font-size: 1.1rem; line-height: 1.55; }
.hours { margin: 1.2rem 0 0; padding: 0; list-style: none; color: var(--ink-2); }

/* Preguntas */
.faq { margin-top: 2.5rem; max-width: 46rem; }
.faq details { border-top: 2px solid var(--mist); padding: 1.1rem 0; }
.faq details:last-child { border-bottom: 2px solid var(--mist); }
.faq summary { cursor: pointer; font: 650 1.15rem/1.35 var(--display); list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-weight: 400; color: var(--rose); font-size: 1.5rem; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin-top: .7rem; color: var(--ink-2); }

/* Cierre */
.closing { text-align: left; }
.closing .wrap { display: flex; justify-content: space-between; align-items: flex-end; gap: 2rem; flex-wrap: wrap; }

/* Pie */
footer { padding: 3rem 0 3.5rem; font-size: .95rem; color: var(--muted); }
footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1.5rem 3rem; }
footer nav { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; }
footer a { color: var(--ink); }

/* Páginas de texto (aviso de privacidad) */
.doc { padding: 2rem 0 5rem; }
.doc .wrap { max-width: 46rem; }
.doc h1 { font-size: clamp(2rem, 4vw, 2.9rem); max-width: none; margin-bottom: 1rem; }
.doc h2 { font-size: 1.4rem; margin: 2.2rem 0 .6rem; max-width: none; }
.doc p, .doc li { max-width: none; color: var(--ink-2); }
.doc ul { padding-left: 1.2rem; }
.updated { color: var(--muted); font-size: .95rem; }

@media (max-width: 900px) {
  .hero .wrap, .holds, .split, .place { grid-template-columns: 1fr; gap: 2.5rem; }
  .stage { justify-self: center; max-width: 430px; }
  .steps, .steps.four { grid-template-columns: 1fr; gap: 2rem; }
  .steps li::after { display: none; }
  .section { padding: 3.75rem 0; }
}
@media (max-width: 560px) {
  body { font-size: 1rem; }
  .top nav .hide-sm { display: none; }
  .actions .btn { width: 100%; }
  .hero { padding-top: 1rem; }
}

@keyframes progress { from { width: 0; } to { width: 100%; } }


.photo { width: 100%; height: auto; margin-top: 2rem; border-radius: 18px; }

/* Franja con vídeo */
.story { position: relative; overflow: hidden; background: var(--ink); min-height: clamp(340px, 41vw, 540px); display: flex; align-items: flex-end; }
.story-media { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.story-still { display: none; }
.story::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(28, 34, 64, .88) 0%, rgba(28, 34, 64, .55) 45%, rgba(28, 34, 64, .1) 100%); }
.story-text { position: relative; z-index: 1; padding: 3.5rem 0; }
.story-text h2 { color: var(--white); max-width: 16ch; }
.story-text p { color: #e3e1ef; margin-top: .8rem; font-size: 1.15rem; }
@media (max-width: 700px) {
  .story::after { background: linear-gradient(0deg, rgba(28, 34, 64, .92) 0%, rgba(28, 34, 64, .5) 55%, rgba(28, 34, 64, .15) 100%); }
  .story-text { padding: 2.5rem 0; }
}
@media (prefers-reduced-motion: reduce) {
  .story video.story-media { display: none; }
  .story-still { display: block; }
}

/* Página de médicos: crecimiento */
.growth { margin-top: 2.5rem; gap: 3rem 4rem; }
.growth h3 { color: var(--amber); margin-bottom: 1.25rem; font-size: 1.35rem; }
