/* ==========================================================================
   Berganti SGA — hoja de estilos (identidad v2)
   ========================================================================== */

:root {
  /* Paleta de marca */
  --pizarra: #1F2A33;
  --pizarra-900: #151D24;
  --pizarra-700: #2B3945;
  --teal: #2F8F83;
  --teal-600: #267A70;
  --teal-claro: #4FB3A5;
  --teal-50: #E3F1EE;
  --niebla: #F1F1F0;
  --linea: #E2E4E3;
  --tinta: #1F2A33;
  --gris: #5B6770;

  --font: "Outfit", system-ui, -apple-system, "Segoe UI", sans-serif;

  --wrap: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
  --radius: 10px;
  --radius-lg: 20px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  margin: 0;
  background: var(--niebla);
  color: var(--tinta);
  font: 400 17px/1.65 var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { font-weight: 600; line-height: 1.1; margin: 0; letter-spacing: -.02em; }
h1 { font-size: clamp(2.6rem, 6vw, 4.4rem); font-weight: 700; letter-spacing: -.03em; }
h2 { font-size: clamp(2rem, 4vw, 2.9rem); }
h3 { font-size: 1.3rem; letter-spacing: -.01em; }
h1 em, h2 em { font-style: normal; color: var(--teal); }
p { margin: 0; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

.skip { position: absolute; left: -9999px; top: 8px; background: var(--pizarra); color: #fff; padding: 8px 14px; z-index: 100; }
.skip:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; }

/* Etiqueta con tejado */
.eyebrow {
  display: inline-flex; align-items: center; gap: 12px;
  font-size: .8rem; font-weight: 500; letter-spacing: .28em; text-transform: uppercase;
  color: var(--teal); margin-bottom: 20px;
}
.eyebrow::before {
  content: ""; width: 10px; height: 10px; margin-top: 6px;
  border-top: 2px solid currentColor; border-left: 2px solid currentColor;
  border-radius: 2px 0 0 0; transform: rotate(45deg);
}

/* Botones y enlaces */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 16px 28px; border: 0; border-radius: var(--radius); cursor: pointer;
  background: var(--pizarra); color: #fff;
  font: 500 1rem/1 var(--font); letter-spacing: .01em; text-decoration: none;
  transition: background .25s var(--ease), transform .25s var(--ease);
}
.btn:hover { background: var(--teal); transform: translateY(-1px); }
.btn-sm { padding: 12px 20px; font-size: .92rem; }
.btn-light { background: #fff; color: var(--pizarra); }
.btn-light:hover { background: var(--teal-claro); color: var(--pizarra-900); }

.link-arrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 500; text-decoration: none; color: var(--pizarra);
  border-bottom: 2px solid var(--teal); padding-bottom: 4px;
}
.link-arrow svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .25s var(--ease); }
.link-arrow:hover svg { transform: translateX(4px); }

/* Cabecera */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(241, 241, 240, .86);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s;
}
.site-header.scrolled { border-bottom-color: var(--linea); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 80px; }
.brand img { width: 200px; height: auto; }
.nav { display: flex; align-items: center; gap: 34px; }
.nav a:not(.btn) { text-decoration: none; font-weight: 400; font-size: 1rem; position: relative; }
.nav a:not(.btn)::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 2px; border-radius: 2px;
  background: var(--teal); transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease);
}
.nav a:not(.btn):hover::after { transform: scaleX(1); }
.nav-toggle { display: none; }

/* Hero */
.hero { padding: clamp(40px, 7vw, 96px) 0 clamp(56px, 8vw, 110px); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: clamp(40px, 6vw, 88px); align-items: center; }
.hero h1 { margin-bottom: 28px; }
.lead { font-size: 1.2rem; font-weight: 300; color: var(--gris); max-width: 32em; }
.hero-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 28px; margin: 40px 0 44px; }
.hero-points { list-style: none; margin: 0; padding: 26px 0 0; border-top: 1px solid var(--linea); display: flex; flex-wrap: wrap; gap: 12px 32px; font-size: .95rem; }
.hero-points li { display: flex; align-items: center; gap: 10px; }
.hero-points li::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--teal); }

.hero-visual { margin: 0; position: relative; }
.frame {
  aspect-ratio: 4 / 5; border-radius: var(--radius-lg); overflow: hidden;
  background: linear-gradient(160deg, var(--pizarra-700), var(--pizarra) 55%, var(--pizarra-900));
  color: rgba(255, 255, 255, .78);
}
.facade { width: 100%; height: 100%; }
.facade .acc { color: var(--teal-claro); }
.hero-badge {
  position: absolute; left: -32px; bottom: 36px;
  display: flex; align-items: center; gap: 14px;
  background: #fff; padding: 14px 22px 14px 14px; border-radius: var(--radius);
  box-shadow: 0 20px 50px -20px rgba(21, 29, 36, .35);
  font-size: .9rem; color: var(--gris);
}
.hero-badge img { width: 44px; height: 44px; }
.hero-badge strong { display: block; color: var(--tinta); font-weight: 600; }

/* Franja */
.band { background: var(--pizarra); color: #fff; overflow: hidden; padding: 22px 0; }
.band-track { display: flex; align-items: center; gap: 36px; width: max-content; animation: scroll 40s linear infinite; }
.band span { font-size: 1.3rem; font-weight: 300; white-space: nowrap; letter-spacing: .01em; }
.band i { width: 10px; height: 10px; margin-top: 6px; border-top: 2px solid var(--teal-claro); border-left: 2px solid var(--teal-claro); transform: rotate(45deg); }
@keyframes scroll { to { transform: translateX(-50%); } }

/* Secciones */
.section { padding: clamp(72px, 10vw, 128px) 0; }
.section-soft { background: #fff; }
.section-dark { background: var(--pizarra); color: #fff; }
.section-dark .eyebrow { color: var(--teal-claro); }
.section-head { max-width: 720px; margin-bottom: clamp(44px, 6vw, 72px); }
.section-head h2 { margin-bottom: 20px; }
.section-head > p:last-child { color: var(--gris); font-size: 1.1rem; font-weight: 300; }
.section-dark .section-head > p:last-child { color: rgba(255, 255, 255, .7); }

/* Servicios */
.services { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.service {
  background: #fff; padding: 36px 32px 40px; border-radius: var(--radius-lg); border: 1px solid var(--linea);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s;
}
.service:hover { transform: translateY(-4px); border-color: transparent; box-shadow: 0 24px 50px -28px rgba(21, 29, 36, .35); }
.service .icon {
  width: 56px; height: 56px; padding: 12px; border-radius: 14px; background: var(--teal-50);
  fill: none; stroke: var(--teal); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 26px;
}
.service h3 { margin-bottom: 10px; }
.service p { color: var(--gris); margin-bottom: 20px; font-weight: 300; }
.service ul { list-style: none; margin: 0; padding: 18px 0 0; border-top: 1px solid var(--linea); font-size: .95rem; }
.service li { padding: 5px 0 5px 22px; position: relative; }
.service li::before {
  content: ""; position: absolute; left: 2px; top: 15px; width: 6px; height: 6px;
  border-top: 1.5px solid var(--teal); border-left: 1.5px solid var(--teal); transform: rotate(45deg);
}

/* Método */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px; }
.steps li { border-top: 2px solid rgba(255, 255, 255, .14); padding-top: 28px; position: relative; }
.steps li::before { content: ""; position: absolute; top: -2px; left: 0; width: 48px; height: 2px; background: var(--teal-claro); }
.step-n { font-size: 3rem; font-weight: 200; color: var(--teal-claro); line-height: 1; display: block; margin-bottom: 22px; }
.steps h3 { margin-bottom: 10px; }
.steps p { color: rgba(255, 255, 255, .7); font-size: .98rem; font-weight: 300; }

/* Para quién */
.audience { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.aud { background: #fff; border: 1px solid var(--linea); border-radius: var(--radius-lg); padding: 32px; }
.aud-icon { width: 64px; height: 64px; margin-bottom: 28px; fill: none; stroke: var(--pizarra); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.aud-icon .acc { stroke: var(--teal); }
.aud h3 { margin-bottom: 10px; }
.aud p { color: var(--gris); font-weight: 300; }

/* Nosotros */
.about { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(40px, 7vw, 96px); align-items: start; }
.about-copy h2 { margin-bottom: 24px; }
.about-copy p:not(.eyebrow) { color: var(--gris); font-size: 1.1rem; font-weight: 300; margin-bottom: 32px; }
.values { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 40px 32px; }
.values li { padding-left: 22px; border-left: 2px solid var(--teal); }
.values h3 { font-size: 1.15rem; margin-bottom: 8px; }
.values p { color: var(--gris); font-size: .97rem; font-weight: 300; }

/* CTA */
.cta { background: var(--pizarra-900); color: #fff; padding: clamp(72px, 9vw, 112px) 0; text-align: center; }
.cta-inner { display: flex; flex-direction: column; align-items: center; gap: 18px; }
.cta img { width: 72px; height: 72px; }
.cta h2 { max-width: 18em; }
.cta p { color: rgba(255, 255, 255, .7); font-weight: 300; margin-bottom: 12px; }

/* Contacto */
.contact { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(40px, 7vw, 96px); }
.contact-copy h2 { margin-bottom: 20px; }
.contact-copy > p:not(.eyebrow) { color: var(--gris); font-weight: 300; margin-bottom: 40px; }
.contact-data { margin: 0; display: grid; gap: 22px; }
.contact-data dt { font-size: .75rem; font-weight: 500; letter-spacing: .24em; text-transform: uppercase; color: var(--teal); margin-bottom: 2px; }
.contact-data dd { margin: 0; font-size: 1.3rem; font-weight: 500; }
.contact-data a { text-decoration: none; }
.contact-data a:hover { color: var(--teal); }

.form { background: #fff; padding: clamp(28px, 4vw, 48px); border-radius: var(--radius-lg); border: 1px solid var(--linea); display: grid; gap: 20px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.field { display: grid; gap: 8px; }
.field label { font-size: .88rem; font-weight: 500; }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; font-size: 1rem; color: var(--tinta);
  background: var(--niebla); border: 1px solid transparent; border-radius: var(--radius);
  padding: 12px 14px; transition: border-color .2s, background .2s;
}
.field select { appearance: none; background: var(--niebla) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%232F8F83' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E") right 14px center no-repeat; padding-right: 36px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--teal); background-color: #fff; }
.field textarea { resize: vertical; }
.field .invalid, .field input:user-invalid { border-color: #C0492F; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .9rem; color: var(--gris); }
.check input { margin-top: 5px; accent-color: var(--teal); }
.form .btn { justify-self: start; }
.form-msg { font-size: .95rem; color: var(--teal-600); min-height: 1.4em; }
.form-msg.error { color: #C0492F; }

/* Pie */
.site-footer { background: var(--pizarra); color: rgba(255, 255, 255, .7); padding: 80px 0 32px; font-size: .95rem; font-weight: 300; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; padding-bottom: 56px; border-bottom: 1px solid rgba(255, 255, 255, .12); }
.footer-grid img { width: 220px; height: auto; margin-bottom: 22px; }
.footer-claim { line-height: 1.7; }
.footer-grid nav { display: flex; flex-direction: column; gap: 10px; }
.footer-grid h4 { margin: 0 0 8px; color: var(--teal-claro); font-size: .75rem; font-weight: 500; letter-spacing: .24em; text-transform: uppercase; }
.footer-grid a { text-decoration: none; }
.footer-grid a:hover { color: #fff; }
.footer-bottom { padding-top: 28px; font-size: .85rem; }

.footer-contact { font-style: normal; line-height: 1.8; }
.footer-contact a { text-decoration: none; }
.footer-contact a:hover { color: #fff; }
.nav a[aria-current="page"]::after { transform: scaleX(1); }

/* ── Página de servicios ─────────────────────────────────────────────── */
.page-hero { padding: clamp(48px, 7vw, 96px) 0 clamp(48px, 6vw, 80px); }
.page-hero-copy { max-width: 820px; }
.page-hero h1 { margin-bottom: 24px; }
.svc-index { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; margin-top: clamp(40px, 5vw, 64px); }
.svc-index a {
  display: flex; flex-direction: column; gap: 14px; padding: 20px 18px;
  background: #fff; border: 1px solid var(--linea); border-radius: var(--radius-lg);
  text-decoration: none; font-weight: 500; line-height: 1.25;
  transition: border-color .25s, transform .25s var(--ease);
}
.svc-index a:hover { border-color: var(--teal); transform: translateY(-3px); }
.svc-index svg { width: 30px; height: 30px; fill: none; stroke: var(--teal); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.svc { padding: clamp(64px, 8vw, 110px) 0; border-top: 1px solid var(--linea); }
.svc-alt { background: #fff; }
.svc-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(36px, 6vw, 88px); align-items: start; }
.svc-main { position: relative; }
.svc-n { position: absolute; right: 0; top: -12px; font-size: clamp(4rem, 8vw, 6.5rem); font-weight: 200; line-height: 1; color: var(--teal); opacity: .22; }
.svc-icon {
  width: 60px; height: 60px; padding: 13px; border-radius: 16px; background: var(--teal-50); margin-bottom: 26px;
  fill: none; stroke: var(--teal); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
.svc h2 { margin-bottom: 18px; }
.svc-lead { font-size: 1.15rem; font-weight: 300; color: var(--gris); margin-bottom: 24px; }
.svc-ideal { padding: 16px 20px; border-left: 2px solid var(--teal); background: rgba(47, 143, 131, .06); border-radius: 0 var(--radius) var(--radius) 0; font-weight: 300; margin-bottom: 30px; }
.svc-ideal strong { font-weight: 600; }
.svc-card { background: var(--niebla); border-radius: var(--radius-lg); padding: clamp(28px, 4vw, 44px); }
.svc-alt .svc-card { background: var(--niebla); }
.svc:not(.svc-alt) .svc-card { background: #fff; border: 1px solid var(--linea); }
.svc-card h3 { font-size: .8rem; font-weight: 500; letter-spacing: .28em; text-transform: uppercase; color: var(--teal); margin-bottom: 20px; }
.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.checks li { display: flex; gap: 14px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid var(--linea); }
.checks li:last-child { border-bottom: 0; }
.checks svg { flex: none; width: 22px; height: 22px; margin-top: 2px; padding: 3px; border-radius: 50%; background: var(--teal); fill: none; stroke: #fff; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }

.integral { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(36px, 6vw, 88px); align-items: center; }
.integral h2 { margin-bottom: 20px; }
.integral-lead { color: rgba(255, 255, 255, .72); font-size: 1.12rem; font-weight: 300; }
.integral-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.integral-list li { background: var(--pizarra-700); border-radius: var(--radius-lg); padding: 24px; display: grid; gap: 6px; }
.integral-list strong { font-weight: 600; font-size: 1.05rem; }
.integral-list span { color: rgba(255, 255, 255, .7); font-weight: 300; font-size: .95rem; }

.faq-grid { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(36px, 6vw, 88px); align-items: start; }
.faq-grid .section-head a { color: var(--teal); font-weight: 500; }
.faq details { border-bottom: 1px solid var(--linea); }
.faq details:first-child { border-top: 1px solid var(--linea); }
.faq summary {
  list-style: none; cursor: pointer; padding: 22px 44px 22px 0; position: relative;
  font-size: 1.12rem; font-weight: 500;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 8px; top: 30px; width: 10px; height: 10px;
  border-right: 2px solid var(--teal); border-bottom: 2px solid var(--teal); transform: rotate(45deg); transition: transform .25s var(--ease);
}
.faq details[open] summary::after { transform: translateY(4px) rotate(-135deg); }
.faq details p { color: var(--gris); font-weight: 300; padding: 0 44px 24px 0; }

.contact-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 48px; }
.contact-card {
  display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 30px 20px;
  background: var(--pizarra); border: 1px solid rgba(255, 255, 255, .08); border-radius: var(--radius-lg);
  text-decoration: none; transition: border-color .25s, transform .25s var(--ease);
}
.contact-card:hover { border-color: var(--teal-claro); transform: translateY(-3px); }
.contact-card svg { width: 30px; height: 30px; margin-bottom: 10px; fill: none; stroke: var(--teal-claro); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.cc-label { font-size: .75rem; font-weight: 500; letter-spacing: .24em; text-transform: uppercase; color: rgba(255, 255, 255, .55); }
.cc-value { font-size: 1.15rem; font-weight: 500; overflow-wrap: anywhere; }
.cta-form { margin-top: 40px; }

@media (max-width: 1024px) {
  .svc-index { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .svc-grid, .integral, .faq-grid { grid-template-columns: minmax(0, 1fr); }
  .contact-cards { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
  .svc-index { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .integral-list { grid-template-columns: minmax(0, 1fr); }
}

/* Animación de entrada */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .band-track { animation: none; }
}

/* Responsive */
@media (max-width: 1024px) {
  .services { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px 28px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
  .nav-toggle {
    display: grid; gap: 7px; place-content: center; width: 44px; height: 44px;
    background: none; border: 0; cursor: pointer; padding: 0;
  }
  .nav-toggle span { width: 24px; height: 2px; border-radius: 2px; background: var(--pizarra); transition: transform .3s var(--ease); }
  .nav-toggle[aria-expanded="true"] span:first-child { transform: translateY(4.5px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:last-child { transform: translateY(-4.5px) rotate(-45deg); }
  .nav {
    position: fixed; inset: 80px 0 auto 0; flex-direction: column; align-items: stretch; gap: 0;
    background: var(--niebla); padding: 8px var(--gutter) 28px; border-bottom: 1px solid var(--linea);
    transform: translateY(-12px); opacity: 0; visibility: hidden; transition: all .3s var(--ease);
  }
  .nav.open { transform: none; opacity: 1; visibility: visible; }
  .nav a:not(.btn) { padding: 16px 0; border-bottom: 1px solid var(--linea); font-size: 1.1rem; }
  .nav a:not(.btn)::after { display: none; }
  .nav .btn { margin-top: 20px; }

  .hero-grid, .about, .contact { grid-template-columns: minmax(0, 1fr); }
  .hero-visual { max-width: 440px; width: 100%; margin: 0 auto; }
  .hero-badge { left: 16px; bottom: 20px; }
  .audience { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 600px) {
  body { font-size: 16px; }
  .header-inner { height: 68px; }
  .nav { inset: 68px 0 auto 0; }
  .brand img { width: 170px; }
  .services, .steps, .values, .field-row { grid-template-columns: minmax(0, 1fr); }
  .service { padding: 30px 24px; }
  .section-head h2 br { display: none; }
  .footer-grid { grid-template-columns: 1fr; }
}

.svc-more { margin-top: 22px; font-size: .95rem; }
.inline-link { color: var(--teal); font-weight: 500; }
