/* Bibliario · portada web, estilo «Nativo y sereno» (D99).
   Paleta Claro de app/native-serene.json; misma regla tipográfica que la app (Diseno/NATIVO-SERENO.md):
   interfaz, títulos y explicaciones en la fuente del sistema; serif solo para el texto bíblico.
   Composición de producto al estilo Apple: secciones centradas, mucho aire, una acción principal,
   franjas grises alternas y tarjetas blancas sin borde. Azul tinta como único acento (D85). */

:root {
  color-scheme: light;
  /* native-serene.json · light */
  --bg: #fafaf9;
  --surface: #ffffff;
  --text: #222321;
  --muted: #686b65;
  --line: #e2e3de;
  --accent: #142d3b;
  --accent-soft: #e1e8eb;
  --input: #f0f1ed;
  --panel: #f0f1ed;
  --on-accent: #ffffff;
  --scrim: rgba(0, 0, 0, .32);
  --serif: Georgia, 'Times New Roman', serif;
  --ui: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --display: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --ease: cubic-bezier(.25, .1, .25, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 64px; }
body { margin: 0; background: var(--bg); color: var(--text); font: 17px/1.47 var(--ui); letter-spacing: -.01em; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; letter-spacing: inherit; cursor: pointer; border: 0; background: none; padding: 0; }
button, a { -webkit-tap-highlight-color: transparent; }
a:focus-visible, button:focus-visible, summary:focus-visible, [tabindex]:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 8px; }
img { display: block; max-width: 100%; }
.brand img, .closing-logo { mix-blend-mode: multiply; }
::selection { background: var(--accent-soft); color: var(--text); }
h1, h2, h3, p { margin: 0; }
.container { width: min(1024px, calc(100% - 48px)); margin-inline: auto; }
.narrow { width: min(760px, calc(100% - 48px)); }
.skip-link { position: fixed; top: -80px; left: 20px; z-index: 100; padding: 10px 16px; border-radius: 999px; background: var(--accent); color: var(--on-accent); font-size: 15px; font-weight: 600; }
.skip-link:focus { top: 12px; }

/* Iconos · app/components/Icon.tsx (viewBox 24, trazo 1,75) */
.icon { width: 22px; height: 22px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }

/* Texto */
.eyebrow { font-size: 21px; line-height: 1.2; font-weight: 600; color: var(--muted); }
.label { font-size: 15px; line-height: 20px; font-weight: 600; color: var(--accent); }
.meta { font-size: 13px; line-height: 20px; color: var(--muted); }
.display { font: 700 clamp(44px, 7.4vw, 88px)/1.04 var(--display); letter-spacing: -.035em; }
h2 { font: 700 clamp(34px, 5vw, 56px)/1.07 var(--display); letter-spacing: -.03em; }
.lead { font-size: clamp(19px, 2vw, 23px); line-height: 1.4; color: var(--muted); letter-spacing: -.015em; }

/* Botones de la web: cápsula; una sola acción rellena por bloque */
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 12px 24px; border-radius: 999px; background: var(--input); color: var(--text); font-size: 17px; line-height: 22px; font-weight: 600; text-align: center; transition: opacity .2s var(--ease), transform .2s var(--ease); }
.button-primary { background: var(--accent) url("./button-grain.svg") repeat; color: var(--on-accent); }
.button:hover { opacity: .86; }
.button:active { transform: scale(.97); opacity: .7; }
.button-compact { position: relative; min-height: 32px; padding: 6px 14px; font-size: 13px; line-height: 20px; }
.button-compact::after { content: ''; position: absolute; inset: -6px -4px; } /* objetivo táctil de 44 */
.capsule { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 16px; border-radius: 999px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); font-size: 15px; transition: background .2s var(--ease); }
a.capsule:hover { background: var(--input); }
.icon-button { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; border-radius: 22px; }
/* Enlace con chevron, como «Más información ›» */
.text-action { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; font-size: 17px; line-height: 22px; font-weight: 400; color: var(--accent); }
.text-action .icon { width: 16px; height: 16px; stroke-width: 2.2; transition: transform .2s var(--ease); }
.text-action:hover { text-decoration: underline; text-underline-offset: 3px; }
.text-action:hover .icon { transform: translateX(2px); }

/* Cabecera fina y translúcida */
.site-header { position: sticky; top: 0; z-index: 20; background: rgba(250, 250, 249, .8); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px); box-shadow: 0 1px 0 transparent; transition: box-shadow .2s var(--ease); }
.site-header.is-scrolled { box-shadow: 0 1px 0 var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 52px; }
.brand { display: inline-flex; align-items: center; gap: 6px; font-size: 17px; line-height: 22px; font-weight: 600; letter-spacing: -.02em; }
.brand img { width: 44px; height: 44px; object-fit: contain; flex-shrink: 0; margin: -8px -4px -8px -8px; }
.header-inner > nav { display: flex; gap: 4px; margin-left: auto; }
.header-inner > nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; font-size: 13px; color: var(--muted); transition: color .2s var(--ease); }
.header-inner > nav a:hover { color: var(--text); }

/* Portada: texto centrado y el teléfono debajo, como una página de producto */
.hero { padding-top: clamp(56px, 9vw, 104px); text-align: center; overflow: hidden; }
.hero-copy { display: flex; flex-direction: column; align-items: center; }
.hero .eyebrow { margin-bottom: 12px; }
.hero h1 { max-width: 13ch; }
.nowrap { white-space: nowrap; }
.hero .lead { max-width: 620px; margin-top: 20px; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px 28px; margin-top: 32px; }
.hero-copy > .meta { margin-top: 14px; }
.hero-visual { display: flex; flex-direction: column; align-items: center; padding: 64px 0 88px; }

/* Teléfono con el recorrido real por la app (D105): vídeo de 640 × 1384 bajo una barra de estado */
.phone { position: relative; width: 340px; margin: 0; overflow: hidden; background: var(--bg); border: 10px solid #1d1d1f; border-radius: 54px; box-shadow: 0 0 0 1px #3a3a3c, 0 50px 90px -40px rgba(20, 30, 40, .45), 0 24px 40px -24px rgba(20, 30, 40, .25); }
.phone-status { display: flex; justify-content: space-between; align-items: center; height: 38px; padding: 4px 28px 0; font-size: 14px; font-weight: 600; }
.phone-island { width: 92px; height: 26px; border-radius: 14px; background: #1d1d1f; }
.phone-video { display: block; width: 100%; height: auto; aspect-ratio: 640 / 1384; background: var(--bg); }
.tour-controls { display: flex; flex-direction: column; align-items: center; gap: 6px; margin-top: 24px; text-align: center; }
.tour-toggle { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 16px; border-radius: 999px; background: var(--input); font-size: 15px; font-weight: 500; transition: opacity .2s var(--ease); }
.tour-toggle[hidden] { display: none; }
.tour-toggle:active { opacity: .6; }
.tour-toggle .icon { width: 16px; height: 16px; fill: currentColor; stroke-width: 2; }

/* Cifras */
.numbers { padding-bottom: clamp(64px, 9vw, 112px); }
.numbers-list { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; margin: 0 auto; padding: 0; list-style: none; text-align: center; }
.numbers-list strong { display: block; font: 700 clamp(40px, 5vw, 56px)/1.05 var(--display); letter-spacing: -.035em; }
.numbers-list span { display: block; margin-top: 6px; font-size: 17px; color: var(--muted); }

/* Secciones */
.band { background: var(--panel); }
.section-space { padding-block: clamp(80px, 11vw, 136px); }
.section-intro { max-width: 720px; margin: 0 auto clamp(40px, 6vw, 64px); text-align: center; }
.section-intro .lead { margin-top: 20px; }

/* Tarjetas de función: blancas, sin borde, radio 28 */
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin: 0; padding: 0; list-style: none; }
.tile { display: flex; flex-direction: column; min-height: 280px; padding: 32px 28px 24px; border-radius: 28px; background: var(--surface); }
.tile > .icon { width: 30px; height: 30px; color: var(--accent); margin-bottom: 28px; }
.tile h3 { font: 700 24px/1.17 var(--display); letter-spacing: -.02em; margin-bottom: 10px; }
.tile p { font-size: 16px; line-height: 1.5; color: var(--muted); }
.tile .text-action { margin-top: auto; padding-top: 16px; font-size: 16px; }
.soon { display: inline-block; margin-right: 4px; font-weight: 600; color: var(--accent); }

/* Una palabra, dos pasajes */
.passage-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.passage-card { display: flex; flex-direction: column; padding: 36px 32px; border-radius: 28px; background: var(--panel); }
.passage-ref { font-size: 15px; font-weight: 600; margin-bottom: 16px; }
.passage-card blockquote { flex: 1; margin: 0 0 20px; font: 400 clamp(23px, 2.6vw, 30px)/1.35 var(--serif); letter-spacing: 0; }
.passage-card mark { background: var(--accent-soft); color: inherit; padding: 0 3px; margin: 0 -3px; border-radius: 6px; }
.passage-card .meta { font-size: 15px; line-height: 22px; }
.center-action { text-align: center; margin-top: 28px; }
.source-note { text-align: center; }

/* Preguntas: acordeón con filetes finos */
.faq-list { border-top: 1px solid var(--line); }
details { border-bottom: 1px solid var(--line); }
summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 72px; padding: 18px 0; cursor: pointer; font-size: 19px; line-height: 26px; font-weight: 600; letter-spacing: -.02em; }
summary::-webkit-details-marker { display: none; }
summary .icon { width: 20px; height: 20px; color: var(--muted); transition: transform .25s var(--ease); }
details[open] summary .icon { transform: rotate(45deg); }
details > p { padding: 0 40px 24px 0; font-size: 17px; line-height: 1.55; color: var(--muted); }

/* Cierre */
.closing-inner { display: flex; flex-direction: column; align-items: center; text-align: center; }
.closing-logo { width: 96px; height: 96px; object-fit: contain; margin-bottom: 8px; }
.closing .lead { margin: 20px 0 32px; }
.closing .meta { margin-top: 16px; }

/* Pie: pequeño y gris */
.site-footer { background: var(--panel); border-top: 1px solid var(--line); }
.footer-inner { padding-block: 20px 28px; }
.footer-inner nav { display: flex; flex-wrap: wrap; gap: 0 4px; margin-left: -10px; }
.footer-inner nav a, .footer-inner nav button { display: inline-flex; align-items: center; min-height: 40px; padding: 0 10px; font-size: 12px; color: var(--muted); }
.footer-inner nav a:hover, .footer-inner nav button:hover { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.footer-inner .meta { font-size: 12px; margin-top: 4px; }

/* Hojas · como las de la app: asa, cabecera compacta, radio 28 */
dialog { width: min(560px, calc(100% - 32px)); max-height: 86dvh; padding: 0; border: 0; border-radius: 28px; background: var(--surface); color: var(--text); overflow: auto; box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .3); }
dialog::backdrop { background: var(--scrim); backdrop-filter: blur(4px); }
.sheet-handle { width: 36px; height: 5px; border-radius: 3px; background: var(--line); margin: 8px auto 0; }
.sheet-header { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; justify-content: flex-end; min-height: 52px; padding: 0 12px; background: var(--surface); }
.sheet-header .sheet-title { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 17px; font-weight: 600; pointer-events: none; }
.close-dialog { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; margin: 6px; border-radius: 50%; background: var(--input); color: var(--muted); }
.close-dialog .icon { width: 16px; height: 16px; stroke-width: 2.2; }
.sheet-body { padding: 8px 24px 28px; }
.sheet-body h2 { font: 700 23px/30px var(--ui); letter-spacing: -.02em; margin: 4px 0 16px; }
.sheet-body > p { font-size: 16px; line-height: 25px; color: var(--muted); margin-bottom: 14px; }
.sheet-body .text-action { margin-top: 4px; }

@media (max-width: 900px) {
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 734px) {
  .container, .narrow { width: calc(100% - 40px); }
  .header-inner > nav { display: none; }
  .header-inner { min-height: 48px; }
  .hero-actions { flex-direction: column; gap: 4px; }
  .hero-visual { padding: 48px 0 64px; }
  .numbers-list { grid-template-columns: repeat(2, 1fr); row-gap: 32px; }
  .tiles, .passage-pair { grid-template-columns: 1fr; }
  .tile { min-height: 0; padding: 28px 24px 20px; }
  .tile > .icon { margin-bottom: 20px; }
  .passage-card { padding: 28px 24px; }
  summary { font-size: 17px; line-height: 24px; }
  details > p { padding-right: 0; font-size: 16px; }
  .closing .button { align-self: stretch; }
  /* En móvil las hojas suben desde abajo, como en la app */
  dialog { width: 100%; max-width: 100%; margin: auto 0 0; border-radius: 28px 28px 0 0; max-height: 90dvh; }
}
@media (max-width: 380px) {
  .container, .narrow { width: calc(100% - 32px); }
  .hero-visual { width: 100%; padding-inline: 16px; }
  .phone { width: min(320px, 100%); border-width: 8px; border-radius: 48px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
