/* FARMFLATION — landing page
   Paleta tomada de la tapa nueva del libro (KDP) y del arte del
   árbol de dinero en rojo sobre fondo cremita. Tipografía: Space
   Grotesk para el texto corrido, Archivo Narrow (bold) para todo
   lo que es "tapa"/titulares. */

:root {
  --red: #d42533;
  --red-dark: #b31f2a;
  --red-darker: #8f1821;
  --ink: #000000;
  --paper: #f0eee7;
  --paper-dim: #e6e2d5;
  --cream: #f0eee7;
  --line: rgba(0, 0, 0, 0.14);
  --gray: #57534a;
  --shadow: 0 20px 45px rgba(0, 0, 0, 0.12);
  --serif: "Space Grotesk", -apple-system, "Segoe UI", sans-serif;
  --display: "Archivo Narrow", "Arial Narrow", sans-serif;
  --maxw: 1120px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--serif);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 700;
  text-transform: uppercase;
  margin: 0;
}

img { max-width: 100%; display: block; }

a { color: inherit; }

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Botones ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--display);
  font-weight: 400;
  text-transform: uppercase;
  font-size: 18px;
  padding: 15px 30px;
  border-radius: 4px;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  letter-spacing: 0.4px;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary {
  background: var(--ink);
  color: var(--cream);
}
.btn-primary:hover { background: #000; box-shadow: var(--shadow); }
.btn-on-red {
  background: var(--red);
  color: #fff;
}
.btn-on-red:hover { background: var(--red-dark); box-shadow: 0 15px 30px rgba(0,0,0,0.25); }
.btn-outline {
  background: transparent;
  border-color: var(--ink);
  color: var(--ink);
}
.btn-outline:hover { background: var(--ink); color: var(--cream); }
.btn small { display: block; font-weight: 500; font-size: 12px; opacity: 0.75; }

.price-tag {
  font-family: var(--serif);
  font-size: 16px;
  color: var(--gray);
  margin-top: 10px;
}
.price-tag strong { font-family: var(--display); color: var(--ink); font-size: 19px; letter-spacing: 0.3px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(240, 238, 231, 0.92);
  backdrop-filter: saturate(160%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.logo {
  display: flex;
  align-items: center;
}
.logo img {
  display: block;
  height: 24px;
  width: auto;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
nav.main-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}
nav.main-nav a.nav-link {
  font-family: var(--display);
  text-transform: uppercase;
  font-size: 15px;
  font-weight: 400;
  text-decoration: none;
  color: var(--ink);
  opacity: 0.8;
  display: inline;
}
nav.main-nav a.nav-link:hover { opacity: 1; }
@media (max-width: 639px) {
  .site-header .wrap {
    flex-wrap: wrap;
    height: auto;
    padding: 14px 0;
    row-gap: 10px;
  }
  nav.main-nav {
    width: 100%;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px 16px;
  }
  nav.main-nav a.nav-link { font-size: 13px; }
}
.lang-switch {
  display: flex;
  gap: 6px;
  font-family: var(--display);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.5px;
}
.lang-switch span,
.lang-switch a {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 3px;
  color: var(--gray);
  border: 1px solid var(--line);
  cursor: default;
  text-decoration: none;
}
.lang-switch a {
  cursor: pointer;
}
.lang-switch a:hover {
  border-color: var(--ink);
  color: var(--ink);
}
.lang-switch span.active {
  background: var(--ink);
  color: var(--cream);
  border-color: var(--ink);
}
.flag-icon {
  display: inline-block;
  width: 16px;
  height: 12px;
  border-radius: 2px;
  background-size: cover;
  background-position: center;
  margin-right: 5px;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.15);
  flex-shrink: 0;
}
.flag-gb {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 36'%3E%3Crect width='60' height='36' fill='%2300247d'/%3E%3Cpath d='M0,0 L60,36 M60,0 L0,36' stroke='%23fff' stroke-width='7'/%3E%3Cpath d='M0,0 L60,36 M60,0 L0,36' stroke='%23cf142b' stroke-width='3'/%3E%3Cpath d='M30,0 V36 M0,18 H60' stroke='%23fff' stroke-width='10'/%3E%3Cpath d='M30,0 V36 M0,18 H60' stroke='%23cf142b' stroke-width='6'/%3E%3C/svg%3E");
}
.flag-es {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 36'%3E%3Crect width='60' height='36' fill='%23AA151B'/%3E%3Crect y='9' width='60' height='18' fill='%23F1BF00'/%3E%3C/svg%3E");
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background: var(--paper);
  color: var(--ink);
  overflow: hidden;
  isolation: isolate;
  padding: 0;
}
.hero .wrap {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  padding-top: 48px;
  padding-bottom: 40px;
  align-items: center;
}
@media (min-width: 900px) {
  .hero .wrap {
    grid-template-columns: 1.2fr 0.8fr;
    padding-top: 36px;
    padding-bottom: 36px;
    align-items: center;
  }
}
.eyebrow {
  font-family: var(--display);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--ink);
  margin: 0 0 18px;
}
.hero h1 {
  margin: 0 0 18px;
}
.hero h1.wordmark img {
  display: block;
  width: 100%;
  max-width: 460px;
  height: auto;
}
.hero-sub {
  font-family: var(--serif);
  font-size: clamp(21px, 2.8vw, 28px);
  font-weight: 500;
  max-width: 32ch;
  margin: 0 0 22px;
  color: var(--ink);
}
.hero-tagline {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 19px;
  max-width: 34ch;
  margin: 0 0 34px;
  color: #2a2420;
  border-left: 3px solid var(--red);
  padding-left: 16px;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }
.hero-art {
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.hero-art img {
  max-width: 288px;
  width: 72%;
  max-height: 52vh;
  object-fit: contain;
}
@media (min-width: 900px) {
  .hero-art img { max-width: 408px; width: 100%; max-height: 68vh; }
}

/* ---------- Secciones generales ---------- */
section { padding: 88px 0; }
.section-tight { padding: 64px 0; }
.section-label {
  font-family: var(--display);
  font-size: 15px;
  font-weight: 400;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--red-dark);
  margin: 0 0 14px;
}
h2.section-title {
  font-size: clamp(30px, 4.5vw, 46px);
  line-height: 1.08;
  margin: 0 0 28px;
  max-width: 20ch;
}
.lede {
  font-family: var(--serif);
  font-size: 21px;
  line-height: 1.55;
  max-width: 62ch;
  color: #2a2420;
}

/* ---------- Relación tóxica ---------- */
.toxic { background: var(--ink); color: var(--paper); }
.toxic .section-label { color: #ff5a5f; }
.toxic h2.section-title { color: #fff; }
.toxic-grid {
  display: grid;
  gap: 24px;
  margin-top: 42px;
}
@media (min-width: 780px) {
  .toxic-grid { grid-template-columns: repeat(3, 1fr); }
}
.toxic-card {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px;
  padding: 28px 26px;
}
.toxic-card .face {
  font-family: var(--display);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  font-size: 18px;
  color: #ff5a5f;
  margin: 0 0 12px;
}
.toxic-card p { margin: 0; color: #d8d3cc; font-size: 16.5px; }
.toxic-quote {
  margin-top: 44px;
  font-family: var(--serif);
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 500;
  line-height: 1.4;
  max-width: 46ch;
  color: #fff;
  border-left: 4px solid var(--red);
  padding-left: 22px;
}

/* ---------- Historia (Diocleciano / Nixon) ---------- */
.history { background: var(--paper-dim); }
.history-grid {
  display: grid;
  gap: 24px;
  margin-top: 40px;
}
@media (min-width: 780px) {
  .history-grid { grid-template-columns: repeat(2, 1fr); }
}
.history-card {
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 32px;
  position: relative;
}
.history-card .year {
  font-family: var(--display);
  font-weight: 400;
  font-size: 16px;
  color: var(--red-dark);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin: 0 0 6px;
}
.history-card h3 {
  font-size: 25px;
  margin: 0 0 14px;
}
.history-card .recipe {
  font-family: var(--serif);
  font-weight: 500;
  color: var(--gray);
  margin: 0 0 14px;
  font-size: 16px;
}
.history-card p.body-text { font-size: 16.5px; margin: 0 0 14px; }
.history-card .moraleja {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 17px;
  color: var(--ink);
  border-top: 1px dashed var(--line);
  padding-top: 14px;
  margin: 0;
}
.history-footer {
  margin-top: 36px;
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 500;
  max-width: 60ch;
  color: var(--ink);
}

/* ---------- Qué vas a encontrar ---------- */
.roadmap { background: var(--paper); }
.roadmap-list {
  margin-top: 40px;
  display: grid;
  gap: 18px;
}
@media (min-width: 780px) {
  .roadmap-list { grid-template-columns: repeat(2, 1fr); }
}
.roadmap-item {
  display: flex;
  gap: 18px;
  padding: 24px;
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 10px;
}
.roadmap-num {
  font-family: var(--display);
  font-size: 36px;
  color: var(--red);
  line-height: 1;
  flex-shrink: 0;
}
.roadmap-item h3 {
  font-size: 20px;
  margin: 0 0 6px;
}
.roadmap-item p { margin: 0; font-family: var(--serif); font-size: 16px; color: var(--gray); }

/* ---------- Señal y ruido (gráfico) ---------- */
.signal { background: var(--paper-dim); }
.signal-chart {
  margin-top: 40px;
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 24px 24px 8px;
}
.signal-chart svg.chart-main { width: 100%; height: auto; display: block; }
.signal-legend {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 20px 4px 16px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-family: var(--serif);
  font-size: 17px;
  color: var(--ink);
}
.signal-legend .legend-item { display: flex; align-items: center; gap: 14px; }
.signal-legend .legend-icon { width: 40px; height: 10px; flex-shrink: 0; display: block; overflow: visible; }
.signal-caption {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 18px;
  max-width: 60ch;
  margin: 30px 0 0;
  color: var(--ink);
  border-left: 3px solid var(--red);
  padding-left: 18px;
}

/* ---------- Adelanto / excerpt ---------- */
.excerpt {
  background: var(--cream);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.excerpt-box {
  margin-top: 36px;
  background: var(--paper-dim);
  border-radius: 12px;
  padding: 40px;
  position: relative;
}
.excerpt-box::before {
  content: "\201C";
  position: absolute;
  top: -6px;
  left: 24px;
  font-family: var(--serif);
  font-size: 120px;
  color: var(--red);
  opacity: 0.18;
  line-height: 1;
}
.excerpt-box h3 {
  font-size: 23px;
  margin: 0 0 16px;
  position: relative;
}
.excerpt-box p { font-family: var(--serif); font-size: 17px; margin: 0 0 14px; position: relative; }
.excerpt-box p:last-of-type { margin-bottom: 0; }
.excerpt-more {
  margin-top: 22px;
  font-family: var(--display);
  text-transform: uppercase;
  font-size: 14px;
  letter-spacing: 0.3px;
  color: var(--red-dark);
}
.excerpt-grid {
  display: grid;
  gap: 24px;
  margin-top: 36px;
}
@media (min-width: 860px) {
  .excerpt-grid { grid-template-columns: repeat(2, 1fr); }
}
.excerpt-grid .excerpt-box { margin-top: 0; }

/* ---------- Autor ---------- */
.author { background: var(--ink); color: var(--paper); }
.author .wrap {
  display: grid;
  gap: 40px;
  align-items: center;
}
@media (min-width: 860px) {
  .author .wrap { grid-template-columns: 0.7fr 1.3fr; }
}
.author-badge {
  width: 100%;
  aspect-ratio: 1;
  max-width: 260px;
  border-radius: 50%;
  border: 4px solid var(--red);
  object-fit: cover;
  display: block;
  margin: 0 auto;
}
.author h2.section-title { color: #fff; }
.author .section-label { color: #ff5a5f; }
.author p { color: #d8d3cc; font-size: 17px; }
.author p strong { color: #fff; }
.author-links {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  margin-top: 22px;
}
.author-articles-link {
  display: inline-block;
  font-family: var(--display);
  text-transform: uppercase;
  font-size: 15px;
  letter-spacing: 0.5px;
  color: #fff;
  text-decoration: none;
  border-bottom: 2px solid var(--red);
  padding-bottom: 3px;
}
.author-articles-link:hover { border-color: #fff; }

/* ---------- CTA final ---------- */
.final-cta {
  background: var(--paper-dim);
  color: var(--ink);
  position: relative;
  overflow: hidden;
}
.final-cta .wrap {
  display: grid;
  gap: 40px;
  align-items: center;
}
@media (min-width: 860px) {
  .final-cta .wrap { grid-template-columns: 0.8fr 1.2fr; }
}
.book-3d {
  width: 100%;
  max-width: 280px;
  margin: 0 auto;
  padding: 20px 0 20px 30px;
  perspective: 1400px;
  transform: rotate(-8deg);
  filter: drop-shadow(14px 30px 18px rgba(0,0,0,0.4));
}
.book-3d-inner {
  position: relative;
  width: 100%;
  aspect-ratio: 900 / 1357;
  background: #000;
  transform-style: preserve-3d;
  transform: rotateY(28deg);
}
.book-3d-face {
  position: absolute;
  top: 0;
  height: 100%;
  background-size: cover;
  background-position: center;
}
.book-3d-cover {
  left: 0;
  width: 100%;
  transform: translateZ(11.5px);
  border-radius: 1px 3px 3px 1px;
}
.book-3d-spine {
  left: -23px;
  width: 23px;
  transform-origin: right center;
  transform: rotateY(-90deg);
}
.final-cta h2.section-title { color: var(--ink); max-width: none; }
.final-cta .section-label { color: var(--red-dark); }
.final-cta p.lede { color: #2a2420; }
.final-cta .price-tag { color: var(--gray); }
.final-cta .price-tag strong { color: var(--ink); }
.final-cta .hero-actions { margin-top: 26px; }

/* ---------- Footer ---------- */
footer.site-footer {
  background: var(--ink);
  color: rgba(255,255,255,0.6);
  padding: 40px 0;
  font-family: var(--serif);
  font-size: 14px;
}
footer.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  align-items: center;
}
footer.site-footer strong {
  font-family: var(--display);
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.3px;
  color: #fff;
}
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- Página de artículos ---------- */
.page-header {
  background: var(--ink);
  color: var(--cream);
  padding: 64px 0 48px;
}
.page-header .section-label { color: #ff5a5f; }
.page-header h1.section-title {
  font-family: var(--display);
  font-weight: 700;
  text-transform: uppercase;
  font-size: clamp(32px, 5vw, 50px);
  line-height: 1.05;
  margin: 0 0 16px;
  color: #fff;
}
.page-header p { color: #d8d3cc; font-size: 17px; max-width: 62ch; margin: 0; }

.articles-list {
  background: var(--paper);
  padding: 56px 0 96px;
}
.article-item {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 26px 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  color: var(--ink);
  position: relative;
}
.article-item:first-child { padding-top: 0; }
.article-item-stretched-link {
  position: absolute;
  inset: 0;
  z-index: 1;
}
.article-pub a {
  position: relative;
  z-index: 2;
  color: inherit;
  text-decoration: underline;
}
.article-pub a:hover { color: var(--red-dark); }
.article-icon {
  flex-shrink: 0;
  width: 46px;
  height: 56px;
  border: 2px solid var(--red);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--display);
  font-size: 13px;
  color: var(--red-dark);
  letter-spacing: 0.5px;
}
.article-body { flex: 1; min-width: 0; }
.article-body h3 {
  font-size: 20px;
  margin: 0 0 6px;
  color: var(--ink);
}
.article-body p {
  font-family: var(--serif);
  font-size: 15.5px;
  color: var(--gray);
  margin: 0;
}
.article-body p.article-pub {
  font-family: var(--display);
  text-transform: uppercase;
  font-size: 13px;
  letter-spacing: 0.3px;
  color: var(--gray);
}
.article-meta {
  flex-shrink: 0;
  font-family: var(--display);
  text-transform: uppercase;
  font-size: 13px;
  color: var(--red-dark);
  white-space: nowrap;
}
.article-item:hover .article-body h3 { text-decoration: underline; }

/* ---------- Página de prompts (Dinámico / Dynamic) ---------- */
.prompts-list {
  background: var(--paper);
  padding: 56px 0 96px;
}
.prompt-card {
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 32px;
}
.prompt-card + .prompt-card { margin-top: 24px; }
.prompt-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
}
.prompt-label {
  font-family: var(--display);
  text-transform: uppercase;
  font-size: 14px;
  letter-spacing: 0.5px;
  color: var(--red-dark);
  margin: 0;
}
.prompt-card h3 {
  font-size: 23px;
  margin: 0 0 18px;
}
.prompt-text {
  font-family: var(--serif);
  font-size: 16.5px;
  line-height: 1.6;
  color: var(--ink);
}
.prompt-text p { margin: 0 0 14px; }
.prompt-text ol { margin: 0 0 14px; padding-left: 22px; }
.prompt-text li { margin-bottom: 10px; }
.prompt-text a { color: var(--red-dark); }
.copy-btn {
  flex-shrink: 0;
  font-family: var(--display);
  text-transform: uppercase;
  font-size: 13px;
  letter-spacing: 0.3px;
  background: var(--ink);
  color: var(--cream);
  border: none;
  border-radius: 4px;
  padding: 9px 16px;
  cursor: pointer;
  transition: background 0.15s ease;
}
.copy-btn:hover { background: #000; }
.copy-btn.copied { background: var(--red); }
.prompts-note {
  margin-top: 36px;
  font-family: var(--serif);
  font-size: 16px;
  color: var(--gray);
}
.prompts-note a { color: var(--red-dark); }
.prompt-example {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px dashed var(--line);
  font-family: var(--serif);
  font-size: 15.5px;
}
.prompt-example-label {
  display: block;
  font-family: var(--display);
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.4px;
  color: var(--gray);
  margin-bottom: 6px;
}
.prompt-example a {
  color: var(--red-dark);
  font-weight: 600;
  text-decoration: underline;
}
