* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Arial, sans-serif;
}

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

.wrap {
  width: min(1240px, 90%);
  margin: auto;
}

/* =========================
   HEADER
========================= */

header {
  position: fixed;
  z-index: 20;
  top: 0;
  left: 0;
  right: 0;
  height: 78px;
  background: #080808d9;
  backdrop-filter: blur(14px);
  border-bottom: 1px solid #ffffff12;
}

.head {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 30px;
}

.brand {
  width: var(--logoD);
  height: 60px;
  display: flex;
}

.brand img,
footer img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

nav {
  display: flex;
  gap: 30px;
  margin-left: auto;
}

nav a {
  font-size: 13px;
  color: #aaa;
}

#menu,
#mobile {
  display: none;
}

/* =========================
   BUTTONS
========================= */

.btn {
  padding: 15px 22px;
  font-size: 11px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: .1em;
}

.outline {
  border: 1px solid var(--accent);
  color: var(--accent);
}

.primary {
  display: inline-block;
  background: var(--accent);
  color: #080808;
}

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

.hero {
  min-height: 70vh;
  position: relative;
  display: flex;
  align-items: center;
}

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

.hero-bg {
  background-size: cover;
  background-repeat: no-repeat;
}

.overlay {
  background: #0009;
}

.hero-content {
  position: relative;
  z-index: 1;
  padding-top: 42px;
}

.eyebrow {
  color: var(--accent);
  font-size: 11px;
  font-weight: bold;
  letter-spacing: .2em;
}

h1,
h2,
h3 {
  font-family: Arial, sans-serif;
}

h1 {
  font-size: clamp(55px, 8vw, 105px);
  line-height: .94;
  letter-spacing: -.06em;
  margin: 18px 0;
}

h1 em {
  color: #aaa;
  font-style: normal;
}

.hero-content > p:not(.eyebrow) {
  font-size: 18px;
  color: #bbb;
  margin-bottom: 30px;
}

/* =========================
   GENERAL SECTIONS
========================= */

.section {
  padding: 120px 0;
}

.section h2,
.about h2,
.cta h2,
.contact h2 {
  font-size: clamp(40px, 5vw, 68px);
  line-height: .98;
  letter-spacing: -.05em;
  margin: 0 0 20px;
}

.muted {
  color: var(--muted);
}

/* =========================
   SERVICES GRID
========================= */

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  margin-top: 50px;
}

.grid article {
  background: var(--surface);
  padding: 34px;
  min-height: 220px;
  border: 1px solid #ffffff0a;
}

.grid small {
  color: #666;
}

.grid h3 {
  margin-top: 45px;
  font-size: 23px;
}

.grid p {
  color: #999;
  line-height: 1.7;
  font-size: 14px;
}

.grid b {
  color: var(--accent);
}

/* =========================
   ABOUT
========================= */

.about {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--surface);

  /* IMPORTANTE:
     No usamos height fija ni overflow:hidden */
  min-height: 700px;
}

#aboutImg {
  position: relative;
}

#aboutImg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
}
#aboutImg {
  min-height: 700px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.aboutText {
  position: relative;
  z-index: 2;

  /* Centrado vertical */
  align-self: center;

  /* Espaciado */
  padding: 80px;

  color: #fff;
}

.aboutText h2 {
  margin-bottom: 30px;
}

.aboutText p {
  color: #aaa;
  line-height: 1.8;
  max-width: 550px;
  margin: 0;
}

/* =========================
   GALLERY
========================= */

.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 50px;
}

.pic {
  height: 380px;
  padding: 0;
  border: 0;
  overflow: hidden;
  background: #111;
  cursor: pointer;
}

.pic img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: .4s;
}

.pic:hover img {
  transform: scale(1.05);
}

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

.cta {
  padding: 100px 0;
  background: var(--surface2);
}

.ctaIn {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 30px;
}

/* =========================
   CONTACT
========================= */

.contact {
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 60px;
}

.contact > div:last-child {
  border-left: 1px solid var(--border);
  padding-left: 30px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  color: #aaa;
}

.contact a {
  font-weight: bold;
  color: white;
}

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

footer {
  border-top: 1px solid var(--border);
  padding: 30px 0;
}

footer .foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #777;
  font-size: 11px;
}

footer img {
  width: 130px;
  height: 55px;
}

/* =========================
   LIGHTBOX
========================= */

#lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 100;
  background: #000f;
  align-items: center;
  justify-content: center;
  padding: 5%;
}

#lightbox.open {
  display: flex;
}

#lightbox img {
  max-width: 95%;
  max-height: 90%;
}

#close {
  position: absolute;
  top: 20px;
  right: 30px;
  background: none;
  border: 0;
  color: white;
  font-size: 42px;
}

/* =========================
   MOBILE
========================= */

@media (max-width: 800px) {

  .wrap {
    width: 86%;
  }

  header {
    height: 68px;
  }

  .brand {
    width: var(--logoM);
    height: 52px;
  }

  nav,
  #headBtn {
    display: none;
  }

  #menu {
    display: block;
    margin-left: auto;
    background: none;
    border: 0;
    color: white;
    font-size: 26px;
  }

  #mobile.open {
    display: flex;
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    background: #080808;
    padding: 25px 7%;
    flex-direction: column;
    gap: 20px;
    border-bottom: 1px solid var(--border);
  }

  #mobile a {
    color: #ddd;
  }

  /* =========================
     MOBILE GRID
  ========================= */

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

  .pic {
    height: 300px;
  }

  /* =========================
     MOBILE ABOUT
  ========================= */

  .about {
    grid-template-columns: 1fr;

    /* La altura ahora se adapta al contenido */
    min-height: 0;
    height: auto;
  }

  #aboutImg {
    min-height: 400px;
    height: 400px;
  }

  .aboutText {
    padding: 70px 7%;
    align-self: auto;
  }

  .aboutText h2 {
    font-size: clamp(42px, 13vw, 62px);
    line-height: .95;
    margin-bottom: 25px;
  }

  .aboutText p {
    font-size: 15px;
    line-height: 1.7;
    max-width: none;
  }

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

  .ctaIn {
    display: block;
  }

  .cta .btn {
    margin-top: 25px;
  }

  /* =========================
     MOBILE CONTACT
  ========================= */

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

  .contact > div:last-child {
    border-left: 0;
    border-top: 1px solid var(--border);
    padding: 25px 0;
  }

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

  footer .foot {
    display: block;
  }

  footer img {
    margin-bottom: 15px;
  }
}
