/* ============================================================
   IT Encore — itencore.es
   Hoja de estilos principal
   ============================================================ */

:root {
  --navy: #0b2545;
  --navy-2: #13315c;
  --accent: #0f7bbf;
  --accent-2: #00a8e8;
  --ink: #1d2733;
  --muted: #5a6b7b;
  --bg: #ffffff;
  --bg-soft: #f4f7fa;
  --line: #e3e9ef;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(11, 37, 69, .08);
  --font: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--navy); }

.container { width: min(1160px, 92%); margin-inline: auto; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .container {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 72px; gap: 24px;
}
.brand img { height: 44px; width: auto; }

.main-nav { display: flex; align-items: center; gap: 28px; }
.main-nav a {
  color: var(--ink); font-weight: 500; font-size: .97rem;
  padding: 6px 2px; border-bottom: 2px solid transparent;
}
.main-nav a:hover, .main-nav a[aria-current="page"] {
  color: var(--accent); border-bottom-color: var(--accent-2);
}
.main-nav .btn { border-bottom: none; }

.nav-toggle {
  display: none; background: none; border: 0; cursor: pointer; padding: 8px;
}
.nav-toggle span {
  display: block; width: 24px; height: 2px; background: var(--navy);
  margin: 5px 0; transition: transform .25s ease, opacity .25s ease;
}

/* ---------- Botones ---------- */
.btn {
  display: inline-block; padding: 12px 26px; border-radius: 999px;
  font-weight: 600; font-size: .95rem; transition: all .2s ease;
  border: 2px solid transparent; cursor: pointer;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--navy); color: #fff; transform: translateY(-2px); }
.btn-outline { border-color: var(--navy); color: var(--navy); background: transparent; }
.btn-outline:hover { background: var(--navy); color: #fff; }
.btn-light { background: #fff; color: var(--navy); }
.btn-light:hover { background: var(--accent-2); color: #fff; }

/* ---------- Hero ---------- */
.hero {
  background:
    radial-gradient(1100px 500px at 85% -10%, rgba(0, 168, 232, .25), transparent 60%),
    linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 65%, #1b4a7a 100%);
  color: #fff;
  padding: 96px 0 104px;
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(700px 400px at 70% 30%, #000, transparent 75%);
}
.hero .container { position: relative; z-index: 1; }
.hero .kicker {
  display: inline-block; text-transform: uppercase; letter-spacing: .2em;
  font-size: .78rem; font-weight: 700; color: var(--accent-2); margin-bottom: 18px;
}
.hero h1 {
  font-size: clamp(2rem, 4.5vw, 3.3rem); line-height: 1.15;
  font-weight: 800; max-width: 20ch; margin-bottom: 22px;
}
.hero p.lead { font-size: 1.15rem; color: #d6e3f0; max-width: 56ch; margin-bottom: 34px; }
.hero .actions { display: flex; gap: 14px; flex-wrap: wrap; }

.hero.hero-sub { padding: 72px 0 80px; }
.hero.hero-sub h1 { max-width: 28ch; }

/* ---------- Secciones ---------- */
.section { padding: 84px 0; }
.section.alt { background: var(--bg-soft); }

.section-head { max-width: 720px; margin-bottom: 48px; }
.section-head .kicker {
  text-transform: uppercase; letter-spacing: .18em; font-size: .76rem;
  font-weight: 700; color: var(--accent); display: block; margin-bottom: 10px;
}
.section-head h2 {
  font-size: clamp(1.6rem, 3vw, 2.3rem); color: var(--navy);
  line-height: 1.2; margin-bottom: 14px; font-weight: 800;
}
.section-head p { color: var(--muted); font-size: 1.05rem; }
.section-head.center { margin-inline: auto; text-align: center; }

/* ---------- Tarjetas ---------- */
.grid { display: grid; gap: 26px; }
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid.cols-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px 26px; transition: transform .2s ease, box-shadow .2s ease;
}
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.card .icon {
  width: 52px; height: 52px; border-radius: 12px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff; margin-bottom: 18px;
}
.card .icon svg { width: 26px; height: 26px; }
.card .card-media {
  margin: -30px -26px 20px; border-radius: var(--radius) var(--radius) 0 0;
  overflow: hidden;
}
.card .card-media img { width: 100%; height: 185px; object-fit: cover; display: block; }
.card h3 { color: var(--navy); font-size: 1.12rem; margin-bottom: 10px; font-weight: 700; }
.card p { color: var(--muted); font-size: .95rem; }

/* ---------- Imágenes de sección ---------- */
.banner-img {
  border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); margin-bottom: 44px;
}
.banner-img img {
  width: 100%; height: clamp(220px, 32vw, 400px); object-fit: cover; display: block;
}
.side-img { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); margin-bottom: 20px; }
.side-img img { width: 100%; object-fit: cover; display: block; }
.cta-band .cta-media { flex: 0 0 auto; }
.cta-band .cta-media img {
  width: 250px; max-width: 100%; border-radius: 12px; display: block;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .3);
}

/* ---------- Enfoque numerado ---------- */
.steps { display: grid; grid-template-columns: repeat(2, 1fr); gap: 26px; }
.step {
  display: flex; gap: 20px; background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); padding: 26px;
}
.step .num {
  flex: 0 0 auto; width: 54px; height: 54px; border-radius: 50%;
  display: grid; place-items: center; font-size: 1.4rem; font-weight: 800;
  color: #fff; background: linear-gradient(135deg, var(--navy), var(--accent));
}
.step h3 { color: var(--navy); font-size: 1.08rem; margin-bottom: 6px; font-weight: 700; }
.step p { color: var(--muted); font-size: .95rem; }

/* ---------- Logos clientes ---------- */
.logo-wall {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px; align-items: center;
}
.logo-wall .logo-item {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; display: grid; place-items: center; min-height: 110px;
}
.logo-wall img {
  max-height: 60px; width: auto; filter: grayscale(1); opacity: .75;
  transition: filter .2s ease, opacity .2s ease;
}
.logo-wall .logo-item:hover img { filter: none; opacity: 1; }

/* ---------- Partners ---------- */
.partner {
  display: grid; grid-template-columns: 220px 1fr; gap: 34px; align-items: center;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 34px; margin-bottom: 26px;
}
.partner .partner-logo { display: grid; place-items: center; }
.partner .partner-logo img { max-height: 110px; width: auto; }
.partner h3 { color: var(--navy); margin-bottom: 8px; font-size: 1.15rem; }
.partner p { color: var(--muted); font-size: .96rem; }

/* ---------- CTA banda ---------- */
.cta-band {
  background: linear-gradient(120deg, var(--navy), var(--navy-2) 60%, #17538a);
  color: #fff; border-radius: 20px; padding: 56px 48px;
  display: flex; align-items: center; justify-content: space-between; gap: 30px;
  flex-wrap: wrap;
}
.cta-band h2 { font-size: clamp(1.4rem, 2.6vw, 2rem); font-weight: 800; max-width: 26ch; }
.cta-band p { color: #cfe0ef; max-width: 60ch; }

/* ---------- Timeline ---------- */
.timeline { position: relative; padding-left: 34px; }
.timeline::before {
  content: ""; position: absolute; left: 10px; top: 6px; bottom: 6px;
  width: 2px; background: linear-gradient(var(--accent-2), var(--navy));
}
.timeline .t-item { position: relative; padding-bottom: 30px; }
.timeline .t-item:last-child { padding-bottom: 0; }
.timeline .t-item::before {
  content: ""; position: absolute; left: -30px; top: 8px;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--accent-2); box-shadow: 0 0 0 4px rgba(0, 168, 232, .18);
}
.timeline .t-year { font-weight: 800; color: var(--navy); font-size: 1.05rem; }
.timeline p { color: var(--muted); font-size: .97rem; }

/* ---------- Dos columnas texto/imagen ---------- */
.split { display: grid; grid-template-columns: 1.1fr .9fr; gap: 54px; align-items: center; }
.split .media img { border-radius: var(--radius); box-shadow: var(--shadow); }
.split h2 { color: var(--navy); font-size: clamp(1.5rem, 2.8vw, 2.1rem); margin-bottom: 16px; font-weight: 800; }
.split p { color: var(--muted); margin-bottom: 14px; }

/* ---------- Contacto ---------- */
.contact-layout { display: grid; grid-template-columns: .9fr 1.1fr; gap: 48px; align-items: start; }
.info-block {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px; margin-bottom: 20px;
}
.info-block h3 { color: var(--navy); font-size: 1.05rem; margin-bottom: 10px; display: flex; align-items: center; gap: 10px; }
.info-block h3 svg { width: 20px; height: 20px; color: var(--accent); flex: 0 0 auto; }
.info-block p { color: var(--muted); font-size: .97rem; }

.map-embed {
  border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line);
  box-shadow: var(--shadow); line-height: 0;
}
.map-embed iframe { width: 100%; height: 340px; display: block; }

.contact-form {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 34px; box-shadow: var(--shadow);
}
.contact-form label { display: block; font-weight: 600; font-size: .92rem; color: var(--navy); margin-bottom: 6px; }
.contact-form .field { margin-bottom: 18px; }
.contact-form input, .contact-form textarea {
  width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px;
  font-family: inherit; font-size: .97rem; color: var(--ink); background: var(--bg-soft);
  transition: border-color .2s ease;
}
.contact-form input:focus, .contact-form textarea:focus {
  outline: none; border-color: var(--accent-2); background: #fff;
}
.contact-form textarea { min-height: 150px; resize: vertical; }
.form-note { font-size: .82rem; color: var(--muted); margin-top: 14px; }
.form-msg { padding: 14px 18px; border-radius: 10px; margin-bottom: 20px; font-size: .95rem; }
.form-msg.ok { background: #e7f6ec; color: #1c6b34; border: 1px solid #bfe5cb; }
.form-msg.error { background: #fdecea; color: #a33025; border: 1px solid #f5c6c0; }
.hp-field { position: absolute; left: -9999px; opacity: 0; height: 0; overflow: hidden; }

/* ---------- Página legal ---------- */
.legal-content h2 { color: var(--navy); font-size: 1.35rem; margin: 38px 0 14px; font-weight: 800; }
.legal-content h2:first-child { margin-top: 0; }
.legal-content p { color: #3d4b59; margin-bottom: 14px; font-size: .98rem; }
.legal-content .company-data {
  margin-top: 42px; background: var(--bg-soft); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 24px; font-size: .95rem; color: var(--muted);
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--navy); color: #b9c9d9; padding: 56px 0 28px; margin-top: 0;
}
.site-footer .footer-grid {
  display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 40px; margin-bottom: 40px;
}
.site-footer .footer-logo {
  background: #fff; border-radius: 10px; padding: 10px 16px; display: inline-block; margin-bottom: 16px;
}
.site-footer .footer-logo img { height: 40px; width: auto; }
.site-footer h4 {
  color: #fff; font-size: .95rem; text-transform: uppercase; letter-spacing: .12em;
  margin-bottom: 16px;
}
.site-footer ul { list-style: none; }
.site-footer li { margin-bottom: 10px; font-size: .93rem; }
.site-footer a { color: #b9c9d9; }
.site-footer a:hover { color: var(--accent-2); }
.site-footer .copyright {
  border-top: 1px solid rgba(255, 255, 255, .12); padding-top: 24px;
  font-size: .86rem; text-align: center; color: #8fa3b6;
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .grid.cols-3, .grid.cols-4 { grid-template-columns: repeat(2, 1fr); }
  .split, .contact-layout { grid-template-columns: 1fr; }
  .partner { grid-template-columns: 1fr; text-align: center; }
  .partner .partner-logo { margin-inline: auto; }
  .site-footer .footer-grid { grid-template-columns: 1fr 1fr; }
  .logo-wall { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 720px) {
  .nav-toggle { display: block; }
  .main-nav {
    position: absolute; top: 100%; left: 0; right: 0;
    background: #fff; border-bottom: 1px solid var(--line);
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 12px 4%; display: none;
  }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 13px 8px; border-bottom: 1px solid var(--line); }
  .main-nav a:last-child { border-bottom: none; }
  .grid.cols-2, .grid.cols-3, .grid.cols-4, .steps { grid-template-columns: 1fr; }
  .logo-wall { grid-template-columns: repeat(2, 1fr); }
  .hero { padding: 64px 0 72px; }
  .cta-band { padding: 40px 28px; }
  .site-footer .footer-grid { grid-template-columns: 1fr; }
}
