/* Cotidiano — sitio informativo. Sin build, sin dependencias, sin fuentes externas, sin JS.
 *
 * La hoja la comparten las cuatro páginas. `.hero` es el encabezado compacto que usan Privacidad,
 * Términos e Invitación; la landing agrega `.hero--home` encima para el encabezado grande de dos
 * columnas. Si el hero grande viviera en `.hero` a secas, a las páginas legales les crecería el
 * banner a media pantalla.
 */

:root {
  /* Marca */
  --indigo: #4F46E5;
  --violet: #7C3AED;
  --amber: #FBBF24;
  /* El degradado del encabezado, el mismo de la app (brand_header_start/end). */
  --grad-a: #4F46E5;
  --grad-b: #7C3AED;

  /* Superficies y texto — Slate, igual que la paleta clara de la app */
  --bg: #ffffff;
  --surface: #f8fafc;
  --surface-2: #f1f5f9;
  --border: #e2e8f0;
  --text: #0f172a;
  --muted: #64748b;
  --link: #4F46E5;

  /* El teléfono de los mockups reproduce el tema CLARO de la app */
  --ui-bezel: #e2e8f0;
  --ui-bg: #f8fafc;
  --ui-card: #ffffff;
  --ui-border: #e9eef5;
  --ui-text: #0f172a;
  --ui-muted: #64748b;
  --ui-line: #e2e8f0;

  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 8px 24px -8px rgba(15, 23, 42, 0.16);
  --shadow-lg: 0 32px 64px -24px rgba(15, 23, 42, 0.34);
}

@media (prefers-color-scheme: dark) {
  :root {
    /* En oscuro la app usa los dos tonos profundos (brand_header_*_dark): el degradado claro
       encandila de noche y deja los íconos de la barra de estado sin contraste. */
    --grad-a: #312E81;
    --grad-b: #5B21B6;

    --bg: #0b1120;
    --surface: #111827;
    --surface-2: #1e293b;
    --border: #1f2937;
    --text: #e5e7eb;
    --muted: #9ca3af;
    --link: #a5b4fc;

    --ui-bezel: #1f2937;
    --ui-bg: #0b1120;
    --ui-card: #111827;
    --ui-border: #1f2937;
    --ui-text: #e2e8f0;
    --ui-muted: #94a3b8;
    --ui-line: #1e293b;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 8px 24px -8px rgba(0, 0, 0, 0.6);
    --shadow-lg: 0 32px 64px -24px rgba(0, 0, 0, 0.75);
  }
}

* { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  /* Nada de la página puede desbordar a lo ancho. */
  overflow-x: hidden;
}

a { color: var(--link); }
a:hover { text-decoration: none; }

img, svg { max-width: 100%; }

::selection { background: rgba(124, 58, 237, 0.22); }

:focus-visible {
  outline: 2px solid var(--indigo);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------------------------------------------------------------- Layout -- */

.wrap { max-width: 720px; margin: 0 auto; padding: 0 20px; }
.wrap--wide { max-width: 1080px; }

/* 900px es el único umbral de la página: abajo de eso todo —hero, pasos, showcases, grilla y
   pie— es una sola columna de 600, así que comparten el mismo borde izquierdo. Acotarlo acá y
   no bloque por bloque es lo que evita que el hero termine centrado sobre un texto pegado al
   margen. Abajo de ~640px de viewport el límite ya no toca nada y manda el padding de `.wrap`. */
@media (max-width: 899px) {
  .wrap--wide { max-width: 600px; }
}

/* Bloque de texto corrido: la medida de lectura no crece aunque el contenedor sea ancho. */
.prose { max-width: 62ch; }

/* ------------------------------------------------------------------ Hero -- */

.hero {
  position: relative;
  background: linear-gradient(135deg, var(--grad-a), var(--grad-b));
  color: #fff;
  padding: 56px 0 48px;
  text-align: center;
  overflow: hidden;
}

/* Una veladura del glifo, en grande y muy tenue, para que el degradado no sea un plano liso. */
.hero::after {
  content: "";
  position: absolute;
  top: -30%;
  right: -12%;
  width: 620px;
  height: 620px;
  background: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.16), transparent 62%);
  pointer-events: none;
}

.hero .wrap { position: relative; z-index: 1; }

.hero .logo { width: 88px; height: 88px; }

.hero h1 {
  margin: 18px 0 8px;
  font-size: clamp(2.1rem, 7vw, 3rem);
  letter-spacing: -0.025em;
  font-weight: 700;
  line-height: 1.1;
}

.hero p {
  margin: 0 auto;
  max-width: 34ch;
  font-size: clamp(1.05rem, 3.4vw, 1.25rem);
  opacity: 0.92;
}

/* ---- Hero de la portada: dos columnas, texto y teléfono ---- */

.hero--home { padding: 60px 0 72px; text-align: left; }

.hero--home .hero__grid {
  display: grid;
  gap: 44px;
  align-items: center;
}

@media (min-width: 900px) {
  .hero--home { padding: 84px 0 92px; }
  .hero--home .hero__grid { grid-template-columns: 1.05fr 0.95fr; gap: 56px; }
}

/* Logotipo: el glifo y la palabra en una línea. */
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 26px;
}
.brand .logo { width: 44px; height: 44px; flex: none; }
.brand__name {
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.hero--home h1 {
  margin: 0 0 16px;
  font-size: clamp(2.3rem, 6.2vw, 3.5rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
  max-width: 15ch;
}

/* El ámbar del check, usado como subrayado de la palabra que carga el sentido.
   La banda va en `em` y no en % del alto de línea: con el h1 a line-height 1.08 el
   porcentaje la trepaba hasta tapar un tercio de la palabra. */
.hero--home h1 .mark {
  box-shadow: inset 0 -0.14em rgba(251, 191, 36, 0.55);
  padding: 0 2px;
}

.hero--home .lead {
  margin: 0 0 30px;
  max-width: 38ch;
  font-size: clamp(1.06rem, 2.6vw, 1.2rem);
  opacity: 0.9;
  line-height: 1.6;
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 20px;
}

.badge {
  display: inline-block;
  padding: 11px 20px;
  /* En pantallas muy angostas el texto parte en dos líneas: centrado sigue leyéndose
     como pastilla y no como un párrafo con borde. */
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 999px;
  font-size: 0.9rem;
  background: rgba(255, 255, 255, 0.08);
}

.hero--home .badge { margin: 0; }

/* Fila de tiendas: el «Próximamente en» suelto y una pastilla por tienda. Deliberadamente NO
   imita las insignias oficiales («Get it on Google Play», «Download on the App Store»): esas
   son artes que Google y Apple entregan hechas y que además no corresponden a una app que
   todavía no está publicada. Acá es el símbolo de cada tienda más su nombre. */
.cta__soon { font-size: 0.95rem; opacity: 0.88; }

/* Las dos tiendas van agrupadas para que, cuando la fila no entra, bajen JUNTAS a la línea
   siguiente en vez de que «App Store» quede huérfana debajo de «Google Play». */
.cta__stores { display: flex; flex-wrap: wrap; gap: 12px; }

.badge--store {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 600;
  white-space: nowrap;
}
.badge--store svg { width: 17px; height: 17px; display: block; flex: none; }

/* El link de abajo va en su propia línea, debajo de las pastillas. */
.hero--home .hero__link { display: inline-block; margin-top: 22px; }

/* Enlace claro sobre el degradado (el `--link` del tema no contrasta acá). */
.hero__link {
  color: #fff;
  opacity: 0.86;
  font-size: 0.95rem;
  text-decoration-color: rgba(255, 255, 255, 0.45);
  text-underline-offset: 3px;
}
.hero__link:hover { opacity: 1; }

.hero__phone { display: flex; justify-content: center; }

@media (min-width: 900px) {
  .hero__phone { justify-content: flex-end; }
}

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

main { padding: 56px 0 24px; }

/* Privacidad, Términos e Invitación son `<main class="wrap">`, y el `padding: 0 20px` de
   `.wrap` —una clase— le gana por especificidad al `padding` de `main` —un elemento—, así que
   les anulaba el aire de arriba y el primer h2 quedaba pegado a la franja de color. Mismo caso
   en el pie. Se repite el valor con la especificidad que hace falta en vez de tocar `.wrap`,
   que también lo usan divs que sí tienen que ir sin padding vertical. */
main.wrap { padding-top: 56px; padding-bottom: 24px; }

.section { padding: 24px 0; }
.section--alt {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 64px 0;
  margin: 64px 0;
}

h2 {
  font-size: clamp(1.5rem, 3.4vw, 2rem);
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin: 48px 0 14px;
}
h2:first-child { margin-top: 0; }
h3 { font-size: 1.08rem; margin: 30px 0 6px; }
p, li { color: var(--text); }
.muted { color: var(--muted); }

/* Rótulo chico sobre el título, en versalitas. */
.eyebrow {
  display: block;
  margin: 0 0 10px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--indigo);
}
@media (prefers-color-scheme: dark) { .eyebrow { color: var(--link); } }

/* Primer párrafo de una sección: entra más grande que el cuerpo. */
.section-lead {
  font-size: clamp(1.1rem, 2.4vw, 1.3rem);
  line-height: 1.55;
  letter-spacing: -0.01em;
  max-width: 34ch;
}

/* Secciones de texto sobre el contenedor ancho: alinean con el hero, pero ni el
   título ni el aviso se estiran a los 1080px del contenedor. */
.section--text h2 { max-width: 24ch; }
.section--text .note--lead { max-width: 62ch; }

/* ------------------------------------------------------------ Cómo funciona -- */

.steps {
  list-style: none;
  margin: 36px 0 0;
  padding: 0;
  display: grid;
  gap: 34px;
  counter-reset: paso;
}

@media (min-width: 900px) {
  .steps { grid-template-columns: repeat(3, 1fr); gap: 32px; }
}

.steps li {
  position: relative;
  counter-increment: paso;
  padding-left: 56px;
}

@media (min-width: 900px) {
  .steps li { padding-left: 0; padding-top: 60px; }
}

/* El número, en un disco con el degradado de marca. */
.steps li::before {
  content: counter(paso);
  position: absolute;
  top: 0;
  left: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--grad-a), var(--grad-b));
  color: #fff;
  font-weight: 700;
  font-size: 1.02rem;
  box-shadow: var(--shadow-sm);
}

/* La línea que une un paso con el siguiente. */
.steps li::after {
  content: "";
  position: absolute;
  background: var(--border);
}

.steps li::after {
  left: 19px;
  top: 46px;
  width: 2px;
  height: calc(100% - 32px);
}
.steps li:last-child::after { display: none; }

@media (min-width: 900px) {
  .steps li::after {
    left: 52px;
    top: 19px;
    width: calc(100% - 24px);
    height: 2px;
  }
}

.steps strong {
  display: block;
  font-size: 1.1rem;
  letter-spacing: -0.01em;
  margin-bottom: 4px;
}
.steps span { color: var(--muted); font-size: 0.97rem; }

/* --------------------------------------------------------- Filas alternadas -- */

.showcase {
  display: grid;
  gap: 36px;
  align-items: center;
  padding: 44px 0;
}

@media (min-width: 900px) {
  .showcase { grid-template-columns: 1fr 1fr; gap: 64px; padding: 56px 0; }
  /* La fila impar pone el teléfono a la derecha; la par lo manda a la izquierda. */
  .showcase--flip .showcase__art { order: -1; }
}

.showcase__art { display: flex; justify-content: center; }

.showcase h2 { margin-top: 0; }

.showcase ul {
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}
.showcase ul li {
  position: relative;
  padding-left: 26px;
  margin-bottom: 9px;
  color: var(--muted);
  font-size: 0.97rem;
}
/* Un check ámbar, el mismo trazo del glifo. */
.showcase ul li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.55em;
  width: 11px;
  height: 6px;
  border-left: 2.5px solid var(--amber);
  border-bottom: 2.5px solid var(--amber);
  transform: rotate(-45deg);
}

/* ------------------------------------------------------------- Grilla resto -- */

.features {
  list-style: none;
  padding: 0;
  margin: 32px 0 0;
  display: grid;
  gap: 16px;
}

@media (min-width: 620px) { .features { grid-template-columns: 1fr 1fr; } }
@media (min-width: 900px) { .features { grid-template-columns: repeat(3, 1fr); } }

.features li {
  /* `--surface` y no `--bg`: en oscuro la sombra no se ve, así que la tarjeta se despega
     del fondo por ser MÁS CLARA que él — el mismo truco que usa la paleta de la app. */
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px 22px;
  box-shadow: var(--shadow-sm);
}

.features strong { display: block; margin-bottom: 4px; font-size: 1.02rem; letter-spacing: -0.01em; }
.features span { color: var(--muted); font-size: 0.94rem; }

/* El ícono chico de cada tarjeta. */
.features .ico {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  margin-bottom: 12px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.14), rgba(124, 58, 237, 0.14));
  color: var(--indigo);
}
@media (prefers-color-scheme: dark) {
  .features .ico {
    background: linear-gradient(135deg, rgba(165, 180, 252, 0.16), rgba(196, 181, 253, 0.16));
    color: var(--link);
  }
}
.features .ico svg { width: 19px; height: 19px; display: block; }

/* ------------------------------------------------------------------- Nota -- */

.note {
  background: var(--surface);
  border-left: 3px solid var(--amber);
  border-radius: 0 10px 10px 0;
  padding: 14px 18px;
  margin: 24px 0;
}

/* La nota de privacidad de la portada, con más peso. */
.note--lead {
  border-radius: 16px;
  border: 1px solid var(--border);
  border-left: 3px solid var(--amber);
  padding: 22px 24px;
  box-shadow: var(--shadow-sm);
}

/* ------------------------------------------------------------------ Tabla -- */

table { width: 100%; border-collapse: collapse; margin: 18px 0; font-size: 0.95rem; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
th { color: var(--muted); font-weight: 600; }
.scroll-x { overflow-x: auto; }

/* ===========================================================================
   Mockups de la app — dibujados con divs, sin imágenes ni JS.
   Los datos de ejemplo son los reales de la app: «2 de 3» para una rutina,
   «Hecho por …» en una tarea compartida, «Nivel 3 · Planta».
   =========================================================================== */

.phone {
  width: min(268px, 76vw);
  flex: none;
  padding: 9px;
  border-radius: 38px;
  background: var(--ui-bezel);
  box-shadow: var(--shadow-lg);
  /* El degradado del hero ya trae sombra propia; acá sólo se despega del fondo. */
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.hero__phone .phone { transform: rotate(1.4deg); }

.phone__screen {
  border-radius: 30px;
  overflow: hidden;
  background: var(--ui-bg);
  color: var(--ui-text);
  font-size: 12.5px;
  line-height: 1.45;
  text-align: left;
}

/* Barra superior de la app: el mismo degradado del encabezado. */
.ui__top {
  background: linear-gradient(135deg, var(--grad-a), var(--grad-b));
  color: #fff;
  padding: 14px 15px 15px;
}

.ui__status {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 10px;
  opacity: 0.85;
  margin-bottom: 10px;
  font-variant-numeric: tabular-nums;
}
.ui__status span { letter-spacing: 0.02em; }

.ui__title {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.ui__sub { font-size: 11px; opacity: 0.86; margin-top: 1px; }

.ui__body { padding: 12px 12px 16px; display: grid; gap: 9px; }

/* Chips (racha, pendientes) */
.ui__chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 2px; }
.ui__chip {
  font-size: 10px;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--ui-card);
  border: 1px solid var(--ui-border);
  color: var(--ui-muted);
  white-space: nowrap;
}
.ui__chip--amber {
  background: rgba(251, 191, 36, 0.16);
  border-color: rgba(251, 191, 36, 0.4);
  color: #92400e;
}
@media (prefers-color-scheme: dark) { .ui__chip--amber { color: #FDE68A; } }

/* Tarjeta de tarea */
.task {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  background: var(--ui-card);
  border: 1px solid var(--ui-border);
  border-radius: 12px;
  padding: 10px 11px;
  box-shadow: var(--shadow-sm);
}

.task__box {
  flex: none;
  width: 16px;
  height: 16px;
  margin-top: 1px;
  border-radius: 5px;
  border: 1.5px solid var(--ui-line);
  position: relative;
}

.task__box--done {
  background: var(--indigo);
  border-color: var(--indigo);
}
/* El tilde, dibujado con dos bordes rotados. */
.task__box--done::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 3px;
  width: 6px;
  height: 3px;
  border-left: 1.6px solid #fff;
  border-bottom: 1.6px solid #fff;
  transform: rotate(-45deg);
}

.task__body { min-width: 0; flex: 1; }
.task__title { font-weight: 600; font-size: 12.5px; letter-spacing: -0.005em; }
.task__meta { color: var(--ui-muted); font-size: 10.5px; margin-top: 2px; }

.task--done .task__title { color: var(--ui-muted); text-decoration: line-through; }

/* Etiqueta de contexto (Hogar, Pareja…) */
.tag {
  display: inline-block;
  font-size: 9.5px;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--ui-muted);
  border: 1px solid var(--ui-border);
  vertical-align: 1px;
}

/* Avatar chiquito de quien completó */
.who {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.who__dot {
  width: 13px;
  height: 13px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--grad-a), var(--grad-b));
  color: #fff;
  font-size: 7.5px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
}

/* Barra de progreso de una rutina */
.bar {
  height: 4px;
  border-radius: 999px;
  background: var(--ui-line);
  margin-top: 7px;
  overflow: hidden;
}
.bar__fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--grad-a), var(--grad-b));
}

/* Lista de pasos de una rutina */
.ui__steps { display: grid; gap: 7px; margin-top: 9px; }
.ui__step {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  color: var(--ui-text);
}
.ui__step .task__box { width: 14px; height: 14px; }
.ui__step--done { color: var(--ui-muted); }
.ui__step--done .lbl { text-decoration: line-through; }

/* Encabezado de sección dentro de la pantalla */
.ui__label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ui-muted);
  font-weight: 700;
  margin-top: 4px;
}

/* Burbuja de dictado por voz */
.ui__voice {
  background: var(--ui-card);
  border: 1px solid var(--ui-border);
  border-radius: 12px;
  padding: 11px;
  box-shadow: var(--shadow-sm);
}
.ui__mic {
  width: 38px;
  height: 38px;
  margin: 4px auto 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--grad-a), var(--grad-b));
  display: flex;
  align-items: center;
  justify-content: center;
  /* El halo del micrófono escuchando. */
  box-shadow: 0 0 0 6px rgba(124, 58, 237, 0.14);
}
.ui__mic svg { width: 17px; height: 17px; color: #fff; }
.ui__said {
  font-size: 12px;
  font-style: italic;
  color: var(--ui-text);
  text-align: center;
}
.ui__arrow {
  text-align: center;
  color: var(--ui-muted);
  font-size: 13px;
  margin: 2px 0;
}

/* Barra de navegación de abajo */
.ui__nav {
  display: flex;
  justify-content: space-around;
  border-top: 1px solid var(--ui-line);
  background: var(--ui-card);
  padding: 8px 4px 10px;
  font-size: 9.5px;
  color: var(--ui-muted);
}
.ui__nav b { color: var(--indigo); font-weight: 600; }
@media (prefers-color-scheme: dark) { .ui__nav b { color: var(--link); } }
.ui__nav span,
.ui__nav b { display: flex; flex-direction: column; align-items: center; gap: 3px; }
.ui__nav i {
  width: 15px;
  height: 15px;
  border-radius: 4px;
  background: currentColor;
  opacity: 0.32;
  display: block;
}
.ui__nav b i { opacity: 1; }

/* ----------------------------------------------------------------- Footer -- */

footer {
  border-top: 1px solid var(--border);
  margin-top: 64px;
  padding: 28px 0 48px;
  color: var(--muted);
  font-size: 0.9rem;
}
footer nav { display: flex; flex-wrap: wrap; gap: 18px; margin-bottom: 10px; }
footer.wrap { padding-top: 28px; padding-bottom: 48px; }

.footer__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  color: var(--text);
  font-weight: 600;
}
.footer__brand .logo { width: 28px; height: 28px; }

/* ------------------------------------------------------------ Accesibilidad -- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero__phone .phone { transform: none; }
}
