:root {
  --bg: #050608;
  --text: #F9FAFB;
  --dim: #A1ABB5;
  --faint: rgba(255, 255, 255, 0.05);
  --accent: #BFA58A;
  --serif: 'Cormorant Garamond', Georgia, serif;
  --sans: 'Inter', sans-serif;
  --mono: 'Space Mono', monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

#scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  background: var(--accent);
  z-index: 1000;
  width: 0%;
  box-shadow: 0 0 10px var(--accent), 0 0 20px var(--accent);
  transition: width 0.1s ease-out;
}
#noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

body {
  background: var(--bg);
  background-image: radial-gradient(circle at 50% -20%, #12151A, #050608 65%);
  color: var(--text);
  font-family: var(--sans);
  font-weight: 300;
  font-size: 14px;
  line-height: 1.7;
  overflow-x: hidden;
}
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -2;
  background-image: 
    linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
  background-size: 60px 60px;
}

nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 2rem 3rem;
  background: rgba(3, 3, 3, 0.5);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--faint);
}

.logo {
  font-family: var(--serif);
  font-size: 1.8rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text);
  text-decoration: none;
  text-shadow: 0 0 15px rgba(210, 154, 97, 0.15);
}

.menu-toggle {
  background: none; border: none; color: var(--text);
  cursor: pointer;
  transition: color 0.3s;
  display: flex;
  align-items: center; justify-content: center;
}
.menu-toggle:hover { color: var(--accent); }

.fullscreen-menu {
  position: fixed;
  inset: 0;
  background: var(--bg);
  background-image: radial-gradient(circle at 50% -20%, #12151A, #050608 65%);
  z-index: 2000;
  display: flex;
  flex-direction: column;
  padding: 3rem 4rem;
  transform: translateY(-100%);
  transition: transform 0.6s cubic-bezier(0.7, 0, 0.3, 1), opacity 0.6s;
  opacity: 0;
  pointer-events: none;
}
.fullscreen-menu.open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: all;
}
.menu-close {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 4rem;
}
.menu-close button {
  background: none; border: none; color: var(--text); cursor: pointer;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 50%;
  width: 50px; height: 50px;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.3s;
}
.menu-close button:hover { border-color: var(--accent); color: var(--accent); }

.menu-content {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex: 1;
  padding-bottom: 2rem;
}
.menu-nav {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.menu-nav a {
  font-family: var(--serif);
  font-size: clamp(3rem, 6vw, 5rem);
  color: var(--dim);
  text-decoration: none;
  transition: color 0.4s ease, transform 0.4s ease;
  display: flex;
  align-items: baseline;
  gap: 1.5rem;
}
.menu-nav a:hover {
  color: var(--text);
  transform: translateX(20px);
}
.menu-nav a span {
  font-family: var(--mono);
  font-size: 1.2rem;
  color: var(--accent);
}
.menu-info {
  text-align: right;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  color: var(--dim);
  line-height: 2;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

main { padding-top: 5rem; }

section {
  padding: 10rem 3rem;
  border-bottom: 1px solid var(--faint);
  max-width: 1400px;
  margin: 0 auto;
}

#hero {
  position: relative;
  min-height: calc(100vh - 5rem);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  border-bottom: 1px solid var(--faint);
  padding: 6rem 3rem;
  max-width: none;
  margin: 0;
}
#hero::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: url('mining-1.jpg') center/cover no-repeat;
  opacity: 0.14;
  z-index: -3;
  pointer-events: none;
  transform: translateZ(0);
}

.hero-label {
  font-family: var(--mono);
  font-size: 0.85rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  opacity: 0.8;
  margin-bottom: 3rem;
}

.hero-title {
  font-family: var(--serif);
  font-size: clamp(3.5rem, 8vw, 8rem);
  font-weight: 400;
  line-height: 0.95;
  letter-spacing: -0.01em;
  max-width: 900px;
  text-shadow: 0 0 40px rgba(210, 154, 97, 0.12);
}
.hero-title em { font-style: italic; color: var(--dim); }

.hero-bottom {
  margin-top: 4rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 2rem;
  flex-wrap: wrap;
}

.hero-desc { max-width: 380px; color: var(--dim); font-size: 0.8rem; line-height: 1.8; }

.hero-scroll {
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--dim);
  text-decoration: none;
  transition: color 0.3s ease, transform 0.3s ease;
}
.hero-scroll:hover { 
  color: var(--text); 
  transform: translateY(4px);
}

.editorial-section {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: flex-start;
  gap: 6rem;
}
#nosotros, #areas, #contacto {
  position: relative;
}
#nosotros::before, #areas::before, #contacto::before {
  content: "";
  position: absolute;
  top: 0;
  left: calc(50% - 50vw);
  width: 100vw;
  height: 100%;
  opacity: 0.12;
  z-index: -3;
  pointer-events: none;
  transform: translateZ(0);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
#nosotros::before { background-image: url('mining-2.jpg'); }
#areas::before { background-image: url('bg-solar.jpg'); opacity: 0.15; }
#contacto::before { background-image: url('bg-desert.png'); opacity: 0.15; }

.section-num {
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--accent);
  opacity: 0.7;
  padding-top: 0.3rem;
  margin-bottom: 1.5rem;
  display: block;
}

.editorial-left {
  flex: 1;
  max-width: 500px;
}
.editorial-right {
  flex: 1;
  max-width: 700px;
  padding-top: 6rem;
}

.section-heading {
  font-family: var(--serif);
  font-size: clamp(3.5rem, 6vw, 5.5rem);
  font-weight: 400;
  line-height: 0.95;
  letter-spacing: -0.01em;
  margin-bottom: 2.5rem;
}
.section-heading em { font-style: italic; color: var(--dim); }

.body-text {
  font-size: 0.82rem;
  color: var(--dim);
  line-height: 1.9;
  max-width: 580px;
  margin-bottom: 1.2rem;
  text-shadow: 0 2px 8px rgba(0,0,0,0.9);
}




/* FOTO CARD */
.abogado-foto-wrap {
  position: relative;
  width: 100%;
  cursor: pointer;
  overflow: hidden;
  border-radius: 4px;
}
.abogado-foto-wrap img {
  width: 100%;
  height: 60vh;
  object-fit: cover;
  object-position: top center;
  display: block;
  filter: grayscale(100%) contrast(1.1);
  transition: filter 0.6s ease, transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.abogado-foto-wrap:hover img { 
  filter: grayscale(0%) contrast(1.05);
  transform: scale(1.04);
}
.foto-hint {
  font-family: var(--mono);
  margin-top: 1.5rem;
  font-size: 0.65rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--accent);
  transition: color 0.3s;
}
.abogado-foto-wrap:hover .foto-hint { color: var(--text); }

/* PANEL OVERLAY */
.abogado-panel {
  position: fixed;
  top: 0; right: 0;
  width: min(480px, 100vw);
  height: 100vh;
  background: rgba(10, 10, 10, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-left: 1px solid var(--faint);
  z-index: 200;
  padding: 4rem 3rem;
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform 0.6s cubic-bezier(0.4,0,0.2,1);
  display: flex;
  flex-direction: column;
  gap: 1.8rem;
}
.abogado-panel.open { transform: translateX(0); }
.panel-close {
  align-self: flex-end;
  background: none;
  border: none;
  color: var(--dim);
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 0.3s;
  padding: 0;
  margin-bottom: 1rem;
}
.panel-close:hover { color: var(--text); }
.panel-nombre {
  font-family: var(--serif);
  font-size: 2.4rem;
  font-weight: 400;
  line-height: 1.1;
}
.panel-cargo {
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--dim);
}
.panel-body {
  font-size: 0.8rem;
  color: var(--dim);
  line-height: 1.9;
}
.panel-li-link {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--dim);
  text-decoration: none;
  border-bottom: 1px solid var(--faint);
  padding-bottom: 0.4rem;
  transition: color 0.3s, border-color 0.3s;
  margin-top: auto;
}
.panel-li-link:hover { color: var(--text); border-color: var(--accent); }
.panel-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px);
  z-index: 199;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s;
}
.panel-overlay.open { opacity: 1; pointer-events: all; }

.abogado-cargo {
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--dim);
  margin-bottom: 2.5rem;
}

.industrias-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 3rem 2rem;
}
.industria-card {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  border-top: 1px solid var(--faint);
  padding-top: 1.5rem;
  transition: border-color 0.3s;
}
.industria-card:hover { border-color: var(--accent); }
.industria-card i {
  font-size: 2.2rem;
  color: var(--dim);
  transition: color 0.3s;
}
.industria-card:hover i { color: var(--accent); }
.industria-card p {
  font-family: var(--serif);
  font-size: 1.8rem;
  line-height: 1.2;
  color: var(--text);
}

.contacto-grid {
  display: flex;
  flex-direction: column;
  gap: 4rem;
}

.contacto-info p { font-size: 0.8rem; color: var(--dim); line-height: 2.2; text-shadow: 0 2px 8px rgba(0,0,0,0.9); }
.contacto-info a { color: var(--text); text-decoration: none; transition: color 0.3s; }
.contacto-info a:hover { color: var(--dim); }

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

.field { display: flex; flex-direction: column; gap: 0.6rem; }
.field label { font-size: 0.62rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--dim); transition: color 0.3s; }
.field:focus-within label { color: var(--accent); }

.field input, .field textarea {
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--faint);
  color: var(--text);
  font-family: var(--sans);
  font-size: 0.82rem;
  font-weight: 300;
  padding: 0.6rem 0;
  outline: none;
  transition: border-color 0.3s, box-shadow 0.3s;
  resize: none;
}
.field input::placeholder, .field textarea::placeholder { color: rgba(255,255,255,0.12); }
.field input:focus, .field textarea:focus { 
  border-bottom-color: var(--accent); 
  box-shadow: 0 4px 10px rgba(255,255,255,0.02);
}
.field textarea { min-height: 80px; }

.btn {
  align-self: flex-start;
  background: none;
  border: 1px solid var(--faint);
  padding: 1.2rem 2.5rem;
  border-radius: 4px;
  color: var(--dim);
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
  display: flex;
  align-items: center;
  gap: 1rem;
}
.btn::after { content: '→'; transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1); }
.btn:hover { 
  color: var(--accent); 
  border-color: var(--accent);
  background: rgba(191,165,138,0.05);
}
.btn:hover::after { transform: translateX(6px); }

footer {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 3rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}
footer p { font-size: 0.65rem; color: var(--dim); }

.reveal {
  opacity: 0;
  transform: translateY(40px) scale(0.98);
  filter: blur(10px);
  transition: opacity 1.2s cubic-bezier(0.2, 0.8, 0.2, 1), transform 1.2s cubic-bezier(0.2, 0.8, 0.2, 1), filter 1.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.reveal.visible { opacity: 1; transform: none; filter: blur(0); }

@media (max-width: 680px) {
  nav { padding: 1.5rem 2rem; }
  #hero, section { padding: 5rem 2rem; }
  .editorial-section { flex-direction: column; gap: 2rem; }
  .editorial-right { padding-top: 0; max-width: 100%; }
  .contacto-grid { gap: 2.5rem; }
  
  .menu-content { flex-direction: column; align-items: flex-start; gap: 4rem; justify-content: flex-start; }
  .menu-nav a { font-size: 3rem; }
  .fullscreen-menu { padding: 2rem; }

  footer { padding: 2rem; flex-direction: column; gap: 0.8rem; }
}