/* ========== VARIABLES ========== */
:root {
  --color-bg: #000000;
  --color-surface: #0A0A0A;
  --color-text: #e4e2dd;
  --color-text-muted: #a09e99;
  --color-primary: #e4e2dd;
  --color-accent: #e4e2dd;
  --color-accent-dim: rgba(228, 226, 221, 0.15);
  --color-border: rgba(228, 226, 221, 0.15);
  --color-input-bg: rgba(228, 226, 221, 0.06);
  --logo-invert: invert(1);
  --font-sans: 'Montserrat', -apple-system, sans-serif;
  --max-width: 1100px;
  --nav-height: 72px;
}

[data-theme="light"] {
  --color-bg: #e4e2dd;
  --color-surface: #f2f0ec;
  --color-text: #000000;
  --color-text-muted: #4a4a4a;
  --color-primary: #000000;
  --color-accent: #000000;
  --color-accent-dim: rgba(0, 0, 0, 0.08);
  --color-border: rgba(0, 0, 0, 0.12);
  --color-input-bg: rgba(0, 0, 0, 0.04);
  --logo-invert: invert(0);
}

/* ========== RESET ========== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: var(--nav-height); }
body {
  font-family: var(--font-sans);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background 0.4s ease, color 0.4s ease;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul { list-style: none; }

/* ========== UTILITIES ========== */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }
.section__title {
  font-family: var(--font-sans);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 700;
  text-align: center;
  margin-bottom: 56px;
  color: var(--color-primary);
  letter-spacing: -0.02em;
}
.btn {
  display: inline-block;
  padding: 14px 36px;
  border-radius: 0;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 600;
  border: 2px solid var(--color-primary);
  cursor: pointer;
  transition: all 0.3s ease;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.btn--primary {
  background: var(--color-primary);
  color: var(--color-bg);
}
.btn--primary:hover {
  background: transparent;
  color: var(--color-primary);
}
.btn--full { width: 100%; text-align: center; }

/* ========== NAV ========== */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-height);
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(16px);
  z-index: 100;
  border-bottom: 1px solid var(--color-border);
  transition: background 0.4s ease, box-shadow 0.3s;
}
[data-theme="light"] .nav {
  background: rgba(228, 226, 221, 0.85);
}
.nav--scrolled { box-shadow: 0 1px 20px rgba(0,0,0,0.15); }
.nav__container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 16px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  overflow: visible;
}
.nav__logo {
  flex-shrink: 0;
}
.nav__logo img {
  height: 36px;
  width: 36px;
  object-fit: contain;
  filter: var(--logo-invert);
  transition: filter 0.4s ease;
}
.nav__links {
  display: flex;
  align-items: center;
  gap: 36px;
}
.nav__links a {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-text-muted);
  transition: color 0.2s;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.nav__links a:hover { color: var(--color-primary); }

/* Theme toggle */
.theme-toggle {
  background: none;
  border: 1px solid var(--color-border);
  color: var(--color-text);
  cursor: pointer;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
}
.theme-toggle:hover {
  border-color: var(--color-primary);
}
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .icon-sun { display: none; }
[data-theme="light"] .theme-toggle .icon-moon { display: none; }
[data-theme="light"] .theme-toggle .icon-sun { display: block; }

.nav__toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
}
.nav__toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
  transition: 0.3s;
}

/* ========== HERO ========== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: calc(var(--nav-height) + 40px) 24px 80px;
}
.hero__container { max-width: 720px; }
.hero__logo {
  width: 180px;
  margin: 0 auto 40px;
  filter: var(--logo-invert);
  transition: filter 0.4s ease;
}
.hero__tagline {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: 24px;
}
.hero__title {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 28px;
  color: var(--color-primary);
  letter-spacing: -0.02em;
}
.hero__title em {
  font-style: italic;
  font-weight: 300;
}
.hero__description {
  font-size: 1rem;
  color: var(--color-text-muted);
  line-height: 1.8;
  margin-bottom: 40px;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
  font-weight: 300;
}

/* ========== SERVICIOS ========== */
.servicios {
  padding: 120px 0;
}
.servicios__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.servicio-card {
  padding: 48px 32px;
  border: 1px solid var(--color-border);
  text-align: center;
  transition: all 0.3s ease;
}
.servicio-card:hover {
  border-color: var(--color-primary);
  background: var(--color-accent-dim);
}
.servicio-card--featured {
  border-color: var(--color-primary);
}
.servicio-card__icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 24px;
  color: var(--color-accent);
  opacity: 0.6;
}
.servicio-card__icon svg { width: 100%; height: 100%; }
.servicio-card__label {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: 8px;
}
.servicio-card__title {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}
.servicio-card__text {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  line-height: 1.7;
  font-weight: 300;
}

.servicios__cta {
  text-align: center;
  margin-top: 48px;
}

/* ========== METODOLOGÍA ========== */
.metodologia {
  padding: 120px 0;
  border-top: 1px solid var(--color-border);
}
.metodologia__intro {
  text-align: center;
  font-size: 1rem;
  color: var(--color-text-muted);
  max-width: 560px;
  margin: -32px auto 56px;
  line-height: 1.8;
  font-weight: 300;
}
.metodologia__steps {
  display: flex;
  gap: 48px;
  justify-content: center;
  max-width: 800px;
  margin: 0 auto;
}
.step {
  flex: 1;
  text-align: center;
}
.step__number {
  font-size: 3rem;
  font-weight: 700;
  color: var(--color-accent-dim);
  margin-bottom: 12px;
  line-height: 1;
  -webkit-text-stroke: 1px var(--color-border);
}
.step__content h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.step__content p {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  font-weight: 300;
}

/* ========== CONTACTO ========== */
.contacto {
  padding: 120px 0;
  border-top: 1px solid var(--color-border);
}
.contacto__grid {
  max-width: 560px;
  margin: 0 auto;
}
.form__group {
  margin-bottom: 20px;
}
.form__group label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-text-muted);
  margin-bottom: 8px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.form__group input,
.form__group textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--color-border);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 300;
  background: var(--color-input-bg);
  color: var(--color-text);
  transition: border-color 0.2s;
}
.form__group input:focus,
.form__group textarea:focus {
  outline: none;
  border-color: var(--color-primary);
}
.form__group textarea { resize: vertical; }
.form__checkboxes {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 4px;
}
.checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--color-text);
  font-weight: 300;
}
.checkbox input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--color-accent);
  cursor: pointer;
}
.contacto__info {
  margin-top: 32px;
  text-align: center;
}
.contacto__email {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  color: var(--color-text-muted);
  font-weight: 300;
}
.contacto__email svg { color: var(--color-text-muted); }

/* ========== FOOTER ========== */
.footer {
  padding: 32px 0;
  text-align: center;
  font-size: 0.75rem;
  font-weight: 300;
  color: var(--color-text-muted);
  border-top: 1px solid var(--color-border);
  letter-spacing: 0.05em;
}

/* ========== WHATSAPP ========== */
.whatsapp-btn {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 56px;
  height: 56px;
  background: #25D366;
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(37, 211, 102, 0.35);
  z-index: 99;
  transition: transform 0.3s, box-shadow 0.3s;
}
.whatsapp-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 24px rgba(37, 211, 102, 0.45);
}
.whatsapp-btn svg { width: 28px; height: 28px; }

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
  .nav__toggle { display: flex; }
  .nav__links {
    position: fixed;
    top: var(--nav-height);
    left: 0; right: 0;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(16px);
    flex-direction: column;
    align-items: center;
    gap: 0;
    padding: 16px 0;
    border-bottom: 1px solid var(--color-border);
    transform: translateY(-120%);
    transition: transform 0.3s ease;
  }
  [data-theme="light"] .nav__links {
    background: rgba(228, 226, 221, 0.95);
  }
  .nav__links--open { transform: translateY(0); }
  .nav__links a {
    display: block;
    padding: 14px 24px;
    font-size: 0.85rem;
  }
  .servicios__grid {
    grid-template-columns: 1fr;
    max-width: 420px;
    margin: 0 auto;
  }
  .metodologia__steps {
    flex-direction: column;
    gap: 32px;
  }
  .form__row {
    grid-template-columns: 1fr;
  }
}
