/* =========================
   SOLID ConsultorIA - Styles
   Accessible, responsive, minimal
   ========================= */

:root{
  --bg: #f6f6f4;
  --surface: #ffffff;
  --text: #0b1320;
  --muted: #4b5563;
  --brand: #0b1f3a;
  --brand2: #1f4f8a;
  --border: rgba(15, 23, 42, 0.12);
  --shadow: 0 10px 30px rgba(2, 6, 23, 0.08);
  --radius: 18px;
  --radius2: 28px;
  --maxw: 1120px;
  --focus: 3px solid rgba(31, 79, 138, 0.55);
}

@media (prefers-reduced-motion: reduce) {
  html:focus-within{ scroll-behavior: auto; }
  *, *::before, *::after{
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

*{ box-sizing:border-box; }
html{ scroll-behavior:smooth; }
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Noto Sans", "Helvetica Neue", sans-serif;
  color: var(--text);
  background: radial-gradient(1200px 800px at 25% 0%, #ffffff 0%, var(--bg) 55%, #f1f2f0 100%);
  line-height:1.55;
}

a{ color: inherit; text-decoration: none; }
a:hover{ text-decoration: underline; }
img{ max-width:100%; height:auto; }
button, input, textarea, select{ font: inherit; }

.container{
  width: min(100% - 2rem, var(--maxw));
  margin-inline: auto;
}

.skip-link{
  position:absolute;
  left:-9999px;
  top:0;
  padding: .75rem 1rem;
  background: var(--brand);
  color: white;
  border-radius: 0 0 12px 12px;
  z-index: 9999;
}
.skip-link:focus{
  left: 1rem;
  top: 1rem;
  outline: var(--focus);
}

:focus-visible{
  outline: var(--focus);
  outline-offset: 3px;
}

.header{
  position: sticky;
  top:0;
  z-index: 1000;
  background: rgba(246,246,244,0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.header-inner{
  display:flex;
  align-items:center;
  justify-content: space-between;
  padding: .75rem 0;
  gap: 1rem;
}

.brand{
  display:flex;
  align-items:center;
  gap:.75rem;
  min-width: 200px;
}
.brand-mark{
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(145deg, var(--brand2), var(--brand));
  box-shadow: var(--shadow);
  flex: 0 0 auto;
}
.brand-title{
  display:flex;
  flex-direction: column;
  line-height:1.1;
}
.brand-title strong{
  letter-spacing: .04em;
  font-size: 1rem;
}
.brand-title span{
  font-size: .88rem;
  color: var(--muted);
}
.nav{
  display:flex;
  align-items:center;
  gap: 1rem;
}
.nav a{
  padding: .45rem .7rem;
  border-radius: 12px;
  color: rgba(11,19,32,0.9);
}
.nav a[aria-current="page"]{
  background: rgba(31,79,138,0.12);
  text-decoration: none;
}
.nav a:hover{
  text-decoration:none;
  background: rgba(15,23,42,0.06);
}

.cta{
  display:flex;
  align-items:center;
  gap:.6rem;
}
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:.5rem;
  padding:.75rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 8px 20px rgba(2,6,23,0.06);
  text-decoration:none;
  cursor:pointer;
}
.btn:hover{ text-decoration:none; transform: translateY(-1px); }
.btn:active{ transform: translateY(0); }
.btn-primary{
  background: linear-gradient(145deg, var(--brand2), var(--brand));
  border-color: transparent;
  color:white;
}
.btn-ghost{
  background: transparent;
  box-shadow:none;
}

.menu-btn{ display:none; }

/* Hero */
.hero{ padding: 3.5rem 0 2.5rem; }
.hero-grid{
  display:grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 2rem;
  align-items: start;
}
.kicker{
  display:inline-flex;
  align-items:center;
  gap:.5rem;
  padding:.35rem .75rem;
  border-radius: 999px;
  background: rgba(31,79,138,0.10);
  border: 1px solid rgba(31,79,138,0.18);
  color: rgba(11,19,32,0.9);
  font-size: .9rem;
  width: fit-content;
}
.h1{
  font-size: clamp(2rem, 4vw, 3.25rem);
  line-height: 1.08;
  margin: .85rem 0 1rem;
  letter-spacing: -0.02em;
}
.lead{
  font-size: clamp(1.05rem, 2.2vw, 1.25rem);
  color: rgba(11,19,32,0.82);
  margin: 0 0 1.25rem;
}
.rebel{
  display:inline-block;
  padding: .15rem .55rem;
  border-radius: 10px;
  background: rgba(11,31,58,0.08);
  border: 1px dashed rgba(11,31,58,0.25);
}

.hero-card{
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius2);
  padding: 1.25rem;
  box-shadow: var(--shadow);
}
.hero-card h2{
  font-size: 1.1rem;
  margin: 0 0 .5rem;
}
.hero-card p{
  color: var(--muted);
  margin:0 0 1rem;
}
.list{ margin:0; padding: 0 0 0 1.1rem; }
.list li{ margin: .35rem 0; }
.meta-row{
  display:flex;
  flex-wrap: wrap;
  gap:.6rem;
  margin-top: 1rem;
}
.pill{
  font-size:.9rem;
  color: rgba(11,19,32,0.85);
  background: rgba(15,23,42,0.05);
  border: 1px solid var(--border);
  padding: .35rem .6rem;
  border-radius: 999px;
}

/* Sections */
.section{ padding: 2.5rem 0; }
.section h2{
  font-size: 1.75rem;
  margin:0 0 .75rem;
  letter-spacing: -0.01em;
}
.section p.section-lead{
  margin: 0 0 1.25rem;
  color: var(--muted);
}

.grid-3{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.card{
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem;
  box-shadow: 0 10px 24px rgba(2,6,23,0.05);
}
.card h3{ margin: 0 0 .5rem; font-size: 1.1rem; }
.card p{ margin:0; color: var(--muted); }
.card a.inline{
  margin-top: .85rem;
  display:inline-flex;
  gap:.35rem;
  align-items:center;
  color: var(--brand2);
  text-decoration:none;
}
.card a.inline:hover{ text-decoration: underline; }

.split{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  align-items: start;
}
.panel{
  background: rgba(255,255,255,0.6);
  border: 1px solid var(--border);
  border-radius: var(--radius2);
  padding: 1.25rem;
}

.quote{
  border-left: 4px solid rgba(31,79,138,0.4);
  padding-left: 1rem;
  color: rgba(11,19,32,0.85);
  margin: 0;
}
.small{ font-size:.95rem; color: var(--muted); }

/* Forms */
.form{ display:grid; gap: .85rem; }
.field{ display:grid; gap:.35rem; }
label{ font-weight: 600; }
input, textarea, select{
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: .75rem .85rem;
  background: #fff;
}
textarea{ min-height: 120px; resize: vertical; }
.hint{ font-size: .9rem; color: var(--muted); }
.form-row{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: .85rem;
}

.alert{
  border: 1px solid rgba(31,79,138,0.3);
  background: rgba(31,79,138,0.08);
  padding: .85rem 1rem;
  border-radius: 14px;
  color: rgba(11,19,32,0.88);
}

/* Footer */
.footer{
  border-top: 1px solid var(--border);
  padding: 2rem 0;
  color: rgba(11,19,32,0.85);
}
.footer-grid{
  display:grid;
  grid-template-columns: 1.25fr 1fr 1fr;
  gap: 1rem;
}
.footer a{ color: rgba(11,19,32,0.85); }
.footer small{ color: var(--muted); }

/* Chat widget */
.chat-launcher{
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 2000;
  display:flex;
  flex-direction: column;
  gap: .5rem;
  align-items: flex-end;
}
.chat-btn{
  border: none;
  cursor: pointer;
  border-radius: 999px;
  padding: .9rem 1rem;
  background: linear-gradient(145deg, var(--brand2), var(--brand));
  color: #fff;
  box-shadow: var(--shadow);
  display:inline-flex;
  align-items:center;
  gap:.55rem;
}
.chat-btn:hover{ transform: translateY(-1px); }
.chat-badge{
  background: rgba(255,255,255,0.18);
  border: 1px solid rgba(255,255,255,0.2);
  padding: .2rem .5rem;
  border-radius: 999px;
  font-size: .85rem;
}
.chat-panel{
  width: min(380px, calc(100vw - 2rem));
  max-height: 70vh;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 22px;
  box-shadow: var(--shadow);
  overflow: hidden;
  display:none;
}
.chat-panel[aria-hidden="false"]{ display:block; }
.chat-head{
  padding: .9rem 1rem;
  background: rgba(11,31,58,0.06);
  border-bottom: 1px solid var(--border);
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: .75rem;
}
.chat-title{
  display:flex;
  flex-direction: column;
  gap:.15rem;
}
.chat-title strong{ font-size: 1rem; }
.chat-title span{ font-size: .85rem; color: var(--muted); }
.icon-btn{
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 12px;
  padding: .45rem .6rem;
  cursor:pointer;
}
.chat-body{
  padding: .9rem 1rem;
  overflow:auto;
  max-height: calc(70vh - 170px);
}
.msg{ margin: .5rem 0; display:flex; }
.msg .bubble{
  padding: .65rem .8rem;
  border-radius: 16px;
  border: 1px solid var(--border);
  max-width: 90%;
}
.msg.bot{ justify-content:flex-start; }
.msg.bot .bubble{ background: rgba(15,23,42,0.04); }
.msg.user{ justify-content:flex-end; }
.msg.user .bubble{ background: rgba(31,79,138,0.10); border-color: rgba(31,79,138,0.22); }

.chat-actions{
  padding: .75rem 1rem;
  border-top: 1px solid var(--border);
  display:flex;
  gap:.5rem;
  flex-wrap: wrap;
}
.chat-actions button{
  padding: .55rem .75rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #fff;
  cursor:pointer;
}
.chat-actions button:hover{ background: rgba(15,23,42,0.04); }
.chat-foot{
  padding: .75rem 1rem;
  border-top: 1px solid var(--border);
  display:flex;
  gap:.5rem;
  align-items:center;
}
.chat-foot input{
  flex: 1;
  border-radius: 999px;
  padding: .65rem .85rem;
}
.chat-foot button{
  border:none;
  border-radius: 999px;
  padding: .65rem .85rem;
  cursor:pointer;
  background: linear-gradient(145deg, var(--brand2), var(--brand));
  color:#fff;
}
.chat-foot button:hover{ transform: translateY(-1px); }

/* Cookie banner */
.cookie-banner{
  position: fixed;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  z-index: 2500;
  background: rgba(255,255,255,0.96);
  border: 1px solid var(--border);
  border-radius: 22px;
  box-shadow: var(--shadow);
  padding: 1rem;
  display:none;
}
.cookie-banner[data-open="true"]{ display:block; }
.cookie-grid{
  display:grid;
  grid-template-columns: 1.4fr 0.6fr;
  gap: .75rem;
  align-items: start;
}
.cookie-actions{
  display:flex;
  gap:.5rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

/* Mobile nav */
@media (max-width: 920px){
  .hero-grid{ grid-template-columns: 1fr; }
  .grid-3{ grid-template-columns: 1fr; }
  .split{ grid-template-columns: 1fr; }
  .footer-grid{ grid-template-columns: 1fr; }
  .form-row{ grid-template-columns: 1fr; }

  .menu-btn{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:.5rem;
    padding:.65rem .9rem;
  }
  .nav{
    position: fixed;
    top: 64px;
    right: 1rem;
    left: 1rem;
    background: rgba(255,255,255,0.98);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: .6rem;
    box-shadow: var(--shadow);
    flex-direction: column;
    align-items: stretch;
    display:none;
  }
  .nav[data-open="true"]{ display:flex; }
  .nav a{ padding: .75rem .85rem; }
  .cookie-grid{ grid-template-columns: 1fr; }
  .cookie-actions{ justify-content:flex-start; }
}

/* Print */
@media print{
  .chat-launcher, .menu-btn, .header, .cookie-banner{ display:none !important; }
  body{ background:#fff; }
  .card, .panel, .hero-card{ box-shadow:none; }
}

/* A11y helper */
.sr-only{
  position:absolute; width:1px; height:1px; padding:0; margin:-1px;
  overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0;
}


/* Media helpers */
.media{
  border-radius: var(--radius2);
  border: 1px solid var(--border);
  overflow: hidden;
  background: #fff;
  box-shadow: 0 10px 24px rgba(2,6,23,0.05);
}
.media img{ display:block; width:100%; height:auto; }

.card-media{
  border-radius: 14px;
  border: 1px solid var(--border);
  overflow:hidden;
  margin-bottom: .8rem;
  background:#fff;
}
.card-media img{ display:block; width:100%; height:auto; }
