/* ============================================================
   CalcuTrader — Landing (versión estática: HTML + CSS + JS puro)
   Sistema visual extraído de la app (neumorfismo azul polvo + terracota)
   ============================================================ */

:root {
  /* Superficies neumórficas */
  --bg:        #e6e8ef;
  --bg-2:      #e1e4ec;
  --surface:   #eef0f6;   /* tarjetas elevadas */
  --surface-hi:#f6f7fb;   /* tarjetas "blancas" flotantes */

  /* Tinta */
  --ink:   #2a2e44;
  --ink-2: #565d77;
  --muted: #8d93a6;
  --hair:  rgba(120,128,150,0.16);

  /* Acentos (mismo chroma/lightness, hue variado donde aplica) */
  --blue:      #2f6bff;   /* acciones */
  --blue-soft: #dce6ff;
  --indigo:    #4d5bd0;   /* íconos de calculadora */
  --terra:     #b5715a;   /* terracota */
  --terra-2:   #c98a6f;
  --terra-soft:#f0e0d8;

  /* metálico oro (tarjeta de metas) */
  --gold-a: #b9852a;
  --gold-b: #f4df8a;
  --gold-c: #d6a73e;

  --green:      #2fb457;
  --green-soft: #e3f4e8;
  --red:        #e8493e;
  --red-soft:   #fbe6e4;
  --amber:      #f3a01f;

  /* Sombras neumórficas */
  --sh-raise:    10px 10px 26px rgba(173,180,199,.55), -10px -10px 22px rgba(255,255,255,.92);
  --sh-raise-sm: 6px 6px 16px rgba(173,180,199,.5), -6px -6px 12px rgba(255,255,255,.88);
  --sh-raise-xs: 4px 4px 10px rgba(173,180,199,.45), -3px -3px 8px rgba(255,255,255,.85);
  --sh-press:    inset 5px 5px 12px rgba(170,177,197,.6), inset -5px -5px 12px rgba(255,255,255,.92);
  --sh-float:    0 30px 70px -28px rgba(43,47,67,.45), 0 8px 20px -10px rgba(43,47,67,.25);

  --r-xl: 34px;
  --r-lg: 26px;
  --r-md: 18px;
  --r-sm: 13px;

  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --serif: "Newsreader", Georgia, "Times New Roman", serif;

  --maxw: 1180px;

  /* Color de acento elegido: verde */
  --accent: var(--green);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background:
    radial-gradient(1100px 700px at 82% -8%, rgba(181,113,90,.10), transparent 60%),
    radial-gradient(1000px 800px at 8% 4%, rgba(47,107,255,.07), transparent 55%),
    var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

::selection { background: rgba(47,107,255,.2); }

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; }

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

/* ---------- type helpers ---------- */
.eyebrow {
  font-size: 12.5px; font-weight: 700; letter-spacing: .22em;
  text-transform: uppercase; color: var(--terra);
  display: inline-flex; align-items: center; gap: 10px;
}
.eyebrow.blue { color: var(--blue); }
.eyebrow::before {
  content: ""; width: 26px; height: 1.5px; background: currentColor;
  display: inline-block; opacity: .55;
}
.eyebrow.center::before { display: none; }

h1, h2, h3 { margin: 0; font-weight: 760; letter-spacing: -.02em; line-height: 1.04; }
.h-display { font-size: clamp(40px, 6.2vw, 76px); }
.h2 { font-size: clamp(30px, 4vw, 50px); letter-spacing: -.025em; }
.h3 { font-size: clamp(20px, 2vw, 26px); letter-spacing: -.02em; }
.lead { font-size: clamp(17px, 1.45vw, 21px); line-height: 1.55; color: var(--ink-2); font-weight: 450; }
.mono { font-family: var(--mono); font-feature-settings: "tnum" 1; }
.serif { font-family: var(--serif); }

/* ---------- neumorphic primitives ---------- */
.neu {
  background: var(--surface);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-raise);
}
.neu-sm { border-radius: var(--r-md); box-shadow: var(--sh-raise-sm); background: var(--surface); }
.neu-press { box-shadow: var(--sh-press); background: var(--bg-2); border-radius: 999px; }

/* pills / buttons */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 650; font-size: 15.5px; letter-spacing: -.01em;
  padding: 14px 24px; border-radius: 16px; border: none;
  transition: transform .18s ease, box-shadow .25s ease, background .2s ease;
}
.btn-primary {
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 92%, white), var(--accent));
  color: #fff;
  box-shadow: 0 14px 28px -12px color-mix(in srgb, var(--accent) 75%, transparent), inset 0 1px 0 rgba(255,255,255,.4);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 20px 34px -12px color-mix(in srgb, var(--accent) 70%, transparent), inset 0 1px 0 rgba(255,255,255,.4); }
.btn-ghost { background: var(--surface); color: var(--ink); box-shadow: var(--sh-raise-sm); }
.btn-ghost:hover { transform: translateY(-2px); box-shadow: var(--sh-raise); }
.btn:active { transform: translateY(0); box-shadow: var(--sh-press); }

/* store badges */
.stores { display: flex; flex-wrap: wrap; gap: 14px; }
.store {
  display: flex; align-items: center; gap: 13px;
  padding: 11px 20px 11px 17px; border-radius: 16px;
  background: #1c1f2b; color: #fff;
  box-shadow: var(--sh-float);
  transition: transform .2s ease, box-shadow .2s ease;
}
.store:hover { transform: translateY(-3px); }
.store .glyph { width: 26px; height: 26px; flex: none; }
.store small { display: block; font-size: 10.5px; letter-spacing: .04em; opacity: .72; font-weight: 500; }
.store b { display: block; font-size: 17px; font-weight: 650; letter-spacing: -.01em; margin-top: 1px; }

/* chips */
.chip {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 13.5px; font-weight: 600; color: var(--ink-2);
  padding: 8px 14px; border-radius: 999px;
  background: var(--surface); box-shadow: var(--sh-raise-xs);
}

/* sections */
section { position: relative; }
.sec-pad { padding: clamp(72px, 9vw, 130px) 0; }
.sec-head { max-width: 760px; }
.sec-head .h2 { margin-top: 18px; }
.sec-head .lead { margin-top: 20px; }

/* reveal on scroll */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }
.reveal-done { opacity: 1 !important; transform: none !important; transition: none !important; }
.reveal.d1 { transition-delay: .08s; }
.reveal.d2 { transition-delay: .16s; }
.reveal.d3 { transition-delay: .24s; }
.reveal.d4 { transition-delay: .32s; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- phone mockup ---------- */
.phone {
  position: relative;
  width: 100%;
  aspect-ratio: 1284 / 2778;
  border-radius: 13.5% / 6.2%;
  padding: 2.6%;
  background: linear-gradient(155deg, #2c3040, #12141d 60%);
  box-shadow:
    var(--sh-float),
    inset 0 0 0 1.5px rgba(255,255,255,.08);
}
.phone::after { /* side button hint */
  content: ""; position: absolute; left: -2px; top: 26%; width: 3px; height: 9%;
  background: #1a1d28; border-radius: 3px;
}
.phone-screen {
  position: relative; width: 100%; height: 100%;
  border-radius: 11% / 5%;
  overflow: hidden;
  background: #e9eaee;
}
.phone-screen img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.phone .island {
  position: absolute; top: 2.3%; left: 50%; transform: translateX(-50%);
  width: 31%; height: 3.6%; background: #07080c; border-radius: 999px; z-index: 3;
  box-shadow: 0 1px 2px rgba(0,0,0,.4);
}

/* glow plate behind hero phones */
.plate {
  position: absolute; inset: 0;
  border-radius: 40px;
  background:
    radial-gradient(60% 60% at 50% 30%, rgba(255,255,255,.55), transparent 70%);
  filter: blur(8px); z-index: -1;
}

/* floating spec card near phone */
.spec {
  position: absolute; z-index: 4;
  background: var(--surface-hi); border-radius: var(--r-md);
  box-shadow: var(--sh-float); padding: 14px 16px;
  display: flex; align-items: center; gap: 12px;
  animation: floaty 6s ease-in-out infinite;
}
@keyframes floaty { 0%,100%{ transform: translateY(0); } 50%{ transform: translateY(-9px); } }

/* footer */
footer { background: #15171f; color: #c7cad6; }

/* fade for calc grid swap */
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* footer links */
.flink { color: rgba(199,202,214,.82); transition: color .2s; }
.flink:hover { color: #fff; }

/* hide floating chips tweak */
body.no-chips .spec { display: none !important; }

/* ============================================================
   Estados que antes vivían en el estado de React → ahora CSS/JS
   ============================================================ */

/* Nav fijo: estado transparente (arriba) y sólido (al hacer scroll) */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  transition: all .3s ease;
  padding: 18px 0;
  background: transparent;
  -webkit-backdrop-filter: none; backdrop-filter: none;
  box-shadow: none;
}
.nav.solid {
  padding: 10px 0;
  background: rgba(230,232,239,.78);
  -webkit-backdrop-filter: saturate(160%) blur(18px);
  backdrop-filter: saturate(160%) blur(18px);
  box-shadow: 0 1px 0 var(--hair);
}
.nav .nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.nav-links { display: flex; gap: 30px; font-size: 15px; font-weight: 550; color: var(--ink-2); }
.navlink { transition: color .2s; }
.navlink:hover { color: var(--ink); }

.logo { display: flex; align-items: center; gap: 12px; }

/* Tabs de las 26 calculadoras */
.tabs { display: flex; flex-wrap: wrap; gap: 12px; margin: 34px 0 30px; }
.tab {
  border: none; border-radius: 999px; padding: 12px 22px;
  font-size: 14.5px; font-weight: 600; letter-spacing: -.01em;
  transition: all .25s ease;
  color: var(--ink-2); background: var(--surface); box-shadow: var(--sh-raise-xs);
}
.tab .tab-count { margin-left: 9px; opacity: .5; font-family: var(--mono); font-size: 12.5px; }
.tab.active {
  color: #fff; background: var(--accent);
  box-shadow: 0 12px 24px -12px color-mix(in srgb, var(--accent) 70%, transparent);
}
.tab.active .tab-count { opacity: .8; }

/* Paneles de calculadoras: solo el activo es visible */
.calc-panel { display: none; }
.calc-panel.active {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 16px;
  animation: fadeUp .5s ease;
}

/* Tarjeta de calculadora (hover antes manejado por React) */
.calc-tile {
  padding: 18px; display: flex; gap: 15px; align-items: flex-start;
  transition: transform .22s ease, box-shadow .22s ease;
  box-shadow: var(--sh-raise-sm);
  cursor: default; position: relative;
}
.calc-tile:hover { transform: translateY(-4px); box-shadow: var(--sh-raise); }
.calc-ico {
  width: 46px; height: 46px; flex: none; border-radius: 14px;
  display: grid; place-items: center;
  background: var(--surface-hi); box-shadow: var(--sh-raise-xs);
  color: var(--indigo);
}
.calc-tile.terra .calc-ico { color: var(--terra); }
.calc-tag {
  font-size: 10.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  color: var(--terra); background: var(--terra-soft); padding: 3px 8px; border-radius: 999px;
}

/* Tarjeta de promoción (hover) */
.promo-card {
  padding: 16px; display: flex; flex-direction: column;
  transition: transform .22s ease, box-shadow .22s ease;
  box-shadow: var(--sh-raise-sm);
}
.promo-card:hover { transform: translateY(-5px); box-shadow: var(--sh-raise); }

/* Cupón copiable */
.coupon-btn {
  flex: 1; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  border: 1.5px dashed color-mix(in srgb, var(--terra) 55%, transparent); border-radius: 12px;
  padding: 10px 14px; background: var(--terra-soft); color: var(--terra);
  font-family: var(--mono); font-weight: 700; font-size: 14.5px; letter-spacing: .04em;
  transition: transform .15s ease;
}
.coupon-btn:active { transform: scale(.98); }

/* FAQ acordeón */
.faq-item { overflow: hidden; transition: box-shadow .25s; }
.faq-q {
  width: 100%; text-align: left; border: none; background: transparent;
  padding: 22px 24px; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  font-size: 17px; font-weight: 640; color: var(--ink); letter-spacing: -.01em;
}
.faq-plus {
  flex: none; width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center;
  background: var(--bg-2); color: var(--ink-2); box-shadow: var(--sh-press); transition: all .25s;
}
.faq-plus svg { transition: transform .25s; }
.faq-item.open .faq-plus { background: var(--accent); color: #fff; box-shadow: none; }
.faq-item.open .faq-plus svg { transform: rotate(45deg); }
.faq-a { max-height: 0; transition: max-height .35s ease; overflow: hidden; }
.faq-item.open .faq-a { max-height: 240px; }
.faq-a p { margin: 0; padding: 0 24px 24px; font-size: 15px; line-height: 1.6; color: var(--ink-2); }

/* featured creatives */
.featured-card { overflow: hidden; display: block; position: relative; text-decoration: none; }

/* ===================== RESPONSIVE ===================== */

/* Tablet / small desktop */
@media (max-width: 1000px) {
  .hero-wrap, .adapt-wrap, .ses-wrap, .espacio-wrap { gap: 36px !important; }
}

/* Stack the two-column sections */
@media (max-width: 900px) {
  .hero-wrap, .adapt-wrap, .ses-wrap, .espacio-wrap, .propfirm-wrap {
    grid-template-columns: 1fr !important;
  }
  .hero-copy { text-align: left; }
  /* Hero art → single centered phone, no overlap/overflow */
  .hero-art { min-height: 0 !important; height: auto !important; margin-top: 30px; display: flex; justify-content: center; }
  .hero-art .plate { display: none; }
  .hero-phone-1 { position: relative !important; right: auto !important; top: auto !important; width: 260px !important; max-width: 70vw; transform: rotate(0deg) !important; }
  .hero-phone-2 { display: none !important; }
  .hero-spec-2 { display: none !important; }
  .hero-spec-1 { left: auto !important; right: 2% !important; top: 8% !important; }
  .adapt-art { order: -1; margin-bottom: 8px; max-width: 320px !important; }
  .ses-wrap .reveal.d1 { margin-top: 14px; }
  /* PropFirm + Mi Espacio: clusters de teléfonos superpuestos → fila lado a lado en móvil
     (evita que los teléfonos position:absolute con ancho en % colapsen a 0) */
  .propfirm-art { order: -1; min-height: 0 !important; margin-bottom: 8px; max-width: 460px; display: flex; justify-content: center; align-items: flex-start; gap: 16px; }
  .tools-grid { grid-template-columns: 1fr !important; }
  .propfirm-art .plate, .espacio-art .plate { display: none; }
  .espacio-art { position: relative !important; min-height: 0 !important; margin-top: 20px; display: flex; justify-content: center; align-items: flex-start; gap: 16px; max-width: 460px; }
  .propfirm-phone, .espacio-phone {
    position: relative !important; left: auto !important; right: auto !important; top: auto !important; bottom: auto !important;
    transform: none !important; width: 46% !important; max-width: 215px;
  }
  .propfirm-art .spec { display: none !important; }
  /* Enfoque band → stack icon + copy, drop the number chips */
  .enfoque-band { grid-template-columns: auto 1fr !important; }
}

/* Phones */
@media (max-width: 640px) {
  .wrap { padding: 0 18px; }
  .sec-pad { padding: clamp(56px, 13vw, 84px) 0; }

  .h-display { font-size: clamp(34px, 10vw, 44px); }
  .h2 { font-size: clamp(26px, 7.5vw, 34px); }
  .sec-head .h2 br, .h2 br { display: none; }

  .hero-art { margin-top: 24px; }
  .calc-panel.active { grid-template-columns: 1fr !important; }
  .espacio-feats { grid-template-columns: 1fr 1fr !important; }
  .ses-cards { grid-template-columns: 1fr !important; }
  .espacio-gallery { grid-template-columns: 1fr !important; max-width: 280px !important; }
  .propfirm-phone, .espacio-phone { width: 48% !important; }

  /* Enfoque: stack fully */
  .enfoque-band { grid-template-columns: 1fr !important; gap: 22px !important; }

  /* store badges fill width */
  .stores { width: 100%; }
  .store { flex: 1 1 auto; justify-content: flex-start; }
}

/* Very small phones */
@media (max-width: 400px) {
  .wrap { padding: 0 15px; }
  .h-display { font-size: 32px; }
  .espacio-feats { grid-template-columns: 1fr !important; }
  .spec { transform: scale(.85); }
  .store small { font-size: 10px; }
  .store b { font-size: 15.5px; }
}

/* utility */
.grid { display: grid; }

/* featured creatives */
@media (max-width: 860px) {
  .featured-grid { grid-template-columns: 1fr 1fr !important; }
  .featured-grid > a:first-child { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  .featured-grid { grid-template-columns: 1fr !important; }
  .featured-grid > a:first-child { grid-column: auto; }
}
.center { text-align: center; }
.mx-auto { margin-left: auto; margin-right: auto; }
.hide-sm { }
@media (max-width: 860px) {
  .hide-sm { display: none !important; }
  .wrap { padding: 0 20px; }
}
