/* Buggui · buggui.app
   Escala de espacio de 8 px. Tamaños de texto: 15 · 18 · 22 · h2 · h1. Colores de marca planos.
   Texto de lectura en --ink; --ink-2 solo para pies de figura, horas, estado, notas y pie de página. */

@font-face { font-family: "Outfit"; font-weight: 400; font-style: normal; font-display: swap; src: url("/assets/fonts/outfit-400.woff") format("woff"); }
@font-face { font-family: "Outfit"; font-weight: 600; font-style: normal; font-display: swap; src: url("/assets/fonts/outfit-600.woff") format("woff"); }

:root {
  --bg: #FFFFFF;
  --ink: #14102B;
  --ink-2: #5E5873;
  --rule: #E6E1EF;
  --rule-strong: #CFC7DE;
  --pink: #F72A9C;
  --violet: #702EFB;
  --link-hover: #C21DB6;
  --focus: #702EFB;
  --btn-bg: #14102B;
  --btn-fg: #FFFFFF;
  --btn-hover: #702EFB;
  --wm-bug: #14102B;

  /* Pantallas de la app (tokens del tema claro de la app) */
  --frame: #14102B;
  --app-bg: #FBF8FF;
  --app-surface: #FFFFFF;
  --app-border: #ECE4FB;
  --app-text: #14102B;
  --app-text-2: #6B6584;
  --app-input: #F1EBFE;
  --app-soft-pink: #FFE6F4;
  --app-accent: #C21DB6;

  --g: clamp(16px, 4vw, 32px);
  --s1: 8px; --s2: 16px; --s3: 24px; --s4: 32px; --s6: 48px; --s8: 64px; --s12: 96px; --s16: 128px;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #160B2E;
    --ink: #F6F1FF;
    --ink-2: #C9BFE6;
    --rule: #33255A;
    --rule-strong: #4B3381;
    --link-hover: #FF7AC6;
    --focus: #B79BFF;
    --btn-bg: #F6F1FF;
    --btn-fg: #14102B;
    --btn-hover: #FFE6F4;
    --wm-bug: #F6F1FF;

    --frame: #07040F;
    --app-bg: #160B2E;
    --app-surface: #22123F;
    --app-border: #3A2668;
    --app-text: #F6F1FF;
    --app-text-2: #C9BFE6;
    --app-input: #2A1650;
    --app-soft-pink: #3D1A4F;
    --app-accent: #FF6FEA;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 18px/1.55 "Outfit", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-kerning: normal;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
h1, h2, h3, p, ol, ul, dl, dd, figure { margin: 0; }
p, li { text-wrap: pretty; }
ol, ul { padding: 0; list-style: none; }
img, svg { display: block; }
b, strong { font-weight: 600; }

a { color: inherit; text-decoration: underline; text-decoration-color: var(--pink); text-decoration-thickness: 1.5px; text-underline-offset: .2em; }
a:hover { color: var(--link-hover); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 2px; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.wrap { width: 100%; max-width: calc(1200px + 2 * var(--g)); margin-inline: auto; padding-inline: var(--g); }

.skip { position: absolute; left: var(--g); top: -80px; z-index: 10; padding: var(--s1) var(--s2); background: var(--btn-bg); color: var(--btn-fg); border-radius: 4px; text-decoration: none; font-size: 15px; font-weight: 600; }
.skip:focus { top: var(--s2); }

/* Encabezado */
.top-in { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); padding-block: var(--s3); }
.lockup { display: inline-flex; align-items: center; gap: var(--s1); text-decoration: none; color: var(--wm-bug); }
.lockup img { width: 32px; height: 32px; margin-left: -4px; } /* el isotipo tiene 4 px de aire a la izquierda: así su borde cae en la línea del texto */
.wm { width: 84px; height: 28px; color: var(--wm-bug); }
.top-nav { display: flex; gap: var(--s4); font-size: 15px; }
.top-nav a { text-decoration: none; padding-block: var(--s1); }
.top-nav a:hover { color: var(--link-hover); }

/* Tipografía */
h1 { font-size: clamp(2.25rem, 1.2rem + 3.6vw, 4rem); line-height: 1.04; letter-spacing: -.03em; font-weight: 600; }
h2 { font-size: clamp(2rem, 1.45rem + 1.6vw, 2.75rem); line-height: 1.08; letter-spacing: -.022em; font-weight: 600; text-wrap: balance; }
h3 { font-size: 18px; line-height: 24px; font-weight: 600; }
.lead { font-size: 22px; line-height: 1.45; max-width: 26em; } /* unos 65 caracteres por línea */
.note { margin-top: var(--s4); padding-top: var(--s3); border-top: 1px solid var(--rule); font-size: 15px; color: var(--ink-2); max-width: 40em; }

/* Portada */
.hero {
  display: grid;
  grid-template-columns: [full-start] minmax(var(--g), 1fr) [main-start] minmax(0, 536px) 64px minmax(0, 600px) [main-end] minmax(var(--g), 1fr) [full-end];
  padding-top: var(--s4);
}
.hero-text { grid-column: 2; grid-row: 1; align-self: center; padding-block: var(--s8) var(--s16); }
.hero-text .lead { margin-top: var(--s3); }
.hero-act { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s3); margin-top: var(--s6); }
.cta {
  display: inline-flex; align-items: center; min-height: 48px; padding: 0 var(--s3);
  background: var(--btn-bg); color: var(--btn-fg); border-radius: 8px;
  font-size: 15px; font-weight: 600; text-decoration: none;
}
.cta:hover { background: var(--btn-hover); color: var(--btn-fg); }
.status { font-size: 15px; line-height: 1.45; color: var(--ink-2); max-width: 19em; }
.status strong { color: var(--ink); }

/* Escenario: bloque plano de color con el teléfono que sobresale por abajo */
.stage { --over: 80px; }
.block { display: flex; padding-top: var(--s8); }
.block .phone { margin-bottom: calc(-1 * var(--over)); }
.stage figcaption { margin-top: calc(var(--over) + var(--s2)); font-size: 15px; line-height: 1.45; color: var(--ink-2); max-width: 22em; }

.stage--pink { grid-column: 4 / full-end; grid-row: 1; }
.stage--pink .block { background: var(--pink); padding-left: var(--s8); }
.stage--pink figcaption { margin-left: var(--s8); }

/* Cómo funciona */
.how {
  display: grid;
  grid-template-columns: [full-start] minmax(var(--g), 1fr) minmax(0, 504px) 96px minmax(0, 600px) minmax(var(--g), 1fr) [full-end];
  margin-top: var(--s16);
}
.stage--violet { grid-column: full-start / 3; grid-row: 1; align-self: start; position: sticky; top: var(--s3); }
.stage--violet .block { background: var(--violet); justify-content: flex-end; padding-right: var(--s8); }
.stage--violet figcaption { margin-left: auto; margin-right: var(--s8); width: 336px; }
.how-text { grid-column: 4; grid-row: 1; padding-top: var(--s4); }
.how-text .lead { margin-top: var(--s3); }

/* Horario: hora | punto y regla | texto. La regla empieza y termina a 7 px de cada punto: no se cruzan. */
.steps { margin-top: var(--s8); }
.steps li { display: grid; grid-template-columns: 8.5rem var(--s6) minmax(0, 1fr); grid-template-rows: auto 1fr; }
.steps li::before { content: ""; grid-column: 2; grid-row: 1; justify-self: center; align-self: start; width: 10px; height: 10px; margin-top: 7px; border: 2px solid var(--pink); border-radius: 50%; }
.steps li::after { content: ""; grid-column: 2; grid-row: 1 / 3; justify-self: center; width: 1px; margin-top: 24px; background: var(--rule-strong); }
.steps li:last-child::after { content: none; }
.steps .when { grid-column: 1; grid-row: 1; padding-top: 1px; font-size: 15px; line-height: 24px; color: var(--ink-2); font-variant-numeric: tabular-nums; text-align: right; }
.steps h3 { grid-column: 3; grid-row: 1; }
.step-body { grid-column: 3; grid-row: 2; padding: var(--s1) 0 var(--s4); }
.step-body p { max-width: 32em; }

/* Matriz de decisión */
.matrix { width: 100%; max-width: 30rem; margin-top: var(--s3); border-collapse: collapse; font-size: 15px; line-height: 1.35; }
.matrix caption { caption-side: bottom; padding-top: var(--s2); text-align: left; color: var(--ink-2); }
.matrix th, .matrix td { padding: 12px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--rule); }
.matrix tr > :first-child { padding-left: 0; }
.matrix thead th { font-weight: 400; color: var(--ink-2); }
.matrix thead > tr > * { border-bottom-color: var(--ink); }
.matrix tbody th { font-weight: 600; }
.matrix .end { color: var(--ink-2); }
.matrix .yes { background: var(--pink); color: #14102B; font-weight: 600; }

/* Fuera de un Buggui y seguridad: título a la izquierda, contenido a la derecha */
.daily, .safety { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); column-gap: var(--s8); padding-block: var(--s16) 0; }
.daily { margin-top: var(--s4); }
.prose { max-width: 32em; }
.prose p + p { margin-top: var(--s2); }
.prose .note { margin-top: var(--s4); }

/* Seguridad */
.safety { row-gap: var(--s4); }
.seen-grid { margin-bottom: var(--s2); }
.safety-head { grid-column: 1; grid-row: 1 / span 3; align-self: start; }
.safety-head .lead { margin-top: var(--s3); }
.seen-grid { grid-column: 2; display: grid; grid-template-columns: 1fr 1fr; gap: var(--s6); }
.seen-grid h3 { padding-bottom: var(--s2); border-bottom: 2px solid var(--ink); }
.plain li { padding-block: var(--s2); border-bottom: 1px solid var(--rule); }
.more, .advice { grid-column: 2; max-width: 32em; }

/* Ficha de perfil (maqueta con iniciales, sin fotos) */
.card-fig { margin-top: var(--s6); max-width: 360px; }
.card { display: flex; flex-direction: column; gap: 12px; padding: var(--s3); background: var(--app-surface); color: var(--app-text); border: 1px solid var(--app-border); border-radius: 16px; line-height: 1.35; -webkit-user-select: none; user-select: none; }
.card-top { display: flex; align-items: center; gap: var(--s2); }
.av--m { width: 56px; height: 56px; font-size: 24px; color: #FFFFFF; }
.card-id { display: flex; flex-direction: column; gap: 4px; }
.card-id b { display: flex; align-items: center; gap: 6px; font-size: 20px; line-height: 1.2; }
.badge { width: 20px; height: 20px; flex: none; }
.card-id small { display: flex; align-items: center; gap: 4px; font-size: 15px; color: var(--app-text-2); }
.card-id small svg { width: 16px; height: 16px; flex: none; }
.card-bio { display: block; padding-top: var(--s2); border-top: 1px solid var(--app-border); font-size: 16px; line-height: 1.5; }
.card-tags { display: block; font-size: 15px; color: var(--app-text-2); }
.card-fig figcaption { margin-top: var(--s2); font-size: 15px; line-height: 1.45; color: var(--ink-2); }

/* Pie */
.foot { margin-top: var(--s16); border-top: 1px solid var(--rule); font-size: 15px; line-height: 1.6; }
.foot-in { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 4fr) minmax(0, 3fr); gap: var(--s6) var(--s8); padding-block: var(--s8); }
.foot-brand p { margin-top: var(--s2); color: var(--ink-2); max-width: 26em; }
.foot h2 { font-size: 15px; line-height: 1.6; letter-spacing: 0; font-weight: 600; margin-bottom: var(--s1); }
.foot-col p + p { margin-top: var(--s2); }
.foot-col span { color: var(--ink-2); }
.foot-col li + li { margin-top: 4px; }
.foot-end { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s1) var(--s3); padding-block: var(--s3) var(--s4); border-top: 1px solid var(--rule); color: var(--ink-2); }
.foot-end p:first-child { color: var(--ink); }

/* ───────── Teléfono Android (todo en em: se escala con un solo font-size) ───────── */
.phone {
  font-size: 10.5px; line-height: 1.3; width: 32em; flex: none; padding: .8em;
  background: var(--frame); border-radius: 4em;
  box-shadow: 0 0 0 1px rgb(20 16 43 / .1);
  -webkit-user-select: none; user-select: none;
}
.scr { position: relative; display: flex; flex-direction: column; height: 63em; border-radius: 3.2em; overflow: hidden; background: var(--app-bg); color: var(--app-text); }
.phone svg { flex: none; }
.sb { position: relative; display: flex; align-items: center; justify-content: space-between; height: 4em; padding: 0 2.4em 0 2.8em; flex: none; }
.sb > span { font-size: 1.3em; font-weight: 600; font-variant-numeric: tabular-nums; }
.sb > svg { width: 4.4em; height: 1.2em; }
.cam { position: absolute; left: 50%; top: 50%; width: 1.5em; height: 1.5em; margin: -.75em 0 0 -.75em; border-radius: 50%; background: #000; }

.bar { display: flex; align-items: center; justify-content: space-between; padding: .4em 2em 0; }
.wm--app { width: 10.8em; height: 3.6em; color: var(--wm-bug); }
.sq { display: grid; place-items: center; width: 3.6em; height: 3.6em; border-radius: 1.1em; background: var(--app-input); color: var(--app-accent); }
.sq svg { width: 2em; height: 2em; }

.tri { position: relative; display: flex; flex-direction: column; align-items: center; padding: 2.8em 1.8em 0; }
.ring { position: absolute; left: 50%; top: 7.2em; width: 24em; height: 24em; margin-left: -12em; }
.ring circle { stroke: var(--app-soft-pink); }
.node { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; }
.node b { margin-top: .45em; font-size: 1.5em; line-height: 1.2; }
.node small { display: inline-flex; align-items: center; gap: .25em; margin-top: .15em; font-size: 1.15em; color: var(--app-text-2); }
.node small svg { width: 1.15em; height: 1.15em; }
.av { position: relative; display: grid; place-items: center; font-weight: 600; line-height: 1; }
.avbg { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
.av > span { position: relative; }
.av-ring { fill: var(--pink); }
.av-gap { fill: var(--app-bg); }
.node--base .av { font-size: 3.2em; width: 2.6em; height: 2.6em; }
.pair .av { font-size: 2.6em; width: 2.6em; height: 2.6em; }
.av--v { color: #FFFFFF; } .av--v .av-fill { fill: #702EFB; }
.av--o { color: #14102B; } .av--o .av-fill { fill: #FF9A26; }
.av--f { color: #FFFFFF; } .av--f .av-fill { fill: #DA2DCD; }
.crown { position: absolute; top: -.08em; right: -.12em; width: .78em; height: .78em; }

.timer { position: relative; display: flex; align-items: center; gap: 1.1em; margin: 1.6em 0; padding: 1em 2em 1em 1.4em; background: var(--app-surface); border: 1px solid var(--app-border); border-radius: 1.6em; }
.timer svg { width: 3.4em; height: 3.4em; color: var(--app-accent); }
.timer span { display: flex; flex-direction: column; align-items: center; line-height: 1.2; }
.timer small:first-child { font-size: 1.15em; font-weight: 600; }
.timer b { font-size: 2.4em; font-weight: 600; color: var(--app-accent); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.timer small:last-child { font-size: 1.1em; color: var(--app-text-2); }

.pair { position: relative; display: flex; justify-content: space-between; width: 100%; }
.pair .node { width: 11.6em; }
.pick { align-self: stretch; margin-top: .8em; border-radius: 2em; background: #C21DB6; color: #FFFFFF; font-size: 1.3em; font-weight: 600; line-height: 2.4; }
.legend { margin: 1.4em 2.6em 0; font-size: 1.05em; line-height: 1.35; text-align: center; color: var(--app-text-2); }

.tabs { display: flex; margin-top: auto; padding: 1em .6em 2em; background: var(--app-surface); border-top: 1px solid var(--app-border); }
.tabs > span:last-child { flex-grow: 1.5; }
.tabs > span { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: .35em; font-size: .95em; color: var(--app-text-2); white-space: nowrap; }
.tabs svg, .tabs img { width: 2.4em; height: 2.4em; }
.tabs > .on { color: var(--app-accent); font-weight: 600; }

/* Chat */
.chat-top { display: flex; align-items: center; gap: 1em; padding: .6em 1em 1.2em 1.4em; border-bottom: 1px solid var(--app-border); }
.back { width: 2.4em; height: 2.4em; }
.av--s { font-size: 1.6em; width: 2.3em; height: 2.3em; }
.who { display: flex; flex-direction: column; line-height: 1.25; }
.who b { display: flex; align-items: center; gap: .4em; font-size: 1.5em; }
.who em { font-style: normal; font-size: .62em; font-weight: 600; padding: .15em .55em; border-radius: .5em; background: var(--app-soft-pink); color: var(--app-accent); }
.who small { font-size: 1.15em; font-weight: 600; color: var(--app-accent); }
.video { display: grid; place-items: center; width: 3.6em; height: 3.6em; margin-left: auto; border-radius: 50%; background: var(--app-input); color: var(--app-accent); }
.video svg { width: 2.2em; height: 2.2em; }
.kebab { width: 2.2em; height: 2.2em; color: var(--app-text); }
.msgs { display: flex; flex-direction: column; gap: .7em; margin-top: auto; padding: 1.6em 1.6em 1.6em; }
.day { align-self: center; margin-bottom: .4em; font-size: 1.05em; color: var(--app-text-2); }
.msgs p { max-width: 80%; padding: .65em .95em; border-radius: 1.2em; font-size: 1.35em; line-height: 1.35; }
.in { align-self: flex-start; background: var(--app-input); border-bottom-left-radius: .3em; }
.out { align-self: flex-end; background: #702EFB; color: #FFFFFF; border-bottom-right-radius: .3em; }
.seen { align-self: flex-end; margin-top: -.3em; font-size: 1em; color: var(--app-text-2); }
.composer { display: flex; align-items: center; gap: 1em; padding: 1em 1.4em 2.2em; border-top: 1px solid var(--app-border); background: var(--app-surface); }
.composer > svg { width: 2.6em; height: 2.6em; color: var(--app-text-2); }
.field { flex: 1; padding: .7em 1em; border-radius: 2em; background: var(--app-input); font-size: 1.25em; color: var(--app-text-2); }
.send svg { width: 3.8em; height: 3.8em; }

/* ───────── Pantallas medianas y pequeñas ───────── */
@media (min-width: 600px) {
  h1 > span { display: block; } /* corte fijo «La app de citas / en la que a veces / te toca escoger.», sin depender del ancho de la fuente */
}

@media (max-width: 1099px) {
  .phone { font-size: 9.5px; }
}

@media (max-width: 899px) {
  .hero, .how { grid-template-columns: [full-start] var(--g) [main-start] minmax(0, 1fr) [main-end] var(--g) [full-end]; }
  .hero-text { grid-column: main-start / main-end; padding-block: var(--s6) var(--s8); }
  .stage { --over: 56px; }
  .stage--pink, .stage--violet { grid-column: full-start / full-end; position: static; }
  .stage--pink { grid-row: 2; }
  .block { justify-content: center; padding-top: var(--s6); }
  .stage--pink .block, .stage--violet .block { padding-inline: var(--g); justify-content: center; }
  .stage figcaption, .stage--pink figcaption, .stage--violet figcaption { margin-inline: var(--g); width: auto; }
  .how { margin-top: var(--s12); }
  .how-text { display: contents; }
  .how-text > * { grid-column: main-start / main-end; }
  .how h2 { grid-row: 1; }
  .how-text > .lead { grid-row: 2; margin-bottom: var(--s6); }
  .stage--violet { grid-row: 3; }
  .steps { grid-row: 4; }
  .steps li { grid-template-columns: var(--s4) minmax(0, 1fr) auto; }
  .steps li::before, .steps li::after { grid-column: 1; justify-self: start; }
  .steps li::after { margin-left: 5px; }
  .steps .when { grid-column: 3; padding-left: var(--s2); }
  .steps h3 { grid-column: 2; }
  .step-body { grid-column: 2 / 4; }
  .note { grid-row: 5; }
  .daily, .safety { grid-template-columns: minmax(0, 1fr); padding-top: var(--s12); }
  .daily { margin-top: 0; }
  .daily h2 { margin-bottom: var(--s4); }
  .prose .note { grid-row: auto; }
  .safety-head { grid-row: auto; }
  .seen-grid, .more, .advice { grid-column: 1; }
  .foot-in { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .foot-brand { grid-column: 1 / -1; }
}

@media (max-width: 599px) {
  body { font-size: 17px; }
  .lead { font-size: 19px; }
  .phone { font-size: clamp(8px, 2.55vw, 9.5px); }
  .hero-act { align-items: flex-start; flex-direction: column; }
  .matrix { font-size: 14px; }
  .matrix th, .matrix td { padding: 10px 6px; }
  .seen-grid { grid-template-columns: minmax(0, 1fr); gap: var(--s6); }
  .foot-in { grid-template-columns: minmax(0, 1fr); gap: var(--s4); }
  .foot-end { flex-direction: column; }
}

@media (max-width: 379px) {
  .top-nav { display: none; }
  .matrix { width: auto; margin-left: calc(-1 * var(--s4)); } /* el último paso no tiene regla: la tabla puede usar la columna del punto */
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
