/* Julián Ortega · Latinoamérica Secreta
   Hoja de estilos única. Todos los colores son tokens aquí arriba. */

:root {
  --bg: #ffffff;
  --band: #f2f4f5;
  --card: #ffffff;
  --ink: #0f1a20;
  --muted: #55646c;
  --line: #dfe4e7;
  --night: #0c1820;          /* fondo de la portada y del cierre */
  --night-2: #13232d;
  --on-night: #eef2f3;
  --on-night-muted: #a9b6bc;
  --gold: #c39a4a;           /* acento: reglas finas, cifras, botón sobre oscuro */
  --gold-strong: #d6ae5c;
  --btn: #0c1820;            /* botón principal sobre claro */
  --btn-hover: #1d3442;
  --on-btn: #ffffff;
  --shadow: 0 1px 2px rgba(12, 24, 32, .06), 0 18px 40px -24px rgba(12, 24, 32, .35);

  --display: "Newsreader", "Iowan Old Style", Georgia, serif;
  --body: "Public Sans", "Helvetica Neue", Arial, system-ui, sans-serif;

  --wrap: 1140px;
  --gutter: clamp(16px, 4vw, 40px);
  --r: 8px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e171c;
    --band: #131f26;
    --card: #17252d;
    --ink: #e9eef0;
    --muted: #a3b1b8;
    --line: #26353e;
    --night: #081117;
    --night-2: #0f1d25;
    --btn: #c39a4a;
    --btn-hover: #d6ae5c;
    --on-btn: #0c1820;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 18px 40px -24px rgba(0,0,0,.8);
  }
}
:root[data-theme="dark"] {
  --bg: #0e171c;
  --band: #131f26;
  --card: #17252d;
  --ink: #e9eef0;
  --muted: #a3b1b8;
  --line: #26353e;
  --night: #081117;
  --night-2: #0f1d25;
  --btn: #c39a4a;
  --btn-hover: #d6ae5c;
  --on-btn: #0c1820;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 18px 40px -24px rgba(0,0,0,.8);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 1.125rem/1.65 var(--body);   /* 18 px */
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, video, svg { display: block; max-width: 100%; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 3px; }

h1, h2, h3 { font-family: var(--display); font-weight: 500; line-height: 1.08; letter-spacing: -0.015em; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(2.6rem, 6vw, 4.5rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: 1.4rem; line-height: 1.2; }
p { margin: 0; max-width: 64ch; }
.muted { color: var(--muted); }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.label {
  font: 600 .78rem/1 var(--body); letter-spacing: .16em; text-transform: uppercase; color: var(--gold);
  display: inline-flex; align-items: center; gap: .7rem;
}
.label::before { content: ""; width: 28px; height: 1px; background: currentColor; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 99; background: var(--card); padding: .5rem 1rem; }

/* Botones */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
  min-height: 54px; padding: .8rem 1.6rem; border-radius: var(--r);
  font: 600 1rem/1.2 var(--body); letter-spacing: .01em; text-decoration: none; cursor: pointer;
  border: 1px solid transparent; transition: background-color .18s ease, border-color .18s ease, color .18s ease;
}
.btn-dark { background: var(--btn); color: var(--on-btn); }
.btn-dark:hover { background: var(--btn-hover); }
.btn-gold { background: var(--gold); color: #0c1820; }
.btn-gold:hover { background: var(--gold-strong); }
.btn-line { color: var(--ink); border-color: var(--line); background: transparent; }
.btn-line:hover { border-color: var(--ink); }
.btn-line-night { color: var(--on-night); border-color: rgba(238, 242, 243, .28); background: transparent; }
.btn-line-night:hover { border-color: var(--on-night); }
.btn-sm { min-height: 42px; padding: .5rem 1.1rem; font-size: .92rem; }
.btn .arrow { transition: transform .18s ease; }
.btn:hover .arrow { transform: translateX(3px); }
.btn-row { display: flex; flex-wrap: wrap; gap: .75rem; }

/* Cabecera */
.site-header { position: absolute; top: 0; left: 0; right: 0; z-index: 10; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 76px; }
.brand { display: flex; flex-direction: column; text-decoration: none; color: var(--on-night); line-height: 1.1; }
.brand strong { font: 500 1.3rem/1 var(--display); letter-spacing: -.01em; }
.brand small { font: 600 .68rem/1 var(--body); letter-spacing: .2em; text-transform: uppercase; color: var(--gold); margin-top: .35rem; }
.nav { display: flex; align-items: center; gap: 1.6rem; font-size: .95rem; }
.nav a:not(.btn) { color: var(--on-night-muted); text-decoration: none; }
.nav a:not(.btn):hover { color: var(--on-night); }
@media (max-width: 760px) { .nav a:not(.btn) { display: none; } }
.page .site-header { position: static; background: var(--night); }

/* Secciones */
section { padding: clamp(64px, 10vw, 120px) 0; }
.band { background: var(--band); }
.head { display: flex; flex-direction: column; gap: 1rem; margin-bottom: clamp(32px, 5vw, 56px); }
.head.center { align-items: center; text-align: center; }
.head.center p { margin: 0 auto; }

/* Portada (oscura) */
.hero {
  position: relative; background: var(--night); color: var(--on-night);
  padding: calc(76px + clamp(40px, 7vw, 88px)) 0 clamp(64px, 9vw, 112px);
  overflow: hidden;
}
.hero::before { /* curvas de nivel muy sutiles */
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='900' height='600' viewBox='0 0 900 600'%3E%3Cg fill='none' stroke='%23ffffff' stroke-opacity='.06' stroke-width='1'%3E%3Cellipse cx='720' cy='160' rx='90' ry='60'/%3E%3Cellipse cx='720' cy='160' rx='160' ry='105'/%3E%3Cellipse cx='720' cy='160' rx='235' ry='155'/%3E%3Cellipse cx='720' cy='160' rx='315' ry='210'/%3E%3Cellipse cx='720' cy='160' rx='400' ry='270'/%3E%3Cellipse cx='720' cy='160' rx='490' ry='335'/%3E%3Cellipse cx='720' cy='160' rx='585' ry='405'/%3E%3C/g%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right -120px top -40px; background-size: 1100px auto;
}
.hero .wrap { position: relative; display: grid; grid-template-columns: 1.2fr .8fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
@media (max-width: 880px) { .hero .wrap { grid-template-columns: 1fr; } }
.hero-copy { display: flex; flex-direction: column; gap: 1.5rem; }
.hero h1 em { font-style: italic; color: var(--gold-strong); }
.hero .lead { font-size: 1.2rem; color: var(--on-night-muted); max-width: 52ch; }
.hero-facts { display: flex; flex-wrap: wrap; gap: .4rem 1.6rem; font-size: .9rem; color: var(--on-night-muted); padding-top: .4rem; }
.hero-facts span { display: inline-flex; align-items: center; gap: .5rem; }
.hero-facts span::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--gold); }

.portrait { position: relative; margin: 0; }
@media (max-width: 880px) { .portrait { max-width: 380px; width: 100%; } }
.portrait img, .portrait video { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: center 30%; border-radius: var(--r); }
.portrait::after { content: ""; position: absolute; inset: 14px -14px -14px 14px; border: 1px solid rgba(195, 154, 74, .55); border-radius: var(--r); z-index: -1; }
.portrait figcaption { margin-top: 1.4rem; font-size: .85rem; color: var(--on-night-muted); display: flex; justify-content: space-between; gap: 1rem; }
.portrait figcaption b { color: var(--on-night); font-weight: 600; }
.hero .portrait { z-index: 0; }

/* Cifras */
.figures { border-bottom: 1px solid var(--line); padding: 0; }
.figures .wrap { display: grid; grid-template-columns: repeat(4, 1fr); }
@media (max-width: 760px) { .figures .wrap { grid-template-columns: repeat(2, 1fr); } }
.figure { padding: clamp(24px, 4vw, 40px) 0; display: flex; flex-direction: column; gap: .3rem; border-right: 1px solid var(--line); padding-left: clamp(12px, 2.5vw, 28px); }
.figure:first-child { padding-left: 0; }
.figure:last-child { border-right: 0; }
@media (max-width: 760px) { .figure:nth-child(2) { border-right: 0; } .figure:nth-child(3) { padding-left: 0; } .figure:nth-child(-n+2) { border-bottom: 1px solid var(--line); } }
.figure b { font: 500 clamp(2rem, 4vw, 2.8rem)/1 var(--display); font-variant-numeric: lining-nums tabular-nums; }
.figure span { font-size: .92rem; color: var(--muted); }

/* El libro */
.book { display: grid; grid-template-columns: .85fr 1.15fr; gap: clamp(32px, 6vw, 88px); align-items: center; }
@media (max-width: 880px) { .book { grid-template-columns: 1fr; } }
.cover-wrap { display: flex; justify-content: center; perspective: 1400px; }
.cover {
  position: relative; width: min(330px, 100%); aspect-ratio: 2 / 3; border-radius: 3px 8px 8px 3px;
  background: #0f2430; color: #f1ead9; overflow: hidden;
  box-shadow: 22px 26px 50px -24px rgba(0,0,0,.6), 0 2px 4px rgba(0,0,0,.2);
  transform: rotateY(-8deg); padding: 34px 30px 30px; display: flex; flex-direction: column;
}
.cover::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 12px; background: linear-gradient(90deg, rgba(0,0,0,.45), rgba(255,255,255,.06) 70%, transparent); }
.cover::after {
  content: ""; position: absolute; inset: 0; opacity: .55; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='330' height='495' viewBox='0 0 330 495'%3E%3Cg fill='none' stroke='%23c39a4a' stroke-opacity='.35' stroke-width='.8'%3E%3Cpath d='M-10 380 C 60 340 110 400 180 360 S 300 300 345 330'/%3E%3Cpath d='M-10 400 C 60 360 110 420 180 380 S 300 320 345 350'/%3E%3Cpath d='M-10 420 C 60 380 110 440 180 400 S 300 340 345 370'/%3E%3Cpath d='M-10 440 C 60 400 110 460 180 420 S 300 360 345 390'/%3E%3Cpath d='M-10 460 C 60 420 110 480 180 440 S 300 380 345 410'/%3E%3C/g%3E%3C/svg%3E");
  background-size: cover;
}
.cover > * { position: relative; z-index: 1; }
.cover .rule { height: 1px; background: #c39a4a; opacity: .8; margin: 14px 0; }
.cover .c-top { font: 600 .62rem/1.3 var(--body); letter-spacing: .24em; text-transform: uppercase; color: #c39a4a; }
.cover .c-title { font: 500 2.25rem/1 var(--display); letter-spacing: -.01em; margin-top: auto; }
.cover .c-title i { display: block; font-style: italic; color: #d6ae5c; }
.cover .c-sub { font-size: .86rem; line-height: 1.4; color: #d9d2c0; }
.cover .c-author { margin-top: 42px; font: 600 .7rem/1 var(--body); letter-spacing: .22em; text-transform: uppercase; }

.book-copy { display: flex; flex-direction: column; gap: 1.4rem; }
.list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.list li { display: grid; grid-template-columns: 2.4rem 1fr; gap: .5rem; padding: 1rem 0; border-bottom: 1px solid var(--line); }
.list li b { font: 500 1.1rem/1.4 var(--display); color: var(--gold); }
.list li strong { font-weight: 600; }

/* Reparto por regiones */
.regions { display: grid; grid-template-columns: repeat(3, 1fr); column-gap: clamp(24px, 4vw, 56px); }
@media (max-width: 880px) { .regions { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .regions { grid-template-columns: 1fr; } }
.region { padding: 1.2rem 0; border-top: 1px solid var(--line); display: grid; gap: .45rem; }
.region .top { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.region .name { font-weight: 600; }
.region .n { font: 500 1.6rem/1 var(--display); font-variant-numeric: tabular-nums; }
.region .bar { height: 3px; background: var(--line); border-radius: 2px; overflow: hidden; }
.region .bar i { display: block; height: 100%; background: var(--gold); }
.region p { font-size: .92rem; color: var(--muted); }

/* Muestra: doble página */
.spread { display: grid; grid-template-columns: 1fr 1fr; background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); overflow: hidden; border: 1px solid var(--line); }
@media (max-width: 880px) { .spread { grid-template-columns: 1fr; } }
.spread > div { padding: clamp(28px, 4.5vw, 56px); display: flex; flex-direction: column; gap: 1.1rem; }
.spread .left { border-right: 1px solid var(--line); }
@media (max-width: 880px) { .spread .left { border-right: 0; border-bottom: 1px solid var(--line); } }
.folio { display: flex; justify-content: space-between; font: 600 .72rem/1 var(--body); letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.spread h3 { font-size: clamp(1.6rem, 3vw, 2.1rem); }
.spread .dropcap::first-letter { float: left; font: 500 3.6rem/.85 var(--display); padding: .3rem .5rem 0 0; color: var(--gold); }
.locator { display: flex; align-items: center; gap: .8rem; font-size: .92rem; color: var(--muted); border-top: 1px solid var(--line); padding-top: 1rem; margin-top: auto; }
.locator svg { flex: none; }
.facts { margin: 0; display: grid; }
.facts div { display: grid; grid-template-columns: 8.5rem 1fr; gap: 1rem; padding: .85rem 0; border-bottom: 1px solid var(--line); }
.facts div:first-child { border-top: 1px solid var(--line); }
.facts dt { font: 600 .74rem/1.6 var(--body); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.facts dd { margin: 0; }
@media (max-width: 460px) { .facts div { grid-template-columns: 1fr; gap: .15rem; } }

/* Pasos */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(20px, 3vw, 40px); counter-reset: s; }
@media (max-width: 820px) { .steps { grid-template-columns: 1fr; } }
.step { border-top: 2px solid var(--ink); padding-top: 1.2rem; display: grid; gap: .5rem; }
.step::before { counter-increment: s; content: "0" counter(s); font: 500 .95rem/1 var(--display); color: var(--gold); }

/* Precio */
.offer { display: grid; grid-template-columns: 1fr auto; gap: clamp(24px, 5vw, 64px); align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); padding: clamp(28px, 5vw, 56px); }
@media (max-width: 820px) { .offer { grid-template-columns: 1fr; } }
.offer-copy { display: grid; gap: 1rem; }
.ticks { list-style: none; margin: .4rem 0 0; padding: 0; display: grid; gap: .55rem; }
.ticks li { display: flex; gap: .7rem; align-items: baseline; }
.ticks li::before { content: "✓"; color: var(--gold); font-weight: 700; }
.buy { display: grid; gap: 1rem; justify-items: start; min-width: 260px; }
@media (min-width: 821px) { .buy { justify-items: center; text-align: center; border-left: 1px solid var(--line); padding-left: clamp(24px, 5vw, 64px); } }
.amount { font: 500 clamp(3.4rem, 8vw, 4.6rem)/1 var(--display); font-variant-numeric: lining-nums; letter-spacing: -.02em; }
.amount small { font: 400 1rem/1 var(--body); color: var(--muted); letter-spacing: 0; margin-left: .3rem; }
.fine { font-size: .85rem; color: var(--muted); max-width: 30ch; }

/* Regalo */
.gift { display: grid; grid-template-columns: auto 1fr auto; gap: clamp(20px, 4vw, 48px); align-items: center; padding: clamp(24px, 4vw, 40px) 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
@media (max-width: 820px) { .gift { grid-template-columns: 1fr; } }
.gift-badge { width: 84px; height: 84px; border-radius: 50%; border: 1px solid var(--gold); display: grid; place-items: center; text-align: center; font: 600 .7rem/1.25 var(--body); letter-spacing: .16em; text-transform: uppercase; color: var(--gold); }
.gift h3 { margin-bottom: .4rem; }

/* Sobre Julián */
.about { display: grid; grid-template-columns: .75fr 1.25fr; gap: clamp(28px, 6vw, 80px); align-items: center; }
@media (max-width: 820px) { .about { grid-template-columns: 1fr; } }
.about img { width: 100%; max-width: 380px; aspect-ratio: 4 / 5; object-fit: cover; object-position: center 30%; border-radius: var(--r); box-shadow: var(--shadow); }
.about-copy { display: grid; gap: 1.2rem; }
.disclosure { font-size: .95rem; color: var(--muted); border-left: 2px solid var(--gold); padding: .2rem 0 .2rem 1rem; }

/* Preguntas */
.faq { max-width: 860px; margin: 0 auto; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; padding: 1.3rem 0; display: flex; justify-content: space-between; align-items: center; gap: 1rem; font: 500 1.25rem/1.3 var(--display); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; width: 12px; height: 12px; flex: none; border-right: 1.5px solid var(--ink); border-bottom: 1.5px solid var(--ink); transform: rotate(45deg) translate(-3px, -3px); transition: transform .2s ease; }
.faq details[open] summary::after { transform: rotate(-135deg); }
.faq details p { padding: 0 0 1.4rem; color: var(--muted); }

/* Cierre */
.closing { background: var(--night); color: var(--on-night); text-align: center; }
.closing .wrap { display: flex; flex-direction: column; align-items: center; gap: 1.4rem; }
.closing p { color: var(--on-night-muted); }

/* Pie */
.site-footer { background: var(--night); color: var(--on-night-muted); border-top: 1px solid rgba(238,242,243,.1); padding: 32px 0 44px; font-size: .9rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem 2rem; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: .5rem 1.4rem; }
.site-footer a { color: var(--on-night-muted); text-decoration: none; }
.site-footer a:hover { color: var(--on-night); }

/* Páginas legales */
.legal { padding: clamp(48px, 8vw, 88px) 0; }
.legal .wrap { max-width: 800px; display: grid; gap: 1.1rem; }
.legal h2 { font-size: 1.5rem; margin-top: 1rem; }
.placeholder { background: rgba(195, 154, 74, .25); padding: 0 .3rem; border-radius: 3px; }
