/* variables de marca */
:root {
  --yellow: #f8d90f;
  --yellow-dark: #d9b800;
  --green: #3fae3a;
  --green-dark: #1f6b25;
  --green-deep: #0b2a0f;
  --black: #111111;
  --ink: #1d1d1f;
  --gray-900: #1a1a1a;
  --gray-700: #3a3a3c;
  --gray-500: #6e6e73;
  --gray-200: #e8e8ea;
  --gray-100: #f5f5f4;
  --white: #ffffff;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(0, 0, 0, .08);
  --font-head: "Barlow Condensed", "Arial Narrow", sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

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

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

h1, h2, h3 {
  font-family: var(--font-head);
  line-height: 1.05;
  letter-spacing: .3px;
  text-transform: uppercase;
}
h1 { font-size: clamp(2.6rem, 6vw, 4.6rem); font-weight: 800; }
h2 { font-size: clamp(2rem, 4vw, 3rem); font-weight: 800; }
h3 { font-size: 1.35rem; font-weight: 700; }

.container { width: min(1180px, 92%); margin-inline: auto; }
.center { text-align: center; margin-top: 2.5rem; }

.eyebrow {
  display: inline-block;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: .8rem;
}

/* botones */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .95rem 1.7rem;
  background: var(--yellow);
  color: var(--black);
  font-weight: 600;
  border-radius: 999px;
  border: 2px solid var(--yellow);
  transition: transform .2s, background .2s, box-shadow .2s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(248, 217, 15, .35); }
.btn--ghost { background: transparent; color: var(--white); border-color: rgba(255, 255, 255, .35); }
.btn--ghost:hover { border-color: var(--yellow); color: var(--yellow); box-shadow: none; }
.btn--dark { background: var(--black); color: var(--white); border-color: var(--black); }
.btn--dark:hover { box-shadow: 0 8px 20px rgba(0, 0, 0, .25); }
.btn--sm { padding: .55rem 1.2rem; font-size: .9rem; }

/* barra superior */
.topbar { background: var(--green-dark); color: var(--white); font-size: .82rem; font-weight: 500; }
.topbar__inner { display: flex; justify-content: space-between; gap: 1rem; padding: .45rem 0; }

/* header */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--gray-200);
}
.header__inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }

.logo { display: flex; align-items: center; gap: .6rem; color: var(--white); }
.logo__mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  background: var(--yellow);
  color: var(--black);
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.5rem;
  border-radius: 10px;
  transform: skewX(-8deg);
}
.logo__text { font-family: var(--font-head); font-size: 1.6rem; font-weight: 600; letter-spacing: 1px; }
.logo__text strong { color: var(--yellow); font-weight: 800; }

/* hero */
.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 85% 25%, rgba(63, 174, 58, .28), transparent 45%),
    radial-gradient(circle at 10% 90%, rgba(248, 217, 15, .10), transparent 40%),
    linear-gradient(160deg, var(--green-deep) 0%, #0a0a0a 60%);
  color: var(--white);
  padding: 3rem 0 6rem;
}
.hero__inner { display: grid; grid-template-columns: 1fr 1.15fr; gap: 3.5rem; align-items: center; position: relative; z-index: 2; }
.hero .hl { color: var(--yellow); }
.hero__lead { margin: 1.5rem 0 2.2rem; font-size: 1.12rem; color: rgba(255, 255, 255, .72); max-width: 540px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 1rem; }

.hero__stats { display: flex; gap: 2.5rem; margin-top: 3rem; padding-top: 2rem; border-top: 1px solid rgba(255, 255, 255, .1); }
.hero__stats strong { display: block; font-family: var(--font-head); font-size: 2.4rem; color: var(--yellow); line-height: 1; }
.hero__stats span { font-size: .85rem; color: rgba(255, 255, 255, .6); }

.hero__media { position: relative; }
/* franjas de seguridad decorativas */
.hero__stripes {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 14px;
  background: linear-gradient(90deg, var(--green) 0 33%, var(--yellow) 33% 66%, var(--black) 66%);
}

/* secciones */
.section { padding: 6.5rem 0; }
.section--alt { background: var(--gray-100); }
.section--dark { background: var(--black); color: var(--white); }
.section__head { max-width: 680px; margin: 0 auto 3.5rem; text-align: center; }
.section__head p { margin-top: 1rem; color: var(--gray-500); font-size: 1.05rem; }
.section__head--light p { color: rgba(255, 255, 255, .65); }

/* tarjetas de servicios */
.services { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.card {
  position: relative;
  padding: 2.2rem 2rem;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  transition: transform .25s, box-shadow .25s, border-color .25s;
  overflow: hidden;
}
.card::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  height: 4px;
  width: 0;
  background: var(--green);
  transition: width .35s;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: transparent; }
.card:hover::after { width: 100%; }
.card__icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: rgba(63, 174, 58, .12);
  margin-bottom: 1.4rem;
}
.card__icon svg { width: 28px; height: 28px; fill: none; stroke: var(--green-dark); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.card h3 { margin-bottom: .6rem; }
.card p { color: var(--gray-500); font-size: .96rem; }

/* pasos */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; counter-reset: step; }
.step {
  padding: 2rem 1.6rem;
  border-radius: var(--radius);
  background: var(--gray-900);
  border: 1px solid rgba(255, 255, 255, .07);
  border-top: 3px solid var(--green);
  position: relative;
}
.step__num { font-family: var(--font-head); font-size: 3rem; font-weight: 800; color: var(--yellow); line-height: 1; }
.step h3 { margin: .8rem 0 .5rem; }
.step p { color: rgba(255, 255, 255, .62); font-size: .95rem; }

/* chips de productos */
.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: .8rem; max-width: 900px; margin: 0 auto; }
.chips li a { display: block; padding: .7rem 1.3rem; border-radius: 999px; color: inherit; }
.chips li {
  padding: 0;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 999px;
  font-weight: 500;
  font-size: .95rem;
  transition: background .2s, border-color .2s;
}
.chips li:hover { background: var(--green); border-color: var(--green); color: var(--white); }
.chips li:hover a { color: var(--white); }
.link-arrow { font-weight: 600; color: var(--green-dark); border-bottom: 2px solid var(--yellow); padding-bottom: 2px; }

/* nosotros */
.about { display: grid; grid-template-columns: 1.3fr 1fr; gap: 4rem; align-items: center; }
.about__text p { color: var(--gray-700); margin-top: 1rem; }
.checks { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; margin-top: 1.8rem; }
.checks li { position: relative; padding-left: 1.8rem; font-weight: 500; }
.checks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .3rem;
  width: 1.1rem;
  height: 1.1rem;
  border-radius: 4px;
  background: var(--green);
}
.about__card {
  padding: 2.8rem;
  border-radius: 20px;
  background: var(--gray-100);
  text-align: center;
  border: 1px solid var(--gray-200);
}
.about__logo { max-height: 90px; width: auto; margin: 0 auto 1.4rem; }
.about__card p { color: var(--gray-700); margin-bottom: 1.6rem; }

/* llamado a la accion */
.cta { background: linear-gradient(120deg, var(--green-dark), var(--green)); padding: 3.5rem 0; }
.cta__inner { display: flex; align-items: center; justify-content: space-between; gap: 2rem; }
.cta h2 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); color: var(--white); max-width: 680px; }

/* contacto */
.contact { display: grid; grid-template-columns: 1fr 1.1fr; gap: 3.5rem; align-items: stretch; }
.contact__list { margin-top: 2rem; display: grid; gap: 1.1rem; }
.contact__list li { display: flex; flex-direction: column; padding-bottom: 1.1rem; border-bottom: 1px solid var(--gray-200); }
.contact__label { font-size: .75rem; text-transform: uppercase; letter-spacing: 1.5px; color: var(--gray-500); font-weight: 600; }
.contact__list a { font-weight: 500; font-size: 1.05rem; transition: color .2s; }
.contact__list a:hover { color: var(--green); }
.hours { margin-top: 2rem; padding: 1.5rem; background: var(--gray-100); border-radius: var(--radius); border-left: 4px solid var(--green); }
.hours h3 { font-size: 1.1rem; margin-bottom: .5rem; }
.hours p { font-size: .93rem; color: var(--gray-700); }
.contact__map { border-radius: 20px; overflow: hidden; min-height: 420px; box-shadow: var(--shadow); }
.contact__map iframe { width: 100%; height: 100%; min-height: 420px; border: 0; filter: grayscale(.3); }

/* footer */
.footer { background: var(--black); border-top: 4px solid var(--green); color: rgba(255, 255, 255, .65); padding-top: 3.5rem; }
.footer__inner { display: flex; justify-content: space-between; align-items: center; gap: 2rem; padding-bottom: 2.5rem; }
.footer__tag { margin-top: .8rem; font-size: .9rem; max-width: 360px; }
.footer__social { display: flex; gap: .8rem; }
.footer__social a {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .15);
  transition: background .2s, border-color .2s;
}
.footer__social a:hover { background: var(--yellow); border-color: var(--yellow); }
.footer__social a:hover svg { stroke: var(--black); }
.footer__social a:hover svg .fill { fill: var(--black); }
.footer__social svg { width: 20px; height: 20px; fill: none; stroke: var(--white); stroke-width: 1.8; stroke-linejoin: round; }
.footer__social svg .fill { fill: var(--white); stroke: none; }
.footer__bottom {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.4rem 0;
  border-top: 1px solid rgba(255, 255, 255, .08);
  font-size: .85rem;
}
.footer__bottom a:hover { color: var(--green); }
.footer__inner, .footer__bottom { flex-direction: column; justify-content: center; align-items: center; text-align: center; }
.footer__bottom { gap: .4rem; }
.footer__tag { margin-left: auto; margin-right: auto; }

/* boton flotante */
.wa-float {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 60;
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #25d366;
  box-shadow: 0 10px 25px rgba(37, 211, 102, .45);
  transition: transform .2s;
}
.wa-float:hover { transform: scale(1.08); }
.wa-float svg { width: 32px; height: 32px; fill: var(--white); }

/* logo recortado de la imagen original de dozermaq */
.brand-logo {
  display: block;
  height: 62px;
  aspect-ratio: 364 / 201;
  background: url("https://agro-costa.com/wp-content/uploads/2024/04/logo-dozer-maq-pe.png") center / contain no-repeat;
}
.brand-logo--footer { height: 70px; }
.header .brand-logo { height: 50px; aspect-ratio: 364 / 156; background-size: 100% auto; background-position: top center; }
.footer__logo-wrap { display: inline-block; background: var(--white); padding: .6rem .9rem; border-radius: 12px; }

/* grupos de servicios */
.svc-group + .svc-group { margin-top: 3.5rem; }
.svc-group__title { display: flex; align-items: center; gap: .8rem; font-size: 1.6rem; margin-bottom: 1.4rem; }
.svc-group__title span { display: inline-grid; place-items: center; min-width: 46px; height: 46px; padding: 0 .6rem; border-radius: 12px; background: var(--yellow); color: var(--black); font-size: 1.1rem; }
.services--4 { grid-template-columns: repeat(4, 1fr); }
.services--2 { grid-template-columns: repeat(2, 1fr); }
.services--5 { grid-template-columns: repeat(5, 1fr); gap: 1.2rem; }
.services--5 .card { padding: 1.8rem 1.3rem; }
.services--5 .card h3 { font-size: 1.1rem; }
.svc-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; margin-top: 3.5rem; }
.svc-pair .svc-group + .svc-group { margin-top: 0; }
.svc-pair + .svc-group { margin-top: 3.5rem; }
.services--2 .card { padding: 2rem 1.6rem; }
.services--2 .card h3 { font-size: 1.2rem; }
.services--4 .card { padding: 2rem 1.6rem; }
.services--4 .card h3 { font-size: 1.2rem; }

/* software de mantenimiento */
.software { display: grid; grid-template-columns: 1fr 2fr; gap: 2rem; align-items: center; padding: 2.4rem; border-radius: 20px; background: var(--black); color: var(--white); }
.software__intro .card__icon { background: rgba(248, 217, 15, .15); }
.software__intro .card__icon svg { stroke: var(--yellow); }
.software__intro p { color: rgba(255, 255, 255, .72); }
.software__list { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem 2rem; }
.software__list li { padding-left: 1.2rem; border-left: 3px solid var(--green); }
.software__list strong { display: block; font-size: 1rem; }
.software__list span { font-size: .9rem; color: rgba(255, 255, 255, .6); }

/* por que elegirnos */
.why { display: grid; grid-template-columns: 1.1fr 1fr; gap: 1.5rem; align-items: stretch; }
.why__main { padding: 2.6rem; border-radius: 20px; background: linear-gradient(140deg, var(--green-deep), var(--green-dark)); color: var(--white); border-bottom: 6px solid var(--yellow); }
.why__tag { display: inline-block; padding: .3rem .8rem; border-radius: 999px; background: var(--yellow); color: var(--black); font-size: .75rem; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; margin-bottom: 1rem; }
.why__main h3 { font-size: clamp(1.7rem, 3vw, 2.3rem); color: var(--yellow); margin-bottom: .8rem; }
.why__main p { color: rgba(255, 255, 255, .75); }
.why__list { display: grid; gap: 1rem; }
.why__list li { display: flex; align-items: center; gap: 1rem; padding: 1.2rem 1.4rem; background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius); font-weight: 600; }
.why__list li::before { content: "✓"; display: grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--green); color: var(--white); font-weight: 800; }

/* cta con dos botones y extras */
.cta__actions { display: flex; flex-wrap: wrap; gap: 1rem; }
.btn--light { background: var(--white); color: var(--black); border-color: var(--white); }
.topbar__phones a:hover, .footer__links a:hover { color: var(--yellow); }
.contact__list li a + a { margin-top: .2rem; }

@media (max-width: 980px) {
  .services--4, .services--5 { grid-template-columns: repeat(2, 1fr); }
  .software, .why, .svc-pair { grid-template-columns: 1fr; }
  .cta__actions { justify-content: center; }
}
@media (max-width: 760px) {
  .services--4, .services--5, .services--2, .software__list { grid-template-columns: 1fr; }
  .software { padding: 1.8rem; }
  .why__main { padding: 2rem; }
}

/* galeria */
.gallery-sec { background: radial-gradient(circle at 15% 0%, rgba(63, 174, 58, .22), transparent 45%), linear-gradient(170deg, #0d1f10 0%, #0a0a0a 70%); color: var(--white); }
.gallery-sec .hl { color: var(--yellow); }
.gallery-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 2rem; flex-wrap: wrap; margin-bottom: 2.5rem; }
.g-filters { display: flex; flex-wrap: wrap; gap: .5rem; padding: .35rem; border-radius: 999px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .1); }
.g-filter { font: inherit; font-size: .9rem; font-weight: 500; color: rgba(255, 255, 255, .75); background: transparent; border: 0; padding: .55rem 1.1rem; border-radius: 999px; cursor: pointer; transition: background .2s, color .2s; }
.g-filter:hover { color: var(--white); }
.g-filter.is-active { background: var(--yellow); color: var(--black); }
.gallery { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 170px; grid-auto-flow: dense; gap: 14px; }
.g-item { position: relative; margin: 0; grid-row: span 2; border-radius: 16px; overflow: hidden; background: #1a1a1a; }
.g-item--wide { grid-column: span 2; }
.g-item--video { grid-row: span 4; }
.g-item.is-hidden { display: none; }
.g-link { display: block; width: 100%; height: 100%; }
.g-item img, .g-item video { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .6s cubic-bezier(.2, .7, .2, 1); }
.g-item:hover img { transform: scale(1.06); }
.g-item figcaption { position: absolute; inset: auto 0 0 0; padding: 2.5rem 1rem 1rem; font-size: .88rem; font-weight: 500; line-height: 1.35; color: var(--white); background: linear-gradient(transparent, rgba(0, 0, 0, .85)); opacity: 0; transform: translateY(8px); transition: opacity .3s, transform .3s; pointer-events: none; }
.g-item figcaption span { display: block; font-size: .7rem; letter-spacing: 1.5px; text-transform: uppercase; color: var(--yellow); margin-bottom: .2rem; }
.g-item:hover figcaption, .g-item--video figcaption { opacity: 1; transform: none; }
.g-item--video { outline: 2px solid var(--yellow); outline-offset: -2px; }
.g-live { color: #ff5a4e !important; }
.g-more { margin-top: .5rem; }
.g-more[hidden] { display: none; }
@media (max-width: 980px) {
  .gallery { grid-template-columns: repeat(3, 1fr); grid-auto-rows: 150px; }
}
@media (max-width: 760px) {
  .gallery { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 140px; gap: 10px; }
  .g-item--video { grid-column: span 2; grid-row: span 4; }
  .g-item--wide { grid-column: span 2; }
  .g-item figcaption { opacity: 1; transform: none; font-size: .78rem; padding: 2rem .7rem .7rem; }
  .g-filters { width: 100%; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .g-filters::-webkit-scrollbar { display: none; }
  .g-filter { white-space: nowrap; flex: none; padding: .5rem .9rem; }
  .g-item figcaption span { display: none; }
  .g-item--video figcaption span { display: block; }
}

/* ===== navegación (popover en angosto, en línea cuando cabe) ===== */
.header__inner > * { flex-shrink: 0; white-space: nowrap; }
.site-nav { display: flex; align-items: center; }
.menu-button {
  anchor-name: --menu-button;
  display: inline-flex; align-items: center; gap: .55rem;
  font: inherit; font-weight: 600; font-size: .95rem; color: var(--ink);
  background: var(--gray-100); border: 1px solid var(--gray-200); border-radius: 999px;
  padding: .55rem 1rem; cursor: pointer;
}
.menu-icon, .menu-icon::before, .menu-icon::after { display: block; width: 18px; height: 2px; background: currentColor; border-radius: 2px; }
.menu-icon { position: relative; }
.menu-icon::before, .menu-icon::after { content: ""; position: absolute; left: 0; }
.menu-icon::before { top: -6px; }
.menu-icon::after { top: 6px; }
.site-menu {
  position: fixed;
  inset: auto;
  inset-block-start: 7rem;
  inset-block-start: anchor(--menu-button bottom);
  inset-inline-end: 1rem;
  inline-size: min(80dvw, 22rem);
  max-inline-size: calc(100dvw - 2rem);
  block-size: fit-content;
  max-block-size: calc(100dvh - 6rem);
  margin: .5rem 0 0;
  overflow: auto;
  padding: .6rem;
  border: 1px solid var(--gray-200);
  border-radius: 18px;
  background: var(--white);
  box-shadow: 0 20px 50px rgba(0, 0, 0, .18);
  list-style: none;
}
.site-menu a:not(.btn) { display: block; padding: .8rem 1rem; border-radius: 12px; color: var(--gray-700); font-weight: 500; transition: background .2s, color .2s; }
.site-menu a:not(.btn):hover { background: var(--gray-100); color: var(--green-dark); }
.site-menu .btn { margin: .4rem .4rem .2rem; justify-content: center; display: flex; }
.site-menu:popover-open { opacity: 1; translate: 0 0; @starting-style { opacity: 0; translate: 0 -8px; } }
.site-menu[popover] {
  opacity: 0;
  translate: 0 -8px;
  transition-property: opacity, translate, display, overlay;
  transition-duration: .2s;
  transition-timing-function: ease-out;
  transition-behavior: allow-discrete;
}
@media (prefers-reduced-motion: reduce) { .site-menu[popover] { translate: 0 0; } }
.site-header.is-wide .menu-button { display: none; }
.site-header.is-wide .site-menu {
  position: static; display: flex; align-items: center; gap: .3rem;
  inline-size: auto; max-inline-size: none; block-size: auto; max-block-size: none;
  overflow: visible; margin: 0; padding: 0; border: 0; background: transparent; box-shadow: none;
  opacity: 1; translate: none;
}
.site-header.is-wide .site-menu a:not(.btn) { padding: .5rem .8rem; font-size: .95rem; }
.site-header.is-wide .site-menu .btn { margin: 0 0 0 .6rem; }
.site-header.is-measuring * { transition: none !important; }
@supports not selector(:popover-open) { [popover]:not(.\:popover-open) { display: none; } }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }
.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; }

/* ===== hero con video de fondo ===== */
.hero--video { min-height: min(88svh, 860px); display: grid; align-items: center; isolation: isolate; }
.hero__bg { position: absolute; inset: 0; z-index: -1; background: #0a0a0a; }
.hero__bg video { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero__bg::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(6, 18, 8, .92) 0%, rgba(6, 18, 8, .78) 38%, rgba(6, 18, 8, .25) 75%, rgba(6, 18, 8, .1) 100%),
    linear-gradient(0deg, rgba(0, 0, 0, .55) 0%, transparent 35%);
}
.hero--video .hero__inner { grid-template-columns: minmax(0, 640px); }
.hero--video .hero__content { text-shadow: 0 2px 20px rgba(0, 0, 0, .35); }
.hero__toggle { position: absolute; right: max(4%, calc((100% - 1180px) / 2)); bottom: 2.2rem; z-index: 3; }
.hero__play { gap: .6rem; }
.play-icon { width: 0; height: 0; border-block: 6px solid transparent; border-inline-start: 10px solid currentColor; }
.vid-toggle {
  font: inherit; font-size: .8rem; font-weight: 600; color: var(--white);
  background: rgba(0, 0, 0, .5); backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, .3); border-radius: 999px;
  padding: .45rem .9rem; cursor: pointer;
}
.vid-toggle:hover { background: rgba(0, 0, 0, .75); }
.vid-toggle--corner { position: absolute; top: .8rem; right: .8rem; z-index: 2; }

/* ===== diálogos (video y lightbox) ===== */
dialog:modal { overscroll-behavior: contain; }
dialog::backdrop { overflow: hidden; overscroll-behavior: contain; }
.video-dialog, .lightbox {
  margin: auto;
  border: 0; padding: 0; background: transparent; color: var(--white);
  max-inline-size: min(1100px, 94dvw); max-block-size: 92dvh; overflow: visible;
}
.video-dialog { inline-size: min(1100px, 94dvw); }
.video-dialog video { display: block; inline-size: 100%; block-size: auto; max-block-size: 82dvh; border-radius: 16px; background: #000; }
.lightbox figure { margin: 0; text-align: center; }
.lightbox img { max-inline-size: 100%; max-block-size: 78dvh; border-radius: 12px; margin: 0 auto; }
.lightbox figcaption { margin-top: .9rem; color: rgba(255, 255, 255, .85); font-size: .95rem; }
.dlg-close, .lb-nav {
  background: rgba(255, 255, 255, .14); color: var(--white); border: 0; cursor: pointer; border-radius: 50%;
  inline-size: 46px; block-size: 46px; font-size: 1.7rem; line-height: 1; display: grid; place-items: center; transition: background .2s, color .2s;
}
.dlg-close:hover, .lb-nav:hover { background: var(--yellow); color: var(--black); }
.dlg-close { position: absolute; top: -56px; right: 0; }
.lb-nav { position: absolute; top: 50%; translate: 0 -50%; }
.lb-prev { left: -64px; }
.lb-next { right: -64px; }
@media (max-width: 760px) { .lb-prev { left: 8px; } .lb-next { right: 8px; } .lb-nav { background: rgba(0, 0, 0, .55); } }
.video-dialog, .lightbox {
  opacity: 0;
  transition-property: opacity, transform, display, overlay;
  transition-duration: .3s;
  transition-timing-function: ease-out;
  transition-behavior: allow-discrete;
  @media (prefers-reduced-motion: no-preference) { transform: scale(.94); }
}
.video-dialog[open], .lightbox[open] {
  opacity: 1;
  @starting-style { opacity: 0; }
  @media (prefers-reduced-motion: no-preference) { transform: scale(1); @starting-style { transform: scale(.94); } }
}
.video-dialog::backdrop, .lightbox::backdrop {
  background-color: rgb(0 0 0 / 0);
  transition-property: background-color, display, overlay;
  transition-duration: .3s;
  transition-behavior: allow-discrete;
}
.video-dialog[open]::backdrop, .lightbox[open]::backdrop {
  background-color: rgb(0 0 0 / .9);
  @starting-style { background-color: rgb(0 0 0 / 0); }
}
@media (prefers-reduced-motion: reduce) { .video-dialog, .lightbox { transition-duration: .1s; } }

/* ===== galería: view transitions al filtrar ===== */
:root { view-transition-name: none; }
::view-transition { pointer-events: none; }
.g-item { view-transition-class: g-item; }
::view-transition-group(.g-item) { animation-duration: .45s; animation-timing-function: cubic-bezier(.2, .7, .2, 1); }
::view-transition-new(.g-item):only-child { animation: g-in .35s ease-out; }
::view-transition-old(.g-item):only-child { animation: g-out .25s ease-in forwards; }
@keyframes g-in { from { opacity: 0; scale: .9; } }
@keyframes g-out { to { opacity: 0; scale: .9; } }
@media (prefers-reduced-motion: reduce) {
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
}

/* ===== aparición al hacer scroll (decorativo, sin fallback) ===== */
@media (prefers-reduced-motion: no-preference) {
  @supports ((animation-timeline: view()) and (animation-range: entry)) {
    @keyframes reveal-up { from { opacity: 0; translate: 0 40px; } }
    .card, .step, .why__main, .why__list li, .software, .section__head, .gallery-head, .about__card, .hours {
      animation: reveal-up auto ease-out backwards;
      animation-timeline: view();
      animation-range: entry 0% entry 90%;
    }
  }
}

/* ===== tipografía ===== */
h1, h2, h3 { text-wrap: balance; }
p, li { text-wrap: pretty; }

/* responsive tablet */
@media (max-width: 980px) {
  .hero__inner, .about, .contact { grid-template-columns: 1fr; }
  .hero { padding: 4rem 0 5rem; }
  .services { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .cta__inner { flex-direction: column; text-align: center; }
}

/* responsive movil */
@media (max-width: 760px) {
  .hero--video { min-height: 92svh; }
  .hero__bg::after { background: linear-gradient(180deg, rgba(6, 18, 8, .55) 0%, rgba(6, 18, 8, .85) 55%, rgba(6, 18, 8, .95) 100%); }
  .hero__toggle { bottom: 1.6rem; }
  .topbar__inner span { display: none; }
  .topbar__inner { justify-content: center; }
  .section { padding: 4.5rem 0; }
  .services, .steps { grid-template-columns: 1fr; }
  .hero__stats { gap: 1.5rem; }
  .hero__stats strong { font-size: 2rem; }
  .checks { grid-template-columns: 1fr; }
  .footer__inner, .footer__bottom { flex-direction: column; text-align: center; align-items: center; }
}
