/* ===== Fuentes (alojadas en local, subset latin) ===== */
@font-face {
  font-family: "Barlow Condensed"; font-style: normal; font-weight: 500; font-display: swap;
  src: url(../fonts/barlow-condensed-500.woff2) format("woff2");
}
@font-face {
  font-family: "Barlow Condensed"; font-style: normal; font-weight: 600; font-display: swap;
  src: url(../fonts/barlow-condensed-600.woff2) format("woff2");
}
@font-face {
  font-family: "Barlow Condensed"; font-style: normal; font-weight: 700; font-display: swap;
  src: url(../fonts/barlow-condensed-700.woff2) format("woff2");
}
@font-face {
  font-family: "Inter"; font-style: normal; font-weight: 400 600; font-display: swap;
  src: url(../fonts/inter-latin.woff2) format("woff2");
}

/* ===== Variables ===== */
:root {
  --bg: #ffffff;
  --bg-alt: #f3f5f8;
  --dark: #0d1117;
  --dark-2: #161b22;
  --text: #1c2430;
  --muted: #5b6676;
  --line: #e2e7ee;
  --accent: #ff8a1f;
  --accent-dark: #e06f00;
  --accent-text: #a65100; /* naranja con contraste AA sobre fondos claros */
  --radius: 14px;
  --shadow: 0 10px 30px rgba(13, 17, 23, .08);
  --font-head: "Barlow Condensed", "Arial Narrow", sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --header-h: 72px;
}

/* ===== Base ===== */
*, *::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: 17px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 {
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: .01em;
  margin: 0 0 .5em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.6rem, 6vw, 4.6rem); text-transform: uppercase; }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: 1.45rem; }
p { margin: 0 0 1em; }
svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }

.container { width: min(1180px, 100% - 32px); margin-inline: auto; }
.accent { color: var(--accent); }
.eyebrow {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: .95rem;
  text-transform: uppercase;
  letter-spacing: .18em;
  color: var(--accent-text);
  margin-bottom: .75rem;
  display: flex;
  align-items: center;
  gap: .6rem;
}
.eyebrow::before { content: ""; width: 28px; height: 2px; background: var(--accent); }

/* ===== Botones ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .9rem 1.6rem;
  border-radius: 999px;
  border: 2px solid var(--accent);
  background: var(--accent);
  color: #111;
  font-weight: 600;
  font-size: .98rem;
  text-decoration: none;
  cursor: pointer;
  transition: transform .2s, background .2s, border-color .2s, color .2s;
}
.btn:hover { background: var(--accent-dark); border-color: var(--accent-dark); transform: translateY(-2px); }
.btn--ghost { background: transparent; color: inherit; border-color: currentColor; }
.btn--ghost:hover { background: var(--accent); border-color: var(--accent); color: #111; }
.btn--sm { padding: .55rem 1.1rem; font-size: .9rem; }
.btn--block { width: 100%; }
.btn--whatsapp { background: #25d366; border-color: #25d366; color: #fff; margin-top: .5rem; }
.btn--whatsapp:hover { background: #1ebe5b; border-color: #1ebe5b; }
.btn__icon { width: 18px; height: 18px; }

/* ===== Cabecera ===== */
.header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  height: var(--header-h);
  transition: background .3s, box-shadow .3s;
  color: #fff;
}
.header.is-scrolled { background: rgba(13, 17, 23, .92); backdrop-filter: blur(10px); box-shadow: 0 4px 20px rgba(0,0,0,.25); }
.header__inner { height: 100%; display: flex; align-items: center; justify-content: space-between; }
.logo { display: flex; align-items: center; gap: .7rem; text-decoration: none; }
.logo__mark {
  display: grid; place-items: center;
  width: 42px; height: 42px;
  border-radius: 10px;
  background: var(--accent);
  color: #111;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.3rem;
}
.logo__text { font-family: var(--font-head); font-weight: 700; font-size: 1.35rem; line-height: 1; display: flex; flex-direction: column; }
.logo__text small { font-family: var(--font-body); font-weight: 500; font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; opacity: .7; margin-top: 4px; }

.nav { display: flex; align-items: center; gap: 1.8rem; }
.nav a:not(.btn) { text-decoration: none; font-weight: 500; font-size: .95rem; opacity: .85; transition: opacity .2s, color .2s; }
.nav a:not(.btn):hover { opacity: 1; color: var(--accent); }

.nav-toggle { display: none; background: none; border: 0; padding: 8px; cursor: pointer; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: #fff; margin: 5px 0; transition: transform .3s, opacity .3s; }
.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); }

/* ===== Hero ===== */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  color: #fff;
  background: var(--dark);
  overflow: hidden;
  padding: calc(var(--header-h) + 40px) 0 60px;
}
.hero__bg {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.05);
  animation: heroZoom 18s ease-out forwards;
}
.hero__bg::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(100deg, rgba(13,17,23,.96) 0%, rgba(13,17,23,.85) 45%, rgba(13,17,23,.45) 100%),
    repeating-linear-gradient(90deg, rgba(255,255,255,.03) 0 1px, transparent 1px 80px);
}
@keyframes heroZoom { to { transform: scale(1); } }
.hero__content { position: relative; max-width: 1180px; }
.hero__content > * { max-width: 760px; }
.hero .eyebrow { color: var(--accent); }
.hero__lead { font-size: 1.15rem; color: rgba(255,255,255,.82); max-width: 620px; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 1rem; margin: 2rem 0 2.5rem; }
.hero__badges { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .8rem 1.8rem; font-size: .95rem; color: rgba(255,255,255,.85); }
.hero__badges li { display: flex; align-items: center; gap: .5rem; }
.hero__badges svg { color: var(--accent); width: 18px; height: 18px; }

/* ===== Secciones ===== */
.section { padding: clamp(70px, 10vw, 120px) 0; }
.section--alt { background: var(--bg-alt); }
.section--dark { background: var(--dark); color: #fff; }
.section--dark .split__text p { color: rgba(255,255,255,.8); }
.section--dark .eyebrow { color: var(--accent); }
.section__head { max-width: 680px; margin-bottom: 3rem; }
.section__head p:last-child { color: var(--muted); font-size: 1.08rem; }

/* Tarjetas de servicio */
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2rem 1.6rem;
  transition: transform .3s, box-shadow .3s, border-color .3s;
  position: relative;
  overflow: hidden;
}
.card::after { content: ""; position: absolute; left: 0; top: 0; height: 3px; width: 0; background: var(--accent); transition: width .4s; }
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: transparent; }
.card:hover::after { width: 100%; }
.card__icon {
  width: 54px; height: 54px;
  display: grid; place-items: center;
  border-radius: 12px;
  background: rgba(255,138,31,.12);
  color: var(--accent-dark);
  margin-bottom: 1.2rem;
}
.card__icon svg { width: 26px; height: 26px; }
.card p { color: var(--muted); font-size: .95rem; margin: 0; }

.sectors { margin-top: 3.5rem; padding: 2rem; border-radius: var(--radius); background: var(--dark); color: #fff; }
.sectors h3 { margin-bottom: 1.2rem; }
.sectors ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .7rem; }
.sectors li { padding: .5rem 1rem; border: 1px solid rgba(255,255,255,.18); border-radius: 999px; font-size: .92rem; transition: border-color .2s, color .2s; }
.sectors li:hover { border-color: var(--accent); color: var(--accent); }

/* Pasos */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; counter-reset: s; }
.step { position: relative; padding-top: 1.5rem; border-top: 2px solid var(--line); }
.step::before { content: ""; position: absolute; top: -2px; left: 0; width: 48px; height: 2px; background: var(--accent); }
.step__num { font-family: var(--font-head); font-size: 3rem; font-weight: 700; color: var(--accent); line-height: 1; display: block; margin-bottom: .6rem; }
.step p { color: var(--muted); font-size: .95rem; }

/* Split */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 5rem); align-items: center; }
.split--reverse .split__media { order: 2; }
.split__media img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); box-shadow: var(--shadow); }
.split__media { position: relative; }
.split__media::before { content: ""; position: absolute; inset: 18px -18px -18px 18px; border: 2px solid var(--accent); border-radius: var(--radius); z-index: -1; }
.section--dark .split__media::before { inset: 18px 18px -18px -18px; }
.section--dark, #sobre-mi { position: relative; isolation: isolate; }
.split__text p { color: var(--muted); }
.split__text .btn { margin-top: 1rem; }

.checklist { list-style: none; padding: 0; margin: 1.5rem 0 0; display: grid; gap: .7rem; }
.checklist li { position: relative; padding-left: 2rem; font-weight: 500; }
.checklist li::before {
  content: ""; position: absolute; left: 0; top: .3em;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23111' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 12px no-repeat;
}

/* Galería */
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-rows: 280px; gap: 1rem; }
.gallery__item { position: relative; margin: 0; border-radius: var(--radius); overflow: hidden; }
.gallery__item--wide { grid-column: span 2; }
.gallery__item img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s; }
.gallery__item:hover img { transform: scale(1.06); }
.gallery__item figcaption {
  position: absolute; inset: auto 0 0;
  padding: 2.5rem 1.2rem 1rem;
  background: linear-gradient(transparent, rgba(13,17,23,.85));
  color: #fff;
  font-family: var(--font-head);
  font-size: 1.25rem;
  font-weight: 600;
}

/* Contacto */
.contact { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(2rem, 5vw, 5rem); align-items: start; }
.contact__info > p { color: var(--muted); }
.contact__list { list-style: none; padding: 0; margin: 2rem 0; display: grid; gap: 1rem; }
.contact__list li { display: flex; align-items: center; gap: .9rem; font-weight: 500; }
.contact__list svg { color: var(--accent-dark); }
.contact__list a { text-decoration: none; }
.contact__list a:hover { color: var(--accent-dark); }

.form { background: #fff; padding: clamp(1.5rem, 4vw, 2.5rem); border-radius: var(--radius); box-shadow: var(--shadow); display: grid; gap: 1.1rem; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; align-items: start; }
.form label { display: grid; gap: .4rem; font-size: .88rem; font-weight: 600; color: var(--text); }
.form input, .form select, .form textarea {
  font: inherit; font-size: .98rem; font-weight: 400;
  padding: .8rem 1rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg-alt);
  color: var(--text);
  transition: border-color .2s, background .2s, box-shadow .2s;
  width: 100%;
}
.form textarea { resize: vertical; }
.form input:focus, .form select:focus, .form textarea:focus { outline: none; border-color: var(--accent); background: #fff; box-shadow: 0 0 0 4px rgba(255,138,31,.15); }
.form .is-invalid { border-color: #d93025; background: #fff6f5; }
.form__error { font-size: .8rem; font-weight: 500; color: #c5221f; }
.form__check { display: flex !important; flex-wrap: wrap; align-items: flex-start; gap: .6rem !important; font-weight: 500 !important; }
.form__check span:not(.form__error) { flex: 1; }
.form__check .form__error { flex-basis: 100%; }
.form__check input { width: 18px; height: 18px; margin: .15rem 0 0; padding: 0; accent-color: var(--accent-dark); flex-shrink: 0; }
.form__check.is-invalid span { color: #c5221f; }
.form__check a { color: var(--accent-text); }
.form__note { margin: 0; font-size: .9rem; min-height: 1.4em; color: var(--muted); }
.form__note a { color: var(--accent-text); font-weight: 600; }
.form__note--error { color: #c5221f; }
.link-btn { background: none; border: 0; padding: 0; font: inherit; font-weight: 600; color: var(--accent-text); text-decoration: underline; cursor: pointer; }

/* Footer */
.footer { background: var(--dark); color: rgba(255,255,255,.7); padding: 2.5rem 0; font-size: .9rem; }
.footer__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem 2rem; }
.footer p { margin: 0; }
.footer a { color: var(--accent); text-decoration: none; }
.logo--footer { color: #fff; }

/* Animación de entrada (solo con JS activo: sin JS el contenido se ve igual) */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s ease, transform .7s ease; }
.js .reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .hero__bg { animation: none; transform: none; }
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .cards, .steps { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .nav {
    position: fixed;
    inset: var(--header-h) 0 auto;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 1rem 16px 1.5rem;
    background: rgba(13,17,23,.98);
    transform: translateY(-110%);
    visibility: hidden;
    transition: transform .35s, visibility .35s;
  }
  .nav.is-open { transform: none; visibility: visible; }
  .nav a:not(.btn) { padding: .9rem 0; border-bottom: 1px solid rgba(255,255,255,.08); }
  .nav .btn { margin-top: 1rem; }
  .header:has(.nav.is-open) { background: rgba(13,17,23,.98); }

  .split, .contact { grid-template-columns: 1fr; }
  .split--reverse .split__media { order: 0; }
  .split__media::before { display: none; }
  .gallery { grid-template-columns: 1fr 1fr; grid-auto-rows: 200px; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .cards, .steps, .form__row { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: 1fr; }
  .gallery__item--wide { grid-column: auto; }
  .hero__cta .btn { flex: 1 1 100%; }
  .footer__inner { flex-direction: column; align-items: flex-start; }
}
