/* ═══════════════════════════════════════════════════════════════════════
   Cajón Corral Regenera — sistema gráfico del modelo (Claude Design)
   bosque #14331F · panel #1C4029 · borde #2A5236 · crema #FFF9E6
   salvia #B9C9B3 · ámbar #D9B84A · hoja #3FA65C · terracota #D97757
   tipografía: Karla
   ═══════════════════════════════════════════════════════════════════════ */
:root {
  --bosque: #14331f;
  --bosque-2: #0d2116;
  --panel: #1c4029;
  --panel-2: #2a5236;
  --borde: #2a5236;
  --crema: #fff9e6;
  --salvia: #b9c9b3;
  --ambar: #d9b84a;
  --hoja: #3fa65c;
  --terracota: #d97757;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  /* Textura: la hoja del modelo de Claude Design repetida en filigrana + luz suave */
  background:
    radial-gradient(1100px 600px at 88% -120px, rgba(63, 166, 92, 0.11), transparent 62%),
    radial-gradient(950px 720px at -160px 42%, rgba(217, 184, 74, 0.06), transparent 60%),
    radial-gradient(900px 620px at 105% 88%, rgba(63, 166, 92, 0.07), transparent 60%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='230' height='230' viewBox='0 0 230 230'%3E%3Cg fill='none' stroke='%23FFF9E6' stroke-opacity='0.05' stroke-width='2'%3E%3Cpath d='M62,18 C80,42 95,63 95,84 A33,33 0 0,1 29,84 C29,63 44,42 62,18 Z'/%3E%3Cpath d='M172,122 C190,146 205,167 205,188 A33,33 0 0,1 139,188 C139,167 154,146 172,122 Z' /%3E%3Cpath d='M62,84 L62,102 M172,188 L172,206' /%3E%3C/g%3E%3C/svg%3E"),
    var(--bosque);
  color: var(--crema);
  font-family: "Karla", "Segoe UI", system-ui, sans-serif;
  line-height: 1.6;
  font-size: 16.5px;
}
img { max-width: 100%; display: block; }
a { color: var(--ambar); }

/* ── Aviso honesto ─────────────────────────────────────────────────── */
.banner-aviso {
  background: var(--terracota);
  color: #fff;
  text-align: center;
  padding: 9px 16px;
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

/* ── Navegación ────────────────────────────────────────────────────── */
nav {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 26px;
  padding: 14px 5vw;
  background: rgba(13, 33, 22, 0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--borde);
}
.nav-logo { font-weight: 800; letter-spacing: 0.14em; font-size: 0.95rem; color: var(--crema); text-decoration: none; }
.nav-logo strong { color: var(--ambar); }
nav .enlaces { display: flex; gap: 22px; margin-left: auto; flex-wrap: wrap; }
nav .enlaces a {
  color: var(--salvia); text-decoration: none; font-size: 0.92rem; font-weight: 600;
}
nav .enlaces a:hover { color: var(--crema); }

/* ── Hero ──────────────────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: min(86vh, 900px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 90px 5vw 120px;
  background:
    linear-gradient(180deg, rgba(13,33,22,0.82) 0%, rgba(20,51,31,0.62) 45%, var(--bosque) 100%),
    url("img/floracion.jpg") center 35% / cover no-repeat;
}
.hero-marca {
  letter-spacing: 0.34em;
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--ambar);
  margin-bottom: 22px;
}
.hero h1 {
  font-size: clamp(2.3rem, 5.6vw, 4rem);
  line-height: 1.08;
  font-weight: 800;
  max-width: 13em;
  letter-spacing: -0.01em;
}
.hero h1 em { font-style: normal; color: var(--ambar); }
.hero-slogan {
  max-width: 560px;
  margin: 22px 0 34px;
  color: var(--salvia);
  font-size: 1.12rem;
}
.hero-acciones { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.hero-wallet { min-height: 1.4em; color: var(--ambar); font-size: 0.9rem; margin-top: 16px; font-weight: 600; }

/* ── Botones ───────────────────────────────────────────────────────── */
.boton {
  display: inline-block;
  border: 1.5px solid var(--panel-2);
  background: var(--panel);
  color: var(--crema);
  padding: 13px 26px;
  border-radius: 12px;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.12s ease, filter 0.12s ease;
}
.boton.primario { background: var(--ambar); border-color: var(--ambar); color: var(--bosque-2); }
.boton.sutil { background: transparent; color: var(--salvia); }
.boton:disabled { opacity: 0.4; cursor: not-allowed; }
.boton:not(:disabled):hover { transform: translateY(-1px); filter: brightness(1.07); }

/* ── Contadores ────────────────────────────────────────────────────── */
.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  max-width: 1100px;
  margin: -70px auto 0;
  padding: 0 5vw;
  position: relative;
  z-index: 5;
}
.tiles.compacto { margin: 0 0 18px; padding: 0; }
.tile {
  background: var(--panel);
  border: 1px solid var(--borde);
  border-radius: 16px;
  padding: 22px 18px 18px;
  text-align: center;
}
.tile-n {
  display: block;
  font-size: clamp(1.3rem, 0.9rem + 1.2vw, 2rem);
  font-weight: 800;
  color: var(--ambar);
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
  white-space: nowrap;
}
.tile-l { display: block; font-size: 0.82rem; color: var(--salvia); margin-top: 7px; }

/* ── Bloques ───────────────────────────────────────────────────────── */
.bloque { max-width: 1100px; margin: 96px auto; padding: 0 5vw; }
.ceja {
  letter-spacing: 0.3em;
  font-size: 0.76rem;
  font-weight: 800;
  color: var(--ambar);
  text-transform: uppercase;
  margin-bottom: 12px;
}
.bloque h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); font-weight: 800; line-height: 1.15; max-width: 18em; }
.bloque .intro { color: var(--salvia); max-width: 640px; margin-top: 14px; font-size: 1.05rem; }
.tarjeta {
  background: var(--panel);
  border: 1px solid var(--borde);
  border-radius: 20px;
  padding: 30px 32px 34px;
}
.nota { color: var(--salvia); font-size: 0.9rem; }

/* ── Rejillas de tarjetas ──────────────────────────────────────────── */
.tres { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 18px; margin-top: 34px; }
.pilar, .nivel {
  background: var(--panel);
  border: 1px solid var(--borde);
  border-radius: 18px;
  padding: 26px 24px;
}
.pilar .icono { font-size: 1.7rem; }
.pilar h3, .nivel h3 { margin: 12px 0 8px; font-size: 1.15rem; color: var(--crema); }
.pilar p, .nivel p { color: var(--salvia); font-size: 0.95rem; }
.nivel { position: relative; overflow: hidden; }
.nivel .precio { color: var(--ambar); font-weight: 800; font-size: 0.9rem; }
.nivel .paso-n {
  position: absolute; top: 16px; right: 20px;
  font-size: 2.6rem; font-weight: 800; color: var(--panel-2); line-height: 1;
}

/* ── Galería del fundo ─────────────────────────────────────────────── */
.galeria {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 220px;
  gap: 14px;
  margin-top: 34px;
}
@media (max-width: 760px) { .galeria { grid-template-columns: 1fr; } .galeria .ancha { grid-column: span 1; } }
.galeria figure {
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  border: 1px solid var(--borde);
}
.galeria img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.35s ease; }
.galeria figure:hover img { transform: scale(1.045); }
.galeria figcaption {
  position: absolute; inset: auto 0 0 0;
  padding: 26px 14px 10px;
  font-size: 0.8rem; color: var(--crema);
  background: linear-gradient(transparent, rgba(13, 33, 22, 0.85));
}
.galeria .ancha { grid-column: span 2; }
@media (max-width: 640px) { .galeria .ancha { grid-column: span 1; } }

/* ── Formularios dApp ──────────────────────────────────────────────── */
.fila { display: flex; gap: 16px; flex-wrap: wrap; align-items: end; margin: 16px 0 0; }
label { display: flex; flex-direction: column; gap: 6px; font-size: 0.84rem; color: var(--salvia); font-weight: 600; }
input, select {
  padding: 12px 14px;
  border: 1.5px solid var(--panel-2);
  border-radius: 10px;
  font-size: 1rem;
  font-family: inherit;
  min-width: 110px;
  background: var(--bosque-2);
  color: var(--crema);
}
input:focus, select:focus { outline: 2px solid var(--ambar); border-color: var(--ambar); }
input#inReferente { min-width: min(360px, 70vw); }
code {
  background: var(--bosque-2);
  border: 1px solid var(--borde);
  border-radius: 8px;
  padding: 3px 8px;
  font-size: 0.85em;
  word-break: break-all;
  color: var(--salvia);
}

/* ── Mis árboles ───────────────────────────────────────────────────── */
.arboles { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; margin-top: 26px; }
.arbol { background: var(--panel); border: 1px solid var(--borde); border-radius: 18px; padding: 22px; }
.arbol h3 { color: var(--crema); margin-bottom: 6px; }
.arbol .estado { font-size: 0.88rem; color: var(--salvia); margin-bottom: 6px; }
.arbol .estado strong { color: var(--crema); }
.arbol .boton { padding: 9px 14px; font-size: 0.86rem; }
.bienvenida { background: var(--panel-2); border: 1px solid var(--ambar); border-radius: 18px; padding: 22px; margin: 0 0 20px; }
.bienvenida h3 { color: var(--ambar); margin-bottom: 8px; }
.bienvenida p { color: var(--salvia); font-size: 0.92rem; line-height: 1.5; margin-bottom: 10px; }
.bienvenida strong { color: var(--crema); }
.bienvenida .alerta { border-left: 3px solid var(--terracota); padding-left: 10px; }
.arbol .medios { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 10px 0 12px; }
.arbol .medio { margin: 0; }
.arbol .medio img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block;
  border-radius: 12px; border: 1px solid var(--borde); background: var(--panel-2); }
.arbol .medio figcaption { font-size: 0.76rem; color: var(--salvia); margin-top: 5px; line-height: 1.35; }
.arbol .medio figcaption strong { color: var(--ambar); }
.arbol .medio figcaption a { color: var(--hoja); }
@media (max-width: 420px) { .arbol .medios { grid-template-columns: 1fr; } }

/* ── Canje ─────────────────────────────────────────────────────────── */
.canje-opciones { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; margin-top: 34px; }
.opcion {
  background: var(--panel); border: 1px solid var(--borde); border-radius: 18px; padding: 24px;
}
.opcion .icono { font-size: 1.9rem; }
.opcion h3 { margin: 10px 0 6px; }
.opcion p { color: var(--salvia); font-size: 0.92rem; }
.opcion .quien { margin-top: 10px; font-size: 0.82rem; color: var(--ambar); font-weight: 700; }

/* ── Tokenomics: barras ────────────────────────────────────────────── */
.reparto { margin-top: 30px; display: grid; gap: 26px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.reparto h3 { font-size: 1.05rem; margin-bottom: 14px; }
.barra { margin-bottom: 12px; }
.barra .etiqueta { display: flex; justify-content: space-between; font-size: 0.88rem; color: var(--salvia); margin-bottom: 5px; }
.barra .etiqueta strong { color: var(--crema); font-weight: 700; }
.barra .pista { background: var(--bosque-2); border-radius: 99px; height: 10px; overflow: hidden; }
.barra .relleno { height: 100%; border-radius: 99px; background: var(--hoja); }
.reparto .oro .relleno { background: var(--ambar); }
.dato-clave {
  margin-top: 26px; padding: 18px 22px;
  background: var(--bosque-2); border: 1px solid var(--borde); border-left: 4px solid var(--ambar);
  border-radius: 12px; color: var(--salvia); font-size: 0.95rem;
}
.dato-clave strong { color: var(--crema); }

/* ── Hoja de ruta ──────────────────────────────────────────────────── */
.ruta { margin-top: 34px; display: grid; gap: 0; }
.fase {
  display: grid; grid-template-columns: 46px 1fr; gap: 18px;
  padding: 18px 0; border-bottom: 1px dashed var(--borde);
}
.fase:last-child { border-bottom: none; }
.fase .punto {
  width: 34px; height: 34px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--panel); border: 2px solid var(--panel-2);
  font-weight: 800; color: var(--salvia); font-size: 0.9rem;
}
.fase.activa .punto { background: var(--ambar); border-color: var(--ambar); color: var(--bosque-2); }
.fase.hecha .punto { background: var(--hoja); border-color: var(--hoja); color: var(--bosque-2); }
.fase h3 { font-size: 1.02rem; }
.fase h3 .cuando { margin-left: 10px; font-size: 0.76rem; color: var(--ambar); font-weight: 800; letter-spacing: 0.05em; }
.fase.activa h3::after {
  content: "EN CURSO"; margin-left: 10px; font-size: 0.66rem; letter-spacing: 0.12em;
  background: var(--ambar); color: var(--bosque-2); padding: 3px 8px; border-radius: 99px; vertical-align: middle;
}
.fase.hecha h3::after {
  content: "HECHO ✓"; margin-left: 10px; font-size: 0.66rem; letter-spacing: 0.12em;
  background: var(--hoja); color: var(--bosque-2); padding: 3px 8px; border-radius: 99px; vertical-align: middle;
}
.fase p { color: var(--salvia); font-size: 0.92rem; }

/* ── Tablas del whitepaper ─────────────────────────────────────────── */
.envoltorio-tabla { overflow-x: auto; margin-top: 18px; }
table.wp { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
table.wp th, table.wp td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--borde); }
table.wp th { color: var(--ambar); font-size: 0.76rem; letter-spacing: 0.09em; text-transform: uppercase; }
table.wp td { color: var(--salvia); }
table.wp td strong, table.wp td:first-child { color: var(--crema); }
.wp-nota {
  margin-top: 18px; padding: 16px 20px; border-radius: 12px; font-size: 0.92rem;
  background: var(--bosque-2); border: 1px solid var(--borde); border-left: 4px solid var(--hoja); color: var(--salvia);
}
.wp-nota strong { color: var(--crema); }
.wp-cabecera { padding: 80px 5vw 30px; max-width: 1100px; margin: 0 auto; }
.wp-cabecera h1 { font-size: clamp(2rem, 4.5vw, 3rem); font-weight: 800; }
.wp-cabecera .meta { color: var(--salvia); margin-top: 10px; }
.bloque h2 .num { color: var(--ambar); margin-right: 10px; }

/* ── Transparencia y FAQ ───────────────────────────────────────────── */
.garantias { margin: 26px 0 0; display: grid; gap: 10px; padding-left: 0; list-style: none; }
.garantias li { padding-left: 30px; position: relative; color: var(--salvia); }
.garantias li::before { content: "✓"; position: absolute; left: 4px; color: var(--hoja); font-weight: 800; }
.garantias li.pendiente::before { content: "◌"; color: var(--ambar); }
.garantias strong { color: var(--crema); }
#tablaContratos { margin-top: 26px; overflow-x: auto; }
#tablaContratos table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
#tablaContratos th, #tablaContratos td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--borde); }
#tablaContratos th { color: var(--ambar); font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; }

details {
  background: var(--panel); border: 1px solid var(--borde); border-radius: 14px;
  padding: 18px 22px; margin-top: 12px;
}
details summary { cursor: pointer; font-weight: 700; color: var(--crema); }
details p { margin-top: 12px; color: var(--salvia); font-size: 0.95rem; }

/* ── Legal y pie ───────────────────────────────────────────────────── */
.legal p { font-size: 0.88rem; color: var(--salvia); max-width: 780px; }
footer {
  background: var(--bosque-2);
  border-top: 1px solid var(--borde);
  text-align: center;
  padding: 40px 16px;
  margin-top: 90px;
}
footer p { margin: 5px 0; color: var(--salvia); font-size: 0.92rem; }
footer .credito { font-size: 0.78rem; color: #6f8272; }

/* ── Toast ─────────────────────────────────────────────────────────── */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: var(--panel); color: var(--crema); border: 1px solid var(--panel-2);
  padding: 14px 22px; border-radius: 12px; max-width: min(560px, 92vw);
  box-shadow: 0 10px 34px rgba(0, 0, 0, 0.45); font-size: 0.92rem; z-index: 60;
}
.toast.error { background: #5c2b2e; border-color: var(--terracota); }

/* ── Anti-desbordes ────────────────────────────────────────────────── */
h1, h2, h3, p, li, .tile-l { overflow-wrap: break-word; }
input, select { max-width: 100%; }
code { display: inline-block; max-width: 100%; }
.fila .boton { max-width: 100%; white-space: normal; }

/* ── Resaltados en ámbar (como la página anterior) ─────────────────── */
.intro strong, .garantias strong, .wp-nota strong, .fase p strong,
.legal strong, .nota strong, .pilar strong, .nivel p strong {
  color: var(--ambar);
}
.dato-clave { background: linear-gradient(180deg, rgba(217, 184, 74, 0.09), rgba(217, 184, 74, 0.03)), var(--bosque-2); }
.opcion.destacada, .tarjeta.destacada {
  border-color: rgba(217, 184, 74, 0.55);
  background: linear-gradient(180deg, rgba(217, 184, 74, 0.10), transparent 65%), var(--panel);
}

/* ── Selector de billeteras ────────────────────────────────────────── */
.modal {
  position: fixed; inset: 0; z-index: 70;
  display: flex; align-items: center; justify-content: center;
  background: rgba(13, 33, 22, 0.78); backdrop-filter: blur(6px);
  padding: 20px;
}
.modal[hidden] { display: none; }
.modal-caja {
  background: var(--panel); border: 1px solid var(--panel-2); border-radius: 20px;
  padding: 28px; width: min(430px, 94vw); box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}
.modal-caja h3 { margin-bottom: 6px; }
.modal-caja .nota { margin: 4px 0 14px; }
.lista-wallets { display: grid; gap: 10px; margin: 14px 0; }
.wallet-opcion {
  display: flex; align-items: center; gap: 12px;
  background: var(--bosque-2); border: 1.5px solid var(--panel-2); border-radius: 12px;
  padding: 12px 16px; color: var(--crema); font-weight: 700; font-size: 1rem;
  cursor: pointer; font-family: inherit; text-align: left; text-decoration: none;
}
.wallet-opcion:hover { border-color: var(--ambar); }
.wallet-opcion img { width: 28px; height: 28px; border-radius: 6px; }
.wallet-opcion .sub { display: block; font-size: 0.78rem; color: var(--salvia); font-weight: 600; }

/* ── Mercado: grafico del par ──────────────────────────────────────── */
.grafico-caja {
  margin-top: 30px; border: 1px solid var(--borde); border-radius: 18px;
  background: var(--panel); overflow: hidden; min-height: 320px;
  display: flex; align-items: center; justify-content: center;
}
.grafico-caja iframe { width: 100%; height: 460px; border: 0; display: block; }
.grafico-vacio { text-align: center; padding: 40px 26px; max-width: 560px; }
.grafico-vacio .icono { font-size: 2.2rem; }
.grafico-vacio p { color: var(--salvia); font-size: 0.95rem; margin-top: 10px; }

.mercado-vivo {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(280px, 1.4fr);
  gap: 30px;
  align-items: center;
  width: 100%;
  padding: 30px 32px;
}
@media (max-width: 760px) { .mercado-vivo { grid-template-columns: 1fr; } }
.precio-grande {
  font-size: clamp(1.5rem, 1rem + 1.8vw, 2.3rem);
  font-weight: 800;
  color: var(--ambar);
  font-variant-numeric: tabular-nums;
  margin: 8px 0 6px;
}
#svgPrecio {
  width: 100%;
  height: 160px;
  display: block;
  background: var(--bosque-2);
  border: 1px solid var(--borde);
  border-radius: 12px;
}
