/* Tienda Itera · hoja común. Paleta y tipografía de 00-identidad/sistema-de-diseno.md */
:root {
  --bg: #ECECEC;
  --tile: #E2E2E2;
  --ink: #161616;
  --ink-2: #555555;
  --cap: #8A8A8A;
  --line: #CCCCCC;
  --track: #D9D9D9;
  --orange: #FF6039;
  --orange-ink: #E0461F;
  --white: #FFFFFF;
  --dark-grad: linear-gradient(135deg, #161616 0%, #161616 45%, #FF6039 130%);
  --radius: 14px;
  --wrap: 1120px;
  --gutter: 20px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: 'Figtree', system-ui, sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 17px;
  line-height: 1.6;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: 760px; }

h1, h2, h3, .cal { font-family: 'Cal Sans', 'Figtree', sans-serif; font-weight: 400; word-spacing: 0.06em; line-height: 1.12; }
h1 { font-size: clamp(38px, 6.4vw, 72px); letter-spacing: -0.01em; }
h2 { font-size: clamp(30px, 4.4vw, 48px); margin-bottom: 18px; }
h3 { font-size: clamp(21px, 2.4vw, 26px); margin-bottom: 8px; }
p + p { margin-top: 14px; }
strong { font-weight: 700; }
.accent { color: var(--orange); }

.kicker {
  font-size: 12px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--orange); margin-bottom: 14px; display: inline-block;
}
.lead { font-size: clamp(18px, 2vw, 21px); color: var(--ink-2); max-width: 680px; }

/* Barra superior */
.topbar { position: sticky; top: 0; z-index: 30; background: rgba(22,22,22,0.92); backdrop-filter: saturate(140%) blur(8px); }
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; height: 62px; gap: 16px; }
.topbar img { height: 26px; width: auto; }
.topbar nav { display: flex; gap: 22px; align-items: center; }
.topbar nav a { color: #fff; text-decoration: none; font-size: 14px; opacity: .85; }
.topbar nav a:hover { opacity: 1; }
.topbar .btn { padding: 10px 16px; font-size: 14px; }
@media (max-width: 720px) { .topbar nav a.hide-sm { display: none; } }

/* Botones */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  background: var(--orange); color: #fff; text-decoration: none; border: 0; cursor: pointer;
  font-family: 'Figtree', sans-serif; font-weight: 700; font-size: 17px;
  padding: 17px 28px; border-radius: 999px; transition: transform .15s ease, background .15s ease;
}
.btn:hover { background: var(--orange-ink); transform: translateY(-1px); }
.btn.ghost { background: transparent; color: inherit; box-shadow: inset 0 0 0 1.5px currentColor; }
.btn.ghost:hover { background: rgba(255,255,255,.08); }
.btn.big { font-size: 19px; padding: 20px 34px; }
.btn.block { width: 100%; }
.microcopy { font-size: 14px; color: var(--ink-2); margin-top: 12px; }
.dark .microcopy { color: rgba(255,255,255,.7); }

/* Secciones */
section { padding: 84px 0; }
section.tight { padding: 56px 0; }
.dark { background: var(--dark-grad); color: #fff; }
.dark .lead { color: rgba(255,255,255,.82); }
.dark .kicker { color: #FFB39E; }
.ink { background: var(--ink); color: #fff; }
.ink .lead { color: rgba(255,255,255,.8); }
.tilebg { background: var(--tile); }

/* Héroe */
.hero { padding: 72px 0 84px; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center; }
.hero h1 { margin: 6px 0 22px; }
.hero .cta-row { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 30px; align-items: center; }
.hero .price-chip { font-size: 15px; color: rgba(255,255,255,.85); }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } }

/* Mockup del libro */
.book {
  aspect-ratio: 8.5/11; width: min(360px, 82%); margin: 0 auto; border-radius: 6px 14px 14px 6px;
  background: var(--dark-grad); color: #fff; padding: 34px 28px; position: relative;
  box-shadow: 0 30px 60px rgba(0,0,0,.45), inset 6px 0 0 rgba(255,255,255,.08);
  display: flex; flex-direction: column; transform: rotate(-3deg);
}
.book img { height: 22px; width: auto; }
.book .k { font-size: 10px; letter-spacing: .16em; text-transform: uppercase; opacity: .7; margin-top: auto; }
.book .t { font-family: 'Cal Sans', sans-serif; font-size: clamp(30px, 4vw, 40px); line-height: 1.05; margin: 8px 0 14px; }
.book .s { font-size: 13px; opacity: .85; line-height: 1.4; }
.book .a { font-size: 12px; opacity: .7; margin-top: 22px; }

/* Rejillas */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.card { background: var(--white); border-radius: var(--radius); padding: 28px; }
.card.soft { background: var(--tile); }
.dark .card, .ink .card { background: rgba(255,255,255,.06); color: #fff; box-shadow: inset 0 0 0 1px rgba(255,255,255,.1); }
.card .num { font-family: 'Cal Sans', sans-serif; font-size: 44px; color: var(--orange); line-height: 1; margin-bottom: 10px; }
.card p { color: var(--ink-2); font-size: 16px; }
.dark .card p, .ink .card p { color: rgba(255,255,255,.78); }

/* Cifra grande */
.stat { padding: 22px; border-radius: var(--radius); background: var(--tile); }
.stat .n { font-family: 'Cal Sans', sans-serif; font-size: clamp(36px, 5vw, 52px); color: var(--orange); line-height: 1; }
.stat .c { font-size: 14px; color: var(--ink-2); margin-top: 8px; line-height: 1.45; }
.dark .stat, .ink .stat { background: rgba(255,255,255,.07); }
.dark .stat .c, .ink .stat .c { color: rgba(255,255,255,.75); }

/* Callout */
.callout { border-left: 4px solid var(--orange); padding: 6px 0 6px 22px; font-size: 19px; line-height: 1.5; margin: 26px 0; }

/* Lista con estrella */
.check { list-style: none; }
.check li { position: relative; padding-left: 34px; margin: 12px 0; }
.check li::before { content: ''; position: absolute; left: 0; top: 7px; width: 18px; height: 18px; border-radius: 50%; background: var(--orange); box-shadow: inset 0 0 0 5px var(--orange), inset 0 0 0 9px #fff; }
.cross li::before { background: var(--ink-2); box-shadow: none; clip-path: polygon(20% 0,50% 30%,80% 0,100% 20%,70% 50%,100% 80%,80% 100%,50% 70%,20% 100%,0 80%,30% 50%,0 20%); border-radius: 0; }

/* Tabla */
table.datos { width: 100%; border-collapse: collapse; font-size: 15px; }
table.datos th { text-align: left; font-weight: 700; font-size: 13px; border-bottom: 1.5px solid var(--ink); padding: 10px 8px; }
table.datos td { padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.datos td.num, table.datos th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.datos tr.hl td { background: rgba(255,96,57,.09); }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* Índice */
.toc { counter-reset: cap; columns: 2; column-gap: 36px; }
.toc li { list-style: none; break-inside: avoid; padding: 10px 0 10px 46px; position: relative; border-bottom: 1px solid var(--line); }
.toc li::before { counter-increment: cap; content: counter(cap, decimal-leading-zero); position: absolute; left: 0; top: 9px; font-family: 'Cal Sans', sans-serif; color: var(--orange); font-size: 20px; }
.toc li b { display: block; }
.toc li span { font-size: 14px; color: var(--ink-2); }
@media (max-width: 760px) { .toc { columns: 1; } }

/* Autor */
.author { display: grid; grid-template-columns: 260px 1fr; gap: 42px; align-items: center; }
.author img { border-radius: 50%; width: 260px; height: 260px; object-fit: cover; }
@media (max-width: 760px) { .author { grid-template-columns: 1fr; } .author img { width: 180px; height: 180px; } }

/* Oferta */
.offer { background: var(--white); border-radius: 22px; padding: 38px; box-shadow: 0 24px 60px rgba(22,22,22,.12); max-width: 560px; margin: 0 auto; }
.offer .price { font-family: 'Cal Sans', sans-serif; font-size: clamp(42px, 11vw, 58px); line-height: 1; margin: 6px 0 4px; }
.offer .pill, .dark .offer .pill { background: rgba(255,96,57,.12); color: var(--orange-ink); }
@media (max-width: 520px) { .offer { padding: 26px 20px; } .offer .price small { display: block; margin: 8px 0 0; } }
.offer .price small { font-family: 'Figtree', sans-serif; font-size: 18px; color: var(--ink-2); margin-left: 6px; }
.offer ul { margin: 22px 0 26px; }
.offer .guarantee { display: flex; gap: 14px; align-items: flex-start; background: var(--bg); border-radius: 12px; padding: 16px; margin-top: 18px; font-size: 15px; }

/* FAQ */
details { border-bottom: 1px solid var(--line); padding: 18px 0; }
details summary { cursor: pointer; font-weight: 700; font-size: 18px; list-style: none; position: relative; padding-right: 36px; }
details summary::-webkit-details-marker { display: none; }
details summary::after { content: '+'; position: absolute; right: 0; top: -4px; font-family: 'Cal Sans', sans-serif; font-size: 28px; color: var(--orange); }
details[open] summary::after { content: '–'; }
details p { margin-top: 12px; color: var(--ink-2); }

/* Página de muestra */
.sample { background: #fff; border-radius: 10px; padding: 26px; box-shadow: 0 14px 34px rgba(22,22,22,.12); font-size: 14px; line-height: 1.5; }
.sample .k { font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--orange); font-weight: 700; }
.sample h4 { font-family: 'Cal Sans', sans-serif; font-weight: 400; font-size: 21px; margin: 6px 0 10px; line-height: 1.15; }

/* Pie */
footer { background: var(--ink); color: rgba(255,255,255,.7); padding: 46px 0; font-size: 14px; }
footer .wrap { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; align-items: center; }
footer img { height: 24px; width: auto; }
footer a { color: rgba(255,255,255,.85); }

/* Barra fija de compra en móvil */
.buybar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: var(--ink); color: #fff; padding: 12px var(--gutter); display: none; align-items: center; justify-content: space-between; gap: 12px; box-shadow: 0 -8px 24px rgba(0,0,0,.25); }
.buybar .p { font-family: 'Cal Sans', sans-serif; font-size: 22px; line-height: 1; }
.buybar .p small { display: block; font-family: 'Figtree', sans-serif; font-size: 12px; opacity: .7; margin-top: 4px; }
.buybar .btn { padding: 13px 20px; font-size: 15px; }
@media (max-width: 760px) { .buybar.on { display: flex; } body.has-buybar { padding-bottom: 76px; } }

.center { text-align: center; }
.mt-s { margin-top: 14px; } .mt-m { margin-top: 28px; } .mt-l { margin-top: 48px; }
.muted { color: var(--ink-2); }
.small { font-size: 14px; }
.pill { display: inline-block; background: rgba(255,96,57,.12); color: var(--orange-ink); font-weight: 700; font-size: 13px; padding: 6px 12px; border-radius: 999px; }
.dark .pill, .ink .pill { background: rgba(255,255,255,.12); color: #fff; }
