/* ==========================================================================
   LMJN.ORG  -  The Life and Morals of Jesus of Nazareth
   Hoja de estilos unica y compartida por todas las versiones de idioma.
   Paleta calida (crema / oro / tinta) y tipografia serif = tono devocional.
   Dos imagenes reales: el retrato de la portada (assets/thomasjefferson.jpg) y
   la vista de Monticello (assets/monticello.jpg). Los demas huecos reservados
   se maquetan solo con CSS.

   CACHE: el sitio esta detras de Cloudflare y el CSS se guarda 7 dias en el
   borde. Los HTML llaman a "style.css?v=N". Cada vez que se toque este archivo
   hay que subir N en site/index.html y site/es/index.html (v=3 -> v=4) y subir
   los tres archivos a public_html. Version actual: v=4.
   ========================================================================== */

:root {
  --cream: #FBF8F1;
  --cream-deep: #F4EEE1;
  --paper: #FFFFFF;
  --ink: #262B33;
  --ink-soft: #4A5260;
  --navy: #1C2B45;
  --navy-deep: #162237;
  --gold: #A98336;
  --gold-light: #C9A85C;
  --gold-soft: #EFE3C8;
  --sage: #5C6B58;
  --muted: #6E7481;
  --line: #E5DBC6;
  --shadow-sm: 0 2px 10px rgba(28, 43, 69, .06);
  --shadow: 0 14px 40px rgba(28, 43, 69, .10);
  --radius: 14px;
  --radius-sm: 8px;
  --maxw: 1120px;
  --serif: Georgia, "Iowan Old Style", "Palatino Linotype", "Book Antiqua", "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.75;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--gold); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4, .serif {
  font-family: var(--serif);
  color: var(--navy);
  font-weight: 400;
  line-height: 1.25;
  margin: 0 0 .6em;
}

h1 { font-size: clamp(2rem, 5vw, 3.1rem); }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.25rem); }
h3 { font-size: clamp(1.15rem, 2.2vw, 1.4rem); }
h4 { font-size: 1.06rem; }

p { margin: 0 0 1.15em; }

.wrap { width: min(100% - 2.5rem, var(--maxw)); margin-inline: auto; }
.center { text-align: center; }
.lede { font-size: 1.13rem; color: var(--ink-soft); }
.small { font-size: .9rem; color: var(--muted); }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* --- Ornamentos dibujados con CSS (sin imagenes ni emojis) --------------- */
.rule {
  display: flex; align-items: center; justify-content: center;
  gap: 14px; margin: 22px auto 30px; max-width: 320px;
}
.rule::before, .rule::after {
  content: ""; height: 1px; flex: 1;
  background: linear-gradient(90deg, transparent, var(--gold-light), transparent);
}
.rule i {
  width: 9px; height: 9px; transform: rotate(45deg);
  border: 1px solid var(--gold-light); background: var(--gold-soft);
}
.rule--left { justify-content: flex-start; margin-inline: 0; max-width: 200px; }
.rule--deep::before, .rule--deep::after {
  background: linear-gradient(90deg, transparent, rgba(201, 168, 92, .55), transparent);
}
.rule--deep i { border-color: rgba(201, 168, 92, .7); background: rgba(201, 168, 92, .18); }


/* --- Barra superior y cabecera ------------------------------------------- */
.topbar {
  background: var(--navy-deep);
  color: #EADFC4;
  font-size: .84rem;
  letter-spacing: .04em;
  text-align: center;
  padding: 9px 1rem;
}
.topbar a { color: #F3E7C9; text-decoration: underline; text-underline-offset: 3px; }
.topbar b { font-weight: 600; }

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(251, 248, 241, .95);
  backdrop-filter: saturate(160%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; gap: 18px; min-height: 78px; }

.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand:hover { text-decoration: none; }

/* marca de la casa: circulo dorado con cruz dibujada en CSS */
.brand-mark {
  width: 42px; height: 42px; border-radius: 50%;
  border: 1px solid var(--gold);
  background: radial-gradient(circle at 30% 25%, #FDF9EF, var(--gold-soft));
  position: relative; flex: 0 0 auto;
}
.brand-mark::before, .brand-mark::after { content: ""; position: absolute; background: var(--gold); }
.brand-mark::before { left: 50%; top: 9px; bottom: 9px; width: 2px; transform: translateX(-50%); }
.brand-mark::after  { top: 17px; left: 10px; right: 10px; height: 2px; }

.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-text b {
  font-family: var(--serif); font-weight: 400; color: var(--navy);
  font-size: 1.04rem; letter-spacing: .01em;
}
.brand-text span {
  font-size: .68rem; letter-spacing: .16em; text-transform: uppercase; color: var(--gold);
}

/* Menu de idiomas: desplegable nativo (<details>) en la esquina superior
   derecha. Sin JavaScript: funciona con teclado, tactil y lectores de pantalla.
   La navegacion del sitio es por scroll, por eso no hay enlaces de secciones
   en la cabecera (siguen en la barra superior, en el texto y en el pie). */
.lang-menu { margin-left: auto; position: relative; }
.lang-menu summary {
  list-style: none; cursor: pointer;
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--sans); font-size: .78rem; letter-spacing: .1em;
  text-transform: uppercase; color: var(--ink-soft);
  background: var(--paper); border: 1px solid var(--line);
  border-radius: 999px; padding: 9px 16px; box-shadow: var(--shadow-sm);
}
.lang-menu summary::-webkit-details-marker { display: none; }
.lang-menu summary::marker { content: ""; }
.lang-menu summary:hover { border-color: var(--gold-light); color: var(--navy); }
.lang-menu .lang-current { color: var(--navy); font-weight: 600; }
.lang-menu .caret {
  width: 7px; height: 7px; flex: 0 0 auto;
  border-right: 1px solid var(--gold); border-bottom: 1px solid var(--gold);
  transform: rotate(45deg) translate(-1px, -1px);
}
.lang-menu[open] .caret { transform: rotate(-135deg) translate(-1px, -1px); }

.lang-menu:not([open]) ul { display: none; }
.lang-menu ul {
  position: absolute; right: 0; top: calc(100% + 10px); z-index: 60;
  min-width: 215px; margin: 0; padding: 8px; list-style: none;
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.lang-menu li + li { border-top: 1px solid var(--line); }
.lang-menu a, .lang-menu li > span {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 12px; border-radius: var(--radius-sm);
  font-size: .93rem; letter-spacing: .01em; text-transform: none; color: var(--ink-soft);
}
.lang-menu a:hover { background: var(--cream-deep); color: var(--navy); text-decoration: none; }
.lang-menu .is-active { color: var(--navy); font-weight: 600; }
.lang-menu .is-active::before {
  content: ""; width: 7px; height: 7px; flex: 0 0 auto; transform: rotate(45deg);
  background: var(--gold); margin-right: -3px;
}
.lang-menu .is-soon { color: var(--muted); cursor: default; }
.lang-menu .is-soon em {
  font-style: normal; font-size: .62rem; letter-spacing: .14em;
  text-transform: uppercase; color: var(--gold);
}

/* --- Botones -------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  font-family: var(--sans); font-size: .95rem; font-weight: 600;
  letter-spacing: .02em; padding: 13px 26px; border-radius: 999px;
  border: 1px solid var(--gold); background: var(--gold); color: #fff;
  box-shadow: var(--shadow-sm); cursor: pointer; text-align: center;
}
.btn:hover { background: #97742E; border-color: #97742E; color: #fff; text-decoration: none; }
.btn--ghost { background: transparent; color: var(--navy); border-color: var(--line); box-shadow: none; }
.btn--ghost:hover { background: var(--paper); border-color: var(--gold-light); color: var(--navy); }
.btn--light { background: transparent; border-color: var(--gold-light); color: #F5ECD6; box-shadow: none; }
.btn--light:hover { background: rgba(255, 255, 255, .1); border-color: var(--gold-light); color: #fff; }
.btn--lg { padding: 16px 34px; font-size: 1rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; }
.btn-row--center, .center .btn-row { justify-content: center; }
.btn-note { font-size: .84rem; color: var(--muted); margin-top: 12px; }
.section--deep .btn-note { color: #C9C0AC; }

/* --- Portada (hero) ------------------------------------------------------- */
.hero {
  background:
    radial-gradient(1200px 430px at 50% -150px, var(--gold-soft), transparent 70%),
    var(--cream);
  border-bottom: 1px solid var(--line);
  padding: clamp(46px, 8vw, 92px) 0 clamp(42px, 7vw, 78px);
  text-align: center;
}
.hero h1 { margin-bottom: .3em; }
.hero .lede { max-width: 46ch; margin-inline: auto; }
.hero .btn-row { margin-top: 26px; }
.eyebrow {
  font-size: .76rem; letter-spacing: .22em; text-transform: uppercase;
  color: var(--gold); margin: 0 0 14px;
}
.hero-grid {
  display: grid; gap: clamp(28px, 5vw, 54px);
  grid-template-columns: 1.15fr .85fr; align-items: center; text-align: left;
}
.hero-grid .lede { margin-inline: 0; }
.hero-grid .btn-row { justify-content: flex-start; }

/* --- Secciones ------------------------------------------------------------ */
.section { padding: clamp(48px, 7vw, 86px) 0; }
.section--alt { background: var(--paper); border-block: 1px solid var(--line); }
.section--deep { background: var(--navy); color: #E6E0D2; }
.section--deep h2, .section--deep h3 { color: #FBF8F1; }
.section--deep .lede { color: #D6CDB9; }
.section--tight { padding-block: clamp(34px, 5vw, 56px); }
.section-head { max-width: 64ch; margin-bottom: 34px; }
.section-head--center { margin-inline: auto; text-align: center; }
.cols { display: grid; gap: 26px; }
/* Numero de columnas fijo en pantalla grande: "El libro" tiene 4 tarjetas (2+2) y
   "Para quien es" tiene 6 (3+3). Con auto-fit salian 3+1 y 4+2 y sobraba una fila. */
.cols--2 { grid-template-columns: repeat(2, 1fr); }
.cols--3 { grid-template-columns: repeat(3, 1fr); }
.cols--4 { grid-template-columns: repeat(4, 1fr); }
.split { display: grid; gap: clamp(28px, 5vw, 56px); grid-template-columns: 1fr 1fr; align-items: center; }

.card {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 28px 26px; box-shadow: var(--shadow-sm);
}
.card h3 { margin-bottom: .35em; }
.card p:last-child, .card ul:last-child { margin-bottom: 0; }
.card--flat { box-shadow: none; background: var(--cream); }
.section--alt .card { background: var(--cream); }
.section--deep .card {
  background: rgba(255, 255, 255, .045);
  border-color: rgba(201, 168, 92, .28);
}
.card-num {
  font-family: var(--serif); font-size: 1.45rem; color: var(--gold-light);
  display: block; margin-bottom: 4px;
}
.card-list { margin: 0; padding: 0; list-style: none; }
.card-list li { padding-left: 22px; position: relative; margin-bottom: .5em; }
.card-list li::before {
  content: ""; position: absolute; left: 4px; top: .68em;
  width: 6px; height: 6px; transform: rotate(45deg);
  background: var(--gold-light);
}

/* --- Espacios reservados para imagenes ----------------------------------- */
.media-placeholder {
  position: relative; width: 100%; min-height: 220px;
  border: 1px dashed var(--gold-light); border-radius: var(--radius);
  background:
    repeating-linear-gradient(135deg, rgba(201, 168, 92, .07) 0 12px, transparent 12px 24px),
    var(--cream-deep);
  display: flex; align-items: center; justify-content: center;
  text-align: center; padding: 24px; color: var(--gold);
  font-size: .76rem; letter-spacing: .16em; text-transform: uppercase;
}
.media-placeholder > span { max-width: 34ch; line-height: 1.8; }
.media-placeholder--wide { aspect-ratio: 16 / 7; }
.media-placeholder--panorama { aspect-ratio: 21 / 9; }
.media-placeholder--portrait { aspect-ratio: 3 / 4; }
.media-placeholder--square { aspect-ratio: 1 / 1; }
.media-placeholder--book { aspect-ratio: 4 / 3; }
.media-placeholder--deep {
  border-color: rgba(201, 168, 92, .5);
  background: rgba(255, 255, 255, .05); color: var(--gold-light);
}
.media-caption {
  font-size: .82rem; color: var(--muted); margin-top: 10px;
  letter-spacing: .02em; text-transform: none;
}
.section--deep .media-caption { color: #BDB49F; }

/* --- Imagenes reales enmarcadas ------------------------------------------- */
/* Retrato de la portada (assets/thomasjefferson.jpg) y vista de Monticello
   (assets/monticello.jpg). Se enmarcan como una estampa con la misma paleta que
   el resto de la pagina; cada imagen conserva su propia proporcion. */
.hero-figure { max-width: 420px; margin-inline: auto; }
.plate-frame {
  margin: 0; padding: 10px;
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.plate-frame > img {
  display: block; width: 100%; height: auto;
  border-radius: calc(var(--radius) - 6px); background: var(--cream-deep);
}
.hero-figure .media-caption { text-align: center; }

/* --- Franja de cita / versiculo ------------------------------------------ */
.verse-band {
  background: var(--paper);
  border-block: 1px solid var(--line);
  padding: clamp(34px, 5vw, 52px) 0;
  text-align: center;
}
.verse-band blockquote { margin: 0; }
.verse-band p {
  font-family: var(--serif); font-size: clamp(1.15rem, 2.4vw, 1.5rem);
  color: var(--navy); line-height: 1.55; max-width: 60ch; margin: 0 auto 10px;
}
.verse-band cite { font-style: normal; font-size: .86rem; color: var(--muted); letter-spacing: .04em; }

/* --- Citas ---------------------------------------------------------------- */
.quote-grid { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.quote {
  margin: 0; padding: 4px 0 4px 24px;
  border-left: 2px solid var(--gold-light);
}
.quote p {
  font-family: var(--serif); font-size: 1.08rem; color: var(--navy);
  line-height: 1.6; margin-bottom: .5em;
}
.quote cite { font-style: normal; font-size: .84rem; color: var(--muted); }
.section--deep .quote { border-left-color: rgba(201, 168, 92, .55); }
.section--deep .quote p { color: #F3EDDF; }
.section--deep .quote cite { color: #B3AA95; }

/* --- Cronologia ----------------------------------------------------------- */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before {
  content: ""; position: absolute; left: 8px; top: 6px; bottom: 6px; width: 1px;
  background: linear-gradient(180deg, transparent, var(--gold-light), transparent);
}
.timeline li { position: relative; padding: 0 0 26px 40px; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before {
  content: ""; position: absolute; left: 3px; top: 10px;
  width: 11px; height: 11px; transform: rotate(45deg);
  background: var(--paper); border: 1px solid var(--gold);
}
.timeline b {
  display: block; font-family: var(--serif); font-size: 1.1rem;
  color: var(--gold); margin-bottom: 2px;
}
.timeline span { display: block; color: var(--ink-soft); }
.section--alt .timeline li::before, .section--deep .timeline li::before { background: var(--navy-deep); }
.section--deep .timeline span { color: #CFC6B1; }

/* --- Preguntas frecuentes ------------------------------------------------- */
.faq { max-width: 78ch; margin-inline: auto; }
.faq details {
  border-bottom: 1px solid var(--line);
  padding: 4px 0;
}
.faq summary {
  cursor: pointer; list-style: none; padding: 16px 34px 16px 0; position: relative;
  font-family: var(--serif); font-size: 1.1rem; color: var(--navy);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 8px; top: 26px;
  width: 8px; height: 8px; border-right: 1px solid var(--gold);
  border-bottom: 1px solid var(--gold); transform: rotate(45deg);
}
.faq details[open] summary::after { transform: rotate(-135deg); top: 28px; }
.faq details > div { padding: 0 0 18px; color: var(--ink-soft); }
.faq details > div p:last-child { margin-bottom: 0; }

/* --- Llamada final -------------------------------------------------------- */
.cta-band {
  background:
    radial-gradient(900px 300px at 50% 0, rgba(201, 168, 92, .18), transparent 70%),
    var(--navy-deep);
  color: #EFE9DA;
  text-align: center;
  padding: clamp(52px, 8vw, 92px) 0;
}
.cta-band h2 { color: #FBF8F1; }
.cta-band .lede { color: #D3CAB6; max-width: 52ch; margin-inline: auto; }

/* --- Pie de pagina -------------------------------------------------------- */
.site-footer {
  background: #101A2B;
  color: #A9A395;
  font-size: .92rem;
  padding: clamp(44px, 6vw, 66px) 0 26px;
}
.site-footer h4 {
  color: #F1EADA; font-size: .8rem; letter-spacing: .18em;
  text-transform: uppercase; font-family: var(--sans); margin-bottom: 14px;
}
.footer-grid {
  display: grid; gap: 32px;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
}
.site-footer a { color: #CFC5AF; }
.site-footer a:hover { color: #F1EADA; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 8px; }
.footer-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.footer-brand .brand-text b { color: #F4EEE0; }
.footer-brand .brand-text span { color: var(--gold-light); }
.footer-legal {
  border-top: 1px solid rgba(255, 255, 255, .1);
  margin-top: 34px; padding-top: 20px;
  display: flex; flex-wrap: wrap; gap: 12px 22px; justify-content: space-between;
  font-size: .82rem; color: #8B8578;
}

/* --- Aviso / nota informativa -------------------------------------------- */
.notice {
  border: 1px solid var(--line); border-left: 3px solid var(--gold-light);
  background: var(--paper); border-radius: var(--radius-sm);
  padding: 18px 22px; font-size: .94rem; color: var(--ink-soft);
}
.section--alt .notice { background: var(--cream-deep); }
.notice p:last-child { margin-bottom: 0; }
.notice--deep {
  background: rgba(255, 255, 255, .05); border-color: rgba(201, 168, 92, .4);
  color: #D3CAB6;
}

/* --- Adaptacion a pantallas pequenas ------------------------------------- */
@media (max-width: 900px) {
  .hero-grid, .split { grid-template-columns: 1fr; }
  .hero-grid { text-align: center; }
  .hero-grid .btn-row { justify-content: center; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  /* Los bloques de 6 tarjetas pasan a 2 columnas antes que los de 2. */
  .cols--3, .cols--4 { grid-template-columns: repeat(2, 1fr); }

  .site-header .wrap { min-height: 68px; gap: 12px; }
  .lang-menu summary { padding: 8px 14px; font-size: .74rem; letter-spacing: .08em; }
  .lang-menu ul { min-width: 200px; }
  .hero-figure { max-width: 340px; }
}

@media (max-width: 560px) {
  body { font-size: 16.5px; }
  .footer-grid { grid-template-columns: 1fr; }
  .cols { grid-template-columns: 1fr; }
  .topbar { font-size: .78rem; }
  .btn { width: 100%; }
  .btn-row { flex-direction: column; }
  .brand-text b { font-size: .96rem; }
  .brand-text span { font-size: .62rem; letter-spacing: .12em; }
  .brand-mark { width: 36px; height: 36px; }
  .lang-menu summary { padding: 7px 12px; gap: 7px; }
  .lang-menu ul { min-width: 180px; right: -4px; }
}

/* --- Impresion ------------------------------------------------------------ */
@media print {
  .topbar, .site-header, .cta-band, .site-footer { display: none; }
  body { background: #fff; font-size: 11pt; }
  .media-placeholder { display: none; }
}
