/* =========================================================
   ECUANIME CONSULTING & WORKSPACE
   Premium Carbon Theme + Luminous Electric Cyan Accent
   Palette:
   - Carbon: #121A23
   - Text:   #F5F7FA
   - Muted:  #A9B1BC
   - Accent: #2FD0E6
   - Accent Hover: #1FB8D1
   - Accent Soft: #6FE8F5
   ========================================================= */

/* ------------------------------
   1) Root variables & base
------------------------------ */
:root{
  /* Brand palette */
  --bg: #121A23;
  --bg-2: #0F1720;
  --surface: rgba(255,255,255,.04);
  --surface-2: rgba(255,255,255,.06);

  --text: #F5F7FA;
  --muted: #A9B1BC;

  --accent: #2FD0E6;
  --accent-hover: #1FB8D1;
  --accent-soft: #6FE8F5;

  /* Lines & shadows */
  --line: rgba(255,255,255,.10);
  --line-2: rgba(255,255,255,.14);

  --shadow: 0 12px 40px rgba(0,0,0,.35);
  --shadow-soft: 0 10px 30px rgba(0,0,0,.25);

  /* Radius & spacing */
  --radius: 18px;
  --radius-sm: 14px;
  --container: 1160px;

  /* Motion */
  --ease: cubic-bezier(.2,.8,.2,1);
  --t: 220ms;

  /* Typography */
  --font: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji";
}

:root { --header-h: 70px; }

[id]{ scroll-margin-top: var(--header-h); }

@media(max-width:980px){
  :root { --header-h: 85px; }
}


/* A light, subtle page glow to avoid “flat dark” */
html, body{
  height: 100%;
}

body{ padding-top: 60px; }
@media(max-width:980px){ body{ padding-top: 70px; } }

body{
  margin: 0;
  font-family: var(--font);
  color: var(--text);

  /* Fondo premium: luz arriba + luz abajo + centro más oscuro */
  background:
    /* Glow superior */
    radial-gradient(1200px 600px at 15% 0%,
      rgba(47, 208, 230, .12),
      transparent 58%),

    radial-gradient(900px 520px at 85% 10%,
      rgba(47, 208, 230, .08),
      transparent 60%),

    /* Glow inferior (invertido) */
    radial-gradient(1200px 600px at 15% 100%,
      rgba(47, 208, 230, .10),
      transparent 58%),

    radial-gradient(900px 520px at 85% 92%,
      rgba(47, 208, 230, .06),
      transparent 60%),

    /* Base: oscuro en el centro, más “carbón” arriba/abajo */
    linear-gradient(180deg,
      var(--bg) 0%,
      #0C1118 50%,
      var(--bg-2) 100%);

  background-repeat: no-repeat;
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

a{
  color: var(--text);
  text-decoration: none;
  transition: color var(--t) var(--ease), opacity var(--t) var(--ease);
}

a:hover{
  color: var(--accent);
}

::selection{
  background: rgba(47, 208, 230, .28);
}

/* ------------------------------
   2) Layout utilities
------------------------------ */
.container{
  width: min(var(--container), calc(100% - 40px));
  margin: 0 auto;
}

.section{
  padding: 72px 0;
}

@media (max-width: 980px){
  .section{ padding: 56px 0; }
}

.kicker{
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(47, 208, 230, .88);
  font-weight: 700;
}

.h1{
  font-size: clamp(30px, 3.4vw, 44px);
  letter-spacing: -0.02em;
  margin: 10px 0 10px;
}

.section-title{
  font-size: 22px;
  letter-spacing: -0.01em;
  margin: 0 0 10px;
}

.section-sub{
  font-size: 15px;
  line-height: 1.7;
  color: var(--muted);
  margin: 0 0 10px;
}

.lead{
  font-size: 16px;
  line-height: 1.7;
  color: var(--muted);
  margin: 0;
}

/* ------------------------------
   3) Header / Navigation
------------------------------ */
.site-header{
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(18, 26, 35, .70);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.navbar{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 0;
}

.brand{
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  letter-spacing: .04em;
}

.brand .logo-mark{
  width: 12px;
  height: 12px;
  border-radius: 4px;
  background: var(--accent);
  box-shadow: 0 0 0 6px rgba(47,208,230,.12);
}

.nav-links{
  display: flex;
  align-items: center;
  gap: 18px;
}

.nav-links a{
  font-size: 13px;
  color: rgba(245,247,250,.90);
  padding: 10px 10px;
  border-radius: 12px;
}

.nav-links a:hover{
  color: var(--text);
  background: rgba(255,255,255,.04);
  box-shadow: inset 0 0 0 1px rgba(47,208,230,.18);
}

/* Mobile nav (if your header uses a button/menu) */
.nav-toggle{
  display: none;
}

@media (max-width: 980px){
  .nav-links{ display:none; }
  .nav-toggle{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(255,255,255,.08);
    color: var(--text);
    cursor: pointer;
  }
}

/* ------------------------------
   4) Hero cards / panels
------------------------------ */
.hero-card{
  border-radius: calc(var(--radius) + 2px);
  background:
    radial-gradient(900px 300px at 20% 0%, rgba(47,208,230,.12), transparent 55%),
    linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.03));
  border: 1px solid rgba(255,255,255,.10);
  box-shadow: var(--shadow-soft);
  padding: 28px;
}

@media (max-width: 980px){
  .hero-card{ padding: 22px; }
}

/* Pills */
.pill{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.03);
  color: rgba(245,247,250,.86);
  padding: 8px 10px;
  font-size: 12px;
  transition: border-color var(--t) var(--ease), box-shadow var(--t) var(--ease);
}

.pill:hover{
  border-color: rgba(47,208,230,.40);
  box-shadow: 0 0 0 4px rgba(47,208,230,.10);
}

/* ------------------------------
   5) Buttons / CTAs
------------------------------ */
.btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.04);
  color: var(--text);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  transition:
    transform var(--t) var(--ease),
    background var(--t) var(--ease),
    border-color var(--t) var(--ease),
    box-shadow var(--t) var(--ease);
}

.btn:hover{
  background: rgba(255,255,255,.06);
  border-color: rgba(47,208,230,.26);
  box-shadow: 0 10px 30px rgba(0,0,0,.20);
  transform: translateY(-1px);
}

.btn:active{
  transform: translateY(0px);
}

.btn.primary{
  border-color: rgba(47,208,230,.30);
  background: linear-gradient(180deg, rgba(47,208,230,.22), rgba(47,208,230,.10));
  box-shadow:
    0 10px 34px rgba(0,0,0,.25),
    0 0 0 6px rgba(47,208,230,.08);
}

.btn.primary:hover{
  border-color: rgba(47,208,230,.55);
  background: linear-gradient(180deg, rgba(47,208,230,.28), rgba(47,208,230,.12));
  box-shadow:
    0 12px 40px rgba(0,0,0,.28),
    0 0 0 7px rgba(47,208,230,.10);
}

/* CTA row */
.cta-row{
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
}

/* ------------------------------
   6) Grid / Cards
------------------------------ */
.grid{
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 16px;
  margin-top: 16px;
}

/* Default: cards become 6 columns on desktop */
.card{
  grid-column: span 6;
  position: relative;
  border-radius: var(--radius);
  background:
    radial-gradient(700px 220px at 30% 0%, rgba(47,208,230,.09), transparent 62%),
    rgba(255,255,255,.035);
  border: 1px solid rgba(255,255,255,.10);
  box-shadow: 0 10px 24px rgba(0,0,0,.18);
  padding: 18px;
  overflow: hidden;
  transition:
    transform var(--t) var(--ease),
    border-color var(--t) var(--ease),
    box-shadow var(--t) var(--ease),
    background var(--t) var(--ease);
}

/* Subtle “luxury” hover: accent line + gentle lift */
.card::after{
  content:"";
  position:absolute;
  inset: 0;
  pointer-events:none;
  border-radius: inherit;
  /* a thin accent line on the left, and a very subtle top edge */
  background:
    linear-gradient(90deg, rgba(47,208,230,.0) 0%, rgba(47,208,230,.0) 10%, rgba(47,208,230,.0) 100%);
  opacity: 0;
  transition: opacity var(--t) var(--ease);
}

.card::before{
  content:"";
  position:absolute;
  left:0; top:0; bottom:0;
  width: 0;
  background: linear-gradient(180deg, rgba(47,208,230,.0), rgba(47,208,230,.70), rgba(47,208,230,.0));
  opacity: 0;
  transition: width var(--t) var(--ease), opacity var(--t) var(--ease);
}

.card:hover{
  transform: translateY(-2px);
  border-color: rgba(47,208,230,.38);
  box-shadow: 0 16px 46px rgba(0,0,0,.30);
  background:
    radial-gradient(700px 220px at 30% 0%, rgba(47,208,230,.12), transparent 62%),
    rgba(255,255,255,.045);
}

.card:hover::before{
  width: 3px;              /* the “blue line” */
  opacity: 1;
}

.card:hover::after{
  opacity: 1;
}

.card h3{
  margin: 0 0 8px;
  font-size: 16px;
  letter-spacing: -0.01em;
}

.card p{
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

/* Full-width cards (when you set grid-column in HTML inline) */
.card[style*="grid-column: span 12"]{
  grid-column: span 12 !important;
}

/* Responsive cards */
@media (max-width: 980px){
  .card{ grid-column: span 12; }
  .grid{ gap: 14px; }
}

/* ------------------------------
   7) Forms (contact)
------------------------------ */
input, textarea, select{
  color: var(--text);
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.10);
}

input::placeholder, textarea::placeholder{
  color: rgba(169,177,188,.75);
}

input:focus, textarea:focus, select:focus{
  outline: none;
  border-color: rgba(47,208,230,.55);
  box-shadow: 0 0 0 6px rgba(47,208,230,.10);
}

/* ------------------------------
   8) Breadcrumbs / misc
------------------------------ */
.breadcrumbs{
  font-size: 12px;
  color: var(--muted);
  margin: 18px 0 0;
}

.breadcrumbs a{
  color: rgba(169,177,188,.92);
}

.breadcrumbs a:hover{
  color: var(--accent);
}

/* Details/FAQ (your pages include their own, but this improves baseline) */
details{
  border: 1px solid rgba(255,255,255,.10);
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,.02);
}

summary{
  color: var(--text);
}

/* ------------------------------
   9) Footer (Legal + corporate)
------------------------------ */
.site-footer{
  border-top: 1px solid rgba(255,255,255,.08);
  background:
    radial-gradient(900px 300px at 50% 0%, rgba(47,208,230,.08), transparent 60%),
    rgba(0,0,0,.18);
  padding: 28px 0;
}

.footer-grid{
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 16px;
  align-items: start;
}

.footer-grid > div{
  color: rgba(245,247,250,.86);
  font-size: 13px;
  line-height: 1.6;
}

.footer-links{
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  justify-content: flex-end;
}

.footer-links a{
  font-size: 12px;
  color: rgba(169,177,188,.92);
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: all var(--t) var(--ease);
}

.footer-links a:hover{
  color: var(--text);
  border-color: rgba(47,208,230,.25);
  background: rgba(255,255,255,.03);
  box-shadow: 0 0 0 5px rgba(47,208,230,.08);
}

@media (max-width: 980px){
  .footer-grid{
    grid-template-columns: 1fr;
  }
  .footer-links{
    justify-content: flex-start;
  }
}

/* ------------------------------
   10) Small helpers
------------------------------ */
hr{
  border: none;
  border-top: 1px solid rgba(255,255,255,.08);
  margin: 24px 0;
}

.callout{
  border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,.10);
  background:
    linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.03));
  padding: 18px;
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce){
  *{
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

/* ----------------------------------
   MICRO-ICONOS · CARDS
---------------------------------- */

.card h3{
  position: relative;
  padding-left: 18px;
}

.card h3::before{
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 6px rgba(47,208,230,.15);
}

/* ----------------------------------
   MICRO-ICONOS · LISTAS
---------------------------------- */

.list{
  list-style: none;
  padding-left: 0;
}

.list li{
  position: relative;
  padding-left: 20px;
}

.list li::before{
  content: "›";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--accent);
  font-size: 18px;
  line-height: 1;
  opacity: .9;
}

/* ----------------------------------
   MICRO-ICONOS · KICKER
---------------------------------- */

.kicker{
  position: relative;
  padding-left: 22px;
}

.kicker::before{
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 12px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
}

/* ----------------------------------
   MICRO-ANIMACIONES · ENTRADA (premium)
---------------------------------- */

.reveal{
  opacity: 0;
  transform: translateY(10px);
  transition:
    opacity 700ms var(--ease),
    transform 700ms var(--ease);
  will-change: opacity, transform;
}

.reveal.in{
  opacity: 1;
  transform: translateY(0);
}

/* Variantes sutiles (opcional, auto-aplicadas por JS) */
.reveal.reveal-up{ transform: translateY(12px); }
.reveal.reveal-down{ transform: translateY(-10px); }
.reveal.reveal-left{ transform: translateX(12px); }
.reveal.reveal-right{ transform: translateX(-12px); }

.reveal.reveal-up.in,
.reveal.reveal-down.in,
.reveal.reveal-left.in,
.reveal.reveal-right.in{
  transform: translate(0,0);
}

/* Stagger suave */
.reveal[data-delay]{
  transition-delay: var(--delay, 0ms);
}

/* Accesibilidad: sin animaciones si el usuario lo pide */
@media (prefers-reduced-motion: reduce){
  .reveal{
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

/* ----------------------------------
   LUX FINISH · LINKS (subrayado animado)
---------------------------------- */

/* Enlaces dentro de texto: subrayado fino con animación */
p a, .section-sub a, .lead a, .card p a, .callout a, .list a, .faq a{
  color: var(--text);
  position: relative;
  text-decoration: none;
  transition: color var(--t) var(--ease);
}

p a::after, .section-sub a::after, .lead a::after, .card p a::after, .callout a::after, .list a::after, .faq a::after{
  content:"";
  position:absolute;
  left:0;
  bottom:-2px;
  width:100%;
  height:1px;
  background: linear-gradient(90deg, rgba(47,208,230,.0), rgba(47,208,230,.85), rgba(47,208,230,.0));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 380ms var(--ease), opacity 380ms var(--ease);
  opacity: .9;
}

p a:hover, .section-sub a:hover, .lead a:hover, .card p a:hover, .callout a:hover, .list a:hover, .faq a:hover{
  color: var(--accent);
}

p a:hover::after, .section-sub a:hover::after, .lead a:hover::after, .card p a:hover::after, .callout a:hover::after, .list a:hover::after, .faq a:hover::after{
  transform: scaleX(1);
}

/* ----------------------------------
   LUX FINISH · NAV LINKS (hover más premium)
---------------------------------- */

.nav-links a{
  position: relative;
}

.nav-links a::after{
  content:"";
  position:absolute;
  left:10px;
  right:10px;
  bottom:8px;
  height:2px;
  border-radius:2px;
  background: rgba(47,208,230,.85);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 320ms var(--ease), opacity 320ms var(--ease);
  opacity: .0;
}

.nav-links a:hover::after{
  transform: scaleX(1);
  opacity: .95;
}

/* ----------------------------------
   LUX FINISH · Focus visible (accesibilidad premium)
---------------------------------- */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible{
  outline: none;
  box-shadow: 0 0 0 6px rgba(47,208,230,.12);
  border-radius: 14px;
}

/* Optional: línea sutil bajo títulos */
.section-title{
  position: relative;
  display: inline-block;
  padding-bottom: 8px;
}

.section-title::after{
  content:"";
  position:absolute;
  left:0;
  bottom:0;
  width: 44px;
  height: 2px;
  border-radius: 2px;
  background: rgba(47,208,230,.75);
  box-shadow: 0 0 0 5px rgba(47,208,230,.08);
  opacity: .9;
}

/* ===== Fix SELECT / OPTION visibility (define-tu-necesidad) ===== */
select{
  background-color: rgba(255,255,255,.03) !important;
  color: var(--text) !important;
  border-color: rgba(255,255,255,.10) !important;
}

select option{
  background-color: #121A23; /* fondo oscuro */
  color: #F5F7FA;            /* texto claro */
}

/* Asegura contraste en estados */
select:focus{
  border-color: rgba(47,208,230,.55) !important;
  box-shadow: 0 0 0 6px rgba(47,208,230,.10) !important;
}


/* ===== Legal Modal (ECUANIME) ===== */
.modal-overlay{
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(10,14,18,.88);
  z-index: 9999;
}

.modal-overlay.open{ display:flex; }

.modal-window{
  width: min(960px, 100%);
  max-height: min(78vh, 820px);
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.12);
  background:
    radial-gradient(900px 260px at 15% 0%, rgba(47,208,230,.12), transparent 60%),
    rgba(18,26,35,.98);
  box-shadow: 0 20px 60px rgba(0,0,0,.55);
  display:flex;
  flex-direction: column;
}

.modal-header{
  display:flex;
  align-items:flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 16px 10px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.modal-kicker{
  font-size: 12px;
  letter-spacing: .10em;
  text-transform: uppercase;
  color: rgba(245,247,250,.70);
}

.modal-title{
  margin: 8px 0 0;
  font-size: 18px;
  letter-spacing: .02em;
  color: rgba(245,247,250,.98);
}

.modal-close{
  width: 40px;
  height: 40px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.04);
  color: rgba(245,247,250,.92);
  cursor: pointer;
  transition: all .18s ease;
}
.modal-close:hover{
  border-color: rgba(47,208,230,.45);
  box-shadow: 0 0 0 6px rgba(47,208,230,.10);
}

.modal-body{
  padding: 16px;
  overflow: auto;
}

.modal-body h3{
  margin: 18px 0 10px;
}

.modal-body p, .modal-body li{
  color: rgba(245,247,250,.78);
  line-height: 1.75;
}

.modal-footer{
  padding: 12px 16px;
  border-top: 1px solid rgba(255,255,255,.08);
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 12px;
  background: rgba(0,0,0,.18);
}

.modal-meta{
  color: rgba(245,247,250,.65);
  font-size: 12px;
}

/* bloquear scroll del body */
body.modal-open{
  overflow: hidden;
}
/* FIX definitivo modal: nunca visible por defecto */
#legalOverlay{
  display:none !important;
  position: fixed !important;
  inset: 0 !important;
  z-index: 9999 !important;
}

#legalOverlay.open{
  display:flex !important;
}

.modal-body p{
  text-align: justify;
  text-justify: inter-word;
  hyphens: auto;
}

.modal-body ul,
.modal-body li{
  text-align: left;
}

.modal-body h3,
.modal-body h4{
  color: var(--accent); /* tu azul corporativo */
  letter-spacing: .02em;
}

.modal-body h3{
  margin-top: 24px;
}

.modal-body h4{
  margin-top: 20px;
}

