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

:root {
  --negro: #111110;
  --crema: #F5F0E8;
  --verde: #2D6A4F;
  --verde-claro: #52B788;
  --arena: #D4A96A;
  --gris: #6B6B6B;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--crema);
  color: var(--negro);
  overflow-x: hidden;
}

/* ── NAV ── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 5%;
  background: rgba(245,240,232,0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0,0,0,0.07);
  transition: box-shadow 0.3s;
  overflow: visible;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  flex-shrink: 0;
}

.logo-icon {
  width: 30px;
  height: 33px;
  flex-shrink: 0;
}

.logo-text {
  font-family: 'Fraunces', serif;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--verde);
  letter-spacing: -1px;
  line-height: 1;
}

.nav-links {
  display: flex;
  gap: 2.2rem;
  list-style: none;
  align-items: center;
}

.nav-links a {
  text-decoration: none;
  color: var(--negro);
  font-size: 1.1rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: color 0.2s;
}

.nav-links a:hover { color: var(--verde); }

.nav-cta {
  background: var(--verde);
  color: var(--crema) !important;
  padding: 0.55rem 1.3rem;
  border-radius: 100px;
  transition: background 0.2s !important;
  white-space: nowrap;
}

.nav-cta:hover { background: var(--negro) !important; color: var(--crema) !important; }

/* ── MENÚ MÓVIL INDEPENDIENTE ── */
.mobile-menu {
  display: none;
  position: fixed;
  inset: 0;
  background: #1a3d2b;
  z-index: 250;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding-top: 6rem;
  gap: 0;
}

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

.mobile-menu-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 3rem;
  font-family: 'Fraunces', serif;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--crema);
  letter-spacing: -0.5px;
}

.mobile-menu ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}

.mobile-menu ul a {
  font-size: 1.6rem;
  font-weight: 500;
  color: rgba(245,240,232,0.85);
  text-decoration: none;
  transition: color 0.2s;
  letter-spacing: -0.3px;
}

.mobile-menu ul a:hover { color: var(--verde-claro); }

.mobile-cta {
  background: var(--verde-claro) !important;
  color: white !important;
  padding: 0.8rem 2.2rem !important;
  border-radius: 100px;
  font-size: 1rem !important;
  opacity: 1 !important;
}

/* ── HAMBURGER ── */
.hamburger {
  display: none;
  position: fixed;
  top: 1rem;
  right: 5%;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  z-index: 350;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--negro);
  border-radius: 2px;
  transition: all 0.3s;
  transform-origin: center;
}

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

/* ── HERO ── */
#inicio {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8rem 5% 5rem;
  position: relative;
  overflow: hidden;
  text-align: center;
  background: var(--crema);
}

#inicio::before {
  content: '';
  position: absolute;
  top: -120px; right: -180px;
  width: 700px; height: 700px;
  background: radial-gradient(circle, rgba(82,183,136,0.12) 0%, transparent 65%);
  pointer-events: none;
}

#inicio::after {
  content: '';
  position: absolute;
  bottom: -100px; left: -120px;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(45,106,79,0.07) 0%, transparent 65%);
  pointer-events: none;
}

.hero-text {
  position: relative;
  z-index: 1;
  max-width: 700px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(45,106,79,0.1);
  color: var(--verde);
  font-size: 0.8rem;
  font-weight: 500;
  padding: 0.4rem 1rem;
  border-radius: 100px;
  margin-bottom: 1.5rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.hero-badge::before {
  content: '';
  width: 7px; height: 7px;
  background: var(--verde-claro);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.3); }
}

h1 {
  font-family: 'Fraunces', serif;
  font-size: clamp(2.8rem, 5.5vw, 4.6rem);
  line-height: 1.1;
  letter-spacing: -1.5px;
  margin-bottom: 1.5rem;
  color: var(--negro);
}

h1 em {
  font-style: italic;
  color: var(--verde);
}

.hero-sub {
  font-size: 1.25rem;
  color: var(--gris);
  line-height: 1.6;
  max-width: 520px;
  margin: 0 auto 2.5rem;
}

.hero-btns {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--verde);
  color: var(--crema);
  text-decoration: none;
  padding: 0.9rem 2rem;
  border-radius: 100px;
  font-weight: 500;
  font-size: 0.95rem;
  transition: all 0.25s;
  box-shadow: 0 4px 20px rgba(45,106,79,0.3);
}

.btn-primary:hover {
  background: var(--negro);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0,0,0,0.15);
}

.btn-wa {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--verde);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.2s;
}

.btn-wa:hover { color: var(--negro); }
.btn-wa svg { width: 22px; height: 22px; }

/* ── SOBRE MÍ ── */
#sobre-mi {
  padding: 6rem 5%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
  background: var(--negro);
  color: var(--crema);
}

#sobre-mi h2 {
  font-family: 'Fraunces', serif;
  font-size: clamp(2.2rem, 3.5vw, 3.2rem);
  line-height: 1.15;
  letter-spacing: -0.5px;
  margin-bottom: 1.5rem;
}

#sobre-mi h2 em {
  color: var(--verde-claro);
  font-style: italic;
}

#sobre-mi p {
  color: rgba(245,240,232,0.7);
  line-height: 1.7;
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

.sobre-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.5rem;
}

.tag {
  border: 1px solid rgba(82,183,136,0.4);
  color: var(--verde-claro);
  padding: 0.35rem 0.9rem;
  border-radius: 100px;
  font-size: 0.8rem;
}

.sobre-nums {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.num-item {
  border-left: 3px solid var(--verde-claro);
  padding-left: 1.2rem;
}

.num-big {
  font-family: 'Fraunces', serif;
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--crema);
  line-height: 1;
}

.num-desc {
  font-size: 0.95rem;
  color: rgba(245,240,232,0.6);
  margin-top: 0.3rem;
}

/* ── SERVICIOS ── */
#servicios {
  padding: 6rem 5%;
}

.section-label {
  font-size: 0.88rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--verde);
  font-weight: 500;
  margin-bottom: 0.8rem;
}

.section-title {
  font-family: 'Fraunces', serif;
  font-size: clamp(2.1rem, 3.5vw, 3rem);
  letter-spacing: -0.5px;
  line-height: 1.15;
  margin-bottom: 3.5rem;
  max-width: 500px;
}

.servicios-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.servicio-card {
  background: white;
  border-radius: 20px;
  padding: 2rem;
  position: relative;
  overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s;
  border: 1px solid rgba(0,0,0,0.06);
  display: flex;
  flex-direction: column;
}

.servicio-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 60px rgba(0,0,0,0.1);
}

.servicio-card.destacado {
  background: var(--verde);
  color: var(--crema);
}

.serv-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  background: var(--crema);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 1.5rem;
}

.destacado .serv-icon {
  background: rgba(255,255,255,0.15);
}

.serv-name {
  font-family: 'Fraunces', serif;
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 0.7rem;
}

.serv-desc {
  font-size: 1rem;
  color: var(--gris);
  line-height: 1.6;
  margin-bottom: 1.5rem;
  flex: 1;
}

.destacado .serv-desc { color: rgba(245,240,232,0.75); }

.serv-link {
  display: inline-flex;
  align-items: center;
  font-size: 0.97rem;
  font-weight: 500;
  color: var(--verde);
  text-decoration: none;
  transition: gap 0.2s;
  gap: 0.3rem;
  margin-top: auto;
}

.serv-link:hover { gap: 0.6rem; }

.destacado .serv-link {
  color: var(--crema);
  opacity: 0.9;
}

/* ── PORTFOLIO ── */
#portfolio {
  padding: 6rem 5%;
  background: #F0EBE1;
}

#portfolio .section-title em {
  font-style: italic;
  color: var(--verde);
}

.section-sub {
  color: var(--gris);
  font-size: 1.1rem;
  margin-top: -1.5rem;
  margin-bottom: 3rem;
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.portfolio-item {
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  aspect-ratio: 4/3;
  cursor: pointer;
  background: var(--negro);
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
  transition: transform 0.35s, box-shadow 0.35s;
}

.portfolio-item:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 50px rgba(0,0,0,0.18);
}

.portfolio-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  display: block;
  transition: transform 0.5s, opacity 0.35s;
}

.portfolio-item:hover .portfolio-thumb {
  transform: scale(1.04);
  opacity: 0.35;
}

.portfolio-overlay {
  position: absolute;
  inset: 0;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background: linear-gradient(to top, rgba(17,17,16,0.85) 0%, transparent 60%);
  color: white;
  opacity: 0;
  transition: opacity 0.35s;
}

.portfolio-item:hover .portfolio-overlay { opacity: 1; }

.p-meta { margin-bottom: 0.5rem; }

.p-tag {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: var(--verde-claro);
  color: white;
  padding: 0.25rem 0.7rem;
  border-radius: 100px;
}

.p-title {
  font-family: 'Fraunces', serif;
  font-weight: 700;
  font-size: 1.15rem;
  line-height: 1.2;
  margin-bottom: 0.25rem;
}

.p-sector {
  font-size: 0.78rem;
  opacity: 0.75;
  margin-bottom: 0.7rem;
}

.p-cta {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--verde-claro);
  letter-spacing: 0.02em;
}

/* ── LIGHTBOX ── */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: rgba(10,10,10,0.95);
  backdrop-filter: blur(14px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.lightbox.active {
  opacity: 1;
  pointer-events: all;
}

.lb-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  width: min(900px, 90vw);
  transform: translateY(20px) scale(0.97);
  transition: transform 0.35s cubic-bezier(0.22,1,0.36,1);
}

.lightbox.active .lb-content {
  transform: translateY(0) scale(1);
}

/* Cabecera: info + contador */
.lb-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 1rem;
}

.lb-header-left {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.lb-tag {
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: var(--verde-claro);
  color: white;
  padding: 0.2rem 0.7rem;
  border-radius: 100px;
  flex-shrink: 0;
}

.lb-title {
  font-family: 'Fraunces', serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--crema);
}

.lb-sector {
  font-size: 0.8rem;
  color: rgba(245,240,232,0.45);
}

.lb-counter {
  font-size: 0.78rem;
  color: rgba(245,240,232,0.35);
  white-space: nowrap;
  flex-shrink: 0;
}

/* Imagen principal */
.lb-img {
  width: 100%;
  max-height: 62vh;
  object-fit: contain;
  object-position: top;
  border-radius: 10px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.6);
  transition: opacity 0.2s;
}

/* Miniaturas */
.lb-thumbs {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  flex-wrap: wrap;
  width: 100%;
}

.lb-thumb {
  width: 64px;
  height: 48px;
  border-radius: 6px;
  overflow: hidden;
  border: 2px solid rgba(255,255,255,0.12);
  background: none;
  padding: 0;
  cursor: pointer;
  transition: border-color 0.2s, transform 0.2s;
  flex-shrink: 0;
}

.lb-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  display: block;
}

.lb-thumb:hover {
  border-color: rgba(255,255,255,0.4);
  transform: translateY(-2px);
}

.lb-thumb-active {
  border-color: var(--verde-claro) !important;
  transform: translateY(-2px);
}

/* Botones fijos */
.lb-close {
  position: fixed;
  top: 1.5rem; right: 1.8rem;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  color: white; font-size: 1rem;
  width: 40px; height: 40px;
  border-radius: 50%; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s;
  z-index: 510;
}
.lb-close:hover { background: rgba(255,255,255,0.18); }

.lb-arrow {
  position: fixed;
  top: 50%; transform: translateY(-50%);
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  color: white; font-size: 1.8rem;
  width: 50px; height: 50px;
  border-radius: 50%; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s;
  z-index: 510; line-height: 1;
}
.lb-arrow:hover { background: rgba(255,255,255,0.18); }
.lb-prev { left: 1.5rem; }
.lb-next { right: 1.5rem; }

@media (max-width: 600px) {
  .lb-arrow {
    width: 44px; height: 44px;
    font-size: 1.8rem;
    background: rgba(255,255,255,0.55);
    border: 1px solid rgba(255,255,255,0.7);
    color: #111;
    top: 50%;
    transform: translateY(-50%);
  }
  .lb-prev { left: 0.5rem; }
  .lb-next { right: 0.5rem; }
  .lb-thumb { width: 52px; height: 38px; }
  .lb-content { width: 80vw; }
  .lb-img { max-height: 55vh; }
  .lb-swipe-hint { display: none; }
}

/* ── CONTACTO ── */
#contacto {
  padding: 6rem 5%;
  background: var(--negro);
  color: var(--crema);
}

.contacto-header {
  text-align: center;
  margin-bottom: 4rem;
}

.contacto-header h2 {
  font-family: 'Fraunces', serif;
  font-size: clamp(2.2rem, 3.5vw, 3.2rem);
  letter-spacing: -0.5px;
  line-height: 1.15;
  margin-bottom: 0.8rem;
  color: var(--crema);
}

.contacto-header p {
  color: rgba(245,240,232,0.7);
  font-size: 1.1rem;
  line-height: 1.7;
  max-width: 480px;
  margin: 0 auto;
}

.contacto-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: start;
}

.contacto-col-title {
  font-family: 'Fraunces', serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--crema);
  margin-bottom: 1.5rem;
  letter-spacing: -0.3px;
}

#contacto .section-label {
  color: var(--verde-claro);
}

.contact-option {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: rgba(3, 130, 22, 0.679);
  border-radius: 14px;
  margin-bottom: 0.8rem;
  text-decoration: none;
  color: var(--crema);
  transition: all 0.2s;
  border: 1px solid rgba(245,240,232,0.1);
}

.contact-option:hover {
  transform: translateX(6px);
  background: rgba(40, 144, 15, 0.458);
  border-color: rgba(82,183,136,0.4);
}

.co-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.contact-option2 {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: rgba(65, 135, 227, 0.661);
  border-radius: 14px;
  margin-bottom: 0.8rem;
  text-decoration: none;
  color: var(--crema);
  transition: all 0.2s;
  border: 1px solid rgba(245,240,232,0.1);
}

.contact-option2:hover {
  transform: translateX(6px);
  background: rgba(26, 115, 232, 0.45);
  border-color: rgba(66, 133, 244, 0.5);
}

.co-phone { background: rgba(26, 115, 232, 0.25); }

.co-wa { background: rgba(82,183,136,0.2); }
.co-mail { background: rgba(82,183,136,0.15); }

.co-text strong { display: block; font-size: 1.05rem; color: var(--crema); }
.co-text span { font-size: 1rem; color: rgba(245,240,232,0.5); }

.form-side { display: flex; flex-direction: column; gap: 1rem; }

.form-group { display: flex; flex-direction: column; gap: 0.4rem; }

.form-group label {
  font-size: 0.95rem;
  font-weight: 500;
  color: rgba(245,240,232,0.7);
}

.form-group input,
.form-group textarea,
.form-group select {
  padding: 0.85rem 1rem;
  border: 1.5px solid rgba(245,240,232,0.12);
  border-radius: 12px;
  font-family: 'DM Sans', sans-serif;
  font-size: 1rem;
  background: rgba(245,240,232,0.06);
  color: var(--crema);
  transition: border-color 0.2s;
  outline: none;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: rgba(245,240,232,0.3);
}

.form-group select option {
  background: var(--negro);
  color: var(--crema);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: var(--verde-claro);
}

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

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

.btn-submit {
  background: var(--verde-claro);
  color: white;
  border: none;
  padding: 1rem 2rem;
  border-radius: 100px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.25s;
  box-shadow: 0 4px 20px rgba(82,183,136,0.3);
}

.btn-submit:hover {
  background: var(--crema);
  color: var(--negro);
  transform: translateY(-2px);
}

.contacto-quote {
  position: relative;
  margin-top: 1.8rem;
  padding: 1.6rem 1.5rem 1.6rem 1.8rem;
  border-left: 3px solid var(--verde-claro);
  border-radius: 0 14px 14px 0;
  background: rgba(82,183,136,0.07);
  color: var(--crema);
  font-family: 'Fraunces', serif;
  font-size: 1.2em;
  font-style: italic;
  line-height: 1.6;
  letter-spacing: -0.01em;
}

.quote-mark {
  font-size: 2.8rem;
  line-height: 0;
  vertical-align: -0.5rem;
  color: var(--verde-claro);
  font-style: normal;
  opacity: 0.7;
  margin-right: 0.1em;
}

.quote-mark-close {
  margin-left: 0.1em;
  margin-right: 0;
}

/* ── FOOTER ── */
footer {
  background: var(--negro);
  color: rgba(245,240,232,0.45);
  text-align: center;
  padding: 2.5rem 5%;
  font-size: 0.92rem;
  border-top: 1px solid rgba(245,240,232,0.06);
  letter-spacing: 0.02em;
}

footer span { color: var(--verde-claro); font-weight: 500; }
footer a { color: rgba(245,240,232,0.45); text-decoration: none; transition: color 0.2s; }
footer a:hover { color: var(--verde-claro); }

/* ── RESPONSIVE ── */
@media (max-width: 791px) {
  .hamburger { display: flex; }
  .nav-links { display: none; }

  #inicio { padding: 7rem 5% 4rem; }

  #sobre-mi, .contacto-cols {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .servicios-grid, .portfolio-grid { grid-template-columns: 1fr; }
  .sobre-nums { grid-template-columns: 1fr 1fr; }
  .form-row { grid-template-columns: 1fr; }
}
