/* ============================================================
   IntegramIA — styles.css
   Cabecera, hero, banda, secciones y pie.
   ============================================================ */

/* ---------- Cabecera ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 60;
  height: var(--header-h);
  display: flex;
  align-items: center;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: rgba(247, 255, 247, .82);
  border-bottom: 1px solid transparent;
  transition: border-color .25s ease, background-color .25s ease;
}
[data-theme="dark"] .header { background: rgba(16, 28, 58, .78); }
.header.scrolled { border-bottom-color: var(--line-soft); }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  font-weight: 700;
  font-size: 1.06rem;
  letter-spacing: -.01em;
}
.brand .logo { width: 30px; height: 30px; }

.nav-center {
  display: flex;
  align-items: center;
  gap: 1.9rem;
  font-size: .93rem;
  color: var(--muted);
}
.nav-center a { transition: color .18s ease; }
.nav-center a:hover { color: var(--text); }

.header-actions { display: flex; align-items: center; gap: .6rem; }

.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  color: var(--muted);
  transition: color .18s ease, border-color .18s ease, transform .18s ease;
}
.icon-btn:hover { color: var(--text); border-color: var(--muted-2); }
.icon-btn .ico { width: 18px; height: 18px; }
.icon-btn > svg { grid-area: 1 / 1; } /* los dos iconos (sol/luna, menú/cerrar) se superponen */

html:not([data-theme="dark"]) .ico-sun { display: none; }
html[data-theme="dark"] .ico-moon { display: none; }

.menu-btn { display: none; }
.menu-btn .ico-close { display: none; }
.menu-btn[aria-expanded="true"] .ico-close { display: block; }
.menu-btn[aria-expanded="true"] .ico-menu { display: none; }

/* ---------- Menú móvil ---------- */
.menu-panel {
  position: fixed;
  top: var(--header-h);
  left: 0;
  right: 0;
  z-index: 55;
  background: var(--bg);
  border-bottom: 1px solid var(--line-soft);
  padding: 1.1rem clamp(1.25rem, 4vw, 2rem) 1.5rem;
  display: grid;
  gap: .2rem;
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
  transition: opacity .22s ease, transform .22s ease;
  box-shadow: 0 24px 40px -30px rgba(16, 28, 58, .4);
}
.menu-panel.open { opacity: 1; transform: none; pointer-events: auto; }
.menu-panel a {
  padding: .85rem .2rem;
  font-size: 1.08rem;
  font-weight: 500;
  border-bottom: 1px solid var(--line-soft);
}
.menu-panel .btn { margin-top: 1rem; justify-self: start; }

/* ---------- Hero ---------- */
.hero { padding-top: clamp(1.4rem, 3.5vw, 2.6rem); }
.hero .wrap { max-width: 1220px; }

.hero-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background:
    radial-gradient(720px 420px at 88% -8%, rgba(255, 107, 107, .13), transparent 62%),
    radial-gradient(820px 480px at 6% 116%, rgba(78, 205, 196, .1), transparent 60%),
    linear-gradient(158deg, #0d1832 0%, #101C3A 46%, #152449 100%);
  border: 1px solid rgba(247, 255, 247, .08);
  padding: clamp(3.6rem, 8.5vw, 6.4rem) 0 clamp(3.4rem, 7vw, 5.6rem);
  color: #F7FFF7;
}
[data-theme="dark"] .hero-card {
  border-color: rgba(247, 255, 247, .2);
  background:
    radial-gradient(720px 420px at 88% -8%, rgba(255, 107, 107, .12), transparent 62%),
    radial-gradient(820px 480px at 6% 116%, rgba(78, 205, 196, .09), transparent 60%),
    linear-gradient(158deg, #0c1630 0%, #131f40 50%, #18274e 100%);
}

.hero-grid-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: .5;
  pointer-events: none;
}

/* Estrella-monumento: el símbolo de la marca en grande, translúcido, sangrando por la esquina */
.hero-star {
  position: absolute;
  top: clamp(-190px, -14vw, -100px);
  right: clamp(-170px, -12vw, -70px);
  width: clamp(300px, 50vw, 660px);
  height: auto;
  color: var(--coral);
  transform: rotate(14deg);
  pointer-events: none;
  -webkit-mask-image: linear-gradient(38deg, rgba(0, 0, 0, .32), rgba(0, 0, 0, .05) 78%);
  mask-image: linear-gradient(38deg, rgba(0, 0, 0, .32), rgba(0, 0, 0, .05) 78%);
  animation: star-breathe 9s ease-in-out infinite;
}
[data-theme="dark"] .hero-star {
  -webkit-mask-image: linear-gradient(38deg, rgba(0, 0, 0, .3), rgba(0, 0, 0, .04) 78%);
  mask-image: linear-gradient(38deg, rgba(0, 0, 0, .3), rgba(0, 0, 0, .04) 78%);
}
@keyframes star-breathe {
  0%, 100% { transform: rotate(14deg) scale(1); opacity: .92; }
  50% { transform: rotate(14deg) scale(1.04); opacity: 1; }
}

.hero-inner {
  position: relative;
  max-width: 1060px;
  padding-inline: clamp(1.4rem, 5vw, 3.4rem);
  text-align: left;
  display: grid;
  justify-items: start;
  gap: 1.5rem;
}

.hero h1 { color: #F7FFF7; }
.hero h1 em { font-style: normal; color: var(--coral); }

.hero-sub {
  max-width: 56ch;
  font-size: clamp(1.02rem, 1.5vw, 1.16rem);
  color: rgba(247, 255, 247, .74);
  line-height: 1.62;
}

.hero-cta { display: flex; flex-wrap: wrap; gap: .95rem; justify-content: flex-start; }

/* ---------- Banda de palabras clave ---------- */
.band {
  padding-block: clamp(2rem, 4.5vw, 3rem) clamp(1.2rem, 3vw, 2rem);
  text-align: center;
  display: grid;
  gap: 1.3rem;
  justify-items: center;
}
.band-words {
  font-size: .74rem;
  font-weight: 500;
  letter-spacing: .17em;
  text-transform: uppercase;
  color: var(--muted);
  max-width: 980px;
  line-height: 2;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: .2rem .8rem;
}
.band-words b, .band-words .bi { white-space: nowrap; }
.band-words b { font-weight: 500; color: var(--text); }
.band-words .sep { color: var(--coral); }

.band-chips { display: flex; flex-wrap: wrap; gap: .7rem 2.4rem; justify-content: center; }

/* ---------- Servicios ---------- */
.services-grid {
  margin-top: clamp(2.2rem, 5vw, 3.4rem);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

/* ---------- Statement ---------- */
.statement-wrap { text-align: center; }
.statement {
  max-width: 920px;
  margin-inline: auto;
  font-size: clamp(1.55rem, 3.8vw, 2.7rem);
  font-weight: 700;
  letter-spacing: -.022em;
  line-height: 1.22;
}
.statement .fade { color: var(--muted-2); }

/* ---------- Casos de uso ---------- */
.cases-grid {
  margin-top: clamp(2.2rem, 5vw, 3.4rem);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.card--cta {
  background: linear-gradient(152deg, #0e1a37 0%, #152449 100%);
  border-color: transparent;
  color: #F7FFF7;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .55rem;
}
.card--cta .card-ico { background: rgba(255, 107, 107, .18); color: var(--coral); }
.card--cta h3 { color: #F7FFF7; }
.card--cta p { color: rgba(247, 255, 247, .68); }
.card--cta .btn { margin-top: auto; }
[data-theme="dark"] .card--cta { border: 1px solid rgba(247, 255, 247, .14); }

/* ---------- Cómo trabajamos ---------- */
.steps-grid {
  margin-top: clamp(2.2rem, 5vw, 3.4rem);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}
.step {
  padding-top: 1.3rem;
  border-top: 2px solid var(--line-soft);
}
.step-num {
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .14em;
  color: var(--coral);
  display: block;
  margin-bottom: .7rem;
}
.step h3 { font-size: 1.02rem; font-weight: 700; margin-bottom: .45rem; }
.step p { font-size: .92rem; color: var(--muted); }

/* ---------- FAQ ---------- */
.faq { margin-top: clamp(1.6rem, 4vw, 2.6rem); max-width: 780px; }
.faq details { border-bottom: 1px solid var(--line-soft); }
.faq summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.2rem;
  padding: 1.2rem 0;
  font-weight: 500;
  font-size: 1.04rem;
  transition: color .18s ease;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { color: var(--coral); }
.faq .plus {
  position: relative;
  width: 15px;
  height: 15px;
  flex: none;
  transition: transform .22s ease;
}
.faq .plus::before, .faq .plus::after {
  content: "";
  position: absolute;
  background: currentColor;
  border-radius: 2px;
}
.faq .plus::before { left: 0; right: 0; top: 6.5px; height: 2px; }
.faq .plus::after { top: 0; bottom: 0; left: 6.5px; width: 2px; }
.faq details[open] .plus { transform: rotate(45deg); }
.faq details p {
  padding: 0 2.2rem 1.3rem 0;
  color: var(--muted);
  font-size: .95rem;
  max-width: 64ch;
}

/* ---------- Contacto ---------- */
.contact {
  text-align: center;
  display: grid;
  gap: 1.4rem;
  justify-items: center;
}
.contact p { max-width: 520px; color: var(--muted); }
.contact-mail {
  font-size: .86rem;
  color: var(--muted-2);
}
.contact-mail a { color: var(--muted); border-bottom: 1px solid var(--line); transition: color .18s ease, border-color .18s ease; }
.contact-mail a:hover { color: var(--coral); border-color: var(--coral); }

/* ---------- Pie ---------- */
.footer {
  border-top: 1px solid var(--line-soft);
  padding-block: clamp(2.4rem, 5vw, 3.6rem) 2rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: clamp(1.6rem, 4vw, 3rem);
}
.footer-brand { display: grid; gap: .8rem; justify-items: start; }
.footer-brand .tagline { font-weight: 700; font-size: 1.06rem; letter-spacing: -.01em; }
.footer-brand p { font-size: .88rem; color: var(--muted); max-width: 30ch; }
.footer h4 {
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted-2);
  margin-bottom: 1rem;
}
.footer-links { display: grid; gap: .55rem; font-size: .93rem; color: var(--muted); }
.footer-links a { transition: color .18s ease; }
.footer-links a:hover { color: var(--text); }

.footer-bottom {
  margin-top: clamp(2rem, 4vw, 3rem);
  padding-top: 1.4rem;
  border-top: 1px solid var(--line-soft);
  display: flex;
  flex-wrap: wrap;
  gap: .6rem 1.5rem;
  align-items: center;
  justify-content: space-between;
  font-size: .82rem;
  color: var(--muted-2);
}
.footer-bottom .micro { font-size: .68rem; }
.footer-bottom .micro .ico { color: var(--teal); }

/* ---------- Responsive ---------- */
@media (max-width: 1020px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .cases-grid { grid-template-columns: repeat(2, 1fr); }
  .steps-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 920px) {
  .nav-center { display: none; }
  .header-cta { display: none; }
  .menu-btn { display: grid; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 880px) {
  .hero-flow--desktop { display: none; }
  .hero-flow--mobile { display: block; }
}

@media (max-width: 640px) {
  .services-grid, .cases-grid, .steps-grid { grid-template-columns: 1fr; }
  .hero-card { border-radius: 22px; }
  .hero-star { width: 320px; top: -120px; right: -80px; }
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .hero-cta .btn { width: 100%; }
  .band-words { font-size: .68rem; letter-spacing: .13em; }
}
