/* ==========================================================================
   components.css — piezas reutilizables: nav, botones, cards, servicios,
   score, stats, formulario, footer.
   ========================================================================== */

/* ---------- NAV ---------- */

.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition:
    background .35s ease,
    backdrop-filter .35s ease,
    border-color .35s ease;
}
.nav.scrolled {
  background: rgba(15, 18, 23, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--lines);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-height);
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-pixel);
  font-size: 17px;
  color: var(--white);
  text-decoration: none;
  letter-spacing: 0.4px;
  transition: opacity .2s;
}
.logo:hover { opacity: 0.75; }
.logo span { color: var(--grey); }

.logo-mark {
  display: inline-block;
  width: 22px; height: 22px;
  background: var(--white);
  color: var(--black);
  font-family: var(--font-pixel);
  font-size: 14px;
  line-height: 22px;
  text-align: center;
  border-radius: 4px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(8px, 1.4vw, 20px);
}

.nav-link,
.nav-cta {
  position: relative;
  color: var(--white);
  text-decoration: none;
  padding: 8px 4px;
  transition: opacity .2s;
}
.nav-link { font-size: 15px; font-weight: 400; opacity: 0.7; }
.nav-link:hover { opacity: 1; }

.nav-link::after,
.nav-cta::after {
  content: "";
  position: absolute;
  left: 4px; right: 4px;
  bottom: 2px;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right center;
  transition: transform .35s cubic-bezier(.7, 0, .2, 1);
}
.nav-link:hover::after {
  transform: scaleX(1);
  transform-origin: left center;
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 500;
  margin-left: 8px;
}
.nav-cta::after {
  transform: scaleX(1);
  transform-origin: left center;
}
.nav-cta:hover::after {
  transform: scaleX(0);
  transform-origin: right center;
}
.nav-cta .arr {
  display: inline-block;
  transition: transform .3s;
}
.nav-cta:hover .arr { transform: translateX(4px); }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--lines);
  color: var(--white);
  font-size: 22px;
  cursor: pointer;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  line-height: 1;
}

/* ---------- BOTONES ---------- */

.btn {
  display: inline-block;
  background: var(--white);
  color: var(--black);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  padding: 10px 22px;
  border: 1px solid var(--white);
  border-radius: 100px;
  cursor: pointer;
  transition: background .2s, color .2s;
}
.btn:hover { background: transparent; color: var(--white); }
.btn-big { font-size: 17px; padding: 14px 32px; }

/* ---------- CARDS "Qué arreglamos" ---------- */

.cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  border-top: 1px solid var(--lines);
  border-left: 1px solid var(--lines);
  margin-top: clamp(30px, 5vh, 50px);
}
.card {
  border-right: 1px solid var(--lines);
  border-bottom: 1px solid var(--lines);
  padding: clamp(24px, 3vw, 40px);
  transition: background .25s;
}
.card:hover { background: var(--black-soft); }
.card .icon {
  font-family: var(--font-pixel);
  font-size: 22px;
  display: block;
  margin-bottom: 18px;
  color: var(--grey);
}
.card h3 {
  font-size: clamp(20px, 2.2vw, 26px);
  font-weight: 600;
  margin-bottom: 12px;
}
.card p {
  color: var(--grey);
  font-size: 16px;
  margin-bottom: 18px;
}
.card .stat {
  font-family: var(--font-pixel);
  font-size: 13px;
  color: var(--white);
}

/* ---------- SERVICIOS ---------- */

.service {
  display: grid;
  grid-template-columns: 90px 1fr 1.6fr;
  gap: clamp(16px, 3vw, 48px);
  padding: clamp(28px, 4vh, 44px) 0;
  border-top: 1px solid var(--lines);
  align-items: start;
}
.service:last-child { border-bottom: 1px solid var(--lines); }
.service .num {
  font-family: var(--font-pixel);
  color: var(--grey);
  font-size: 14px;
  padding-top: 8px;
}
.service h3 {
  font-size: clamp(22px, 2.6vw, 30px);
  font-weight: 600;
  line-height: 1.15;
}
.service h3 em {
  display: block;
  font-style: normal;
  font-family: var(--font-pixel);
  font-size: 0.5em;
  color: var(--grey);
  margin-top: 10px;
}
.service p {
  color: var(--grey);
  font-size: 16.5px;
}

/* ---------- GARANTÍAS / SCORE ---------- */

.score-item {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: clamp(16px, 3vw, 40px);
  padding: 26px 0;
  border-top: 1px solid var(--lines);
  align-items: baseline;
}
.score-item:last-of-type { border-bottom: 1px solid var(--lines); }
.score-item .letter {
  font-family: var(--font-pixel);
  font-size: 26px;
}
.score-item h3 {
  font-size: clamp(19px, 2.2vw, 25px);
  font-weight: 600;
  display: inline;
}
.score-item p {
  display: inline;
  color: var(--grey);
  font-size: inherit;
}

/* ---------- STATS ---------- */

.stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  border-top: 1px solid var(--lines);
  border-left: 1px solid var(--lines);
  margin-top: clamp(30px, 5vh, 50px);
}
.stat-box {
  border-right: 1px solid var(--lines);
  border-bottom: 1px solid var(--lines);
  padding: clamp(24px, 3vw, 40px);
}
.stat-box .big {
  font-size: clamp(40px, 6vw, 72px);
  font-weight: 600;
  line-height: 1;
  margin-bottom: 14px;
  letter-spacing: -0.02em;
}
.stat-box .big .px { font-size: 0.55em; }
.stat-box p { color: var(--grey); font-size: 16px; }

/* ---------- NOSOTROS ---------- */

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(24px, 4vw, 64px);
  margin-top: clamp(30px, 5vh, 50px);
}
.about-grid h3 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 14px;
}
.about-grid h3 .px { font-size: 0.75em; color: var(--grey); }
.about-grid p { color: var(--grey); font-size: 16.5px; }

/* ---------- CONTACTO ---------- */

.contact { padding-bottom: clamp(60px, 9vh, 100px); }

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: clamp(30px, 5vw, 80px);
  margin-top: clamp(30px, 5vh, 50px);
}

.contact-info p {
  color: var(--grey);
  font-size: 17px;
  margin-bottom: 22px;
}
.contact-info p strong { color: var(--white); font-weight: 500; }

.contact-info .mail {
  font-family: var(--font-pixel);
  font-size: 15px;
  color: var(--white);
  text-decoration: none;
  border-bottom: 1px solid var(--lines);
  padding-bottom: 3px;
}
.contact-info .mail:hover { border-color: var(--white); }

form .field { margin-bottom: 22px; }
form label {
  display: block;
  font-family: var(--font-pixel);
  font-size: 12px;
  color: var(--grey);
  margin-bottom: 8px;
  letter-spacing: 0.5px;
}
form input,
form textarea {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--lines);
  color: var(--white);
  font-family: var(--font-body);
  font-size: 18px;
  font-weight: 400;
  padding: 10px 2px;
  outline: none;
  transition: border-color .2s;
  resize: vertical;
}
form input:focus,
form textarea:focus { border-color: var(--white); }
form ::placeholder { color: #565b60; }

.form-note {
  font-size: 14px;
  color: var(--grey);
  margin-top: 18px;
}

.success-msg {
  display: none;
  border: 1px solid var(--white);
  padding: 18px 22px;
  margin-bottom: 28px;
  font-family: var(--font-pixel);
  font-size: 14px;
}
.success-msg.show { display: block; }

/* ---------- FOOTER ---------- */

footer { border-top: none; }
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding: 28px 0;
  color: var(--grey);
  font-size: 14px;
}
.footer-inner .px { font-size: 12px; }
.footer-inner a { color: var(--grey); text-decoration: none; }
.footer-inner a:hover { color: var(--white); }
