/* =========================================================
   iProtection Asesores — estilos
   Colores tomados del logo y del brochure 2025
   ========================================================= */

:root {
  --navy: #111e4a;        /* letras del logo */
  --blue: #174f90;        /* isotipo */
  --blue-soft: #426daa;   /* isotipo, curva clara */
  --deep: #0f2c4f;        /* franjas oscuras del brochure */
  --accent: #e6325a;      /* línea rosa del brochure */
  --teal: #2f7f9b;        /* círculos de íconos del brochure */
  --ink: #1d2433;
  --muted: #5a6478;
  --line: #dfe5ee;
  --bg-soft: #f3f6fb;
  --white: #fff;

  --radius: 14px;
  --shadow: 0 10px 30px rgba(17, 30, 74, .08);
  --container: 1180px;
  --header-h: 76px;

  --font-head: "Outfit", system-ui, sans-serif;
  --font-body: "Figtree", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); }
h1, h2, h3, h4 { font-family: var(--font-head); color: var(--navy); line-height: 1.15; margin: 0 0 .5em; }
p { margin: 0 0 1em; }

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

.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 100;
  background: var(--navy); color: #fff; padding: .6rem 1rem;
}
.skip-link:focus { left: 1rem; top: 1rem; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: .5rem; padding: .9rem 1.6rem;
  font-family: var(--font-head); font-weight: 600; font-size: 1rem;
  color: #fff; background: var(--blue);
  border: 2px solid var(--blue); border-radius: 999px;
  text-decoration: none; cursor: pointer;
  transition: background .2s, border-color .2s, transform .2s;
}
.btn:hover { background: var(--navy); border-color: var(--navy); transform: translateY(-1px); }
.btn-ghost { background: transparent; border-color: rgba(255,255,255,.7); }
.btn-ghost:hover { background: #fff; color: var(--navy); border-color: #fff; }
.btn-sm { padding: .55rem 1.2rem; font-size: .95rem; }
.btn-block { width: 100%; }

/* ---------- Encabezado ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s, box-shadow .2s;
}
.site-header.scrolled { border-color: var(--line); box-shadow: 0 4px 18px rgba(17,30,74,.06); }
.header-inner { height: var(--header-h); display: flex; align-items: center; justify-content: space-between; }

.brand { display: flex; align-items: center; gap: .65rem; text-decoration: none; }
.brand img { width: 34px; height: auto; }
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-name { font-family: var(--font-head); font-weight: 800; font-size: 1.5rem; color: var(--navy); letter-spacing: -.01em; }
.brand-tag { font-family: var(--font-head); font-size: .72rem; letter-spacing: .28em; text-transform: uppercase; color: var(--blue-soft); margin-top: .2rem; }

.site-nav { display: flex; align-items: center; gap: 2rem; }
.site-nav a:not(.btn) {
  font-family: var(--font-head); font-weight: 500; color: var(--navy);
  text-decoration: none; position: relative;
}
.site-nav a:not(.btn)::after {
  content: ""; position: absolute; left: 0; bottom: -6px; width: 0; height: 2px;
  background: var(--accent); transition: width .25s;
}
.site-nav a:not(.btn):hover::after,
.site-nav a.active::after { width: 100%; }

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

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  color: #fff; background: var(--deep);
  padding: clamp(5rem, 12vw, 9rem) 0 clamp(6rem, 12vw, 10rem);
}
.hero-bg {
  position: absolute; inset: 0;
  background:
    linear-gradient(100deg, rgba(15,44,79,.97) 0%, rgba(15,44,79,.88) 45%, rgba(23,79,144,.35) 100%),
    url("../assets/img/hero.jpg") right center / cover no-repeat;
}
.hero-bg::after {               /* diagonal del brochure */
  content: ""; position: absolute; top: -10%; bottom: -10%; right: 32%;
  width: 3px; background: var(--accent); transform: rotate(18deg); opacity: .85;
}
.hero-inner { position: relative; max-width: 760px; margin-left: max(1.25rem, calc((100% - var(--container)) / 2)); }
.hero h1 { color: #fff; font-size: clamp(2.3rem, 5vw, 3.7rem); font-weight: 700; letter-spacing: -.02em; }
.hero .lead { font-size: clamp(1.05rem, 1.6vw, 1.25rem); color: rgba(255,255,255,.85); max-width: 600px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 2rem; }
.hero .btn:not(.btn-ghost) { background: var(--accent); border-color: var(--accent); }
.hero .btn:not(.btn-ghost):hover { background: #c92349; border-color: #c92349; }

.eyebrow {
  font-family: var(--font-head); font-weight: 600; font-size: .85rem;
  letter-spacing: .18em; text-transform: uppercase; color: var(--accent);
  margin-bottom: 1rem; display: flex; align-items: center; gap: .75rem;
}
.eyebrow::before { content: ""; width: 28px; height: 2px; background: currentColor; }
.hero .eyebrow { color: #ff8aa5; }
.eyebrow-light { color: #ff8aa5; }

/* ---------- Pilares ---------- */
.pillars { margin-top: -4rem; position: relative; z-index: 2; }
.pillars-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow);
  overflow: hidden;
}
.pillar { padding: 2.25rem 2rem; border-right: 1px solid var(--line); }
.pillar:last-child { border-right: 0; }
.pillar h2 { font-size: 1.35rem; text-transform: uppercase; letter-spacing: .04em; margin-top: 1rem; }
.pillar p { color: var(--muted); margin: 0; }
.pillar-icon {
  display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%;
  background: var(--teal);
}
.pillar-icon svg { width: 28px; height: 28px; fill: none; stroke: #fff; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Secciones ---------- */
.section { padding: clamp(4.5rem, 9vw, 7rem) 0; }
.section-title { font-size: clamp(2rem, 3.6vw, 2.8rem); font-weight: 700; letter-spacing: -.015em; }
.section-intro { font-size: 1.15rem; color: var(--muted); max-width: 720px; }

/* ---------- Nosotros ---------- */
.about-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(2.5rem, 6vw, 5rem); align-items: center; }
.about-media { position: relative; }
.about-media img { border-radius: var(--radius); aspect-ratio: 4 / 5; object-fit: cover; width: 100%; }
.about-badge {
  position: absolute; right: -1.5rem; bottom: 2rem;
  background: var(--navy); color: #fff; padding: 1.25rem 1.5rem; border-radius: var(--radius);
  box-shadow: var(--shadow); display: flex; flex-direction: column; border-left: 4px solid var(--accent);
}
.about-badge strong { font-family: var(--font-head); font-size: 2.6rem; line-height: 1; }
.about-badge span { font-size: .9rem; color: rgba(255,255,255,.8); }
.about-copy > p { color: var(--muted); }
.about-copy strong { color: var(--navy); }

.value-list { list-style: none; padding: 0; margin: 1.75rem 0 0; display: grid; gap: .9rem; }
.value-list li { position: relative; padding-left: 2rem; font-weight: 500; }
.value-list li::before {
  content: ""; position: absolute; left: 0; top: .35em; width: 14px; height: 14px;
  background: var(--blue); clip-path: polygon(0 0, 100% 50%, 0 100%, 35% 50%);
}

.mv-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; margin-top: clamp(3.5rem, 7vw, 5rem); }
.mv-card { background: var(--bg-soft); border-radius: var(--radius); padding: 2rem 2.25rem; border-top: 4px solid var(--blue); }
.mv-card h3 { font-size: 1.4rem; }
.mv-card p { color: var(--muted); margin: 0; }

/* ---------- Servicios ---------- */
.services { background: var(--bg-soft); padding-bottom: 0; }
.service-tabs { display: flex; flex-wrap: wrap; gap: .6rem; margin: 2rem 0 3rem; }
.service-tabs a {
  font-family: var(--font-head); font-weight: 500; font-size: .95rem;
  padding: .55rem 1.1rem; border-radius: 999px; text-decoration: none;
  color: var(--navy); background: #fff; border: 1px solid var(--line);
  transition: background .2s, color .2s, border-color .2s;
}
.service-tabs a:hover { background: var(--navy); color: #fff; border-color: var(--navy); }

.service { padding: clamp(3rem, 6vw, 4.5rem) 0; background: #fff; }
.service-alt { background: var(--bg-soft); }
.service-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: start; }
.service-alt .service-grid { grid-template-columns: 1.1fr .9fr; }
.service-alt .service-media { order: 2; }
.service-media img { border-radius: var(--radius); width: 100%; aspect-ratio: 4 / 3; object-fit: cover; box-shadow: var(--shadow); }
.service-num { font-family: var(--font-head); font-weight: 700; color: var(--accent); letter-spacing: .1em; }
.service h3 { font-size: clamp(1.7rem, 3vw, 2.2rem); margin-top: .25rem; }
.service-lead { color: var(--muted); font-size: 1.08rem; }

.pi-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem 2rem; margin-top: 1.25rem; }
.pi-grid h4 { font-size: 1.05rem; text-transform: uppercase; letter-spacing: .06em; color: var(--blue); }
.pi-grid p { color: var(--muted); font-size: .98rem; margin: 0; }
.pi-grid strong, .check-list strong { color: var(--navy); }

.check-list { list-style: none; padding: 0; margin: 1rem 0 0; display: grid; gap: .8rem; }
.check-list.two-col { grid-template-columns: 1fr 1fr; gap: .8rem 1.75rem; }
.check-list li { position: relative; padding-left: 1.9rem; color: var(--muted); }
.check-list li::before {
  content: ""; position: absolute; left: 0; top: .3em; width: 18px; height: 18px; border-radius: 50%;
  background: var(--blue) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12l4 4 8-8'/%3E%3C/svg%3E") center / 12px no-repeat;
}

/* ---------- iP design ---------- */
.ipdesign { background: var(--navy); color: rgba(255,255,255,.85); position: relative; overflow: hidden; }
.ipdesign::before {
  content: ""; position: absolute; top: 0; left: 0; width: 46%; height: 6px; background: var(--accent);
}
.ipdesign .section-title, .ipdesign h3 { color: #fff; }
.ipdesign .section-intro { color: rgba(255,255,255,.75); }
.ipdesign-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.ipdesign-items { display: grid; gap: 1.5rem; margin-top: 2rem; }
.ipdesign-items > div { padding-left: 1.25rem; border-left: 3px solid var(--accent); }
.ipdesign-items h3 { font-size: 1.2rem; margin-bottom: .3rem; }
.ipdesign-items p { margin: 0; }
.ipdesign-media img { border-radius: var(--radius); aspect-ratio: 4 / 5; object-fit: cover; width: 100%; }

/* ---------- Contacto ---------- */
.contact-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(2.5rem, 6vw, 5rem); align-items: start; }
.contact-info > p { color: var(--muted); }
.contact-list { list-style: none; padding: 0; margin: 2rem 0 0; display: grid; gap: 1.25rem; }
.contact-list li { display: grid; gap: .15rem; }
.ci-label { font-family: var(--font-head); font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); font-weight: 600; }
.contact-list a { color: var(--navy); font-weight: 500; text-decoration: none; }
.contact-list a:hover { color: var(--blue); text-decoration: underline; }

.contact-form {
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow);
  padding: clamp(1.75rem, 4vw, 2.5rem); display: grid; gap: 1.1rem; border: 1px solid var(--line);
}
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.contact-form label { display: grid; gap: .4rem; font-weight: 600; font-size: .92rem; color: var(--navy); }
.contact-form input:not([type="checkbox"]), .contact-form select, .contact-form textarea {
  font: inherit; font-weight: 400; color: var(--ink);
  padding: .8rem 1rem; border: 1px solid var(--line); border-radius: 10px; background: var(--bg-soft);
  transition: border-color .2s, background .2s;
}
.contact-form input:focus, .contact-form select:focus, .contact-form textarea:focus {
  outline: none; border-color: var(--blue); background: #fff;
}
.contact-form .check { display: flex; gap: .6rem; align-items: flex-start; font-weight: 400; color: var(--muted); }
.contact-form .check input { margin-top: .3rem; accent-color: var(--blue); }
.form-status { margin: 0; font-size: .95rem; min-height: 1.4em; }
.form-status.ok { color: #1f7a4d; }
.form-status.err { color: #c92349; }

/* ---------- Pie ---------- */
.site-footer { background: var(--deep); color: rgba(255,255,255,.7); padding: 2.5rem 0; font-size: .95rem; }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.25rem; }
.footer-brand { display: flex; align-items: center; gap: .6rem; font-family: var(--font-head); font-weight: 600; color: #fff; }
.footer-brand img { filter: brightness(0) invert(1); width: 24px; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 1.5rem; }
.footer-nav a { color: rgba(255,255,255,.8); text-decoration: none; }
.footer-nav a:hover { color: #fff; }
.footer-copy { margin: 0; width: 100%; font-size: .85rem; color: rgba(255,255,255,.5); }

/* ---------- WhatsApp flotante ---------- */
.wa-float {
  position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 40;
  width: 56px; height: 56px; border-radius: 50%; background: #25d366;
  display: grid; place-items: center; box-shadow: 0 8px 20px rgba(0,0,0,.2);
  transition: transform .2s;
}
.wa-float:hover { transform: scale(1.07); }
.wa-float svg { width: 30px; height: 30px; fill: #fff; }

/* ---------- Página legal ---------- */
.legal { padding: clamp(3.5rem, 8vw, 5.5rem) 0; }
.legal .container { max-width: 820px; }
.legal h1 { font-size: clamp(2rem, 4vw, 2.6rem); }
.legal h2 { font-size: 1.3rem; margin-top: 2rem; }
.legal p, .legal li { color: var(--muted); }
.legal-date { font-size: .9rem; color: var(--muted); margin-bottom: 1.5rem; }
.legal ul { padding-left: 1.25rem; display: grid; gap: .5rem; margin: 0 0 1em; }
.legal strong { color: var(--navy); }
.notice { background: #fff4f6; border-left: 4px solid var(--accent); padding: 1rem 1.25rem; border-radius: 8px; color: var(--ink); }

/* ---------- Animación de entrada ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .about-grid, .service-grid, .service-alt .service-grid, .ipdesign-grid, .contact-grid { grid-template-columns: 1fr; }
  .service-alt .service-media { order: 0; }
  .about-media img { aspect-ratio: 16 / 10; }
  .about-badge { right: 1rem; bottom: 1rem; }
  .ipdesign-media img { aspect-ratio: 16 / 10; }
  .hero-bg::after { display: none; }
}

@media (max-width: 820px) {
  .nav-toggle { display: block; }
  .site-nav {
    position: absolute; top: var(--header-h); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: #fff; border-bottom: 1px solid var(--line); box-shadow: 0 12px 24px rgba(17,30,74,.08);
    padding: .5rem 1.25rem 1.25rem;
    display: none;
  }
  .site-nav.open { display: flex; }
  .site-nav a:not(.btn) { padding: .9rem 0; border-bottom: 1px solid var(--line); }
  .site-nav a:not(.btn)::after { display: none; }
  .site-nav .btn { margin-top: 1rem; }
  .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); }

  .pillars-grid { grid-template-columns: 1fr; }
  .pillar { border-right: 0; border-bottom: 1px solid var(--line); }
  .pillar:last-child { border-bottom: 0; }
  .mv-grid, .pi-grid, .check-list.two-col, .field-row { grid-template-columns: 1fr; }
}
