:root {
  --ink: #111111;
  --ink-soft: #292929;
  --paper: #f5f4ef;
  --white: #ffffff;
  --line: rgba(17, 17, 17, 0.13);
  --line-light: rgba(255, 255, 255, 0.18);
  --accent: #d7ff33;
  --accent-soft: #edff9e;
  --max: 1200px;
  --radius: 22px;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.14);
}


/* =========================================================
   BASE
   ========================================================= */

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system,
    BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a {
  color: inherit;
  text-decoration: none;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.container {
  width: min(calc(100% - 40px), var(--max));
  margin-inline: auto;
}

.section-pad {
  padding: 110px 0;
}

.eyebrow {
  margin: 0 0 18px;
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.eyebrow.dark {
  color: #555;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2 {
  letter-spacing: -0.045em;
  line-height: 0.98;
}

h1 {
  max-width: 900px;
  margin-bottom: 26px;
  color: var(--white);
  font-size: clamp(3.25rem, 8vw, 7.6rem);
  font-weight: 760;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(2.45rem, 5.5vw, 5rem);
  font-weight: 730;
}

h3 {
  font-size: 1.55rem;
}

p {
  line-height: 1.7;
}


/* =========================================================
   BOTONES
   ========================================================= */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  padding: 0 24px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 0.93rem;
  font-weight: 800;
  transition:
    transform 0.2s ease,
    background 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease;
}

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

.btn-primary {
  color: var(--ink);
  background: var(--accent);
}

.btn-primary:hover {
  background: var(--accent-soft);
}

.btn-secondary {
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.btn-secondary:hover {
  color: var(--ink);
  background: var(--white);
}

.btn-dark {
  color: var(--white);
  background: var(--ink);
}

.btn-light {
  color: var(--ink);
  background: var(--white);
}


/* =========================================================
   CABECERA
   ========================================================= */

.site-header {
  position: absolute;
  z-index: 1000;
  top: 0;
  right: 0;
  left: 0;
  color: var(--white);
  transition:
    background 0.25s ease,
    box-shadow 0.25s ease,
    color 0.25s ease;
}

.site-header.is-sticky {
  position: fixed;
  color: var(--ink);
  background: rgba(245, 244, 239, 0.94);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 92px;
}

.brand {
  position: relative;
  z-index: 1020;
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo {
  display: grid;
  width: 50px;
  height: 50px;
  padding: 4px;
  overflow: hidden;
  place-items: center;
  background: var(--white);
}

.brand-logo img {
  height: 100%;
  object-fit: contain;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}

.brand-text strong {
  font-size: 1rem;
}

.brand-text small {
  margin-top: 5px;
  font-size: 0.67rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  opacity: 0.62;
  text-transform: uppercase;
}


/* =========================================================
   NAVEGACIÓN ESCRITORIO
   ========================================================= */

.main-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 0.88rem;
  font-weight: 750;
}

.main-nav > a:not(.nav-cta) {
  position: relative;
}

.main-nav > a:not(.nav-cta)::after {
  position: absolute;
  right: 0;
  bottom: -7px;
  left: 0;
  height: 2px;
  content: "";
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.25s ease;
}

.main-nav > a:not(.nav-cta):hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

.nav-cta {
  padding: 12px 18px;
  color: var(--ink);
  border-radius: 999px;
  background: var(--accent);
}

.menu-toggle {
  display: none;
}


/* =========================================================
   HERO
   ========================================================= */

.hero {
  position: relative;
  display: flex;
  min-height: 100svh;
  overflow: hidden;
  align-items: flex-end;
  background: #111;
}

.hero-bg,
.hero-overlay {
  position: absolute;
  inset: 0;
}

.hero-bg {
  background-image: url("../img/1%20(4).jpg");
  background-position: center 42%;
  background-size: cover;
  transform: scale(1.02);
}

.hero-overlay {
  background:
    linear-gradient(
      90deg,
      rgba(0, 0, 0, 0.83) 0%,
      rgba(0, 0, 0, 0.52) 48%,
      rgba(0, 0, 0, 0.12) 82%
    ),
    linear-gradient(
      0deg,
      rgba(0, 0, 0, 0.56) 0%,
      rgba(0, 0, 0, 0.04) 48%
    );
}

.hero-content {
  position: relative;
  z-index: 2;
  padding-top: 180px;
  padding-bottom: 74px;
}

.hero-copy {
  width: min(920px, 90%);
}

.hero-lead {
  max-width: 670px;
  margin-bottom: 34px;
  color: rgba(255, 255, 255, 0.8);
  font-size: clamp(1.12rem, 2vw, 1.45rem);
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.hero-proof {
  display: flex;
  gap: 42px;
  margin-top: 54px;
  color: var(--white);
}

.hero-proof div {
  display: flex;
  flex-direction: column;
}

.hero-proof strong {
  font-size: 2rem;
  letter-spacing: -0.04em;
}

.hero-proof span {
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.78rem;
}

.hero-scroll {
  position: absolute;
  right: 20px;
  bottom: 76px;
  display: flex;
  align-items: center;
  gap: 14px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  writing-mode: vertical-rl;
}

.scroll-line {
  width: 1px;
  height: 52px;
  background: rgba(255, 255, 255, 0.48);
}


/* =========================================================
   ENCABEZADOS DE SECCIÓN
   ========================================================= */

.section-heading {
  display: grid;
  margin-bottom: 56px;
  grid-template-columns: 1.55fr 0.7fr;
  gap: 72px;
  align-items: end;
}

.section-heading > p {
  max-width: 420px;
  margin-bottom: 4px;
  color: #656565;
}

.section-heading-light {
  color: var(--white);
}

.section-heading-light > p {
  color: rgba(255, 255, 255, 0.58);
}


/* =========================================================
   SERVICIOS
   ========================================================= */

.intro {
  background: var(--paper);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
}

.service-card {
  position: relative;
  min-height: 470px;
  padding: 42px 28px 32px;
  border-right: 1px solid var(--line);
}

.service-card:first-child {
  border-left: 1px solid var(--line);
}

.service-number {
  color: #868686;
  font-size: 0.7rem;
  font-weight: 800;
}

.service-icon {
  width: 58px;
  height: 58px;
  margin: 55px 0 34px;
}

.service-icon svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.25;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.service-card h3 {
  margin-bottom: 16px;
}

.service-card p {
  color: #6a6a6a;
  font-size: 0.92rem;
}

.service-card ul {
  margin: 26px 0 0;
  padding: 0;
  list-style: none;
}

.service-card li {
  position: relative;
  margin: 10px 0;
  padding-left: 17px;
  color: #393939;
  font-size: 0.81rem;
  line-height: 1.45;
}

.service-card li::before {
  position: absolute;
  top: 0.65em;
  left: 0;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  content: "";
  background: var(--ink);
}

.service-card-accent {
  background: var(--accent);
}

.service-card-accent p {
  color: rgba(17, 17, 17, 0.7);
}

.text-link {
  position: absolute;
  right: 28px;
  bottom: 32px;
  left: 28px;
  display: flex;
  justify-content: space-between;
  padding-top: 18px;
  border-top: 1px solid rgba(17, 17, 17, 0.2);
  font-size: 0.82rem;
  font-weight: 800;
}


/* =========================================================
   EMPRESA
   ========================================================= */

.feature-split {
  background: var(--white);
}

.split-grid {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: clamp(50px, 8vw, 120px);
  align-items: center;
}

.split-media {
  position: relative;
  min-height: 650px;
}

.split-media img {
  position: absolute;
  inset: 0;
  height: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  object-fit: cover;
}

.split-copy .lead,
.contact-copy .lead {
  margin-top: 34px;
  color: #343434;
  font-size: 1.18rem;
}

.split-copy > p:not(.eyebrow):not(.lead) {
  color: #737373;
}

.values {
  display: grid;
  margin: 40px 0;
  gap: 24px;
}

.value {
  display: grid;
  grid-template-columns: 12px 1fr;
  gap: 18px;
}

.value-dot {
  width: 10px;
  height: 10px;
  margin-top: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 6px rgba(215, 255, 51, 0.24);
}

.value strong {
  display: block;
  margin-bottom: 5px;
}

.value p {
  margin: 0;
  color: #777;
  font-size: 0.88rem;
}


/* =========================================================
   PROYECTOS
   ========================================================= */

.projects {
  color: var(--white);
  background: var(--ink);
}

.gallery {
  display: grid;
  min-height: 780px;
  grid-template-columns: 1.35fr 0.85fr 0.85fr;
  grid-template-rows: 1fr 1fr;
  gap: 14px;
}

.gallery-item {
  position: relative;
  min-height: 300px;
  margin: 0;
  overflow: hidden;
  border-radius: 18px;
  background: #222;
}

.gallery-item::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(
    0deg,
    rgba(0, 0, 0, 0.7),
    transparent 55%
  );
}

.gallery-item img {
  height: 100%;
  object-fit: cover;
  transition: transform 0.65s cubic-bezier(.2, .8, .2, 1);
}

.gallery-item:hover img {
  transform: scale(1.045);
}

.gallery-wide {
  grid-row: span 2;
}

.gallery-tall {
  grid-row: span 2;
}

.gallery-item figcaption {
  position: absolute;
  z-index: 2;
  right: 22px;
  bottom: 20px;
  left: 22px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
}

.gallery-item figcaption span {
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 800;
}

.gallery-item figcaption strong {
  font-size: 0.92rem;
}


/* =========================================================
   CTA
   ========================================================= */

.cta-band {
  padding: 62px 0;
  color: var(--white);
  background: #242424;
}

.cta-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
}

.cta-inner h2 {
  font-size: clamp(2.6rem, 5vw, 4.7rem);
}


/* =========================================================
   CONTACTO
   ========================================================= */

.contact {
  background: var(--paper);
}

.contact-grid {
  display: grid;
  grid-template-columns: 0.82fr 1.18fr;
  gap: 80px;
}

.contact-copy {
  position: sticky;
  top: 150px;
  align-self: start;
}

.contact-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.contact-card {
  display: flex;
  min-height: 220px;
  padding: 28px;
  flex-direction: column;
  justify-content: flex-end;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  transition:
    background 0.25s ease,
    transform 0.25s ease;
}

.contact-card:hover {
  position: relative;
  z-index: 2;
  background: var(--white);
  transform: translateY(-3px);
}

.contact-label {
  margin-bottom: auto;
  color: #787878;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.contact-card strong {
  margin-bottom: 9px;
  font-size: 1.1rem;
}

.contact-card small {
  color: #777;
  font-weight: 700;
}


/* =========================================================
   FOOTER
   ========================================================= */

.site-footer {
  padding: 38px 0;
  color: rgba(255, 255, 255, 0.65);
  background: #0b0b0b;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  font-size: 0.76rem;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 13px;
}

.footer-brand img {
  width: 42px;
  height: 42px;
  padding: 3px;
  object-fit: contain;
  background: var(--white);
}

.footer-brand div {
  display: flex;
  flex-direction: column;
}

.footer-brand strong {
  color: var(--white);
}

.footer-brand span {
  margin-top: 4px;
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}


/* =========================================================
   ANIMACIONES
   ========================================================= */

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 0.75s ease,
    transform 0.75s cubic-bezier(.2, .7, .2, 1);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}


/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 1050px) {

  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .service-card:nth-child(3) {
    border-left: 1px solid var(--line);
  }

  .split-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .split-media {
    min-height: 600px;
  }

  .split-copy {
    max-width: 760px;
  }

  .contact-copy {
    position: static;
  }

  .gallery {
    min-height: auto;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto;
  }

  .gallery-wide,
  .gallery-tall {
    grid-row: auto;
  }

  .gallery-item {
    aspect-ratio: 4 / 3;
  }
}


/* =========================================================
   MÓVIL / MENÚ
   ========================================================= */

@media (max-width: 800px) {

  html {
    scroll-padding-top: 76px;
  }

  .section-pad {
    padding: 82px 0;
  }


  /* -----------------------------------------
     CABECERA MÓVIL
     ----------------------------------------- */

  .header-inner {
    min-height: 76px;
  }

  .brand-logo {
    width: 44px;
    height: 44px;
  }

  /*
   * IMPORTANTE:
   * En móvil no usamos backdrop-filter en la cabecera fija.
   * Algunos navegadores móviles crean un contexto extraño
   * para los elementos position:fixed que contiene.
   */

  .site-header.is-sticky {
    background: rgba(245, 244, 239, 0.98);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }


  /* -----------------------------------------
     BOTÓN HAMBURGUESA
     ----------------------------------------- */

  .menu-toggle {
    position: relative;
    z-index: 1100;

    display: flex;
    width: 46px;
    height: 46px;
    padding: 0;

    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;

    color: inherit;

    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.14);

    cursor: pointer;
  }

  .site-header.is-sticky .menu-toggle {
    background: rgba(17, 17, 17, 0.08);
  }

  .menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;

    flex: 0 0 2px;

    background: currentColor;

    transition:
      transform 0.25s ease,
      opacity 0.2s ease;
  }


  /* -----------------------------------------
     MENÚ CERRADO
     ----------------------------------------- */

  .main-nav {
    position: fixed;
    z-index: 1050;

    top: 0;
    right: 0;
    bottom: 0;
    left: 0;

    width: 100%;
    height: 100vh;
    height: 100dvh;

    display: flex;

    padding:
      max(105px, env(safe-area-inset-top))
      30px
      max(35px, env(safe-area-inset-bottom));

    flex-direction: column;
    align-items: flex-start;
    justify-content: center;

    gap: 26px;

    color: #ffffff;
    background: #111111;

    overflow-y: auto;
    overscroll-behavior: contain;

    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    transform: translateX(100%);

    transition:
      transform 0.32s cubic-bezier(.2, .8, .2, 1),
      opacity 0.2s ease,
      visibility 0s linear 0.32s;
  }


  /* -----------------------------------------
     MENÚ ABIERTO
     ----------------------------------------- */

  body.menu-open .main-nav {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;

    transform: translateX(0);

    transition:
      transform 0.32s cubic-bezier(.2, .8, .2, 1),
      opacity 0.2s ease;
  }


  /*
   * NO BLOQUEAMOS EL BODY.
   * Así nunca puede quedar la página "muerta"
   * aunque el navegador móvil conserve un estado visual.
   */

  body.menu-open {
    overflow: visible;
  }


  /*
   * Cuando el menú está abierto la cabecera debe ser
   * transparente y blanca para que el botón X siempre
   * sea perfectamente visible.
   */

  body.menu-open .site-header,
  body.menu-open .site-header.is-sticky {
    color: #ffffff;
    background: transparent;
    box-shadow: none;

    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  body.menu-open .menu-toggle,
  body.menu-open .site-header.is-sticky .menu-toggle {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.14);
  }


  /* -----------------------------------------
     HAMBURGUESA → X
     ----------------------------------------- */

  body.menu-open .menu-toggle span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  body.menu-open .menu-toggle span:nth-child(2) {
    opacity: 0;
  }

  body.menu-open .menu-toggle span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }


  /* -----------------------------------------
     ENLACES MÓVIL
     ----------------------------------------- */

  .main-nav a {
    font-size: 1.6rem;
    line-height: 1.15;
  }

  .main-nav > a:not(.nav-cta)::after {
    display: none;
  }

  .main-nav .nav-cta {
    margin-top: 10px;
    padding: 14px 20px;
    color: var(--ink);
    font-size: 1.05rem;
    background: var(--accent);
  }


  /* -----------------------------------------
     RESTO RESPONSIVE
     ----------------------------------------- */

  .section-heading {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .hero-content {
    padding-top: 150px;
    padding-bottom: 56px;
  }

  .hero-copy {
    width: 100%;
  }

  .hero-proof {
    gap: 26px;
  }

  .hero-scroll {
    display: none;
  }

  .cta-inner,
  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }
}


/* =========================================================
   MÓVIL PEQUEÑO
   ========================================================= */

@media (max-width: 580px) {

  .container {
    width: min(calc(100% - 28px), var(--max));
  }

  h1 {
    font-size: clamp(3rem, 14vw, 4.6rem);
  }

  .hero {
    min-height: 790px;
  }

  .hero-bg {
    background-position: 54% center;
  }

  .hero-overlay {
    background:
      linear-gradient(
        0deg,
        rgba(0, 0, 0, 0.9) 0%,
        rgba(0, 0, 0, 0.56) 54%,
        rgba(0, 0, 0, 0.36) 100%
      );
  }

  .hero-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }

  .hero-proof {
    margin-top: 36px;
  }

  .hero-proof strong {
    font-size: 1.6rem;
  }

  .services-grid {
    grid-template-columns: 1fr;
  }

  .service-card,
  .service-card:first-child,
  .service-card:nth-child(3) {
    min-height: 420px;
    border-right: 1px solid var(--line);
    border-left: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
  }

  .service-card + .service-card {
    border-top: 0;
  }

  .split-media {
    min-height: 520px;
  }

  .gallery {
    grid-template-columns: 1fr;
  }

  .gallery-item {
    min-height: 360px;
    aspect-ratio: auto;
  }

  .contact-cards {
    grid-template-columns: 1fr;
  }

  .contact-card {
    min-height: 180px;
  }

  .footer-inner {
    gap: 22px;
  }
}


/* =========================================================
   ACCESIBILIDAD / REDUCCIÓN DE MOVIMIENTO
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}