/* ============================================================
   PaMapp — landing. Sistema "Papel" llevado a web.
   Dirección: editorial impreso. Reglas finas en vez de cajas,
   asimetría, mucho aire y grano de papel. El color sólo dice estado.
   ============================================================ */

*,
*::before,
*::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background-color: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--text-body);
  line-height: var(--leading-relaxed);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* Grano de papel: una sola textura SVG, sin pedir nada a la red. */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='0.045'/%3E%3C/svg%3E");
}

main, header, footer { position: relative; z-index: 1; }

img, svg { max-width: 100%; height: auto; display: block; }

::selection { background: var(--ink); color: var(--paper); }

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: var(--space-sm);
  padding: var(--space-sm) var(--space-lg);
  background: var(--ink);
  color: var(--paper);
  border-radius: var(--radius-pill);
  z-index: 100;
}
.skip-link:focus { left: var(--space-lg); }

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

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

.section {
  padding-block: var(--space-section);
  position: relative;
  /* El header es sticky: sin esto un ancla deja el título tapado. */
  scroll-margin-top: 68px;
}

.section--sunken { background: var(--sunken); }
.section--sunken + .section--sunken { padding-top: 0; }

.section--ink {
  background: var(--ink);
  color: var(--paper);
}

/* ---------- Tipografía ---------- */

h1, h2, h3 {
  font-family: var(--font-display);
  /* 700 y no 600: Nunito es redonda y a 600 los titulares quedan blandos al
     lado del ícono y de la tarjeta social, que van en 800. El `opsz` que había
     acá era del eje óptico de Literata — Nunito no lo tiene y era regla muerta. */
  font-weight: 700;
  letter-spacing: -0.022em;
  line-height: var(--leading-tight);
  margin: 0;
  text-wrap: balance;
}

p { margin: 0; }

/* La itálica del texto corrido SÍ se carga (Nunito 400 cursiva): un `<em>`
   suelto a 17px con la recta inclinada por el navegador se ve mal de cerca.
   Los dos casos grandes —el titular del hero y la pregunta de cada solapa— no
   usan cursiva: ahí el énfasis lo hacen el color y el peso. */
em { font-style: italic; }

strong { font-weight: 600; }

.eyebrow {
  font-size: var(--text-caption);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-subtle);
  margin-bottom: var(--space-lg);
}
.eyebrow--light { color: rgb(250 247 242 / 0.55); }

.section-head { max-width: 44rem; margin-bottom: var(--space-5xl); }

.section-title {
  font-size: var(--text-display);
  margin-bottom: var(--space-2xl);
}
.section-title--light { color: var(--paper); }

.section-lead {
  font-size: var(--text-lead);
  color: var(--ink-muted);
  max-width: var(--measure);
  line-height: var(--leading-relaxed);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  min-height: 48px;
  padding: 0 var(--space-2xl);
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-size: var(--text-small);
  font-weight: 600;
  letter-spacing: 0.005em;
  text-decoration: none;
  cursor: pointer;
  transition:
    transform var(--duration-fast) var(--ease-out),
    box-shadow var(--duration-normal) var(--ease-out),
    background-color var(--duration-fast) var(--ease-out),
    color var(--duration-fast) var(--ease-out);
}

/* La acción primaria es tinta, no un color de marca: así los tres
   colores de estado quedan como los únicos que levantan la voz. */
/* La acción primaria es salvia, no tinta. Es el cambio deliberado de Sereno
   respecto de Papel: la acción ES progreso, y comparte color con lo confirmado.
   La clase se llamaba `btn--ink` y se renombró en vez de dejarla pintando otro
   color del que dice — un nombre que miente es peor que un refactor. */
.btn--action {
  background: var(--action);
  color: var(--action-ink);
  box-shadow: var(--shadow-card);
}
.btn--action:hover { transform: translateY(-2px); box-shadow: var(--shadow-raised); }
.btn--action:active { transform: translateY(0); }

.btn--ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line-strong);
}
.btn--ghost:hover { background: var(--surface); border-color: var(--ink); transform: translateY(-2px); }

.btn--sm { min-height: 40px; padding-inline: var(--space-xl); font-size: var(--text-caption); }
.btn--block { width: 100%; }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in oklab, var(--paper) 88%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--duration-normal) var(--ease-out);
}
.site-header.is-stuck { border-bottom-color: var(--line); }

.site-header__inner {
  display: flex;
  align-items: center;
  gap: var(--space-2xl);
  min-height: 68px;
}

.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  text-decoration: none;
  color: inherit;
  margin-right: auto;
}
/* La marca. El radio es 22,4% del lado —la esquina de iOS—, así que en la
   cabecera se ve igual que en la pantalla de inicio del teléfono. */
.wordmark__mark {
  flex: none;
  display: block;
  width: 30px;
  height: 30px;
  border-radius: 22.4%;
}
.wordmark__text {
  font-family: var(--font-display);
  font-size: 1.1875rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.site-nav { display: flex; gap: var(--space-2xl); }
.site-nav a {
  color: var(--ink-muted);
  text-decoration: none;
  font-size: var(--text-small);
  padding-block: var(--space-sm);
  border-bottom: 1px solid transparent;
  transition: color var(--duration-fast), border-color var(--duration-fast);
}
.site-nav a:hover { color: var(--ink); border-bottom-color: var(--ink); }

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

.hero {
  padding-top: clamp(2rem, 1.2rem + 3vw, 4rem);
  padding-bottom: clamp(3.5rem, 2rem + 6vw, 7rem);
  overflow: hidden;
}

.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(2rem, 1rem + 5vw, 5rem);
  align-items: center;
}

.hero__title {
  font-size: var(--text-hero);
  margin-bottom: var(--space-2xl);
}
/* Sin itálica: Nunito no trae cursiva en el sitio y el navegador la inventaba
   inclinando la recta — una falsa itálica se nota y arruina un titular de 76px.
   El énfasis lo hace el salvia, que además es el color de la acción: la segunda
   línea del titular y el botón que la cumple hablan el mismo idioma. */
.hero__title em { font-style: normal; color: var(--action); }

.hero__lead {
  font-size: var(--text-lead);
  color: var(--ink-muted);
  max-width: 31rem;
  margin-bottom: var(--space-3xl);
}
.hero__lead strong { color: var(--ink); }

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
}

.hero__note {
  font-size: var(--text-caption);
  color: var(--ink-subtle);
}

/* ---------- Teléfono ---------- */

.hero__device { position: relative; justify-self: center; }

.device {
  position: relative;
  width: min(322px, 80vw);
  border-radius: 44px;
  padding: 11px;
  /* Bisel del teléfono. Los tres pasos son el gris verdoso de Sereno, no el
     marrón del papel crema: es aluminio apoyado sobre este fondo, no cuero. */
  background: linear-gradient(160deg, #e6eeeb, #cfdcd7 55%, #bccbc5);
  box-shadow: var(--shadow-lifted), 0 0 0 1px rgb(59 47 30 / 0.09);
  rotate: -1.6deg;
  transition: rotate var(--duration-slow) var(--ease-out), translate var(--duration-slow) var(--ease-out);
}
.device:hover { rotate: 0deg; translate: 0 -6px; }

.device::after {
  content: '';
  position: absolute;
  inset: 11px;
  border-radius: 34px;
  pointer-events: none;
  background: linear-gradient(200deg, rgb(255 255 255 / 0.5), transparent 42%);
}

.device__screen {
  background: var(--paper);
  border-radius: 34px;
  padding: var(--space-md) var(--space-lg) var(--space-3xl);
  /* Relación de pantalla real: lo que no entra se corta, como en el teléfono. */
  aspect-ratio: 9 / 19;
  overflow: hidden;
  position: relative;
}

.device__caption {
  margin-top: var(--space-2xl);
  max-width: 26rem;
  margin-inline: auto;
  font-size: var(--text-caption);
  line-height: var(--leading-normal);
  color: var(--ink-subtle);
  text-align: center;
}

.phone-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  font-weight: 600;
  color: var(--ink);
  padding-inline: var(--space-sm);
  margin-bottom: var(--space-lg);
}
.phone-top__icons { display: flex; gap: 3px; }
.pill-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--ink); display: block; }

.phone-head { margin-bottom: var(--space-lg); }
.phone-head__group {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-subtle);
}
.phone-head__name {
  font-size: 27px;
  margin-block: 2px;
  letter-spacing: -0.02em;
}
.phone-head__name span { font-size: 15px; color: var(--ink-subtle); }
.phone-head__date { font-size: 12px; color: var(--ink-subtle); }

.relevo-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  box-shadow: var(--shadow-card);
  margin-bottom: var(--space-xl);
}
.relevo-card__headline {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  line-height: var(--leading-snug);
  letter-spacing: -0.02em;
  margin-bottom: var(--space-md);
}
.progress {
  height: 6px;
  border-radius: var(--radius-pill);
  background: var(--sunken);
  overflow: hidden;
}
.progress__fill {
  display: block;
  height: 100%;
  width: var(--pct);
  border-radius: inherit;
  background: var(--done);
  transform-origin: left;
  animation: grow 900ms var(--ease-out) 400ms both;
}
@keyframes grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }

.relevo-card__meta {
  margin-top: 6px;
  font-size: 11px;
  color: var(--ink-subtle);
}
.relevo-card__who {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-top: var(--space-md);
  padding-top: var(--space-md);
  border-top: 1px solid var(--line);
  font-size: 11px;
  color: var(--ink-muted);
}
.avatars { display: flex; }
.avatar {
  width: 21px;
  height: 21px;
  border-radius: 50%;
  background: var(--sunken);
  border: 1.5px solid var(--surface);
  display: grid;
  place-items: center;
  font-size: 9px;
  font-weight: 600;
  color: var(--ink-muted);
  margin-left: -6px;
}
.avatar:first-child { margin-left: 0; }

.phone-section {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-subtle);
  margin-bottom: var(--space-sm);
}

.agenda { list-style: none; margin: 0 0 var(--space-lg); padding: 0; }

.agenda__row {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  background: var(--surface);
  border: 1px solid var(--line);
  border-left-width: 3px;
  border-radius: var(--radius-md);
  padding: var(--space-md);
  margin-bottom: 6px;
}
/* El único lugar donde el color habla: el estado de la fila. */
.agenda__row.is-overdue { border-left-color: var(--attention); background: var(--attention-surface); }
.agenda__row.is-upcoming { border-left-color: var(--upcoming); }
.agenda__row.is-done { border-left-color: var(--done); opacity: 0.72; }

.agenda__time {
  font-size: 11px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--ink-muted);
  min-width: 34px;
}
.agenda__body { flex: 1; min-width: 0; }
.agenda__title {
  display: block;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.3;
}
.agenda__sub { display: block; font-size: 11px; color: var(--ink-subtle); }
.agenda__row.is-done .agenda__title { text-decoration: line-through; text-decoration-color: var(--ink-subtle); }

.agenda__action {
  font-size: 10px;
  font-weight: 600;
  color: var(--paper);
  background: var(--ink);
  padding: 5px 10px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
}
.agenda__check { color: var(--done); font-size: 14px; font-weight: 600; }

.device__screen::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 88px;
  pointer-events: none;
  background: linear-gradient(to top, var(--paper) 42%, transparent);
}

.phone-fab {
  position: absolute;
  z-index: 1;
  left: var(--space-lg);
  right: var(--space-lg);
  bottom: var(--space-lg);
  background: var(--ink);
  color: var(--paper);
  border-radius: var(--radius-pill);
  text-align: center;
  padding: 11px;
  font-size: 12px;
  font-weight: 600;
  box-shadow: var(--shadow-raised);
}
