/* LeoCode IA | lblanco © Copyright 2026 */
/* Paleta del brandbook: rojo #A90013, verde #005C41, negro #1A1A1A y amarillo #DFA81F.
   Tipografía: Futura -> Jost en la web. Diseño sobrio: fondo oscuro, un solo acento (amarillo) y el rojo solo en el botón. */
:root {
  --rojo: #a90013;
  --verde: #005c41;
  --fondo: #161616;
  --oro: #dfa81f;
  --texto: #f2f2f2;
  --suave: #b9b9b9;
  --pad: clamp(20px, 6vw, 116px);
  --alto-cab: 96px;
}

* { box-sizing: border-box; margin: 0; }

html { -webkit-text-size-adjust: 100%; background: var(--fondo); }

body {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  font-family: "Jost", "Futura", "Century Gothic", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--texto);
  background: var(--fondo);
  line-height: 1.5;
}

main { flex: 1; display: flex; flex-direction: column; }

/* ---------- Cabecera: solo el logo ---------- */
.top {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  height: var(--alto-cab);
  display: flex;
  align-items: center;
  padding: 0 var(--pad);
  /* Negro translúcido: deja ver la escena detrás, como en el modelo. */
  background: linear-gradient(180deg, rgba(6, 6, 6, 0.78) 0%, rgba(6, 6, 6, 0.4) 100%);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.logo { display: block; height: 42px; width: auto; }

/* ---------- Portada ---------- */
.hero {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  min-height: 31vw;
  padding: calc(var(--alto-cab) + 24px) var(--pad) 24px;
  overflow: hidden;
  background:
    radial-gradient(60% 90% at 85% 60%, rgba(214, 120, 28, 0.26), transparent 70%),
    radial-gradient(45% 70% at 8% 100%, rgba(0, 92, 65, 0.30), transparent 70%),
    linear-gradient(180deg, #131313 0%, #181716 100%);
}
/* Rejilla de gráfico muy tenue, que se pierde hacia los lados. */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 72px 72px;
  -webkit-mask-image: radial-gradient(70% 90% at 35% 50%, #000, transparent 75%);
  mask-image: radial-gradient(70% 90% at 35% 50%, #000, transparent 75%);
  pointer-events: none;
}
.velas { position: absolute; z-index: 1; left: 0; bottom: 0; width: 46%; height: 55%; opacity: 0.1; pointer-events: none; }
.velas .sube { stroke: #3fbf94; fill: #3fbf94; }
.velas .baja { stroke: #e0505f; fill: #e0505f; }
.velas line { stroke-width: 2; }

.hero-text { position: relative; z-index: 4; max-width: 40vw; }

.etiqueta {
  display: block;
  color: var(--oro);
  font-size: clamp(0.72rem, 0.75vw, 1rem);
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

h1 {
  margin-top: 10px;
  font-size: clamp(2.1rem, 3.35vw, 5rem);
  font-weight: 500;
  line-height: 1.06;
  letter-spacing: -0.01em;
}
h1 strong { font-weight: 600; display: block; color: var(--oro); }

.lead {
  margin-top: 14px;
  max-width: 34em;
  font-size: clamp(0.98rem, 1vw, 1.4rem);
  font-weight: 300;
  color: #dcdcdc;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  margin-top: 20px;
  padding: 11px 28px;
  border-radius: 8px;
  background: var(--rojo);
  color: #fff;
  font-size: clamp(1rem, 1vw, 1.3rem);
  font-weight: 500;
}
.btn[aria-disabled="true"] { cursor: default; }

/* Cuatro puntos de la propuesta */
.puntos {
  list-style: none;
  padding: 0;
  margin-top: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px 1.9vw;
}
.puntos li { display: flex; align-items: center; gap: 9px; font-size: clamp(0.78rem, 0.8vw, 1.05rem); font-weight: 400; line-height: 1.25; color: var(--suave); }
.puntos svg { flex: none; width: clamp(24px, 1.8vw, 38px); height: clamp(24px, 1.8vw, 38px); fill: none; stroke: var(--oro); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

/* Escena: ciudad al atardecer de fondo, laptop y taza encima. Todo se mide en vw para conservar las proporciones del modelo. */
.escena { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
/* Ciudad más luminosa + brillo naranja de atardecer, como en el modelo. */
.fondo {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(40% 70% at 76% 36%, rgba(255, 150, 50, 0.5), rgba(255, 120, 40, 0.14) 58%, transparent 78%),
    url("img/ciudad-1920.webp") right center / cover no-repeat;
  filter: brightness(1.55) saturate(1.25) contrast(1.05);
}
/* Oscurece el lado del texto (para que se lea) y los bordes de arriba y abajo. */
.velo {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(8, 8, 8, 0.4) 0%, transparent 20%, transparent 80%, rgba(8, 8, 8, 0.6) 100%),
    linear-gradient(90deg, rgba(8, 8, 8, 0.96) 0%, rgba(8, 8, 8, 0.82) 30%, rgba(8, 8, 8, 0.25) 58%, transparent 80%);
}
/* Mesa hecha con código: superficie oscura y brillante con el reflejo cálido de la ciudad, veta sutil y sombra de contacto. */
.mesa {
  position: absolute;
  z-index: 1;
  left: 0;
  right: 0;
  bottom: 0;
  height: 22%;
  border-top: 1px solid rgba(255, 196, 140, 0.38);
  background:
    radial-gradient(40% 95% at 72% 0%, rgba(255, 150, 50, 0.5), transparent 74%),
    radial-gradient(60% 55% at 62% 62%, rgba(0, 0, 0, 0.55), transparent 75%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.018) 0 2px, transparent 2px 9px),
    linear-gradient(180deg, #3b2b21 0%, #22170f 38%, #120c09 75%, #0a0706 100%);
  box-shadow: 0 -10px 40px rgba(255, 140, 50, 0.1);
}
.laptop {
  position: absolute;
  z-index: 2;
  right: 3vw;
  bottom: 9%;
  width: 56vw;
  max-width: 1400px;
  height: auto;
  filter: drop-shadow(0 30px 34px rgba(0, 0, 0, 0.65));
  animation: flotar 7s ease-in-out infinite;
  /* Reflejo en la mesa (navegadores que lo soportan). */
  -webkit-box-reflect: below -6% linear-gradient(transparent 78%, rgba(255, 255, 255, 0.16));
}
.lema-escena {
  position: absolute;
  z-index: 3;
  right: 3.4vw;
  top: 27%;
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: #ecdcb4;
  font-size: clamp(0.55rem, 0.78vw, 1rem);
  font-weight: 400;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.7);
}
/* En pantallas medianas el lema chocaría con la laptop. */
@media (max-width: 1500px) { .lema-escena { display: none; } }
@keyframes flotar { 50% { transform: translateY(-8px); } }
@media (prefers-reduced-motion: reduce) { .laptop { animation: none; } }

/* ---------- Mercados en movimiento ---------- */
.mercados {
  display: flex;
  align-items: center;
  min-height: 52px;
  border-top: 1px solid rgba(4, 208, 146, 0.45);
  background: linear-gradient(180deg, #002321 0%, #001716 100%);
  box-shadow: 0 -1px 22px rgba(4, 208, 146, 0.14);
}
.mercados-etiqueta {
  flex: none;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 24px 0 var(--pad);
  color: var(--suave);
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  white-space: nowrap;
}
.mercados-etiqueta i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #04d092;
  box-shadow: 0 0 10px rgba(4, 208, 146, 0.85);
  animation: pulso 2s infinite;
}
@keyframes pulso {
  50% { opacity: 0.45; box-shadow: 0 0 3px rgba(4, 208, 146, 0.4); }
}
@media (prefers-reduced-motion: reduce) { .mercados-etiqueta i { animation: none; } }
.mercados .tradingview-widget-container { flex: 1; min-width: 0; }
.mercados-lema {
  flex: none;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 var(--pad) 0 28px;
  color: var(--suave);
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  white-space: nowrap;
}
.mercados-lema::before { content: ""; width: 34px; height: 2px; background: var(--oro); }

/* ---------- Pie ---------- */
footer {
  padding: 18px var(--pad);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: #8f8f8f;
  text-align: center;
}
footer a { color: var(--oro); text-decoration: underline; text-underline-offset: 3px; }
footer a:hover { color: #fff; }

@media (max-width: 860px) {
  :root { --alto-cab: 80px; }
  .hero { flex-direction: column; align-items: flex-start; padding: calc(var(--alto-cab) + 28px) var(--pad) 0; min-height: 0; }
  .hero-text { max-width: none; }
  .velas { width: 100%; height: 30%; }
  .escena { position: relative; inset: auto; width: calc(100% + var(--pad) * 2); margin: 6px calc(var(--pad) * -1) 0; aspect-ratio: 16 / 10; }
  .fondo { background-image: radial-gradient(50% 70% at 70% 36%, rgba(255, 150, 50, 0.5), transparent 75%), url("img/ciudad-1000.webp"); background-position: center, 70% center; }
  .velo { background: linear-gradient(180deg, rgba(8, 8, 8, 0.9) 0%, transparent 35%); }
  /* El borde de arriba se funde con la portada (sin corte). */
  .escena { -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 26%); mask-image: linear-gradient(180deg, transparent 0%, #000 26%); }
  /* La laptop y la taza se miden en % de la escena (no en vw) para que entren completas. */
  .laptop { right: 0; bottom: 2%; width: 100%; max-width: none; }
  .lema-escena { display: none; }
  h1 { font-size: clamp(2.1rem, 7.4vw, 3.5rem); }
  .lead { font-size: clamp(1.02rem, 2.7vw, 1.3rem); max-width: 36em; }
  .etiqueta { font-size: clamp(0.72rem, 2vw, 0.9rem); }
  .btn { font-size: clamp(1.02rem, 2.4vw, 1.2rem); }
  .puntos li { font-size: clamp(0.88rem, 2.2vw, 1.05rem); }
  .puntos svg { width: 32px; height: 32px; }
  .puntos { gap: 18px 24px; margin-top: 34px; }
  .puntos li { flex: 1 1 40%; }
  .mercados-etiqueta, .mercados-lema { display: none; }
  .logo { height: 32px; }
}

/* Tabletas pequeñas y teléfonos en horizontal: la escena no se estira a todo el ancho (evita una portada demasiado alta). */
@media (min-width: 681px) and (max-width: 860px) {
  .escena { width: 640px; max-width: 100%; margin: 6px auto 0; }
  /* Con la escena más angosta que la pantalla, también se funden los lados. */
  .escena {
    -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 26%), linear-gradient(90deg, transparent 0%, #000 14%, #000 86%, transparent 100%);
    -webkit-mask-composite: source-in;
    mask-image: linear-gradient(180deg, transparent 0%, #000 26%), linear-gradient(90deg, transparent 0%, #000 14%, #000 86%, transparent 100%);
    mask-composite: intersect;
  }
  h1 { font-size: clamp(2.1rem, 5vw, 3rem); }
}
