:root {
  --verde-950: #0b2f21;
  --verde-900: #103c2a;
  --verde-800: #144530;
  --verde-700: #1d5e45;
  --verde-100: #e9f3ee;
  --gris-50: #f7f8f7;
  --texto: #202521;
  --blanco: #fff;
  --acento: #a8d648;
  --foco: #ffbf47;
  --radio: 14px;
  --sombra: 0 12px 34px rgba(11, 47, 33, 0.1);
}

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

html {
  scroll-padding-top: 1rem;
}

body {
  color: var(--texto);
  overflow-wrap: break-word;
}

img {
  display: block;
  max-width: 100%;
}

.skip-link {
  position: fixed;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 10001;
  padding: 0.75rem 1rem;
  color: var(--verde-950);
  background: var(--blanco);
  border-radius: 0.4rem;
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--foco);
  outline-offset: 3px;
}

header {
  min-height: 520px;
  display: flex;
  align-items: center;
}

.header-text h1 {
  max-width: 820px;
  line-height: 1.12;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1.6rem;
}

.cta {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  padding: 0.8rem 1.2rem;
  border: 2px solid var(--blanco);
  border-radius: 0.55rem;
  color: var(--verde-950);
  background: var(--blanco);
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.cta:hover {
  transform: translateY(-2px);
}

.cta--secondary {
  color: var(--blanco);
  background: transparent;
}

nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.12);
}

nav ul li a[aria-current="page"] {
  background: var(--verde-700);
}

.menu-toggle {
  display: none;
  min-width: 48px;
  min-height: 48px;
  margin: 0.35rem;
  padding: 0.65rem 0.9rem;
  border: 0;
  border-radius: 0.35rem;
  color: var(--blanco);
  background: transparent;
  font: inherit;
  font-size: 1.5rem;
  cursor: pointer;
}

main {
  display: block;
}

.section-title img {
  flex: 0 0 auto;
  object-fit: cover;
}

.card,
.project,
.metric,
.bim-highlight,
.ruc-highlight,
.model-box,
form {
  box-shadow: var(--sombra);
}

.project img {
  aspect-ratio: 16 / 10;
  height: auto;
  object-fit: cover;
}

.project-content h3,
.model-step h3 {
  color: var(--verde-800);
  margin-bottom: 0.6rem;
  font-size: 1.1rem;
}

.conversion-strip {
  max-width: none;
  margin: 2rem 0 0;
  padding: 4.5rem max(7%, calc((100% - 1100px) / 2));
  color: var(--blanco);
  background: linear-gradient(130deg, var(--verde-950), var(--verde-700));
}

.conversion-strip h2 {
  max-width: 760px;
  margin-bottom: 0.75rem;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
}

.conversion-strip p {
  margin-bottom: 1.4rem;
}

form fieldset {
  margin: 0 0 1.5rem;
  padding: 0;
  border: 0;
}

form legend,
.form-section-title {
  margin-bottom: 1rem;
  color: var(--verde-800);
  font-size: 1.15rem;
  font-weight: 700;
}

form label {
  display: inline-block;
  margin-bottom: 0.35rem;
  font-weight: 600;
}

form input,
form select,
form textarea {
  min-height: 46px;
  font-family: inherit;
}

form textarea {
  resize: vertical;
}

form small {
  display: block;
  margin: -0.65rem 0 1rem;
  color: #515953;
}

.consentimiento {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.7rem;
  align-items: start;
  margin: 1rem 0;
}

.consentimiento input {
  width: 1.25rem;
  min-height: 1.25rem;
  margin-top: 0.25rem;
}

.hp-field {
  position: absolute !important;
  left: -9999px !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

#contacto a,
.footer-links a {
  color: inherit;
}

.contact-list {
  display: grid;
  gap: 0.7rem;
  padding: 0;
  list-style: none;
}

.footer-links {
  margin-top: 0.5rem;
  font-size: 0.9rem;
}

.whatsapp-button {
  border: 3px solid var(--blanco);
}

.privacy-main {
  max-width: 900px;
  margin: 0 auto;
  padding: 4rem 7%;
}

.privacy-main h1,
.privacy-main h2 {
  color: var(--verde-800);
}

.privacy-main .cta {
  color: var(--blanco);
  background: var(--verde-700);
  border-color: var(--verde-700);
}

@media (max-width: 900px) {
  header {
    min-height: auto;
    padding: 3.5rem 7% 4rem;
  }

  .header-text h1 {
    font-size: clamp(2rem, 9vw, 2.6rem);
  }

  .header-text p {
    font-size: 1.05rem;
  }

  .header-logos {
    flex-wrap: wrap;
  }

  .menu-toggle {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
  }

  .nav-container {
    flex-direction: column;
  }

  nav ul {
    display: none !important;
    flex-direction: column;
    width: 100%;
  }

  nav ul.active {
    display: flex !important;
  }

  nav ul li {
    width: 100%;
    text-align: center;
  }

  nav ul li a {
    padding: 0.9rem 1rem;
  }

  section {
    padding: 4rem 7%;
  }

  .section-title {
    align-items: flex-start;
    font-size: 1.65rem;
    line-height: 1.25;
  }

  form {
    padding: 1.25rem;
  }

  form input,
  form select,
  form textarea {
    font-size: 1rem;
  }

  .conversion-strip {
    padding: 4rem 7%;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* Portafolio interactivo */
.project-explorer[hidden] {
  display: none;
}

.header-logos {
  align-items: center;
  flex: 0 0 auto;
  flex-wrap: nowrap;
  gap: 18px;
}

.header-logos .logo {
  width: 200px;
  height: auto !important;
  max-height: 90px;
  object-fit: contain;
  image-rendering: auto;
}

.header-logos .logo-ruc {
  width: 180px;
  height: auto !important;
  max-height: 76px;
  padding: 8px 12px;
  border-radius: 8px;
  object-fit: contain;
  image-rendering: auto;
  background: #fff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.14);
}

.project-explorer {
  max-width: 1180px;
  margin: 0 auto 2rem;
}

.project-explorer-intro {
  max-width: 720px;
  margin: 0 0 1.25rem;
  color: #4d5d55;
}

.project-detail {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  overflow: hidden;
  border: 1px solid #d7e1dc;
  border-radius: 18px;
  background: #f6f8f7;
  box-shadow: 0 18px 45px rgba(20, 69, 48, 0.1);
}

.project-detail-media {
  display: grid;
  min-height: 390px;
  place-items: center;
  background: #e9efec;
}

.project-detail-media img {
  display: block;
  width: 100%;
  height: 100%;
  max-height: 520px;
  object-fit: contain;
}

.project-detail-content {
  align-self: center;
  padding: clamp(1.5rem, 4vw, 3rem);
}

.project-detail-eyebrow {
  display: inline-block;
  margin: 0 0 0.85rem;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  color: #144530;
  background: #e1eee7;
  font-size: 0.85rem;
  font-weight: 700;
}

.project-detail-content h3 {
  margin: 0 0 1.25rem;
  color: #144530;
  font-size: clamp(1.45rem, 3vw, 2.15rem);
}

.project-detail-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  margin: 0;
}

.project-detail-metrics > div {
  padding: 0.9rem 0;
  border-top: 1px solid #d7e1dc;
}

.project-detail-metrics dt {
  color: #617168;
  font-size: 0.82rem;
}

.project-detail-metrics dd {
  margin: 0.25rem 0 0;
  color: #17231d;
  font-weight: 700;
}

.project-open-button {
  width: 100%;
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  border: 1px solid #1d5e45;
  border-radius: 8px;
  color: #144530;
  background: transparent;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: color 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
}

.project-open-button:hover,
.project-open-button:focus-visible {
  color: #fff;
  background: #1d5e45;
  transform: translateY(-1px);
}

.project.project--active {
  outline: 3px solid rgba(29, 94, 69, 0.35);
  outline-offset: 3px;
}

@media (max-width: 760px) {
  .header-logos {
    justify-content: center;
  }

  .header-logos .logo {
    width: 148px;
    max-height: 66px;
  }

  .header-logos .logo-ruc {
    width: 140px;
    max-height: 60px;
  }

  .project-detail {
    grid-template-columns: 1fr;
  }

  .project-detail-media {
    min-height: 240px;
  }

  .project-detail-metrics {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 420px) {
  .header-logos {
    gap: 10px;
  }

  .header-logos .logo {
    width: 134px;
    max-height: 60px;
  }

  .header-logos .logo-ruc {
    width: 128px;
    max-height: 56px;
    padding: 6px 8px;
  }
}
