/* ===== FINCSA · colores institucionales (Presentación Ejecutiva) ===== */
:root {
  --blue: #034ea1;
  --blue-2: #0052ab;
  --blue-dark: #023a78;
  --gray-bg: #f6f6f6;
  --gray: #4a4a4b;
  --gray-l: #8a8b8d;
  --line: #e4e6ea;
  --white: #fff;
  --ink: #14110f;
  --radius: 14px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --header: 68px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header); }
body {
  margin: 0;
  font-family: "Inter Tight", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: var(--white);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { line-height: 1.12; letter-spacing: -.02em; margin: 0 0 .5em; }
h2 { font-size: clamp(1.6rem, 2.6vw, 2.3rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }
.container { width: min(1180px, 100% - 40px); margin-inline: auto; }

/* ===== Botones ===== */
.btn {
  display: inline-flex; align-items: center; gap: .5em;
  padding: .8em 1.4em; border-radius: 999px;
  background: var(--blue); color: var(--white);
  font: 600 .95rem/1 inherit; text-decoration: none; border: 0; cursor: pointer;
  transition: background .25s, transform .25s var(--ease), box-shadow .25s;
}
.btn:hover { background: var(--blue-dark); transform: translateY(-2px); box-shadow: 0 8px 20px -8px rgba(3, 78, 161, .6); }
.btn--sm { padding: .6em 1.1em; font-size: .88rem; }
.btn--ghost { background: transparent; box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .8); }
.btn--ghost:hover { background: var(--white); color: var(--blue); }
.btn--white { background: var(--white); color: var(--blue); }
.btn--white:hover { background: var(--gray-bg); color: var(--blue-dark); }

.eyebrow {
  display: inline-block; margin-bottom: .8rem;
  font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: rgba(255, 255, 255, .85);
}
.eyebrow--blue { color: var(--blue); }

/* ===== Encabezado ===== */
.header {
  position: fixed; inset: 0 0 auto; z-index: 50; height: var(--header);
  background: rgba(255, 255, 255, .92); backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent; transition: border-color .3s, box-shadow .3s;
}
.header.is-scrolled { border-color: var(--line); box-shadow: 0 6px 20px -14px rgba(0, 0, 0, .25); }
.header__inner { height: 100%; display: flex; align-items: center; justify-content: space-between; }
.brand img { height: 34px; width: auto; }
.nav { display: flex; align-items: center; gap: 1.8rem; }
.nav a:not(.btn) {
  text-decoration: none; font-weight: 500; font-size: .95rem; color: var(--gray);
  position: relative; padding: .3em 0;
}
.nav a:not(.btn)::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 2px; width: 100%;
  background: var(--blue); transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease);
}
.nav a:not(.btn):hover, .nav a.is-current { color: var(--blue); }
.nav a:not(.btn):hover::after, .nav a.is-current::after { transform: scaleX(1); }
.nav-toggle { display: none; background: none; border: 0; width: 40px; height: 40px; cursor: pointer; position: relative; }
.nav-toggle span { position: absolute; left: 9px; right: 9px; height: 2px; background: var(--blue); transition: transform .3s, top .3s; }
.nav-toggle span:first-child { top: 15px; }
.nav-toggle span:last-child { top: 23px; }
.nav-toggle[aria-expanded="true"] span:first-child { top: 19px; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:last-child { top: 19px; transform: rotate(-45deg); }

/* ===== Slider ===== */
.slider {
  position: relative; margin-top: var(--header);
  height: clamp(440px, 78vh, 720px); overflow: hidden; background: var(--blue-dark); color: var(--white);
}
.slider__track { position: absolute; inset: 0; }
.slide {
  position: absolute; inset: 0; display: flex; align-items: center;
  opacity: 0; visibility: hidden; transition: opacity .9s var(--ease), visibility 0s .9s;
}
.slide::before {
  content: ""; position: absolute; inset: 0;
  background: var(--img) center / cover no-repeat;
  transform: scale(1.08); transition: transform 7s linear;
}
.slide::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(2, 40, 84, .88) 0%, rgba(3, 78, 161, .55) 45%, rgba(3, 78, 161, 0) 75%);
}
.slide.is-active { opacity: 1; visibility: visible; transition: opacity .9s var(--ease); }
.slide.is-active::before { transform: scale(1); }
.slide__content { position: relative; z-index: 1; max-width: 1180px; }
.slide__content > * { max-width: 560px; opacity: 0; transform: translateY(18px); }
.slide.is-active .slide__content > * { opacity: 1; transform: none; transition: opacity .7s var(--ease), transform .7s var(--ease); }
.slide.is-active .slide__content > :nth-child(2) { transition-delay: .1s; }
.slide.is-active .slide__content > :nth-child(3) { transition-delay: .2s; }
.slide.is-active .slide__content > :nth-child(4) { transition-delay: .3s; }
.slide h1, .slide h2 { font-size: clamp(2rem, 4.6vw, 3.6rem); font-weight: 800; }
.slide p { font-size: clamp(1rem, 1.4vw, 1.15rem); color: rgba(255, 255, 255, .88); }
.slide__actions { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.4rem; }
.slide .btn:not(.btn--ghost) { background: var(--white); color: var(--blue); }
.slide .btn:not(.btn--ghost):hover { background: var(--gray-bg); }

.slider__controls {
  position: absolute; left: 0; right: 0; bottom: 28px; z-index: 2;
  display: flex; align-items: center; justify-content: space-between;
}
.slider__dots { display: flex; gap: 8px; }
.slider__dot {
  width: 28px; height: 4px; border: 0; padding: 0; border-radius: 2px; cursor: pointer;
  background: rgba(255, 255, 255, .35); transition: background .3s, width .3s var(--ease);
}
.slider__dot.is-active { background: var(--white); width: 48px; }
.slider__arrows { display: flex; align-items: center; gap: 14px; font-size: .9rem; }
.slider__count { font-variant-numeric: tabular-nums; color: rgba(255, 255, 255, .75); }
.slider__count b { color: var(--white); }
.slider__arrow {
  width: 42px; height: 42px; border-radius: 50%; cursor: pointer;
  border: 1.5px solid rgba(255, 255, 255, .55); background: transparent; color: var(--white); font-size: 1.1rem;
  transition: background .25s, color .25s;
}
.slider__arrow:hover { background: var(--white); color: var(--blue); }
.slider__progress { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(255, 255, 255, .15); z-index: 2; }
.slider__progress span { display: block; height: 100%; width: 0; background: var(--white); }
.slider__progress span.is-running { animation: progress var(--dur, 6s) linear forwards; }
.slider:hover .slider__progress span.is-running { animation-play-state: paused; }
@keyframes progress { to { width: 100%; } }

/* ===== Cifras ===== */
.stats { border-bottom: 1px solid var(--line); }
.stats__grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.stat { padding: 1.6rem 1rem; text-align: center; border-left: 1px solid var(--line); }
.stat:first-child { border-left: 0; }
.stat b { display: block; font-size: clamp(1.6rem, 3vw, 2.3rem); font-weight: 800; color: var(--blue); font-variant-numeric: tabular-nums; }
.stat span { font-size: .88rem; color: var(--gray-l); }

/* ===== Secciones ===== */
.section { padding: clamp(56px, 8vw, 96px) 0; }
.section--gray { background: var(--gray-bg); }
.section--blue { background: var(--blue); color: var(--white); }
.section__head { margin-bottom: 2rem; max-width: 640px; }
.section__head--row { max-width: none; display: flex; justify-content: space-between; align-items: end; gap: 1rem; flex-wrap: wrap; }
.section__head--row p { color: var(--gray-l); margin: 0; }

/* Nosotros */
.about { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.about__media { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.about__media img { border-radius: var(--radius); aspect-ratio: 3 / 4; object-fit: cover; width: 100%; }
.about__media img:last-child { margin-top: 40px; }
.about__text p { color: var(--gray); }
.timeline { list-style: none; padding: 0; margin: 1.4rem 0; border-left: 2px solid var(--line); }
.timeline li { position: relative; padding: 0 0 .9rem 1.2rem; color: var(--gray); font-size: .95rem; }
.timeline li::before { content: ""; position: absolute; left: -7px; top: .4em; width: 12px; height: 12px; border-radius: 50%; background: var(--white); border: 2px solid var(--blue); }
.timeline b { display: block; color: var(--blue); }
.note { font-size: .9rem; padding: .8rem 1rem; border-radius: 10px; background: var(--gray-bg); }

.divisions { margin-top: clamp(40px, 6vw, 72px); display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap; }
.divisions__label { font-weight: 700; font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; color: var(--gray-l); }
.divisions ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .6rem; }
.divisions li {
  padding: .6em 1.1em; border-radius: 999px; border: 1.5px solid var(--blue); color: var(--blue); font-weight: 600; font-size: .92rem;
  transition: background .25s, color .25s;
}
.divisions li:hover { background: var(--blue); color: var(--white); }

/* Misión, visión, valores */
.mv { display: grid; grid-template-columns: 1fr 1.4fr; gap: 16px; margin-bottom: clamp(40px, 6vw, 64px); }
.mv__card { padding: 1.8rem; border-radius: var(--radius); background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .16); }
.mv__card p { font-size: clamp(1.05rem, 1.6vw, 1.3rem); margin: 0; }
.mv__tag { display: inline-block; font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; margin-bottom: .8rem; color: rgba(255, 255, 255, .7); }
.values__title { margin-bottom: 1.2rem; }
.values { list-style: none; counter-reset: v; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.values li {
  counter-increment: v; position: relative; padding: 1.2rem 1.2rem 1.2rem 3.4rem;
  background: var(--white); color: var(--gray); border-radius: 12px; font-size: .93rem;
  transition: transform .3s var(--ease);
}
.values li:hover { transform: translateY(-4px); }
.values li::before { content: counter(v); position: absolute; left: 1.2rem; top: 1.05rem; font-size: 1.3rem; font-weight: 800; color: #b9cbe6; }
.values b { display: block; color: var(--blue); }

/* Líneas */
.lines { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: 1.4rem; }
.lines__tab {
  font: 600 .92rem/1 inherit; padding: .75em 1.2em; border-radius: 999px; cursor: pointer;
  border: 1.5px solid var(--line); background: var(--white); color: var(--gray); transition: all .25s;
}
.lines__tab:hover { border-color: var(--blue); color: var(--blue); }
.lines__tab.is-active { background: var(--blue); border-color: var(--blue); color: var(--white); }
.line { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 4vw, 56px); align-items: center; padding: clamp(18px, 3vw, 32px); background: var(--gray-bg); border-radius: var(--radius); }
.line[hidden] { display: none; }
.line.is-active { animation: fadeUp .5s var(--ease); }
.line img { width: 100%; max-height: 380px; object-fit: contain; border-radius: 10px; background: var(--white); }
.line p { color: var(--gray); }
.checks { list-style: none; padding: 0; margin: 0 0 1rem; }
.checks li { position: relative; padding-left: 1.6rem; margin-bottom: .45rem; color: var(--gray); }
.checks li::before { content: ""; position: absolute; left: 0; top: .5em; width: 10px; height: 6px; border-left: 2px solid var(--blue); border-bottom: 2px solid var(--blue); transform: rotate(-45deg); }
.chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.chips span { display: inline-flex; align-items: center; gap: .4em; padding: .45em .9em; border-radius: 999px; background: var(--white); border: 1px solid var(--line); font-size: .88rem; color: var(--gray); }
.chips b { color: var(--blue); }
.chips i { width: 14px; height: 14px; border-radius: 50%; display: inline-block; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* Categorías */
.cats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.cat {
  position: relative; overflow: hidden; border-radius: var(--radius); background: var(--white);
  border: 0; padding: 0; text-align: left; cursor: pointer; font: inherit; color: inherit;
  display: flex; flex-direction: column; transition: transform .35s var(--ease), box-shadow .35s;
}
.cat:hover { transform: translateY(-4px); box-shadow: 0 18px 36px -20px rgba(3, 78, 161, .45); }
.cat__img { aspect-ratio: 16 / 10; overflow: hidden; }
.cat__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.cat:hover .cat__img img { transform: scale(1.06); }
.cat__body { padding: 1rem 1.1rem 1.1rem; display: flex; justify-content: space-between; align-items: center; gap: .8rem; }
.cat__body h3 { font-size: 1.05rem; margin: 0 0 .15rem; }
.cat__body p { margin: 0; font-size: .85rem; color: var(--gray-l); }
.cat__go {
  flex: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
  background: var(--gray-bg); color: var(--blue); transition: background .25s, color .25s, transform .25s;
}
.cat:hover .cat__go { background: var(--blue); color: var(--white); transform: rotate(-45deg); }
.cat__num { position: absolute; top: 12px; left: 12px; background: rgba(255, 255, 255, .92); color: var(--blue); font-size: .75rem; font-weight: 700; padding: .3em .7em; border-radius: 999px; }

/* Acabados */
.finishes { display: grid; grid-template-columns: 1fr 1.5fr; gap: clamp(24px, 4vw, 56px); align-items: center; }
.finishes p { color: var(--gray); }
.finishes__list { display: flex; flex-wrap: wrap; gap: .6rem; }
.finish {
  display: inline-flex; align-items: center; gap: .6em; padding: .45em 1em .45em .45em; border-radius: 999px;
  border: 1.5px solid var(--line); background: var(--white); cursor: pointer; font: 500 .9rem/1 inherit; color: var(--gray);
  transition: border-color .25s, transform .25s var(--ease);
}
.finish::before { content: ""; width: 30px; height: 30px; border-radius: 50%; background: radial-gradient(circle at 30% 28%, var(--a), var(--b) 75%); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .08); }
.finish:hover { transform: translateY(-2px); }
.finish.is-active { border-color: var(--blue); color: var(--blue); }
.finishes__code { grid-column: 2; margin: -1rem 0 0; font-size: .95rem; }
.finishes__code b { color: var(--blue); }

/* Contacto */
.contact { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 64px); }
.contact__list { list-style: none; padding: 0; margin: 1.5rem 0; }
.contact__list li { padding: .75rem 0; border-bottom: 1px solid rgba(255, 255, 255, .16); display: grid; grid-template-columns: 150px 1fr; gap: 1rem; }
.contact__list span { font-size: .85rem; color: rgba(255, 255, 255, .65); }
.contact__list a { text-decoration: none; font-weight: 500; }
.contact__list a:hover { text-decoration: underline; }
.contact__ship { font-size: .9rem; color: rgba(255, 255, 255, .8); }
.form { background: var(--white); color: var(--ink); padding: clamp(20px, 3vw, 32px); border-radius: var(--radius); display: grid; gap: .9rem; align-content: start; }
.form .btn--white { background: var(--blue); color: var(--white); justify-self: start; }
.form .btn--white:hover { background: var(--blue-dark); }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: .9rem; }
.form label { display: grid; gap: .35rem; font-size: .85rem; font-weight: 600; color: var(--gray); }
.form input, .form select, .form textarea {
  font: 400 .95rem/1.4 inherit; padding: .75em .9em; border-radius: 10px; border: 1.5px solid var(--line); background: var(--white); color: var(--ink);
  transition: border-color .2s, box-shadow .2s;
}
.form input:focus, .form select:focus, .form textarea:focus { outline: 0; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(3, 78, 161, .15); }
.form .is-invalid { border-color: #d33; }
.form__msg { margin: 0; font-size: .9rem; min-height: 1.3em; color: var(--blue); }

/* Footer */
.footer { padding: 1.6rem 0; border-top: 1px solid var(--line); font-size: .88rem; color: var(--gray-l); }
.footer__inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.footer__inner p { margin: 0; }
.footer img { height: 26px; width: auto; }
.footer__social { display: flex; gap: 1rem; }
.footer__social a { text-decoration: none; color: var(--blue); font-weight: 600; }

/* Modal de categoría */
.modal {
  width: min(920px, 100% - 24px); max-height: min(86vh, 860px); padding: clamp(18px, 3vw, 30px);
  border: 0; border-radius: 18px; color: var(--ink);
}
.modal::backdrop { background: rgba(2, 30, 64, .6); backdrop-filter: blur(4px); }
.modal[open] { animation: fadeUp .35s var(--ease); }
.modal__head { display: flex; justify-content: space-between; align-items: start; gap: 1rem; }
.modal__head h3 { font-size: clamp(1.4rem, 2.5vw, 1.9rem); }
.modal__close { width: 40px; height: 40px; flex: none; border-radius: 50%; border: 0; background: var(--gray-bg); font-size: 1.5rem; cursor: pointer; color: var(--gray); }
.modal__close:hover { background: var(--blue); color: var(--white); }
.modal__desc { color: var(--gray); max-width: 680px; }
.modal__facts { list-style: none; padding: 0; margin: 0 0 1.2rem; display: flex; flex-wrap: wrap; gap: .5rem; }
.modal__facts li { padding: .4em .85em; border-radius: 999px; background: var(--gray-bg); font-size: .85rem; color: var(--gray); }
.modal__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.modal__grid figure { margin: 0; aspect-ratio: 1; border-radius: 12px; background: var(--gray-bg); display: grid; place-items: center; padding: 10px; overflow: hidden; }
.modal__grid img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; transition: transform .4s var(--ease); }
.modal__grid figure:hover img { transform: scale(1.08); }
.modal__foot { margin-top: 1.2rem; display: flex; justify-content: flex-end; }

/* WhatsApp flotante */
.wa {
  position: fixed; right: 18px; bottom: 18px; z-index: 40; width: 54px; height: 54px; border-radius: 50%;
  display: grid; place-items: center; background: #25d366; color: var(--white);
  box-shadow: 0 10px 24px -8px rgba(0, 0, 0, .35); transition: transform .25s var(--ease);
}
.wa:hover { transform: scale(1.08); }

/* Animación al hacer scroll */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }

/* ===== Responsivo ===== */
@media (max-width: 960px) {
  .cats { grid-template-columns: repeat(2, 1fr); }
  .values { grid-template-columns: repeat(2, 1fr); }
  .modal__grid { grid-template-columns: repeat(3, 1fr); }
  .finishes { grid-template-columns: 1fr; }
  .finishes__code { grid-column: auto; }
}
@media (max-width: 820px) {
  .nav-toggle { display: block; }
  .nav {
    position: fixed; top: var(--header); left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0;
    background: var(--white); border-bottom: 1px solid var(--line); padding: .5rem 20px 1rem;
    transform: translateY(-8px); opacity: 0; visibility: hidden; transition: all .25s var(--ease);
  }
  .nav.is-open { transform: none; opacity: 1; visibility: visible; }
  .nav a:not(.btn) { padding: .9rem 0; border-bottom: 1px solid var(--line); }
  .nav a:not(.btn)::after { display: none; }
  .nav .btn { margin-top: .8rem; justify-content: center; }
  .about, .mv, .line, .contact { grid-template-columns: 1fr; }
  .stats__grid { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(3) { border-left: 0; }
  .stat:nth-child(n + 3) { border-top: 1px solid var(--line); }
}
@media (max-width: 560px) {
  .cats, .values { grid-template-columns: 1fr; }
  .modal__grid { grid-template-columns: repeat(2, 1fr); }
  .form__row { grid-template-columns: 1fr; }
  .contact__list li { grid-template-columns: 1fr; gap: .1rem; }
  .slider__count { display: none; }
  .slide::after { background: linear-gradient(0deg, rgba(2, 40, 84, .92) 10%, rgba(3, 78, 161, .45) 100%); }
  .slide { align-items: flex-end; padding-bottom: 90px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
}
