/* ============================================================
   KP Contadora - Estilos principales
   ============================================================ */

/* ====== Reset ====== */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ====== Variables ====== */
:root {
  --bg:             #ffffff;
  --bg-soft:        #f8fafc;
  --bg-dark:        #0d3975;
  --bg-dark-card:   #163458;
  --text:           #171f2c;
  --text-light:     #475569;
  --muted:          #94a3b8;
  --primary:        #22c55e;
  --primary-dark:   #16a34a;
  --primary-glow:   rgba(34, 197, 94, 0.12);
  --border:         #e2e8f0;
  --border-dark:    #1e3a5f;
  --white:          #ffffff;
  --orange:         #f97316;
  --amber:          #d97706;
  --purple:         #7c3aed;
  --font:           'Inter', 'Segoe UI', 'Arial', sans-serif;
  --font-display:   'IBM Plex Mono', 'Inter', 'Segoe UI', 'Arial', sans-serif;
  --container-w:    min(1100px, 92%);
  --section-py:     4.5rem;
  --ease:           cubic-bezier(0.4, 0, 0.2, 1);
  --dur:            0.28s;
  --r-sm:           6px;
  --r-md:           10px;
  --r-lg:           16px;
  --r-full:         999px;
}

/* ====== Base ====== */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 72px;
  overflow-x: clip;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

img  { max-width: 100%; display: block; }
a    { color: inherit; text-decoration: none; }

/* ====== Utilidades ====== */
.container   { width: var(--container-w); margin-inline: auto; }
.text-center { text-align: center; }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

.fade-in {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}
/* Animación inicial solo con JS habilitado */
.js-enabled .fade-in:not(.visible) {
  opacity: 0;
  transform: translateY(22px);
}

/* ====== Announcement bar ====== */
.announcement-bar {
  background: linear-gradient(90deg, #0d3975 0%, #385f84 100%);
  color: #cbd5e1;
  text-align: center;
  padding: 0.55rem 1rem;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  letter-spacing: 0.01em;
  font-weight: 600;
  position: relative;
}
.announcement-bar strong { color: var(--primary); }
.announcement-bar::before,
.announcement-bar::after {
  max-width: 1400px;
  content: '';
  width: 3px;
  height: 32px;
  border-radius: 999px;
  background: var(--primary);
  opacity: 0.85;
  min-width: 0;
}

/* ====== Header / Nav ====== */
.header {
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  z-index: 200;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  width: min(1400px, 100%);
  margin: 0 auto;
  padding: 0 1.5rem;
  position: relative;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
  font-weight: 700;
  font-size: 1.9rem;
  font-family: var(--font-display);
  line-height: 1.2;
  color: var(--text);
  white-space: nowrap;
  flex: 0 1 auto;
  text-decoration: none;
}

.logo span {
  min-width: 0;
}

.logo-img {
  width: 50px;
  height: 50px;
  object-fit: cover;
  border-radius: 4px;
  flex-shrink: 0;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  color: var(--text);
  flex-shrink: 0;
  z-index: 201;
}

.menu-toggle svg {
  width: 24px;
  height: 24px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.menu-toggle line {
  transform-origin: 50% 50%;
  transition: transform 0.24s var(--ease), opacity 0.2s var(--ease);
}

.menu-toggle.is-open line:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.menu-toggle.is-open line:nth-child(2) {
  opacity: 0;
}

.menu-toggle.is-open line:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
  flex-shrink: 0;
}

.nav-links a {
  display: inline-block;
  padding: 0.5rem 1rem;
  border-radius: var(--r-sm);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-light);
  transition: color var(--dur) var(--ease), background var(--dur) var(--ease);
  text-decoration: none;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  color: var(--primary-dark);
  background: var(--primary-glow);
}

/* ====== Header Responsive - Tablet (960px y menos) ====== */
@media (max-width: 960px) {
  .menu-toggle { display: block; }

  .logo {
    font-size: 1.45rem;
  }

  .nav-links {
    display: flex;
    position: absolute;
    top: calc(100% - 1px);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    background: rgba(255, 255, 255, 0.995);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 1rem 1rem 1.15rem;
    gap: 0.25rem;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 18px 34px rgba(15, 23, 42, 0.08);
    z-index: 220;
    overflow-y: auto;
    overflow-x: hidden;
    width: 100%;
    height: auto;
    max-height: 0;
    box-sizing: border-box;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-10px) scale(0.985);
    transform-origin: top center;
    transition: opacity 0.2s var(--ease), transform 0.26s var(--ease), max-height 0.26s var(--ease), visibility 0s linear 0.26s;
  }

  .nav-links.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0) scale(1);
    max-height: min(360px, calc(100dvh - 64px));
    transition: opacity 0.2s var(--ease), transform 0.26s var(--ease), max-height 0.26s var(--ease), visibility 0s linear 0s;
  }

  .nav-links li {
    opacity: 0;
    transform: translateY(-6px);
    transition: opacity 0.2s var(--ease), transform 0.24s var(--ease);
  }

  .nav-links.open li {
    opacity: 1;
    transform: translateY(0);
  }

  .nav-links.open li:nth-child(1) { transition-delay: 0.03s; }
  .nav-links.open li:nth-child(2) { transition-delay: 0.07s; }
  .nav-links.open li:nth-child(3) { transition-delay: 0.11s; }

  .nav-links a {
    font-size: 1rem;
    padding: 0.75rem 1rem;
    width: 100%;
    text-align: left;
  }
}

/* ====== Header Responsive - Mobile (600px y menos) ====== */
@media (max-width: 600px) {
  .nav {
    min-height: 56px;
    padding: 0 0.75rem;
    gap: 0.5rem;
  }

  .logo {
    max-width: calc(100vw - 70px);
    font-size: 1.05rem;
    gap: 0.45rem;
  }

  .logo-img {
    width: 36px;
    height: 36px;
  }

  .menu-toggle {
    padding: 0.4rem;
  }

  .menu-toggle svg {
    width: 20px;
    height: 20px;
  }

  .nav-links {
    padding: 0.95rem 0.95rem 1.05rem;
  }

  .nav-links.open {
    max-height: min(340px, calc(100dvh - 56px));
  }

  .nav-links a {
    font-size: 0.95rem;
    padding: 0.65rem 0.75rem;
  }
}

/* ====== Botones ====== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.72rem 1.35rem;
  border-radius: var(--r-md);
  font-weight: 600;
  font-size: 0.95rem;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: all var(--dur) var(--ease);
  white-space: nowrap;
}
.btn-primary {
  background: var(--primary);
  color: #052e16;
}
.btn-primary:hover {
  background: var(--primary-dark);
  color: var(--white);
  box-shadow: 0 4px 18px rgba(34, 197, 94, 0.3);
}
.btn-lg { padding: 0.9rem 1.8rem; font-size: 1rem; }

/* ====== Secciones ====== */
.section       { padding: var(--section-py) 0; }
.section-light { background: var(--bg-soft); }
.section-dark  { background: var(--bg-dark); color: var(--white); }

.section h2 {
  font-size: clamp(1.6rem, 3.2vw, 2.25rem);
  letter-spacing: -0.025em;
  margin-bottom: 0.6rem;
  color: var(--text);
  font-family: var(--font-display);
}
.section-dark h2 { color: var(--white); }

.section-intro {
  color: var(--text-light);
  font-size: 1rem;
  margin-bottom: 2.25rem;
  max-width: 580px;
  margin-inline: auto;
}
.section-dark .section-intro { color: #94a3b8; }

.section-cta { text-align: center; margin-top: 2.5rem; }

/* ====== Hero ====== */
.hero { padding: 5rem 0 4rem; background: var(--bg); }

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3.5rem;
  align-items: center;
}
.hero h1 {
  font-size: clamp(2rem, 4.5vw, 3.4rem);
  line-height: 1.13;
  letter-spacing: -0.03em;
  margin-bottom: 1.15rem;
  color: var(--text);
  font-family: var(--font-display);
}
.hero-body {
  color: var(--text-light);
  font-size: 1.02rem;
  margin-bottom: 1.25rem;
  max-width: 500px;
}
.hero-quote {
  border-left: 3px solid var(--primary);
  padding: 0.65rem 1rem;
  color: var(--text-light);
  font-style: italic;
  font-size: 2rem;
  line-height: 1.45;
  font-family: var(--font-display);
  margin-bottom: 1.75rem;
  background: var(--primary-glow);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
}

/* ====== Proposal Card ====== */
.hero-proposal-image {
  width: 100%;
  max-width: 540px;
  border-radius: var(--r-md);
  box-shadow: 0 4px 28px rgba(0,0,0,0.1);
}

/* ====== Por que KP Contadora (dark section) ====== */
.why-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}
.why-card {
  background: var(--bg-dark-card);
  border: 1px solid var(--border-dark);
  border-radius: var(--r-lg);
  padding: 1.75rem;
}
.why-card-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.85rem;
  padding-bottom: 0.7rem;
  border-bottom: 2px solid;
}
.why-green { color: var(--primary); border-color: var(--primary); }
.why-blue  { color: #38bdf8;         border-color: #38bdf8; }
.why-card p {
  color: #94a3b8;
  font-size: 0.93rem;
  margin-bottom: 1rem;
  line-height: 1.6;
}
.why-list    { list-style: none; }
.why-list li {
  color: #cbd5e1;
  font-size: 0.9rem;
  padding: 0.35rem 0;
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
}
.check { color: var(--primary); flex-shrink: 0; }

/* ====== Beneficios Garantizados ====== */
.benefits-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.1rem;
}
.benefit-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.2rem 1.25rem;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--bg);
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.benefit-reveal {
  cursor: pointer;
}
.benefit-reveal:hover,
.benefit-reveal:focus-visible,
.benefit-reveal.is-open {
  border-color: var(--primary);
  box-shadow: 0 4px 14px rgba(34,197,94,0.1);
}
.benefit-dot {
  flex-shrink: 0;
  width: 34px; height: 34px;
  border-radius: var(--r-full);
  background: var(--primary);
  color: #052e16;
  font-size: 0.85rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.benefit-content {
  min-width: 0;
}
.benefit-item h4 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0;
  color: var(--text);
}
.benefit-item p {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  margin-top: 0;
  font-size: 0.87rem;
  color: var(--text-light);
  line-height: 1.5;
  transition: max-height 0.28s var(--ease), opacity 0.22s var(--ease), margin-top 0.22s var(--ease);
}
.benefit-reveal:hover p,
.benefit-reveal:focus-visible p,
.benefit-reveal.is-open p {
  max-height: 140px;
  opacity: 1;
  margin-top: 0.4rem;
}

/* ====== Servicios Especializados ====== */
.service-area { margin-bottom: 2rem; }

.area-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.8rem;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}
.area-contabilidad-title   { color: var(--primary-dark); }
.area-administrativa-title { color: #c2410c; }
.area-tesorera-title       { color: #92400e; }
.area-produccion-title     { color: #5b21b6; }

.service-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}
.service-tags span {
  display: inline-block;
  padding: 0.38rem 0.8rem;
  border-radius: var(--r-sm);
  font-size: 0.82rem;
  font-weight: 500;
  border: 1px solid;
  transition: transform var(--dur) var(--ease);
}
.service-tags span:hover { transform: translateY(-1px); }

.tags-contabilidad  span { border-color: rgba(34,197,94,0.4);  color: #166534; background: rgba(34,197,94,0.04);  }
.tags-administrativa span { border-color: rgba(249,115,22,0.4); color: #9a3412; background: rgba(249,115,22,0.04); }
.tags-tesorera      span  { border-color: rgba(217,119,6,0.4);  color: #78350f; background: rgba(217,119,6,0.04);  }
.tags-produccion    span  { border-color: rgba(124,58,237,0.4); color: #4c1d95; background: rgba(124,58,237,0.04); }

/* ====== Proceso / Metodologia ====== */
.process-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  position: relative;
}
.process-steps::before {
  content: '';
  position: absolute;
  top: 27px;
  left: calc(100% / 6);
  right: calc(100% / 6);
  height: 2px;
  background: linear-gradient(90deg, var(--primary), #38bdf8);
  z-index: 0;
}
.process-step {
  text-align: center;
  position: relative;
  z-index: 1;
}
.step-number {
  width: 54px; height: 54px;
  border-radius: var(--r-full);
  background: var(--primary);
  color: #052e16;
  font-size: 1.3rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  border: 3px solid var(--bg-soft);
  box-shadow: 0 0 0 2px var(--primary);
}
.step-content h3 {
  font-size: 1.02rem;
  font-weight: 700;
  margin-bottom: 0.55rem;
  color: var(--text);
}
.step-content p {
  font-size: 0.9rem;
  color: var(--text-light);
  line-height: 1.6;
}

/* ====== Caso de Exito ====== */
.case-card {
  max-width: 920px;
  margin-inline: auto;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--bg);
  box-shadow: 0 4px 28px rgba(0,0,0,0.07);
  overflow: hidden;
}
.case-card-header {
  padding: 1.4rem 1.4rem 1rem;
  border-bottom: 1px solid var(--border);
}
.case-card-header h3 {
  font-size: 1.3rem;
  font-weight: 800;
  margin-bottom: 0.2rem;
  font-family: var(--font-display);
}
.case-location {
  color: var(--text-light);
  font-size: 0.9rem;
  margin-bottom: 0;
}
.case-card-body {
  padding: 1.4rem;
  display: grid;
  gap: 1rem;
}
.case-card-kpis {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.8rem;
}
.case-kpi {
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  padding: 0.8rem;
  background: var(--bg-soft);
}
.kpi-title {
  font-size: 0.82rem;
  color: var(--text-light);
  margin-bottom: 0.2rem;
}
.kpi-value {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
}
.case-card-details {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.8rem;
}
.case-detail-card {
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 0.9rem;
  background: var(--bg-soft);
}
.case-detail-title {
  font-size: 0.86rem;
  color: var(--text-light);
  margin-bottom: 0.2rem;
}
.case-detail-text {
  font-size: 0.95rem;
  font-weight: 600;
}

/* ====== Footer ====== */
.footer { background: var(--bg-dark); color: #94a3b8; }

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 2.5rem;
  padding: 3.5rem 0 2rem;
}
.footer-logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 700;
  font-size: 1.2rem;
  font-family: var(--font-display);
  color: var(--white);
  margin-bottom: 0.85rem;
}
.footer-desc {
  font-size: 0.85rem;
  line-height: 1.7;
  color: #64748b;
}
.footer-col h4 {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--white);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 0.9rem;
}
.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.footer-col a {
  font-size: 0.87rem;
  color: #64748b;
  transition: color var(--dur) var(--ease);
}
.footer-col a:hover { color: var(--primary); }
.footer-contact li {
  font-size: 0.87rem;
  color: #64748b;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}
.footer-contact a,
.footer-contact-text {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: #64748b;
}

.contact-icon {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}

.footer-contact a { transition: color var(--dur) var(--ease); }
.footer-contact a:hover { color: var(--primary); }
.footer-bottom {
  border-top: 1px solid var(--border-dark);
  padding: 1.25rem 0;
  font-size: 0.82rem;
  color: #94a3b8;
}

.footer-credit {
  margin: 0;
  line-height: 1.35;
  white-space: nowrap;
}

.footer-credit-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: #cbd5e1;
  font-weight: 600;
}

.footer-credit-link:hover {
  color: var(--white);
}



.footer-bottom-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.footer-credit {
  text-align: center;
}

.floating-cta {
  position: fixed;
  left: 1rem;
  bottom: 1rem;
  background: #18be72;
  color: #fff;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 24px rgba(0,0,0,0.2);
  z-index: 260;
  font-size: 0.92rem;
  font-weight: 600;
}

.floating-cta-icon {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(255,255,255,0.25);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.floating-cta-text {
  display: none;
}

/* ====== Responsive - Tablet ====== */
@media (max-width: 960px) {
  :root { --section-py: 3.5rem; }

  .hero-grid     { grid-template-columns: 1fr; gap: 2rem; }
  .hero-body     { max-width: 100%; }
  .why-cards     { grid-template-columns: 1fr; }
  .benefits-grid { grid-template-columns: 1fr; }
  .footer-grid   { grid-template-columns: 1fr 1fr; gap: 1.75rem; }

  .process-steps { grid-template-columns: 1fr; gap: 1.5rem; }
  .process-steps::before { display: none; }
  .process-step  { text-align: left; display: flex; gap: 1rem; align-items: flex-start; }
  .step-number   { margin: 0; flex-shrink: 0; }

  .case-card-kpis { grid-template-columns: 1fr; }
  .case-card-details { grid-template-columns: 1fr; }
}

/* ====== Responsive - Mobile ====== */
@media (max-width: 600px) {
  .announcement-bar {
    padding: 0.35rem 0.5rem;
    font-size: 0.7rem;
    gap: 0.25rem;
  }
  
  .announcement-bar::before,
  .announcement-bar::after { display: none; }
  
  .hero { padding: 2.5rem 0 2rem; }
  .hero h1 { font-size: 1.5rem; }
  .hero-quote { font-size: 1.1rem; }
  
  .floating-cta { width: 48px; height: 48px; }
  
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom-inner {
    flex-direction: row;
    justify-content: center;
    align-items: center;
    flex-wrap: nowrap;
    gap: 0.5rem;
  }
  .footer-credit {
    font-size: 0.68rem;
    line-height: 1.2;
  }
}
