/* =========================================================
   InTechHouse — intechhouse.co
   Colores corporativos: cian #00A5DB · azul marino #005296
   ========================================================= */

:root {
  /* Marca */
  --cyan:        #00A5DB;
  --cyan-400:    #34BEEC;
  --navy:        #005296;
  --navy-deep:   #003A6B;

  /* Fondos oscuros */
  --bg:          #070C14;
  --bg-alt:      #0B1220;
  --surface:     #0F1826;
  --surface-2:   #14202F;
  --line:        rgba(255, 255, 255, .09);
  --line-strong: rgba(0, 165, 219, .35);

  /* Texto */
  --text:        #EAF2F8;
  --text-muted:  #9FB0C3;
  --text-dim:    #6E8093;

  /* Sistema */
  --radius:      16px;
  --radius-sm:   10px;
  --maxw:        1180px;
  --pad:         clamp(1.25rem, 4vw, 2rem);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --shadow: 0 18px 50px rgba(0, 0, 0, .45);
  --ease: cubic-bezier(.22, .68, .35, 1);
}

/* ---------------- Reset ---------------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--cyan); text-decoration: none; transition: color .2s var(--ease); }
a:hover { color: var(--cyan-400); }
h1, h2, h3, h4 { line-height: 1.18; margin: 0 0 .6em; letter-spacing: -.02em; font-weight: 700; }
p { margin: 0 0 1rem; }
ul { margin: 0; padding: 0; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 4px; }

.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--pad); }

.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 999;
  background: var(--cyan); color: #04121C; padding: .7rem 1.2rem; font-weight: 600;
}
.skip-link:focus { left: 1rem; top: 1rem; }

/* ---------------- Botones ---------------- */
.btn {
  --btn-bg: transparent;
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .85rem 1.6rem;
  border: 1px solid transparent; border-radius: 999px;
  font: inherit; font-weight: 600; font-size: .95rem;
  cursor: pointer; text-align: center; white-space: nowrap;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), background .2s var(--ease), border-color .2s var(--ease);
}
.btn--primary {
  background: linear-gradient(135deg, var(--cyan) 0%, var(--navy) 100%);
  color: #FFFFFF;
  box-shadow: 0 8px 24px rgba(0, 165, 219, .22);
}
.btn--primary:hover { color: #fff; transform: translateY(-2px); box-shadow: 0 14px 32px rgba(0, 165, 219, .36); }
.btn--ghost { border-color: var(--line); color: var(--text); background: rgba(255,255,255,.03); }
.btn--ghost:hover { color: var(--text); border-color: var(--line-strong); background: rgba(0,165,219,.08); transform: translateY(-2px); }
.btn--lg { padding: 1rem 2rem; font-size: 1rem; }
.btn--sm { padding: .55rem 1.15rem; font-size: .875rem; }
.btn--block { display: flex; width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; transform: none; }

/* ---------------- Header ---------------- */
.header {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  background: rgba(7, 12, 20, .55);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: background .3s var(--ease), border-color .3s var(--ease);
}
.header.is-scrolled { background: rgba(7, 12, 20, .9); border-bottom-color: var(--line); }
/* Con el menú móvil abierto el header debe ser totalmente opaco */
.header.is-navopen { background: var(--bg); border-bottom-color: transparent; }
.header__inner { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; min-height: 72px; }
.brand__logo { height: 38px; width: auto; }

.nav { display: flex; align-items: center; gap: 1.9rem; }
.nav > a:not(.btn) {
  color: var(--text-muted); font-size: .93rem; font-weight: 500; position: relative;
}
.nav > a:not(.btn)::after {
  content: ''; position: absolute; left: 0; bottom: -6px; height: 2px; width: 0;
  background: var(--cyan); transition: width .25s var(--ease);
}
.nav > a:not(.btn):hover { color: var(--text); }
.nav > a:not(.btn):hover::after { width: 100%; }

.nav-toggle {
  display: none; flex-direction: column; gap: 5px; justify-content: center;
  width: 44px; height: 44px; padding: 0 10px;
  background: none; border: 1px solid var(--line); border-radius: var(--radius-sm); cursor: pointer;
}
.nav-toggle span { display: block; height: 2px; background: var(--text); border-radius: 2px; transition: transform .3s var(--ease), opacity .2s var(--ease); }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------------- Hero ---------------- */
.hero { position: relative; padding: clamp(8rem, 16vw, 11rem) 0 clamp(4rem, 8vw, 6rem); overflow: hidden; }
.hero__glow {
  position: absolute; top: -30%; left: 50%; translate: -50% 0;
  width: min(1100px, 130vw); aspect-ratio: 1;
  background:
    radial-gradient(circle at 35% 40%, rgba(0, 165, 219, .20), transparent 58%),
    radial-gradient(circle at 68% 55%, rgba(0, 82, 150, .28), transparent 60%);
  filter: blur(30px); pointer-events: none;
}
.hero__inner { position: relative; max-width: 880px; }
.eyebrow {
  display: inline-block; font-size: .78rem; font-weight: 600; letter-spacing: .14em;
  text-transform: uppercase; color: var(--cyan); margin-bottom: 1rem;
}
.hero__title { font-size: clamp(2.2rem, 6vw, 3.9rem); font-weight: 800; margin-bottom: 1.2rem; }
.grad {
  background: linear-gradient(100deg, var(--cyan) 10%, var(--cyan-400) 45%, #7FD4F2 90%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero__sub { font-size: clamp(1.02rem, 2vw, 1.2rem); color: var(--text-muted); max-width: 62ch; margin-bottom: 2.2rem; }
.hero__cta { display: flex; flex-wrap: wrap; gap: .9rem; margin-bottom: 3.5rem; }

.hero__stats { display: flex; flex-wrap: wrap; gap: 2.5rem; list-style: none; padding-top: 2rem; border-top: 1px solid var(--line); }
.hero__stats li { display: flex; flex-direction: column; }
.hero__stats strong { font-size: 1.6rem; font-weight: 700; color: var(--text); letter-spacing: -.02em; }
.hero__stats span { font-size: .85rem; color: var(--text-dim); }

/* ---------------- Secciones ---------------- */
.section { padding: clamp(4rem, 9vw, 7rem) 0; }
.section--tight { padding: clamp(2.5rem, 5vw, 3.5rem) 0; }
.section--alt { background: var(--bg-alt); border-block: 1px solid var(--line); }
.section__title { font-size: clamp(1.7rem, 3.6vw, 2.6rem); font-weight: 700; max-width: 22ch; }
.section__lead { color: var(--text-muted); max-width: 68ch; font-size: 1.03rem; margin-bottom: 3rem; }

/* ---------------- Dolores ---------------- */
.pains { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1rem; margin-bottom: 1.6rem; }
.pain {
  margin: 0; padding: 1.1rem 1.3rem;
  background: var(--surface); border: 1px solid var(--line);
  border-left: 3px solid var(--cyan); border-radius: var(--radius-sm);
  color: var(--text-muted); font-style: italic; font-size: .95rem;
}
.pains__foot { color: var(--text); font-weight: 600; font-size: 1.05rem; max-width: 65ch; }

/* ---------------- Cards de servicios ---------------- */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.4rem; }
.card {
  position: relative; padding: 2rem 1.8rem;
  background: linear-gradient(170deg, var(--surface) 0%, var(--bg-alt) 100%);
  border: 1px solid var(--line); border-radius: var(--radius);
  transition: transform .3s var(--ease), border-color .3s var(--ease), box-shadow .3s var(--ease);
}
.card:hover { transform: translateY(-6px); border-color: var(--line-strong); box-shadow: var(--shadow); }
.card__icon {
  width: 50px; height: 50px; display: grid; place-items: center; margin-bottom: 1.3rem;
  border-radius: 14px; color: var(--cyan);
  background: rgba(0, 165, 219, .10); border: 1px solid rgba(0, 165, 219, .22);
}
.card__icon svg { width: 26px; height: 26px; }
.card h3 { font-size: 1.22rem; }
.card p { color: var(--text-muted); font-size: .95rem; }
.card__list { list-style: none; margin-top: 1.2rem; padding-top: 1.2rem; border-top: 1px solid var(--line); display: grid; gap: .55rem; }
.card__list li { position: relative; padding-left: 1.5rem; font-size: .89rem; color: var(--text-dim); }
.card__list li::before {
  content: ''; position: absolute; left: 0; top: .55em;
  width: 7px; height: 7px; border-radius: 50%; background: var(--cyan); opacity: .8;
}

/* ---------------- Metodología ---------------- */
.steps { list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.4rem; counter-reset: step; }
.step { position: relative; padding: 1.8rem 1.5rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.step__num {
  display: block; font-size: 2.1rem; font-weight: 800; line-height: 1; margin-bottom: .8rem;
  background: linear-gradient(135deg, var(--cyan), var(--navy));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.step h3 { font-size: 1.1rem; }
.step p { color: var(--text-muted); font-size: .92rem; }
.step__out { margin-bottom: 0; padding-top: .8rem; border-top: 1px dashed var(--line); color: var(--cyan) !important; font-size: .84rem !important; font-weight: 500; }

/* ---------------- Casos ---------------- */
.cases { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.4rem; }
.case {
  padding: 2rem 1.8rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  transition: border-color .3s var(--ease), transform .3s var(--ease);
}
.case:hover { border-color: var(--line-strong); transform: translateY(-4px); }
.case__tag {
  display: inline-block; font-size: .74rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  color: var(--cyan); background: rgba(0, 165, 219, .10); border: 1px solid rgba(0, 165, 219, .2);
  padding: .3rem .8rem; border-radius: 999px; margin-bottom: 1rem;
}
.case h3 { font-size: 1.14rem; }
.case p { color: var(--text-muted); font-size: .93rem; }
.case__res { list-style: none; margin-top: 1.2rem; padding-top: 1.2rem; border-top: 1px solid var(--line); display: grid; gap: .6rem; }
.case__res li { position: relative; padding-left: 1.7rem; font-size: .88rem; color: var(--text); }
.case__res li::before {
  content: ''; position: absolute; left: 0; top: .35em; width: 11px; height: 6px;
  border-left: 2px solid var(--cyan); border-bottom: 2px solid var(--cyan); transform: rotate(-45deg);
}

/* ---------------- Split (nosotros / contacto) ---------------- */
.split { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.split__text p { color: var(--text-muted); }
.split__text .section__lead { margin-bottom: 1.5rem; }

.values { list-style: none; display: grid; gap: .8rem; margin-top: 1.8rem; }
.values li { position: relative; padding-left: 1.7rem; color: var(--text-muted); font-size: .94rem; }
.values li strong { color: var(--text); }
.values li::before {
  content: ''; position: absolute; left: 0; top: .45em; width: 10px; height: 10px;
  border-radius: 3px; background: linear-gradient(135deg, var(--cyan), var(--navy));
}

.panel {
  padding: 2rem 1.8rem; border-radius: var(--radius);
  background: linear-gradient(160deg, rgba(0,165,219,.10), rgba(0,82,150,.06));
  border: 1px solid var(--line-strong);
}
.panel h3 { font-size: 1.2rem; }
.panel p { color: var(--text-muted); font-size: .94rem; }
.panel .btn { margin-top: .8rem; }
.panel__note { margin: .9rem 0 0; font-size: .82rem; color: var(--text-dim); text-align: center; }

/* ---------------- Contacto ---------------- */
.contact-list { list-style: none; display: grid; gap: 1.1rem; margin-top: 2rem; }
.contact-list li { display: grid; gap: .15rem; padding-bottom: 1.1rem; border-bottom: 1px solid var(--line); }
.contact-list li:last-child { border-bottom: none; }
.contact-list__lbl { font-size: .76rem; text-transform: uppercase; letter-spacing: .12em; color: var(--text-dim); font-weight: 600; }
.contact-list a, .contact-list span:not(.contact-list__lbl) { font-size: 1.02rem; color: var(--text); }
.contact-list a:hover { color: var(--cyan); }

/* ---------------- Formulario ---------------- */
.form { padding: 2rem 1.8rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); display: grid; gap: 1.1rem; }
.hp { position: absolute !important; left: -9999px; opacity: 0; }
.field { display: grid; gap: .4rem; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
.field label { font-size: .84rem; font-weight: 600; color: var(--text-muted); }
.field .opt { font-weight: 400; color: var(--text-dim); }
.field input, .field select, .field textarea {
  width: 100%; padding: .8rem .95rem;
  font: inherit; font-size: .93rem; color: var(--text);
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-sm);
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.field textarea { resize: vertical; min-height: 110px; }
.field input::placeholder, .field textarea::placeholder { color: var(--text-dim); }
.field select { appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236E8093' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right .8rem center; background-size: 18px; padding-right: 2.5rem;
}
.field select option { background: var(--bg-alt); color: var(--text); }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(0, 165, 219, .16);
}
.field input[aria-invalid="true"], .field select[aria-invalid="true"], .field textarea[aria-invalid="true"] {
  border-color: #FF6B6B; box-shadow: 0 0 0 3px rgba(255, 107, 107, .14);
}

.check { display: flex; gap: .7rem; align-items: flex-start; font-size: .84rem; color: var(--text-dim); cursor: pointer; }
.check input { width: 18px; height: 18px; margin-top: .15rem; accent-color: var(--cyan); flex-shrink: 0; cursor: pointer; }

.form__status { margin: 0; font-size: .89rem; text-align: center; min-height: 1.2em; }
.form__status.is-ok { color: #4ADE80; }
.form__status.is-err { color: #FF6B6B; }

/* ---------------- Footer ---------------- */
.footer { background: var(--bg-alt); border-top: 1px solid var(--line); padding-top: clamp(3rem, 6vw, 4.5rem); }
.footer__inner { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 2.5rem; padding-bottom: 3rem; }
.footer__brand img { height: 36px; width: auto; margin-bottom: 1.1rem; }
.footer__brand p { color: var(--text-dim); font-size: .9rem; max-width: 38ch; }
.footer h4 { font-size: .78rem; text-transform: uppercase; letter-spacing: .12em; color: var(--text); margin-bottom: 1.1rem; }
.footer__nav { display: flex; flex-direction: column; gap: .55rem; align-items: flex-start; }
.footer__nav a { color: var(--text-dim); font-size: .9rem; }
.footer__nav a:hover { color: var(--cyan); }
.footer__legal p { margin: 0 0 .45rem; color: var(--text-dim); font-size: .9rem; }
.footer__bottom {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem;
  /* El espacio inferior evita que el botón flotante de WhatsApp tape el enlace legal */
  padding: 1.4rem 0 4.5rem; border-top: 1px solid var(--line);
}
.footer__bottom p { margin: 0; font-size: .82rem; color: var(--text-dim); }
.footer__bottom a { color: var(--text-dim); }
.footer__bottom a:hover { color: var(--cyan); }

/* ---------------- WhatsApp flotante ---------------- */
.wa {
  position: fixed; right: 20px; bottom: 20px; z-index: 90;
  width: 56px; height: 56px; display: grid; place-items: center;
  background: #25D366; color: #fff; border-radius: 50%;
  box-shadow: 0 10px 28px rgba(37, 211, 102, .38);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.wa:hover { color: #fff; transform: scale(1.08); box-shadow: 0 14px 34px rgba(37, 211, 102, .5); }
.wa svg { width: 30px; height: 30px; }

/* ---------------- Animaciones de entrada ---------------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------------- Responsive ---------------- */
@media (max-width: 900px) {
  .split { grid-template-columns: 1fr; }
  .footer__inner { grid-template-columns: 1fr 1fr; }
  .footer__brand { grid-column: 1 / -1; }
}

@media (max-width: 760px) {
  .nav-toggle { display: flex; }
  .nav {
    position: fixed; inset: 72px 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 1rem var(--pad) 1.6rem;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 20px 40px rgba(0, 0, 0, .5);
    transform: translateY(-130%); transition: transform .35s var(--ease); visibility: hidden;
  }
  .nav.is-open { transform: none; visibility: visible; }
  .nav > a:not(.btn) { padding: .9rem 0; border-bottom: 1px solid var(--line); font-size: 1rem; }
  .nav > a:not(.btn)::after { display: none; }
  .nav .btn { margin-top: 1.1rem; }
  .hero__stats { gap: 1.6rem; }
  .hero__stats li { flex: 1 1 40%; }
  .field-row { grid-template-columns: 1fr; }
  .footer__inner { grid-template-columns: 1fr; gap: 2rem; }
  .wa { right: 16px; bottom: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
}
