:root {
  --yellow: #ffc800;
  --gold: linear-gradient(135deg, #ffe066 0%, #ffc800 45%, #d99f00 100%);
  --black: #000;
  --bg: #070707;
  --line: rgba(255, 255, 255, .08);
  --glass: rgba(255, 255, 255, .035);
  --text: #f4f4f4;
  --muted: #a3a3a3;
  --font-title: 'Bebas Neue', sans-serif;
  --font-body: 'Barlow', sans-serif;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 112.5%; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--yellow); color: #000; }

/* Scrollbar discreta */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: #050505; }
::-webkit-scrollbar-thumb { background: #2a2a2a; border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--yellow); }

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

.container {
  width: min(100% - 3rem, 900px);
  margin-inline: auto;
}

/* ---------- Iconos ---------- */
.icon {
  width: 20px; height: 20px;
  fill: none; stroke: var(--yellow);
  stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round;
  flex-shrink: 0;
}
.icon--lg {
  width: 30px; height: 30px;
  filter: drop-shadow(0 0 8px rgba(255, 200, 0, .35));
}

/* ---------- Botones ---------- */
.btn {
  position: relative;
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .9rem 1.7rem;
  background: var(--gold); color: #111;
  font-weight: 700; font-size: .78rem;
  letter-spacing: .14em; text-transform: uppercase;
  border: 0;
  border-radius: 2px;
  box-shadow: 0 6px 24px rgba(255, 200, 0, .22);
  overflow: hidden;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.btn::after { /* destello al pasar el mouse */
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.55) 50%, transparent 70%);
  transform: translateX(-120%);
  transition: transform .7s var(--ease);
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 10px 32px rgba(255, 200, 0, .38); }
.btn:hover::after { transform: translateX(120%); }
.btn .icon { stroke: #111; width: 16px; height: 16px; }
.btn--small { padding: .6rem 1.1rem; }

.btn--outline {
  background: rgba(255, 255, 255, .04);
  color: var(--text);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22);
  backdrop-filter: blur(6px);
}
.btn--outline:hover {
  color: var(--yellow);
  box-shadow: inset 0 0 0 1px var(--yellow), 0 10px 32px rgba(255, 200, 0, .15);
}

/* ---------- Franja de seguridad ---------- */
.hazard {
  height: 8px;
  background: repeating-linear-gradient(
    -60deg,
    var(--yellow) 0 18px,
    transparent 18px 34px
  );
}
.hero .hazard { position: absolute; bottom: 8px; left: 0; right: 0; }
.hazard--footer { margin-top: 3rem; }

/* ---------- Header ---------- */
.header {
  background: rgba(0, 0, 0, .55);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  position: sticky; top: 0; z-index: 50;
  transition: background .3s, box-shadow .3s;
}
.header::after { /* línea dorada fina */
  content: '';
  position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 200, 0, .55), transparent);
}
.header.is-scrolled { background: rgba(0, 0, 0, .88); box-shadow: 0 8px 30px rgba(0, 0, 0, .5); }
.header__inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 84px;
}
.logo img { height: 75px; width: auto; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 600px;
  display: flex; align-items: center;
  background: #000;
  padding-bottom: 20px;
  isolation: isolate;
  overflow: hidden;
}
.hero::after { /* imagen de fondo difuminada */
  content: '';
  position: absolute; inset: -24px; z-index: -2;
  background: url('images/herramientas.jpg') center / cover no-repeat;
  filter: blur(4px) saturate(1.15) brightness(1.1);
}
.hero::before { /* capa oscura + resplandor dorado + viñeta */
  content: '';
  position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(ellipse at center, transparent 55%, rgba(0,0,0,.35) 100%),
    radial-gradient(ellipse at 15% 85%, rgba(255, 200, 0, .10), transparent 55%),
    linear-gradient(90deg, rgba(0,0,0,.72) 0%, rgba(0,0,0,.32) 55%, rgba(0,0,0,.12) 100%);
}
.eyebrow {
  display: flex; align-items: center; gap: .9rem;
  color: var(--yellow);
  font-size: .75rem; font-weight: 600;
  letter-spacing: .38em; text-transform: uppercase;
  margin-bottom: 1.2rem;
}
.eyebrow::before {
  content: '';
  width: 42px; height: 1px;
  background: var(--yellow);
}
.hero h1 {
  font-family: var(--font-title);
  font-weight: 400;
  font-size: clamp(3.4rem, 7.5vw, 5.4rem);
  line-height: .98;
  letter-spacing: .01em;
  text-transform: uppercase;
  text-shadow: 0 4px 40px rgba(0, 0, 0, .6);
}
.hero h1 span {
  background: var(--gold);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.hero__text {
  max-width: 480px; margin: 1.8rem 0 2.4rem;
  color: #bdbdbd; font-size: 1rem;
  padding-left: 1.1rem;
  border-left: 2px solid rgba(255, 200, 0, .6);
}
.hero__actions { display: flex; gap: .9rem; }

/* Entrada del hero */
.hero__content > * { animation: rise .9s var(--ease) both; }
.hero__content > *:nth-child(2) { animation-delay: .12s; }
.hero__content > *:nth-child(3) { animation-delay: .24s; }
.hero__content > *:nth-child(4) { animation-delay: .36s; }
@keyframes rise {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: none; }
}

/* ---------- Secciones ---------- */
.section { position: relative; padding: 6rem 0; }

.title {
  font-family: var(--font-title);
  font-weight: 400;
  font-size: 2.6rem;
  letter-spacing: .05em;
  text-transform: uppercase;
  margin-bottom: 3rem;
}
.title span {
  background: var(--gold);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.title::after {
  content: '';
  display: block;
  width: 56px; height: 3px;
  margin-top: .7rem;
  background: var(--gold);
}

/* ---------- Servicios (fondo con imagen) ---------- */
.section--dark {
  background:
    radial-gradient(ellipse at center, transparent 55%, rgba(0,0,0,.35) 100%),
    radial-gradient(ellipse at 15% 85%, rgba(255, 200, 0, .10), transparent 55%),
    linear-gradient(90deg, rgba(0,0,0,.72) 100%, rgba(0,0,0,.32) 55%, rgba(0,0,0,.12) 100%),
    url('images/servicios.jpg') center / cover no-repeat fixed;
}

.grid { display: grid; }
.grid--services {
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem;
  counter-reset: servicio;
}

.card {
  position: relative;
  counter-increment: servicio;
  padding: 1.8rem 1.5rem 1.8rem;
  background: var(--glass);
  border: 1px solid var(--line);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  overflow: hidden;
  transition: transform .4s var(--ease), border-color .4s, box-shadow .4s, background .4s;
}
.card::before { /* línea dorada superior que crece */
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: var(--gold);
  transform: scaleX(0); transform-origin: left;
  transition: transform .5s var(--ease);
}
.card::after { /* numeración */
  content: counter(servicio, decimal-leading-zero);
  position: absolute; top: .9rem; right: 1.2rem;
  font-family: var(--font-title);
  font-size: 1.6rem; line-height: 1;
  color: rgba(255, 255, 255, .07);
  transition: color .4s;
}
.card:hover {
  transform: translateY(-6px);
  background: rgba(255, 255, 255, .06);
  border-color: rgba(255, 200, 0, .35);
  box-shadow: 0 18px 40px rgba(0, 0, 0, .5), 0 0 30px rgba(255, 200, 0, .06);
}
.card:hover::before { transform: scaleX(1); }
.card:hover::after { color: rgba(255, 200, 0, .35); }
.card .icon { margin-bottom: 1.2rem; }
.card h3 {
  font-family: var(--font-title); font-weight: 400;
  font-size: 1.4rem; line-height: 1.15;
  text-transform: uppercase;
  letter-spacing: .05em; margin-bottom: .6rem;
}
.card p { color: var(--muted); font-size: .9rem; }
.card p + p { margin-top: .4rem; }

/* ---------- Galería ---------- */
.section--gallery {
  background:
    radial-gradient(ellipse at 80% 0%, rgba(255, 200, 0, .07), transparent 55%),
    linear-gradient(180deg, #0b0b0b, #060606);
}
.grid--gallery {
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.gallery__item {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  padding: 0;
  border: 1px solid var(--line);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .4);
}
.gallery__item::after { /* marco dorado al hover */
  content: '';
  position: absolute; inset: 0;
  border: 2px solid var(--yellow);
  opacity: 0;
  transform: scale(1.04);
  transition: opacity .4s, transform .4s var(--ease);
  pointer-events: none;
}
.gallery__item img {
  width: 100%; height: 100%; object-fit: cover;
  filter: grayscale(.35) brightness(.8) contrast(1.05);
  transition: filter .5s var(--ease), transform .8s var(--ease);
}
.gallery__item:hover img { filter: none; transform: scale(1.07); }
.gallery__item:hover::after { opacity: 1; transform: none; }

/* ---------- Contacto (fondo con imagen) ---------- */
.section--contact {
  padding-bottom: 0;
  background:
    radial-gradient(ellipse at center, transparent 55%, rgba(0,0,0,.35) 100%),
    radial-gradient(ellipse at 15% 85%, rgba(255, 200, 0, .10), transparent 55%),
    linear-gradient(90deg, rgba(0,0,0,.72) 100%, rgba(0,0,0,.32) 55%, rgba(0,0,0,.12) 100%),
    url('/images/contacto.jpg') center / cover no-repeat fixed;
}
.contact {
  position: relative;
  padding: 2.8rem 2.5rem 3rem;
  background: rgba(10, 10, 10, .55);
  border: 1px solid var(--line);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .5);
}
.contact::before {
  content: '';
  position: absolute; top: -1px; left: -1px; right: -1px; height: 3px;
  background: var(--gold);
}
.contact__title {
  font-family: var(--font-title); font-weight: 400;
  font-size: 2.6rem; letter-spacing: .05em; text-transform: uppercase;
  margin-bottom: 2rem;
}
.contact__grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem;
}
.contact__item { display: flex; gap: 1rem; align-items: flex-start; }
.contact__item .icon {
  width: 42px; height: 42px; padding: 11px;
  border: 1px solid rgba(255, 200, 0, .35);
  border-radius: 50%;
  background: rgba(255, 200, 0, .06);
}
.contact__item strong { display: block; font-size: .95rem; font-weight: 600; letter-spacing: .03em; }
.contact__item a, .contact__item span { font-size: .9rem; color: var(--muted); transition: color .25s; }
.contact__item a:hover { color: var(--yellow); }

/* ---------- Footer ---------- */
.footer {
  text-align: center;
  padding: 1.2rem 1rem 2rem;
  font-size: .8rem; letter-spacing: .08em; color: #777;
  background: #000;
}

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(0, 0, 0, .95);
  backdrop-filter: blur(6px);
  display: none; align-items: center; justify-content: center;
  padding: 2rem;
}
.lightbox.is-open { display: flex; animation: fade .3s; }
.lightbox img { max-height: 90vh; max-width: 90vw; box-shadow: 0 30px 80px rgba(0,0,0,.7); }
.lightbox__close {
  position: absolute; top: 1rem; right: 1.5rem;
  font-size: 2.5rem; color: var(--text);
  transition: color .2s;
}
.lightbox__close:hover { color: var(--yellow); }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* ---------- Animación al hacer scroll ---------- */
.reveal {
  opacity: 0; transform: translateY(24px);
  transition: opacity .8s var(--ease), transform .8s var(--ease),
              border-color .4s, box-shadow .4s, background .4s;
}
.reveal.is-visible { opacity: 1; transform: none; }
.card.reveal.is-visible:hover { transform: translateY(-6px); }

/* ---------- Tarjetas clicables ---------- */
.card[data-service] { cursor: pointer; }
.card[data-service]:focus-visible { outline: 2px solid var(--yellow); outline-offset: 3px; }
.card__more {
  display: inline-flex; align-items: center; gap: .4rem;
  margin-top: 1.1rem;
  font-size: .72rem; font-weight: 600;
  letter-spacing: .16em; text-transform: uppercase;
  color: var(--yellow);
  opacity: .65;
  transition: opacity .3s, gap .3s var(--ease);
}
.card__more::after { content: '→'; }
.card:hover .card__more,
.card:focus-visible .card__more { opacity: 1; gap: .75rem; }

/* ---------- Modal de servicio ---------- */
html.modal-open { overflow: hidden; }

.modal {
  position: fixed; inset: 0; z-index: 90;
  display: flex; align-items: center; justify-content: center;
  padding: 1rem;
}
.modal[hidden] { display: none; }

.modal__backdrop {
  position: absolute; inset: 0;
  background: rgba(0, 0, 0, .72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0;
  transition: opacity .3s var(--ease);
}

.modal__panel {
  position: relative;
  display: flex; flex-direction: column;
  width: min(760px, 100%);
  max-height: calc(100vh - 2rem);
  max-height: calc(100dvh - 2rem);
  background: linear-gradient(180deg, #131313, #0a0a0a);
  border: 1px solid var(--line);
  border-top: 3px solid var(--yellow);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .7);
  outline: none;
  opacity: 0;
  transform: translateY(28px) scale(.97);
  transition: opacity .3s var(--ease), transform .35s var(--ease);
}
.modal.is-open .modal__backdrop { opacity: 1; }
.modal.is-open .modal__panel { opacity: 1; transform: none; }

.modal__close {
  position: absolute; top: .7rem; right: .8rem; z-index: 2;
  width: 40px; height: 40px;
  display: grid; place-items: center;
  font-size: 1.8rem; line-height: 1;
  color: var(--muted);
  border-radius: 50%;
  transition: color .2s, background .2s;
}
.modal__close:hover { color: var(--yellow); background: rgba(255, 255, 255, .06); }
.modal__close:focus-visible,
.modal__thumb:focus-visible,
.modal__cta:focus-visible { outline: 2px solid var(--yellow); outline-offset: 3px; }

.modal__body {
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 2.4rem 2.4rem 2.2rem;
}

.modal__head { display: flex; align-items: center; gap: 1.1rem; margin-bottom: 1.4rem; padding-right: 2.2rem; }
.modal__icon {
  display: grid; place-items: center;
  width: 56px; height: 56px; flex-shrink: 0;
  border: 1px solid rgba(255, 200, 0, .35);
  background: rgba(255, 200, 0, .06);
  border-radius: 50%;
}
.modal__eyebrow {
  font-size: .68rem; font-weight: 600;
  letter-spacing: .3em; text-transform: uppercase;
  color: var(--yellow);
}
.modal__title {
  font-family: var(--font-title); font-weight: 400;
  font-size: 2.1rem; line-height: 1.05;
  letter-spacing: .04em; text-transform: uppercase;
}

.modal__summary { font-size: 1.05rem; color: var(--text); margin-bottom: .7rem; }
.modal__desc { font-size: .95rem; color: var(--muted); }

.modal__points { list-style: none; margin-top: 1.2rem; display: grid; gap: .45rem; }
.modal__points li { position: relative; padding-left: 1.4rem; font-size: .9rem; color: #cfcfcf; }
.modal__points li::before {
  content: '';
  position: absolute; left: .15rem; top: .55em;
  width: 7px; height: 7px;
  background: var(--yellow);
  transform: rotate(45deg);
}

.modal__label {
  display: flex; align-items: center; gap: .9rem;
  margin: 1.8rem 0 .8rem;
  font-size: .68rem; font-weight: 600;
  letter-spacing: .3em; text-transform: uppercase;
  color: var(--muted);
}
.modal__label::after { content: ''; flex: 1; height: 1px; background: var(--line); }

.modal__gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; }
.modal__thumb {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  padding: 0;
  border: 1px solid var(--line);
  cursor: zoom-in;
}
.modal__thumb img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .6s var(--ease), filter .4s;
}
.modal__thumb:hover img { transform: scale(1.07); }
.modal__thumb:hover { border-color: rgba(255, 200, 0, .55); }

.modal__cta { margin-top: 1.9rem; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  /* el fondo fijo (parallax) falla en móviles */
  .hero, .section--dark, .section--contact { background-attachment: scroll; }
}
@media (max-width: 720px) {
  .section { padding: 4rem 0; }
  .grid--services { grid-template-columns: repeat(2, 1fr); }
  .grid--gallery { grid-template-columns: repeat(2, 1fr); gap: .6rem; }
  .contact__grid { grid-template-columns: 1fr; }
  .contact { padding: 2rem 1.4rem; }
  .hero { min-height: 500px; }
}
@media (max-width: 600px) {
  .modal { padding: .6rem; }
  .modal__panel { max-height: calc(100vh - 1.2rem); max-height: calc(100dvh - 1.2rem); }
  .modal__body { padding: 1.8rem 1.2rem 1.4rem; }
  .modal__head { gap: .8rem; }
  .modal__icon { width: 46px; height: 46px; }
  .modal__title { font-size: 1.7rem; }
  .modal__cta { width: 100%; justify-content: center; }
}
@media (max-width: 440px) {
  .grid--services { grid-template-columns: 1fr; }
  .hero__actions { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}