/* ============================================================
   TOBALDO CONSTRUCCIONES — style.css
   Fuente: Poppins (Google Fonts)
   Paleta: Negro #0D0D0D · Blanco #F4F2EE · Gris #616161
   ============================================================ */

/* ── RESET & BASE ── */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --negro:      #0D0D0D;
  --blanco:     #F4F2EE;
  --gris:       #9E9E9E;
  --gris-claro: #9E9E9E;
  --gris-fondo: #EDEBE7;
  --borde:      #D6D3CC;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Poppins', Helvetica, Arial, Lucida, sans-serif;
  background: var(--blanco);
  color: var(--negro);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

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

ul {
  list-style: none;
}

/* ── UTILIDADES GLOBALES ── */

.section-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 5vw;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.tag-line {
  width: 28px;
  height: 1px;
  background: var(--gris);
  flex-shrink: 0;
}

.tag span:last-child {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gris);
}

.tag.tag-light .tag-line {
  background: var(--gris-claro);
}

.tag.tag-light span:last-child {
  color: var(--gris-claro);
}

.section-title {
  font-size: clamp(36px, 5vw, 64px);
  font-weight: 300;
  line-height: 1.08;
  letter-spacing: -0.01em;
}

.section-title em {
  font-style: italic;
  color: var(--gris-claro);
}

.section-title.white {
  color: white;
}

.section-title.white em {
  color: rgba(255, 255, 255, 0.35);
}

/* ── BOTONES ── */

.btn-primary {
  border-radius: 5px;
  font-family: 'Arial';
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: #F4C332;
  color: var(--negro);
  padding: 14px 32px;
  transition: background 0.2s;
}

.btn-primary:hover {
  background: #e8e8e8;
}

.btn-ghost {
  display: inline-block;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
  border-bottom: 1px solid rgba(255, 255, 255, 0.25);
  padding-bottom: 2px;
  transition: color 0.2s, border-color 0.2s;
}

.btn-ghost:hover {
  color: white;
  border-color: white;
}

/* ── ANIMACIONES ── */

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

.reveal.on {
  opacity: 1;
  transform: translateY(0);
}


/* ============================================================
   NAVBAR
   ============================================================ */

#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(13, 13, 13, 0.97);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(6px);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  padding: 0 5vw;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-logo-circle {
  width: 38px;
  height: 38px;
  background: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.nav-logo-circle svg {
  width: 24px;
  height: 24px;
}

.nav-logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.nav-brand {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: white;
}

.nav-sub {
  font-size: 9px;
  font-weight: 300;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gris-claro);
}

.nav-links {
  display: flex;
  gap: 32px;
}

.nav-links a {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
  transition: color 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
  color: white;
}

.nav-cta {
  border-radius: 5px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--negro);
  background: #F4C332;
  padding: 9px 22px;
  transition: background 0.2s;
}

.nav-cta:hover {
  background: #e0e0e0;
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
}

.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: white;
  transition: transform 0.3s, opacity 0.3s;
}

.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-menu {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 99;
  background: rgba(13, 13, 13, 0.98);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 36px;
}

.mobile-menu.open {
  display: flex;
}

.mobile-link {
  font-size: 32px;
  font-weight: 300;
  font-style: italic;
  color: white;
  letter-spacing: 0.02em;
  transition: color 0.2s;
}

.mobile-link:hover {
  color: var(--gris-claro);
}


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

.hero {
  min-height: 100vh;
  background: var(--negro);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 120px 5vw 80px;
  position: relative;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom,
      rgba(13, 13, 13, 0.55) 0%,
      rgba(13, 13, 13, 0.80) 60%,
      rgba(13, 13, 13, 0.97) 100%),
    url('../img/hero/hero.jpg') center / cover no-repeat;
}

.hero-content {
  position: relative;
  max-width: 720px;
}

.hero-eyebrow {
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gris-claro);
  margin-bottom: 28px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.hero-eyebrow::before {
  content: '';
  display: inline-block;
  width: 36px;
  height: 1px;
  background: var(--gris-claro);
  flex-shrink: 0;
}

.hero-title {
  font-size: clamp(48px, 8vw, 104px);
  font-weight: 300;
  line-height: 1;
  color: white;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.hero-title em {
  font-style: italic;
  color: rgba(255, 255, 255, 0.45);
}

.hero-subtitle {
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.35);
  margin-bottom: 28px;
}

.hero-desc {
  font-size: 15px;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.55);
  line-height: 1.8;
  max-width: 420px;
  margin-bottom: 44px;
}

.hero-actions {
  display: flex;
  gap: 24px;
  align-items: center;
  flex-wrap: wrap;
}

.hero-stats {
  position: absolute;
  right: 5vw;
  bottom: 80px;
  display: flex;
  flex-direction: column;
  gap: 32px;
  text-align: right;
}

.stat-num {
  font-size: 48px;
  font-weight: 300;
  font-style: italic;
  color: white;
  line-height: 1;
  display: block;
}

.stat-label {
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gris-claro);
}


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

.servicios {
  background: var(--negro);
  padding: 60px 0;
}

.servicios-header {
  display: grid;
  text-align: center;
  gap: 40px;
  align-items: end;
  margin-bottom: 64px;
}

.servicios-intro {
  font-size: 14px;
  text-align: center;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.45);
  line-height: 1.85;
  max-width: 380px;
  align-self: end;
  margin: 0 auto;
}

.servicios-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.servicio-card {
  background: var(--negro);
  padding: 40px 36px 36px;
  display: flex;
  flex-direction: column;
  gap: 0;
  transition: background 0.25s;
  cursor: default;
  position: relative;
}

.servicio-card:hover {
  background: #161616;
}

.sc-icon {
  width: 44px;
  height: 44px;
  color: #F4C332;
  margin-bottom: 20px;
  flex-shrink: 0;
}

.sc-icon svg {
  width: 100%;
  height: 100%;
}

.sc-num {
  font-size: 10px;
  font-weight: 500;
  font-style: italic;
  letter-spacing: 0.18em;
  color: var(--gris);
  margin-bottom: 10px;
  display: block;
}

.sc-title {
  font-size: 16px;
  font-weight: 600;
  color: white;
  margin-bottom: 10px;
  line-height: 1.3;
}

.sc-desc {
  font-size: 13px;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.42);
  line-height: 1.7;
  flex-grow: 1;
  margin-bottom: 20px;
}

.sc-tag {
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gris);
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  padding-top: 16px;
  display: block;
  margin-top: auto;
}


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

.proyectos {
  background: var(--gris-fondo);
  padding: 60px 0;
}

.proyectos-header {
  margin-bottom: 48px;
  text-align: center;
}

.proyectos-intro {
  font-size: 14px;
  font-weight: 300;
  color: var(--gris);
  max-width: 360px;
  line-height: 1.8;
  margin: 0 auto;
  text-align: center;
}

.proyectos-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 12px;
}

.pcard {
  position: relative;
  overflow: hidden;
  background: #222;
  cursor: pointer;
}

.pcard:nth-child(1) { grid-column: 1 / 8; }
.pcard:nth-child(2) { grid-column: 8 / 13; }
.pcard:nth-child(3) { grid-column: 1 / 5; }
.pcard:nth-child(4) { grid-column: 5 / 9; }
.pcard:nth-child(5) { grid-column: 9 / 13; }

.pcard-img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  filter: grayscale(20%) brightness(0.82);
  transition: filter 0.5s, transform 0.6s;
  background: #2a2a2a;
}

.pcard:nth-child(1) .pcard-img,
.pcard:nth-child(2) .pcard-img {
  aspect-ratio: 16 / 9;
}

.pcard:hover .pcard-img {
  filter: grayscale(0%) brightness(1);
  transform: scale(1.04);
}

.pcard-info {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.88) 0%, transparent 100%);
  padding: 32px 20px 18px;
}

.pcard-tipo {
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
  display: block;
  margin-bottom: 5px;
}

.pcard-nombre {
  font-size: 16px;
  font-weight: 300;
  font-style: italic;
  color: white;
}


/* ============================================================
   NOSOTROS
   ============================================================ */

#nosotros {
  background: white;
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.nosotros-visual {
  position: relative;
  min-height: 620px;
  background: url('../img/nosotros/nosotros.jpg') center / cover;
  overflow: hidden;
}

.nosotros-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg,
    rgba(13, 13, 13, 0.15) 0%,
    rgba(13, 13, 13, 0.04) 100%);
}

.nosotros-year {
  position: absolute;
  bottom: 28px;
  left: 28px;
  font-size: 80px;
  font-weight: 300;
  font-style: italic;
  color: rgba(255, 255, 255, 0.15);
  line-height: 1;
  pointer-events: none;
  user-select: none;
}

.nosotros-content {
  padding: 90px 64px 90px 72px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.nosotros-title {
  margin-bottom: 28px;
  font-size: clamp(32px, 4vw, 54px);
}

.nosotros-body {
  font-size: 14px;
  font-weight: 300;
  color: #555;
  line-height: 1.9;
  max-width: 420px;
  margin-bottom: 20px;
}

.nosotros-body strong {
  font-weight: 600;
  color: var(--negro);
}

.gen-block {
  display: flex;
  align-items: center;
  gap: 18px;
  border-left: 3px solid var(--negro);
  padding-left: 20px;
  margin: 28px 0;
}

.gen-num {
  font-size: 48px;
  font-weight: 300;
  font-style: italic;
  line-height: 1;
  color: var(--negro);
}

.gen-text {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gris);
  line-height: 1.6;
}

.valores {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.valores li {
  font-size: 13px;
  font-weight: 400;
  color: #444;
  line-height: 1.5;
  padding-left: 16px;
  position: relative;
}

.valores li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--gris-claro);
  font-size: 11px;
}


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

.contacto {
  background: var(--negro);
  padding: 60px 0;
}

.contacto-title {
  margin-bottom: 0;
}

.contacto-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 80px;
  margin-top: 56px;
  align-items: start;
}

.contacto-desc {
  font-size: 14px;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.45);
  line-height: 1.85;
  margin-bottom: 48px;
  max-width: 340px;
}

.c-items {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.c-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.c-icon {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.c-icon svg {
  width: 15px;
  height: 15px;
  color: #F4C332;
}

.c-label {
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gris);
  margin-bottom: 4px;
}

.c-val {
  font-size: 13px;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.75);
}

.c-val a:hover {
  color: white;
}

.contacto-form {
  display: flex;
  flex-direction: column;
}

.form-row {
  margin-bottom: 18px;
}

.form-label {
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gris);
  display: block;
  margin-bottom: 7px;
}

.form-input,
.form-textarea {
  width: 100%;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.09);
  color: white;
  padding: 12px 14px;
  font-family: 'Poppins', Helvetica, Arial, sans-serif;
  font-size: 13px;
  font-weight: 300;
  outline: none;
  transition: border-color 0.2s;
}

.form-input:focus,
.form-textarea:focus {
  border-color: rgba(255, 255, 255, 0.3);
}

.form-textarea {
  min-height: 110px;
  resize: vertical;
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: rgba(255, 255, 255, 0.2);
}

.form-submit {
  font-family: 'Poppins', Helvetica, Arial, sans-serif;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  background: #F4C332;
  color: var(--negro);
  border: none;
  padding: 14px 0;
  cursor: pointer;
  width: 100%;
  margin-top: 6px;
  transition: background 0.2s;
}

.form-submit:hover {
  background: #e0e0e0;
}

.form-msg {
  font-size: 12px;
  font-weight: 400;
  margin-top: 10px;
  min-height: 18px;
  color: rgba(255, 255, 255, 0.6);
}

.form-msg.success { color: #6fcf97; }
.form-msg.error   { color: #eb5757; }


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

.footer {
  background: #080808;
  padding: 32px 5vw;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  flex-wrap: wrap;
  gap: 16px;
}

.footer-copy {
  font-size: 10px;
  font-weight: 300;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.25);
}

.footer-ig {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.08em;
  color: #F4C332;
  transition: color 0.2s;
}

.footer-ig:hover {
  color: rgba(255, 255, 255, 0.7);
}


/* ============================================================
   MODAL CARRUSEL
   ============================================================ */

.modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.95);
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

.modal.open {
  display: flex;
}

.modal-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 90vw;
  max-height: 90vh;
}

.modal-img {
  max-width: 90vw;
  max-height: 78vh;
  object-fit: contain;
}

.modal-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  margin-top: 16px;
  padding: 0 4px;
}

.modal-titulo {
  font-size: 13px;
  font-weight: 300;
  font-style: italic;
  color: rgba(255, 255, 255, 0.7);
}

.modal-counter {
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.14em;
  color: var(--gris-claro);
}

.modal-close {
  position: fixed;
  top: 24px;
  right: 28px;
  font-size: 20px;
  color: rgba(255, 255, 255, 0.6);
  background: none;
  border: none;
  cursor: pointer;
  transition: color 0.2s;
  z-index: 201;
}

.modal-close:hover { color: white; }

.modal-prev,
.modal-next {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  font-size: 28px;
  color: rgba(255, 255, 255, 0.5);
  background: none;
  border: none;
  cursor: pointer;
  padding: 16px;
  transition: color 0.2s;
  z-index: 201;
}

.modal-prev { left: 16px; }
.modal-next { right: 16px; }
.modal-prev:hover,
.modal-next:hover { color: white; }


/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 960px) {

  .nav-links,
  .nav-cta {
    display: none;
  }

  .hamburger {
    display: flex;
  }

  .hero-stats {
    display: none;
  }

  .servicios-header {
    grid-template-columns: 1fr;
  }

  .servicios-intro {
    max-width: 100%;
  }

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

  .pcard:nth-child(1),
  .pcard:nth-child(2) {
    grid-column: 1 / -1;
  }

  .pcard:nth-child(3) { grid-column: 1 / 7; }
  .pcard:nth-child(4) { grid-column: 7 / -1; }
  .pcard:nth-child(5) { grid-column: 1 / -1; }

  #nosotros {
    grid-template-columns: 1fr;
  }

  .nosotros-visual {
    min-height: 320px;
  }

  .nosotros-content {
    padding: 60px 5vw;
  }

  .contacto-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }

}

@media (max-width: 600px) {

  .pcard:nth-child(3),
  .pcard:nth-child(4) {
    grid-column: 1 / -1;
  }

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

  .servicio-card {
    padding: 32px 24px;
  }

  .hero-title {
    font-size: clamp(40px, 12vw, 72px);
  }

}