/*
 * FincaPro — landing. Un "informe de campo": papel, tinta, reglas finas.
 * Marca (BRAND_FINCAPRO.md): lima #84CC16 como marcador, zinc, Figtree.
 */
:root {
  --paper: #ffffff;
  --paper-2: #f4f4f5;
  --ink: #18181b;
  --ink-2: #3f3f46;
  --muted: #71717a;
  --rule: #e4e4e7;
  --rule-strong: #18181b;
  --lime: #84cc16;
  --lime-ink: #4d7c0f;
  --lime-text: #65a30d;
  --marker: rgb(132 204 22 / 0.28);
  --screen: #0f160e;
  --screen-2: #161b19;
  --screen-line: #2a332c;
  --screen-text: #fafafa;
  --screen-muted: rgb(250 250 250 / 0.72);
  --panel-bg:
    radial-gradient(80% 70% at 80% 15%, rgb(132 204 22 / 0.35), transparent 55%),
    radial-gradient(70% 60% at 10% 90%, rgb(45 90 20 / 0.55), transparent 50%),
    linear-gradient(160deg, #1a2a14 0%, #0f160e 48%, #162012 100%);
  --g0: #3f7d4a;
  --g1: #6ea03a;
  --g2: #d97706;
  --g3: #ea580c;
  --g4: #be123c;
  --serif: 'Figtree', system-ui, sans-serif;
  --sans: 'Figtree', system-ui, sans-serif;
  --mono: 'Figtree', system-ui, sans-serif;
  --code: 'IBM Plex Mono', ui-monospace, Menlo, monospace;
  --radius: 14px;
  --max: 1240px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img {
  display: block;
  max-width: 100%;
}
a {
  color: inherit;
}
::selection {
  background: var(--marker);
}
:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}
.wrap {
  width: min(var(--max), 100% - 40px);
  margin-inline: auto;
}
.mono {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.mark {
  background: linear-gradient(transparent 58%, var(--marker) 58% 92%, transparent 92%);
  padding: 0 0.08em;
}
.skip {
  position: absolute;
  left: -999px;
}
.skip:focus {
  left: 16px;
  top: 12px;
  z-index: 200;
  background: var(--ink);
  color: var(--paper);
  padding: 8px 12px;
}

/* Botones: rectos, tinta. */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 20px;
  border: 1.5px solid var(--rule);
  border-radius: 10px;
  font: 650 0.95rem/1 var(--sans);
  text-decoration: none;
  cursor: pointer;
  background: transparent;
  color: var(--ink);
  transition:
    background 0.15s,
    color 0.15s;
}
.btn:hover {
  border-color: var(--ink);
}
.btn--solid {
  background: var(--lime);
  border-color: var(--lime);
  color: var(--ink);
}
.btn--solid:hover {
  background: #93d924;
  border-color: #93d924;
}
.btn .arrow {
  font-family: var(--mono);
  transition: transform 0.2s;
}
.btn:hover .arrow {
  transform: translateX(3px);
}

/* Cabecera tipo membrete */
.masthead {
  border-bottom: 1px solid var(--rule);
  position: sticky;
  top: 0;
  z-index: 60;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: blur(8px);
}
.masthead__in {
  display: flex;
  align-items: center;
  gap: 32px;
  height: 64px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}
.brand img {
  width: 30px;
  height: 30px;
}
.brand b {
  color: var(--lime);
}
.masthead nav {
  display: flex;
  gap: 26px;
}
.masthead nav a {
  text-decoration: none;
  font-size: 0.92rem;
  color: var(--ink-2);
}
.masthead nav a:hover {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 4px;
}
.masthead__cta {
  margin-left: auto;
  display: flex;
  gap: 8px;
  align-items: center;
}
.masthead__cta .link {
  font-size: 0.92rem;
  text-decoration: none;
  padding: 8px 12px;
}
.masthead__cta .link:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}
.masthead .btn {
  padding: 10px 14px;
}

/* Portada */
.cover {
  padding: 36px 0 0;
}
.cover__meta {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  color: var(--muted);
  border-bottom: 1px solid var(--rule);
  padding-bottom: 12px;
}
.cover__grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 32px;
  padding-bottom: 40px;
}
.cover__text {
  padding: 56px 0;
}
.cover h1 {
  font-family: var(--sans);
  font-weight: 800;
  font-size: clamp(3rem, 6.8vw, 5.8rem);
  line-height: 0.95;
  letter-spacing: -0.045em;
  margin: 0 0 28px;
}
.cover h1 i {
  font-style: normal;
  color: var(--lime-text);
}
.cover__lead {
  font-size: 1.18rem;
  color: var(--ink-2);
  max-width: 31em;
  margin: 0 0 32px;
}
.cover__ctas {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.cover__fine {
  margin-top: 18px;
  color: var(--muted);
  font-size: 0.9rem;
}
.cover__plant {
  position: relative;
  min-height: 560px;
  border-radius: 24px;
}

/* Lienzos 3D y pantallas */
.screen {
  background: var(--panel-bg);
  color: var(--screen-text);
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.screen::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgb(255 255 255 / 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgb(255 255 255 / 0.05) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: radial-gradient(ellipse 90% 80% at 40% 40%, #000, transparent 75%);
}
.screen::after {
  content: '';
  position: absolute;
  inset: auto 0 0 0;
  height: 45%;
  z-index: -1;
  pointer-events: none;
  opacity: 0.55;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 640 320' preserveAspectRatio='none'%3E%3Cg fill='none' stroke='rgba(163,230,53,0.28)' stroke-width='1.4'%3E%3Cpath d='M-40 40 C 140 10, 300 90, 700 35'/%3E%3Cpath d='M-40 95 C 160 55, 330 140, 700 95'/%3E%3Cpath d='M-40 155 C 180 120, 350 195, 700 155'/%3E%3Cpath d='M-40 215 C 190 185, 370 245, 700 215'/%3E%3Cpath d='M-40 275 C 200 245, 390 295, 700 270'/%3E%3C/g%3E%3C/svg%3E") center / 100% 100% no-repeat;
}
.screen__mark {
  position: absolute;
  right: -10%;
  bottom: -8%;
  width: 46%;
  max-width: 300px;
  opacity: 0.1;
  transform: rotate(-10deg);
  pointer-events: none;
  z-index: -1;
}
.screen canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: pan-y;
  cursor: grab;
}
.screen canvas:active {
  cursor: grabbing;
}
.screen__hud {
  position: absolute;
  inset: 16px 18px auto 18px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--screen-muted);
  pointer-events: none;
}
.screen__foot {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 16px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  pointer-events: none;
}
.screen__foot > * {
  pointer-events: auto;
}
.no-webgl {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 24px;
  color: var(--screen-muted);
}
.readout {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.85rem;
}
.readout b {
  display: block;
  font-family: var(--sans);
  font-weight: 800;
  letter-spacing: -0.04em;
  font-size: 3rem;
  line-height: 1;
  color: var(--screen-text);
  letter-spacing: -0.01em;
}
.legend {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.68rem;
  color: var(--screen-muted);
}
.legend span::before {
  content: '';
  display: inline-block;
  width: 9px;
  height: 9px;
  margin-right: 5px;
  vertical-align: -1px;
  background: var(--c);
}

/* Capítulos */
.chapter {
  border-bottom: 1px solid var(--rule);
}
.chapter__head {
  display: grid;
  grid-template-columns: 180px 1fr;
  border-bottom: 1px solid var(--rule);
}
.chapter__num {
  padding: 32px 0;
  border-right: 1px solid var(--rule);
  font-family: var(--sans);
  font-weight: 800;
  font-size: 2.6rem;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--lime-text);
}
.chapter__num small {
  display: block;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 10px;
}
.chapter__title {
  padding: 28px 0 28px 40px;
}
.chapter__title h2 {
  font-family: var(--sans);
  font-weight: 800;
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.05;
  letter-spacing: -0.035em;
  margin: 0 0 14px;
  max-width: 18em;
}
.chapter__title h2 i {
  font-style: normal;
  color: var(--muted);
}
.chapter__title p {
  margin: 0;
  max-width: 40em;
  color: var(--ink-2);
  font-size: 1.08rem;
}
.chapter__body {
  display: grid;
  grid-template-columns: 1fr 380px;
}
.chapter__body--flip {
  grid-template-columns: 380px 1fr;
}
.cover__grid > *,
.chapter__body > *,
.field-notes > *,
.prices > * {
  min-width: 0;
}
.stage {
  min-height: 560px;
  border-radius: 20px;
  margin: 24px 0;
}
.chapter__body--flip .stage {
  order: 2;
}
.controls {
  padding: 28px 0 28px 32px;
}
.chapter__body--flip .controls {
  padding: 28px 32px 28px 0;
}
.fig {
  display: block;
  color: var(--muted);
  margin-bottom: 18px;
}

/* Controles de formulario con estilo de libreta */
.field {
  margin-bottom: 22px;
}
.field label,
.field .label {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 8px;
}
.field output {
  font-family: var(--mono);
  font-weight: 500;
}
input[type='range'] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 26px;
  background: transparent;
  cursor: pointer;
}
input[type='range']::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 99px;
  background: var(--rule);
}
input[type='range']::-moz-range-track {
  height: 4px;
  border-radius: 99px;
  background: var(--rule);
}
input[type='range']::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  margin-top: -7px;
  border-radius: 50%;
  background: var(--lime);
  border: 3px solid #fff;
  box-shadow: 0 0 0 1px var(--lime-ink);
}
input[type='range']::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--lime);
  border: 3px solid #fff;
  box-shadow: 0 0 0 1px var(--lime-ink);
}
.seg {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: var(--paper-2);
  border-radius: 12px;
}
.seg button {
  flex: 1;
  border: 0;
  border-radius: 9px;
  background: transparent;
  font: 600 0.82rem/1 var(--sans);
  padding: 10px 6px;
  cursor: pointer;
  color: var(--ink);
}
.seg button[aria-pressed='true'] {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.08), 0 0 0 1px var(--rule);
}

/* Hojas de la planta */
.leaves {
  display: grid;
  gap: 6px;
  margin-bottom: 22px;
}
.leaf {
  display: grid;
  grid-template-columns: 58px 1fr;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 0.8rem;
}
.leaf__grades {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 3px;
}
.leaf__grades button {
  border: 1px solid var(--rule);
  background: #fff;
  height: 26px;
  font: 600 0.75rem/1 var(--sans);
  cursor: pointer;
  color: var(--muted);
  border-radius: 7px;
}
.leaf__grades button:hover {
  border-color: var(--ink);
  color: var(--ink);
}
.leaf__grades button[aria-pressed='true'] {
  background: var(--c);
  border-color: var(--c);
  color: #fff;
}
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--rule);
  border-radius: 14px;
  background: var(--paper-2);
}
.stat {
  padding: 12px 14px;
  border-left: 1px solid var(--rule);
}
.stat:first-child {
  border-left: 0;
}
.stat span {
  display: block;
  color: var(--muted);
  font-weight: 600;
  font-family: var(--sans);
  font-size: 0.66rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.stat b {
  font-family: var(--sans);
  font-weight: 800;
  letter-spacing: -0.03em;
  font-size: 1.8rem;
  line-height: 1.1;
}
.note {
  font-size: 0.86rem;
  color: var(--muted);
  margin: 14px 0 0;
}

/* Panorama: línea de tiempo */
.timeline {
  display: flex;
  align-items: center;
  gap: 12px;
}
.timeline input {
  flex: 1;
}
.play {
  width: 40px;
  height: 40px;
  border: 0;
  background: var(--lime);
  color: var(--ink);
  border-radius: 10px;
  cursor: pointer;
  font-family: var(--mono);
}
.play:hover {
  background: #93d924;
}
.lots {
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--rule);
}
.lots li {
  display: grid;
  grid-template-columns: 14px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 7px 0;
  border-bottom: 1px solid var(--rule);
  font-size: 0.9rem;
}
.lots li i {
  width: 12px;
  height: 12px;
  border-radius: 4px;
  background: var(--c);
}
.lots li b {
  font-family: var(--mono);
  font-weight: 500;
}
.lots li.is-hot {
  background: linear-gradient(90deg, rgb(190 18 60 / 0.08), transparent);
}
.tip {
  position: absolute;
  pointer-events: none;
  background: #fff;
  color: var(--ink);
  border-radius: 10px;
  box-shadow: 0 10px 30px -10px rgb(0 0 0 / 0.4);
  padding: 8px 10px;
  font-size: 0.82rem;
  transform: translate(-50%, calc(-100% - 12px));
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.12s;
}
.tip.is-on {
  opacity: 1;
}

/* Gráficas SVG */
.chart {
  padding: 28px 32px 22px 0;
}
.chapter__body--flip .chart {
  padding: 28px 0 22px 32px;
}
.chart svg {
  width: 100%;
  height: auto;
  display: block;
  overflow: visible;
}
.chart text {
  font-family: var(--mono);
  font-size: 11px;
  fill: var(--muted);
}

/* AgroClima */
.risk-card {
  border: 1px solid var(--rule);
  border-radius: 18px;
  padding: 22px 24px;
  background: #fff;
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.04);
}
.risk-card__level {
  font-family: var(--sans);
  font-weight: 800;
  letter-spacing: -0.04em;
  font-size: 3.2rem;
  line-height: 1;
  color: var(--risk, var(--ink));
}
.scale {
  position: relative;
  height: 12px;
  border-radius: 99px;
  overflow: visible;
  margin: 16px 0 6px;
  display: grid;
  grid-template-columns: 43.6fr 19.4fr 17fr 20fr;
}
.scale span {
  border-right: 2px solid var(--paper);
}
.scale__pin {
  position: absolute;
  top: -5px;
  width: 4px;
  height: 22px;
  border-radius: 2px;
  background: var(--ink);
  box-shadow: 0 0 0 2px #fff;
  transition: left 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.scale__labels {
  display: grid;
  grid-template-columns: 43.6fr 19.4fr 17fr 20fr;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.66rem;
  color: var(--muted);
}
.tips {
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.tips li {
  border-left: 3px solid var(--c, var(--ink));
  border-radius: 2px;
  background: var(--paper-2);
  padding: 8px 12px;
  font-size: 0.92rem;
}
.tips li b {
  display: block;
}
.json {
  margin: 0;
  padding: 16px 18px;
  background: #0f160e;
  color: #d9f99d;
  font: 500 0.75rem/1.55 var(--code);
  border-radius: 14px;
  overflow: auto;
  max-height: 260px;
  border-radius: 2px;
}
.json .k {
  color: #a3a3a3;
}
.json .s {
  color: #fde68a;
}
.weeks {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 14px;
}
.weeks label {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin: 0;
}
.weeks input {
  writing-mode: vertical-lr;
  direction: rtl;
  width: 26px;
  height: 120px;
  margin: 0 auto;
  display: block;
}
.weeks input::-webkit-slider-runnable-track {
  width: 2px;
  height: auto;
}
.weeks input::-webkit-slider-thumb {
  margin-top: 0;
  margin-left: -7px;
}
.weeks label {
  text-align: center;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.7rem;
  color: var(--muted);
}
.weeks output {
  display: block;
  font-family: var(--sans);
  font-weight: 700;
  font-size: 0.8rem;
  color: var(--ink);
  text-align: center;
}

/* Libro mayor de módulos */
.ledger {
  width: 100%;
  border-collapse: collapse;
}
.ledger th,
.ledger td {
  text-align: left;
  vertical-align: top;
  padding: 16px 16px 16px 0;
  border-bottom: 1px solid var(--rule);
}
.ledger th {
  font-family: var(--sans);
  font-weight: 650;
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid var(--ink);
}
.ledger td:first-child {
  font-weight: 800;
  color: var(--lime-text);
  width: 56px;
}
.ledger td:nth-child(2) {
  font-weight: 700;
  width: 30%;
}
.ledger td:last-child {
  color: var(--muted);
  width: 22%;
}
.ledger .tag {
  font-size: 0.66rem;
  font-weight: 700;
  background: var(--lime);
  color: var(--ink);
  border-radius: 99px;
  padding: 2px 8px;
  margin-left: 8px;
  vertical-align: 2px;
}
.ledger-wrap {
  padding: 8px 0 40px 220px;
}

/* Campo / móvil */
.field-notes {
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.field-notes > div {
  padding: 40px 40px 48px 0;
}
.field-notes > div + div {
  border-left: 1px solid var(--rule);
  padding-left: 40px;
}
.field-notes ol {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: n;
}
.field-notes li {
  counter-increment: n;
  display: grid;
  grid-template-columns: 44px 1fr;
  padding: 14px 0;
  border-bottom: 1px solid var(--rule);
}
.field-notes li::before {
  content: counter(n, decimal-leading-zero);
  font-weight: 800;
  color: var(--lime-text);
}
.field-notes h3 {
  font-family: var(--sans);
  font-weight: 800;
  letter-spacing: -0.03em;
  font-size: 1.7rem;
  margin: 0 0 14px;
  line-height: 1.05;
}

/* Precios */
.prices {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}
.price-col {
  padding: 32px 32px 36px 0;
  display: flex;
  flex-direction: column;
}
.price-col + .price-col {
  border-left: 1px solid var(--rule);
  padding-left: 32px;
}
.price-col--star {
  background: var(--panel-bg);
  border-radius: 22px;
  color: var(--screen-text);
  padding: 32px !important;
  border-left: 0 !important;
}
.price-col h3 {
  font-family: var(--sans);
  font-weight: 800;
  letter-spacing: -0.02em;
  font-size: 1.6rem;
  margin: 0;
}
.price-col .for {
  color: var(--muted);
  margin: 6px 0 22px;
  min-height: 3em;
}
.price-col--star .for,
.price-col--star .per,
.price-col--star .fine {
  color: var(--screen-muted);
}
.amount {
  font-family: var(--sans);
  font-weight: 800;
  letter-spacing: -0.045em;
  font-size: 3rem;
  line-height: 1;
}
.per {
  color: var(--muted);
  font-size: 0.92rem;
}
.fine {
  color: var(--muted);
  font-size: 0.82rem;
  min-height: 1.3em;
  margin: 6px 0 22px;
}
.price-col ul {
  list-style: none;
  padding: 0;
  margin: 0 0 28px;
  border-top: 1px solid var(--rule);
}
.price-col--star ul {
  border-color: var(--screen-line);
}
.price-col li {
  padding: 9px 0;
  border-bottom: 1px solid var(--rule);
  font-size: 0.94rem;
}
.price-col--star li {
  border-color: var(--screen-line);
}
.price-col .btn {
  margin-top: auto;
  justify-content: center;
}
.price-col--star .btn {
  border-color: var(--lime);
  background: var(--lime);
  color: var(--ink);
}
.price-col--star .btn:hover {
  background: var(--paper);
  border-color: var(--paper);
}
.badge {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 0.66rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--lime);
  margin-bottom: 8px;
}
.prices-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding: 18px 0;
  border-bottom: 1px solid var(--rule);
}
.prices-head .seg {
  min-width: min(330px, 100%);
}
.prices-head .seg button {
  white-space: nowrap;
}

/* Preguntas */
.faq {
  padding: 8px 0 48px 220px;
}
.faq details {
  border-bottom: 1px solid var(--rule);
}
.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 18px 0;
  font-weight: 650;
  font-size: 1.05rem;
  display: grid;
  grid-template-columns: 1fr 24px;
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq summary::after {
  content: '+';
  color: var(--lime-text);
  font-weight: 800;
  text-align: right;
}
.faq details[open] summary::after {
  content: '−';
}
.faq details p {
  margin: 0 0 20px;
  max-width: 46em;
  color: var(--ink-2);
}

/* Cierre y pie */
.close {
  padding: 32px 0 64px;
}
.close .wrap {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background: var(--panel-bg);
  color: var(--screen-text);
  border-radius: 28px;
  padding: 64px 56px;
}
.close .btn {
  border-color: rgb(255 255 255 / 0.3);
  color: #fff;
}
.close .btn--solid {
  color: var(--ink);
  border-color: var(--lime);
}
.close h2 {
  position: relative;
  z-index: 1;
  font-family: var(--sans);
  font-weight: 800;
  font-size: clamp(2.4rem, 5.6vw, 4.6rem);
  line-height: 1;
  letter-spacing: -0.045em;
  margin: 0 0 30px;
  max-width: 12em;
}
.close h2 i {
  font-style: normal;
  color: var(--lime);
}
.foot {
  border-top: 1px solid var(--rule);
  padding: 28px 0 40px;
  color: var(--muted);
  font-size: 0.88rem;
}
.foot__in {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.foot nav {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}
.foot a {
  text-decoration: none;
}
.foot a:hover {
  color: var(--ink);
  text-decoration: underline;
}

/* Revelado sobrio */
.rise {
  opacity: 0;
  transform: translateY(14px);
  transition:
    opacity 0.6s ease,
    transform 0.6s ease;
}
.rise.is-in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
  .rise {
    opacity: 1;
    transform: none;
  }
}

/* Responsive */
@media (max-width: 1060px) {
  .masthead nav {
    display: none;
  }
  .cover__grid,
  .chapter__body,
  .chapter__body--flip,
  .field-notes,
  .prices {
    grid-template-columns: 1fr;
  }
  .cover__text {
    padding: 40px 0;
    border-right: 0;
  }
  .cover__plant {
    min-height: 440px;
  }
  .stage {
    min-height: 440px;
  }
  .chapter__body--flip .stage {
    order: 0;
  }
  .controls,
  .chapter__body--flip .controls,
  .chart,
  .chapter__body--flip .chart {
    padding: 28px 0;
  }
  .ledger-wrap,
  .faq {
    padding-left: 0;
  }
  .field-notes > div,
  .field-notes > div + div {
    padding: 32px 0;
    border-left: 0;
  }
  .field-notes > div + div {
    border-top: 1px solid var(--rule);
  }
  .price-col,
  .price-col + .price-col {
    padding: 28px 0;
    border-left: 0;
    border-top: 1px solid var(--rule);
  }
  .price-col--star {
    padding: 28px 22px !important;
  }
  .close .wrap {
    padding: 44px 24px;
  }
}
@media (max-width: 640px) {
  body {
    font-size: 16px;
  }
  .masthead__cta .link {
    display: none;
  }
  .chapter__head {
    grid-template-columns: 1fr;
  }
  .chapter__num {
    border-right: 0;
    padding: 24px 0 0;
    font-size: 3rem;
  }
  .chapter__title {
    padding: 12px 0 24px;
  }
  .ledger td:last-child,
  .ledger th:last-child {
    display: none;
  }
  .readout b {
    font-size: 2.6rem;
  }
}

/* ===== Vista 3D del paño (igual que en la app) ===== */
.pano {
  margin: 28px 0 56px;
  border: 1px solid var(--rule);
  border-radius: 20px;
  padding: 18px;
  background: #fff;
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.04);
}
.pano__stage {
  position: relative;
  height: 560px;
  border-radius: 14px;
  overflow: hidden;
  background: #f4f4f5;
  border: 1px solid var(--rule);
}
.pano__stage canvas {
  cursor: grab;
}
.pano__tools {
  position: absolute;
  top: 14px;
  left: 14px;
  display: flex;
  gap: 8px;
}
.tool {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border-radius: 10px;
  border: 1px solid var(--rule);
  background: #fff;
  color: var(--lime-text);
  font: 650 0.9rem/1 var(--sans);
  cursor: pointer;
  transition:
    border-color 0.15s,
    transform 0.15s;
}
.tool:hover {
  border-color: var(--lime);
  transform: translateY(-1px);
}
.tool svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.pcard {
  position: absolute;
  top: 14px;
  right: 14px;
  width: min(290px, calc(100% - 28px));
  background: #fff;
  border: 1px solid var(--rule);
  border-left: 4px solid var(--lime);
  border-radius: 12px;
  padding: 16px 18px;
  box-shadow: 0 12px 30px -16px rgb(0 0 0 / 0.25);
  animation: card-in 0.28s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.pcard[hidden] {
  display: none;
}
.pcard h3 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 750;
  letter-spacing: -0.01em;
}
.pcard p {
  margin: 4px 0 12px;
  color: var(--muted);
  font-size: 0.9rem;
}
.pcard dl {
  margin: 0;
  display: grid;
  gap: 8px;
}
.pcard dl div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.92rem;
}
.pcard dt {
  color: var(--muted);
}
.pcard dd {
  margin: 0;
  font-weight: 750;
}
.pcard__x {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 28px;
  height: 28px;
  border: 0;
  background: transparent;
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  color: var(--ink);
  border-radius: 8px;
}
.pcard__x:hover {
  background: var(--paper-2);
}
.gchip {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 99px;
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  background: var(--c, #3f7d4a);
}
.pano__legend {
  position: absolute;
  left: 14px;
  bottom: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 9px 14px;
  font-size: 0.85rem;
  max-width: calc(100% - 28px);
}
.pano__legend span::before {
  content: '';
  display: inline-block;
  width: 11px;
  height: 11px;
  border-radius: 3px;
  margin-right: 6px;
  vertical-align: -1px;
  background: var(--c);
}
.pano__hint {
  margin: 10px 2px 0;
  font-size: 0.88rem;
  color: var(--ink-2);
}
.pano__panel {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 18px;
  margin-top: 18px;
}
.pano__panel > * {
  min-width: 0;
}
.kpis {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  align-content: start;
}
.kpi {
  border: 1px solid var(--rule);
  border-radius: 14px;
  padding: 14px;
  background: var(--paper-2);
}
.kpi span {
  display: block;
  font-size: 0.75rem;
  font-weight: 650;
  color: var(--muted);
}
.kpi b {
  display: block;
  font-size: 1.9rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.15;
  transition: color 0.3s;
}
.kpi small {
  display: block;
  font-size: 0.72rem;
  color: var(--muted);
}
.kpi.is-alert b {
  color: #be123c;
}
.kpi.is-ok b {
  color: var(--lime-text);
}
.editor {
  border: 1px solid var(--rule);
  border-radius: 14px;
  padding: 16px;
}
.editor__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px;
  margin-bottom: 12px;
}
.editor__head h3 {
  margin: 2px 0 0;
  font-size: 1.1rem;
  font-weight: 750;
}
.editor__ice {
  font-size: 0.85rem;
  color: var(--muted);
}
.editor__ice b {
  font-size: 1.6rem;
  color: var(--ink);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-left: 6px;
}
.editor__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 6px 14px;
}
.editor__grid .leaf {
  grid-template-columns: 54px 1fr;
}
.editor__grid .leaf.is-pick span {
  color: var(--lime-text);
}
.plant-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--rule);
}
.plant-pills button {
  border: 1px solid var(--rule);
  background: #fff;
  border-radius: 99px;
  padding: 4px 10px;
  font: 650 0.78rem/1.2 var(--sans);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.plant-pills button i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--c);
}
.plant-pills button[aria-pressed='true'] {
  border-color: var(--lime);
  background: rgb(132 204 22 / 0.12);
}
@keyframes card-in {
  from {
    opacity: 0;
    transform: translateY(-6px) scale(0.98);
  }
}

/* ===== Tendencia IGE (igual que en la app) ===== */
.trend {
  margin: 28px 0 0;
  border: 1px solid var(--rule);
  border-radius: 20px;
  padding: 8px 28px 22px;
  background: #fff;
}
.trend__tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--rule);
  margin: 0 -8px 22px;
  overflow-x: auto;
}
.ttab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 16px 18px 14px;
  font-weight: 600;
  color: var(--ink-2);
  border-bottom: 3px solid transparent;
  white-space: nowrap;
}
.ttab svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.ttab.is-on {
  border-bottom-color: var(--lime);
  color: var(--ink);
}
.trend__eyebrow {
  margin: 0 0 6px;
  font-size: 0.78rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--lime-text);
}
.trend__lead {
  margin: 0 0 18px;
  color: var(--muted);
  max-width: 52em;
  font-size: 1.05rem;
}
.trend__chart {
  position: relative;
  border-top: 1px solid var(--rule);
  padding-top: 18px;
}
.trend__chart svg {
  width: 100%;
  height: auto;
  display: block;
  overflow: visible;
}
.trend__chart text {
  font-family: var(--sans);
  font-size: 13px;
  fill: #52525b;
}
.trend__chart .series path {
  fill: none;
  stroke-width: 2.4;
  stroke-linejoin: round;
  stroke-linecap: round;
  transition: opacity 0.25s;
}
.trend__chart .series.is-avg path {
  stroke-width: 4.5;
}
.trend__chart .series.is-off {
  opacity: 0;
  pointer-events: none;
}
.trend__chart .series circle {
  stroke: #fff;
  stroke-width: 2;
  transition: r 0.15s;
}
.trend__chart.is-drawing .series path {
  animation: draw 1.6s cubic-bezier(0.4, 0, 0.2, 1) both;
}
.trend__chart.is-drawing .series circle {
  animation: dot-in 0.4s ease both;
}
@keyframes draw {
  from {
    stroke-dashoffset: var(--len);
  }
}
@keyframes dot-in {
  from {
    opacity: 0;
  }
}
.trend__tip {
  position: absolute;
  pointer-events: none;
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: 10px;
  box-shadow: 0 12px 30px -14px rgb(0 0 0 / 0.3);
  padding: 10px 12px;
  font-size: 0.82rem;
  min-width: 170px;
  opacity: 0;
  transform: translate(-50%, -110%);
  transition: opacity 0.12s;
}
.trend__tip.is-on {
  opacity: 1;
}
.trend__tip b {
  display: block;
  margin-bottom: 4px;
}
.trend__tip div {
  display: flex;
  justify-content: space-between;
  gap: 14px;
}
.trend__tip i {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  margin-right: 6px;
  background: var(--c);
}
.trend__legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 18px;
  margin: 14px 0 6px;
}
.trend__legend button {
  border: 0;
  background: none;
  font: 500 0.95rem/1.3 var(--sans);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--ink);
  padding: 4px 2px;
}
.trend__legend button i {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--c);
}
.trend__legend button[aria-pressed='false'] {
  opacity: 0.4;
  text-decoration: line-through;
}

/* ===== Por qué la tendencia ===== */
.why {
  padding: 48px 0 56px;
}
.why__title {
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 0 0 22px;
}
.why__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.why__item {
  border: 1px solid var(--rule);
  border-radius: 16px;
  padding: 20px;
  background: #fff;
  transition:
    border-color 0.2s,
    transform 0.2s;
}
.why__item:hover {
  border-color: var(--lime);
  transform: translateY(-2px);
}
.why__n {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: rgb(132 204 22 / 0.16);
  color: var(--lime-ink);
  font-weight: 800;
}
.why__item h4 {
  margin: 14px 0 6px;
  font-size: 1.08rem;
  font-weight: 750;
}
.why__item p {
  margin: 0;
  color: var(--ink-2);
  font-size: 0.95rem;
}

@media (max-width: 1060px) {
  .pano__panel {
    grid-template-columns: 1fr;
  }
  .why__grid {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 640px) {
  .pano {
    padding: 10px;
    margin: 20px -8px 40px;
  }
  .pano__stage {
    height: 460px;
  }
  .pano__tools .tool {
    padding: 8px 10px;
    font-size: 0.8rem;
  }
  .pcard {
    top: auto;
    bottom: 70px;
  }
  .pano__legend {
    gap: 8px;
    font-size: 0.72rem;
    padding: 6px 10px;
  }
  .trend {
    padding: 4px 14px 16px;
  }
  .why__grid {
    grid-template-columns: 1fr;
  }
  .trend__chart text {
    font-size: 16px;
  }
}

/* Precio de fundador y retorno */
.founder {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  margin: 22px 0 6px;
  padding: 16px 20px;
  border: 1px solid rgb(132 204 22 / 0.5);
  background: rgb(132 204 22 / 0.1);
  border-radius: 14px;
}
.founder p {
  margin: 0;
  flex: 1;
  min-width: 240px;
}
.founder__tag {
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--lime-ink);
  background: #fff;
  border: 1px solid rgb(132 204 22 / 0.5);
  border-radius: 99px;
  padding: 5px 10px;
}
.roi {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 32px;
  align-items: center;
  margin: 8px 0 56px;
  padding: 28px;
  border-radius: 20px;
  background: var(--paper-2);
}
.roi h3 {
  margin: 6px 0 0;
  font-size: clamp(1.4rem, 2.4vw, 1.9rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
}
.roi p {
  margin: 0;
  color: var(--ink-2);
}
@media (max-width: 760px) {
  .roi {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

/* ---------- Páginas legales (privacidad, términos) ---------- */
.legal {
  padding: clamp(40px, 7vw, 88px) 0 clamp(56px, 8vw, 104px);
}
.legal__in {
  max-width: 760px;
}
.legal__eyebrow {
  color: var(--lime-text);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0 0 10px;
}
.legal h1 {
  font-size: clamp(2rem, 4.5vw, 2.75rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0 0 8px;
}
.legal__date {
  color: var(--muted);
  margin: 0 0 28px;
}
.legal__toc {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 6px 20px;
  padding: 18px 20px;
  margin: 0 0 40px;
  border: 1px solid var(--rule);
  border-radius: 14px;
  background: var(--paper-2);
  font-size: 0.9rem;
}
.legal__toc a {
  color: var(--ink-2);
  text-decoration: none;
}
.legal__toc a:hover {
  color: var(--ink);
  text-decoration: underline;
}
.legal section {
  scroll-margin-top: 96px;
  margin: 0 0 36px;
}
.legal h2 {
  font-size: 1.25rem;
  letter-spacing: -0.01em;
  margin: 0 0 12px;
  padding-top: 20px;
  border-top: 1px solid var(--rule);
}
.legal p,
.legal li {
  color: var(--ink-2);
  line-height: 1.7;
}
.legal ul {
  padding-left: 1.2em;
  margin: 0 0 14px;
}
.legal li {
  margin: 0 0 6px;
}
.legal a {
  color: var(--lime-ink);
}
.legal__todo {
  background: #fef3c7;
  color: #92400e;
  padding: 1px 6px;
  border-radius: 6px;
  font-weight: 600;
}
.legal__table {
  overflow-x: auto;
  margin: 0 0 14px;
  border: 1px solid var(--rule);
  border-radius: 12px;
}
.legal table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.legal th,
.legal td {
  text-align: left;
  vertical-align: top;
  padding: 10px 14px;
  border-bottom: 1px solid var(--rule);
}
.legal th {
  background: var(--paper-2);
  color: var(--ink);
  font-weight: 600;
}
.legal tr:last-child td {
  border-bottom: 0;
}
