/* ============================================================
   MELAVOT — style.css
   ============================================================ */

/* 1. Variables & Reset
   ---------------------------------------------------------- */
:root {
  --green-dark:  #0f1d16;
  --green:       #162e22;
  --green-mid:   #1e3d2d;
  --green-light: #2a5040;
  --gold:        #c4a467;
  --gold-light:  #d4ba85;
  --cream:       #f5f0e8;
  --cream-dark:  #ebe5d8;
  --white:       #ffffff;
  --text:        #1a1a1a;
  --text-mid:    #555555;
  --text-light:  #888888;

  --f-display: 'Cormorant Garamond', Georgia, serif;
  --f-body:    'Aller', 'DM Sans', system-ui, sans-serif;

  --nav-h:   80px;
  --max-w:   1200px;
  --gutter:  clamp(24px, 6vw, 100px);
  --section: clamp(80px, 12vw, 160px);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--f-body);
  color: var(--text);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul { list-style: none; }

/* 2. Typography
   ---------------------------------------------------------- */
h1, h2, h3, h4 {
  font-family: var(--f-display);
  font-weight: 400;
  line-height: 1.05;
}
p { line-height: 1.75; color: var(--text-mid); }

/* 3. Navigation
   ---------------------------------------------------------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 var(--gutter);
  transition: background 0.5s ease, box-shadow 0.5s ease;
}
.nav.scrolled {
  background: rgba(15, 29, 22, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 rgba(255,255,255,0.06);
}
.nav-logo {
  font-family: var(--f-display);
  font-size: 20px;
  letter-spacing: 5px;
  color: var(--cream);
  font-weight: 500;
  flex-shrink: 0;
}
.nav-links {
  display: flex; gap: 36px;
}
.nav-links a {
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(245,240,232,0.7);
  transition: color 0.3s;
}
.nav-links a:hover,
.nav-links a.active { color: var(--gold); }

.lang-toggle {
  display: flex; align-items: center; gap: 2px;
}
.lang-btn {
  background: none; border: none; cursor: pointer;
  font-family: var(--f-body); font-size: 11px;
  letter-spacing: 2px; text-transform: uppercase;
  color: rgba(245,240,232,0.5);
  padding: 4px 8px;
  transition: color 0.3s;
}
.lang-btn.active { color: var(--gold); }
.lang-sep { color: rgba(245,240,232,0.2); font-size: 10px; }

/* Mobile nav toggle */
.nav-hamburger {
  display: none;
  flex-direction: column; gap: 5px;
  cursor: pointer; padding: 4px;
}
.nav-hamburger span {
  display: block; width: 24px; height: 1px;
  background: var(--cream); transition: all 0.3s;
}
.mobile-menu {
  display: none;
  position: fixed; top: var(--nav-h); left: 0; right: 0;
  background: var(--green-dark);
  padding: 32px var(--gutter) 48px;
  flex-direction: column; gap: 0;
  z-index: 99;
}
.mobile-menu.open { display: flex; }
.mobile-menu a {
  font-size: 13px; letter-spacing: 2px; text-transform: uppercase;
  color: rgba(245,240,232,0.7); padding: 18px 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  transition: color 0.3s;
}
.mobile-menu a:hover { color: var(--gold); }

/* 4. Hero — Home
   ---------------------------------------------------------- */
.hero {
  min-height: 100vh;
  background: var(--green);
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: var(--nav-h) var(--gutter) var(--section);
  position: relative; overflow: hidden;
}
.hero::before {
  content: 'M';
  position: absolute; right: -4%; bottom: -12%;
  font-family: var(--f-display); font-size: clamp(300px, 45vw, 640px);
  font-weight: 500; color: rgba(255,255,255,0.025);
  line-height: 1; pointer-events: none; user-select: none;
}
.hero-eyebrow {
  font-size: 11px; letter-spacing: 3.5px; text-transform: uppercase;
  color: var(--gold);
  display: flex; align-items: center; gap: 18px;
  margin-bottom: 40px;
}
.hero-eyebrow::before {
  content: ''; display: block; width: 48px; height: 1px; background: var(--gold);
}
.hero h1 {
  font-size: clamp(48px, 6.5vw, 92px);
  color: var(--cream);
  font-weight: 300;
  max-width: 960px;
  margin-bottom: 40px;
  line-height: 1.0;
}
.hero-sub {
  font-size: clamp(15px, 1.5vw, 18px);
  color: rgba(245,240,232,0.6);
  max-width: 520px;
  line-height: 1.75;
  margin-bottom: 64px;
  font-weight: 300;
}
.hero-scroll {
  position: absolute; bottom: 48px; right: var(--gutter);
  font-size: 11px; letter-spacing: 2.5px; text-transform: uppercase;
  color: rgba(245,240,232,0.3);
  writing-mode: vertical-rl;
  display: flex; align-items: center; gap: 16px;
}
.hero-scroll::after {
  content: ''; display: block; width: 1px; height: 60px; background: var(--gold); opacity: 0.4;
}

/* 5. Sub-page Hero
   ---------------------------------------------------------- */
.page-hero {
  min-height: 52vh;
  background: var(--green);
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: calc(var(--nav-h) + 40px) var(--gutter) 80px;
}
.page-hero-eyebrow {
  font-size: 11px; letter-spacing: 3px; text-transform: uppercase;
  color: var(--gold); margin-bottom: 28px;
  display: flex; align-items: center; gap: 16px;
}
.page-hero-eyebrow::before {
  content: ''; width: 40px; height: 1px; background: var(--gold);
}
.page-hero h1 {
  font-size: clamp(42px, 5vw, 76px);
  color: var(--cream); font-weight: 300; max-width: 820px;
}
.page-hero p {
  margin-top: 28px;
  font-size: 17px; color: rgba(245,240,232,0.6);
  max-width: 540px; font-weight: 300;
}

/* 6. Sections Base
   ---------------------------------------------------------- */
.section {
  padding: var(--section) var(--gutter);
}
.section-cream  { background: var(--cream); }
.section-dark   { background: var(--green); }
.section-white  { background: var(--white); }
.section-center { text-align: center; }

.section-label {
  font-size: 11px; letter-spacing: 3px; text-transform: uppercase;
  color: var(--gold);
  display: flex; align-items: center; gap: 18px;
  margin-bottom: 64px;
}
.section-label::before {
  content: ''; width: 40px; height: 1px; background: var(--gold);
}
.section-label.center { justify-content: center; }
.section-label.center::before { display: none; }

.section-heading {
  font-size: clamp(36px, 4vw, 58px);
  font-weight: 400; line-height: 1.05;
  margin-bottom: 24px;
}
.section-heading.light { color: var(--cream); }

.section-body {
  font-size: 17px; color: var(--text-mid);
  max-width: 640px; line-height: 1.8; margin-bottom: 64px;
}
.section-body.light { color: rgba(245,240,232,0.65); }

/* 7. Buttons
   ---------------------------------------------------------- */
.btn-outline {
  display: inline-flex; align-items: center; gap: 14px;
  border: 1px solid currentColor;
  font-size: 12px; letter-spacing: 2px; text-transform: uppercase;
  padding: 16px 32px;
  transition: background 0.3s, color 0.3s, border-color 0.3s;
  cursor: pointer;
}
.btn-gold {
  color: var(--gold); border-color: var(--gold);
}
.btn-gold:hover {
  background: var(--gold); color: var(--green);
}
.btn-dark {
  color: var(--green); border-color: var(--green);
}
.btn-dark:hover {
  background: var(--green); color: var(--cream);
}
.btn-cream {
  color: var(--cream); border-color: rgba(245,240,232,0.4);
}
.btn-cream:hover {
  border-color: var(--cream); background: rgba(245,240,232,0.08);
}
.btn-solid {
  display: inline-flex; align-items: center; gap: 14px;
  background: var(--green); color: var(--cream);
  border: none; cursor: pointer;
  font-family: var(--f-body); font-size: 12px;
  letter-spacing: 2px; text-transform: uppercase;
  padding: 18px 40px;
  transition: background 0.3s;
}
.btn-solid:hover { background: var(--green-mid); }

/* 8. Quote Block
   ---------------------------------------------------------- */
.quote-block {
  background: var(--cream);
  padding: clamp(80px, 14vw, 180px) var(--gutter);
  text-align: center;
}
.quote-block blockquote {
  font-family: var(--f-display);
  font-size: clamp(28px, 3.5vw, 52px);
  font-weight: 300; font-style: italic;
  color: var(--green); line-height: 1.2;
  max-width: 960px; margin: 0 auto 36px;
}
.quote-block cite {
  font-size: 11px; letter-spacing: 3px; text-transform: uppercase;
  color: var(--gold); display: block; font-style: normal;
}

/* 9. Areas / Services Grid
   ---------------------------------------------------------- */
.areas-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px; background: var(--cream-dark);
  border: 1px solid var(--cream-dark);
  margin-top: 0;
}
.area-card {
  background: var(--white); padding: 52px 40px;
  cursor: default; transition: background 0.35s;
}
.area-card:hover { background: var(--cream); }
.area-num {
  display: block; font-size: 11px; letter-spacing: 2px;
  color: var(--gold); margin-bottom: 36px;
}
.area-title {
  font-family: var(--f-display);
  font-size: 24px; font-weight: 400; color: var(--text);
  line-height: 1.2; margin-bottom: 20px;
}
.area-desc {
  font-size: 15px; color: var(--text-light); line-height: 1.75;
}

/* Detail areas (practica.html) */
.areas-detail {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 2px; background: var(--cream-dark);
}
.area-detail-card {
  background: var(--white); padding: 64px 56px;
  transition: background 0.3s;
}
.area-detail-card:hover { background: var(--cream); }
.area-detail-num {
  font-size: 36px; font-family: var(--f-display);
  color: var(--cream-dark); display: block; margin-bottom: 32px; line-height: 1;
}
.area-detail-title {
  font-family: var(--f-display); font-size: 34px; font-weight: 400;
  color: var(--green); line-height: 1.1; margin-bottom: 20px;
}
.area-detail-tag {
  font-size: 11px; letter-spacing: 2px; text-transform: uppercase;
  color: var(--gold); display: block; margin-bottom: 32px;
}
.area-detail-desc {
  font-size: 16px; color: var(--text-mid); line-height: 1.8;
  margin-bottom: 32px;
}
.area-detail-list {
  list-style: none; display: flex; flex-direction: column; gap: 10px;
}
.area-detail-list li {
  font-size: 14px; color: var(--text-light);
  display: flex; align-items: flex-start; gap: 12px; line-height: 1.5;
}
.area-detail-list li::before {
  content: '—'; color: var(--gold); flex-shrink: 0; margin-top: 1px;
}

/* 10. Projects Grid
   ---------------------------------------------------------- */
.projects-grid {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 2px; background: var(--cream-dark);
}
.project-card {
  background: var(--white); padding: 56px 48px;
  display: flex; flex-direction: column;
  transition: background 0.35s;
}
.project-card:hover { background: var(--cream); }
.project-tag {
  font-size: 11px; letter-spacing: 2.5px; text-transform: uppercase;
  color: var(--gold); margin-bottom: 24px; display: block;
}
.project-title {
  font-family: var(--f-display); font-size: 28px; font-weight: 400;
  color: var(--green); line-height: 1.15; margin-bottom: 20px;
}
.project-desc {
  font-size: 15px; color: var(--text-mid); line-height: 1.8;
}
.project-meta {
  margin-top: 32px; padding-top: 24px;
  border-top: 1px solid var(--cream-dark);
  display: flex; gap: 24px; flex-wrap: wrap;
}
.project-meta span {
  font-size: 11px; letter-spacing: 1.5px; text-transform: uppercase;
  color: var(--text-light);
}

/* 11. About / Quién soy
   ---------------------------------------------------------- */
.about-grid {
  display: grid; grid-template-columns: 5fr 4fr; gap: 80px;
  align-items: start;
}
.about-body p {
  font-size: 17px; line-height: 1.85; color: var(--text-mid); margin-bottom: 28px;
}
.about-body p.lead {
  font-family: var(--f-display); font-size: 26px; color: var(--green);
  line-height: 1.35; margin-bottom: 40px;
}
.credentials { display: flex; flex-direction: column; gap: 20px; }
.credential {
  padding: 28px 28px 28px 24px;
  border-left: 2px solid var(--gold);
  background: var(--cream);
}
.credential-label {
  font-size: 10px; letter-spacing: 2px; text-transform: uppercase;
  color: var(--gold); margin-bottom: 8px;
}
.credential-value {
  font-size: 15px; color: var(--text); line-height: 1.5;
}
.credential-detail {
  font-size: 13px; color: var(--text-light); margin-top: 2px;
}

.intersection-grid {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 2px; background: var(--green); margin: 80px 0 0;
}
.intersection-item {
  background: var(--green-mid); padding: 48px 40px;
  text-align: center; transition: background 0.3s;
}
.intersection-item:hover { background: var(--green-light); }
.intersection-item h3 {
  font-family: var(--f-display); font-size: 24px; color: var(--cream);
  margin-bottom: 12px; line-height: 1.2;
}
.intersection-item p {
  font-size: 13px; color: rgba(245,240,232,0.5); margin: 0;
}

/* 12. Contact
   ---------------------------------------------------------- */
.contact-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 100px;
  align-items: start;
}
.contact-info h2 { margin-bottom: 28px; }
.contact-info p { font-size: 16px; line-height: 1.8; max-width: 380px; }
.contact-details {
  margin-top: 56px; display: flex; flex-direction: column; gap: 20px;
}
.contact-item {
  display: flex; gap: 20px; align-items: flex-start;
}
.contact-item-label {
  font-size: 10px; letter-spacing: 2px; text-transform: uppercase;
  color: var(--gold); min-width: 72px; margin-top: 2px;
}
.contact-item-value {
  font-size: 15px; color: var(--text-mid); line-height: 1.5;
}
.contact-item-value a { transition: color 0.3s; }
.contact-item-value a:hover { color: var(--green); }

.contact-form { display: flex; flex-direction: column; gap: 28px; }
.form-group { display: flex; flex-direction: column; gap: 8px; }
.form-label {
  font-size: 10px; letter-spacing: 2px; text-transform: uppercase;
  color: var(--text-light);
}
.form-input,
.form-select,
.form-textarea {
  border: none; border-bottom: 1px solid var(--cream-dark);
  padding: 12px 0; font-family: var(--f-body);
  font-size: 16px; color: var(--text);
  background: transparent; outline: none; width: 100%;
  transition: border-color 0.3s;
  -webkit-appearance: none;
}
.form-input:focus,
.form-select:focus,
.form-textarea:focus { border-color: var(--gold); }
.form-textarea { resize: vertical; min-height: 120px; }
.form-select { cursor: pointer; }

/* 13. Footer
   ---------------------------------------------------------- */
.footer {
  background: var(--green-dark);
  padding: 80px var(--gutter) 48px;
}
.footer-top {
  display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 64px;
  padding-bottom: 64px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  margin-bottom: 40px;
}
.footer-logo {
  font-family: var(--f-display); font-size: 22px;
  letter-spacing: 5px; color: var(--cream); font-weight: 400;
  margin-bottom: 8px;
}
.footer-tagline {
  font-size: 11px; letter-spacing: 2px; text-transform: uppercase;
  color: rgba(245,240,232,0.3);
}
.footer-desc {
  margin-top: 24px; font-size: 14px;
  color: rgba(245,240,232,0.4); line-height: 1.8; max-width: 280px;
}
.footer-col h4 {
  font-size: 10px; letter-spacing: 2.5px; text-transform: uppercase;
  color: var(--gold); margin-bottom: 24px;
}
.footer-col nav { display: flex; flex-direction: column; gap: 14px; }
.footer-col nav a {
  font-size: 13px; color: rgba(245,240,232,0.55); transition: color 0.3s;
}
.footer-col nav a:hover { color: var(--gold); }
.footer-contact-list { display: flex; flex-direction: column; gap: 14px; }
.footer-contact-list a {
  font-size: 13px; color: rgba(245,240,232,0.55); transition: color 0.3s;
}
.footer-contact-list a:hover { color: var(--gold); }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 11px; color: rgba(245,240,232,0.25); letter-spacing: 0.5px;
}

/* 14. CTA Section
   ---------------------------------------------------------- */
.cta-section {
  background: var(--green);
  padding: var(--section) var(--gutter);
  text-align: center;
}
.cta-section h2 {
  font-family: var(--f-display);
  font-size: clamp(36px, 4.5vw, 64px);
  color: var(--cream); font-weight: 300;
  max-width: 760px; margin: 0 auto 24px;
  line-height: 1.1;
}
.cta-section p {
  font-size: 17px; color: rgba(245,240,232,0.55);
  max-width: 500px; margin: 0 auto 56px; line-height: 1.75;
}

/* 15. Stats / Numbers bar
   ---------------------------------------------------------- */
.stats-bar {
  background: var(--cream-dark);
  padding: 60px var(--gutter);
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 2px;
}
.stat-item {
  text-align: center; background: var(--cream); padding: 40px 24px;
}
.stat-num {
  font-family: var(--f-display); font-size: 48px; font-weight: 300;
  color: var(--green); line-height: 1; margin-bottom: 12px;
}
.stat-label {
  font-size: 11px; letter-spacing: 2px; text-transform: uppercase;
  color: var(--text-light);
}

/* 16. Responsive
   ---------------------------------------------------------- */
@media (max-width: 1024px) {
  .areas-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-bar  { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .nav-links    { display: none; }
  .nav-hamburger { display: flex; }

  .areas-detail  { grid-template-columns: 1fr; }
  .projects-grid { grid-template-columns: 1fr; }
  .about-grid    { grid-template-columns: 1fr; gap: 48px; }
  .contact-grid  { grid-template-columns: 1fr; gap: 56px; }
  .intersection-grid { grid-template-columns: 1fr; }
  .footer-top    { grid-template-columns: 1fr; gap: 40px; }
  .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }
  .areas-grid    { grid-template-columns: 1fr; }
  .stats-bar     { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
  .stats-bar { grid-template-columns: 1fr; }
}

/* 17. Animations & Transitions
   ---------------------------------------------------------- */
@keyframes heroFadeUp {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: none; }
}

.hero-eyebrow     { animation: heroFadeUp 0.9s cubic-bezier(0.16,1,0.3,1) 0.25s both; }
.hero h1          { animation: heroFadeUp 1.0s cubic-bezier(0.16,1,0.3,1) 0.50s both; }
.hero-sub         { animation: heroFadeUp 0.9s cubic-bezier(0.16,1,0.3,1) 0.75s both; }
.hero .btn-outline { animation: heroFadeUp 0.9s cubic-bezier(0.16,1,0.3,1) 0.95s both; }
.hero-scroll      { animation: heroFadeUp 0.8s cubic-bezier(0.16,1,0.3,1) 1.20s both; }

.page-hero-eyebrow { animation: heroFadeUp 0.9s cubic-bezier(0.16,1,0.3,1) 0.20s both; }
.page-hero h1     { animation: heroFadeUp 1.0s cubic-bezier(0.16,1,0.3,1) 0.40s both; }
.page-hero p      { animation: heroFadeUp 0.9s cubic-bezier(0.16,1,0.3,1) 0.65s both; }

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.75s cubic-bezier(0.16,1,0.3,1),
              transform 0.75s cubic-bezier(0.16,1,0.3,1);
  will-change: opacity, transform;
}
.reveal.visible {
  opacity: 1;
  transform: none;
}

/* Hamburger → X animation */
.nav-hamburger span {
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.nav-hamburger.open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* Smooth section link underlines */
.nav-links a::after {
  content: '';
  display: block;
  width: 0; height: 1px;
  background: var(--gold);
  transition: width 0.3s ease;
  margin-top: 2px;
}
.nav-links a:hover::after,
.nav-links a.active::after { width: 100%; }
