/* ============================================================
   VARIABLES GLOBALES
   ============================================================ */
:root {
  --bg:       #0e1412;
  --bg-2:     #131917;
  --panel:    rgba(255,255,255,0.05);
  --panel-2:  rgba(255,255,255,0.03);
  --text:     #f3f5f4;
  --muted:    #b8c1bc;
  --green:    #1a8060;
  --green-2:  #8fcca3;
  --pink:     #e85d9e;
  --pink-2:   #ff99bf;
  --line:     rgba(255,255,255,0.08);
  --shadow:   0 20px 60px rgba(0,0,0,.35);
  --radius:   22px;
  --max:      1600px;
  --header-h: clamp(80px, 6vw, 100px);
}


/* ============================================================
   RESET & BASE
   ============================================================ */
* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system,
               BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 15% 10%, rgba(76,217,100,.10), transparent 28%),
    radial-gradient(circle at 85% 15%, rgba(232,93,158,.11), transparent 24%),
    linear-gradient(180deg, #0e1412 0%, #0b100f 100%);
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

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

button, input, textarea { font: inherit; }

.container {
  width: min(var(--max), calc(100% - 80px));
  margin: 0 auto;
}

main {
  padding: 4rem 0;
  min-height: 70vh;
  flex: 1 1 auto;
}


/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: background .25s ease, border-color .25s ease,
              backdrop-filter .25s ease, box-shadow .25s ease;

  &.scrolled {
    background: rgba(11,16,15,.72);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 10px 30px rgba(0,0,0,.18);
  }
}

/* Barra principal */
.nav {
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

/* Brand / Logo */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  font-size: 2rem;
  letter-spacing: .02em;
  white-space: nowrap;
}

.brand-mark {
  width: 64px;
  height: 64px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--green), var(--pink));
  box-shadow: 0 8px 30px rgba(76,217,100,.18), 0 8px 30px rgba(232,93,158,.12);
  position: relative;
  isolation: isolate;

  &::after {
    content: "";
    position: absolute;
    inset: 1px;
    border-radius: 11px;
    background: linear-gradient(180deg, rgba(255,255,255,.20), rgba(255,255,255,.02));
    z-index: -1;
  }
}

.brand-logo {
  width: 64px;
  height: 64px;
}
/* Menú desktop */
.menu {
  display: flex;
  align-items: center;
  gap: clamp(20px, 2.5vw, 48px);
  flex-wrap: wrap;

  a {
    color: var(--muted);
    font-size: clamp(1rem, 1.1vw, 1.3rem);
    transition: color .2s ease, transform .2s ease;

    &:hover {
      color: var(--pink-2);
      transform: translateY(6px) scale(1.08);
    }

    &.active {
      color: var(--green-2);

      &:hover { transform: translateY(-6px) scale(1.08); }
    }
  }
}

/* Switch de idioma */
.lang-switch {
  position: relative;
  padding-left: 8px;
  border-left: 1px solid var(--line);

  &.open {
    .lang-arrow { transform: rotate(180deg); }
    .lang-dropdown { display: block; }
  }
}

.lang-current {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  color: var(--text);
  font-size: clamp(1rem, 1.1vw, 1.3rem);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 8px;
  transition: background .2s ease;

  &:hover { background: rgba(255,255,255,.06); }
}

.lang-arrow {
  font-size: .7em;
  opacity: .6;
  transition: transform .2s ease;
}

.lang-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: rgba(11,16,15,.95);
  backdrop-filter: blur(14px);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  min-width: 80px;

  a {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 14px;
    color: var(--muted);
    font-size: clamp(1rem, 1.1vw, 1.3rem);
    transition: background .2s ease, color .2s ease;

    &:hover {
      background: rgba(255,255,255,.06);
      color: var(--text);
    }
  }
}

/* Botón hamburguesa — solo móvil */
.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.04);
  color: var(--text);
  border-radius: 14px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* Menú móvil desplegable */
.mobile-menu {
  display: none;
  padding: 0 0 16px;
  position: fixed;
  top: var(--header-h);
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(11,16,15,.95);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  z-index: 999;
  overflow-y: auto;

  &.open { display: grid; gap: 12px; }

  a {
    color: var(--muted);
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
    transition: color .2s ease, transform .2s ease;

    &:hover { color: var(--pink-2); transform: translateX(6px); }
    &.active { color: var(--green-2); }
  }
}


/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  padding: 24px 42px;
  color: #aaa;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.footer-top {
  display: flex;
  justify-content: center;
  margin-bottom: 18px;
}

.social-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;

  a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    color: #aaa;
    border-radius: 10px;
    transition: color .2s ease, transform .2s ease;

    &:hover { color: var(--pink-2); transform: translateY(-4px); }
  }

  svg {
    display: block;
    width: 42px;
    height: 42px;
    fill: currentColor;
  }
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  font-size: .94rem;
}

.footer-role { text-align: center; }

.footer-links {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;

  a {
    color: #aaa;
    transition: color .2s ease;
    &:hover { color: white; }
  }
}


/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  padding: 64px 0 46px;
  min-height: calc(100vh - var(--header-h));
  display: flex;
  align-items: center;

  overflow: hidden;
  &.short { min-height: auto; padding: 56px 0 40px; }
}

/* Blobs decorativos de fondo */
.blob {
  position: absolute;
  width: 440px;
  height: 440px;
  border-radius: 999px;
  filter: blur(84px);
  opacity: .18;
  pointer-events: none;

  &.green { background: var(--green); top: -110px; left: -120px; }
  &.pink  { background: var(--pink);  right: -120px; top: 20px; }
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.02fr .98fr;
  gap: 42px;
  align-items: center;
}

/* Eyebrow — etiqueta sobre el h1 */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--green-2);
  font-size: .82rem;
  letter-spacing: .16em;
  font-weight: 800;
  margin-bottom: 16px;

  &::before {
    content: "";
    width: 30px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--green-2));
  }
}

h1 {
  margin: 0 0 18px;
  font-size: clamp(2.7rem, 7vw, 6rem);
  line-height: .93;
  letter-spacing: -.04em;
  max-width: 10ch;
}

.page-title {
  max-width: none;
  font-size: clamp(2.4rem, 6vw, 4.7rem);
}

.hero p.lead,
.page-intro {
  margin: 0;
  max-width: 58ch;
  font-size: 1.06rem;
  line-height: 1.78;
  color: var(--muted);
}

.hero-actions {
  display: flex;
  gap: 14px;
  margin-top: 28px;
  flex-wrap: wrap;
}

/* Tarjeta media del hero */
.hero-card {
  position: relative;
  border-radius: 28px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.03));
  overflow: hidden;
  box-shadow: var(--shadow);

  &::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(76,217,100,.10), transparent 38%, rgba(232,93,158,.12));
    pointer-events: none;
  }
}

.hero-media {
  aspect-ratio: 16 / 10;
  background: linear-gradient(180deg, #101615, #0b100f);
  position: relative;
  display: grid;
  place-items: center;

  img, video { width: 100%; height: 100%; object-fit: cover; }
}

.hero-overlay {
  position: absolute;
  inset: auto 18px 18px 18px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: end;
  pointer-events: none;
}

.hero-badge,
.hero-stat {
  pointer-events: auto;
  padding: 12px 14px;
  background: rgba(8,11,10,.65);
  border: 1px solid rgba(255,255,255,.08);
  backdrop-filter: blur(10px);
  border-radius: 16px;

  small {
    display: block;
    color: var(--muted);
    margin-bottom: 4px;
  }
}


/* ============================================================
   SECCIONES GENÉRICAS
   ============================================================ */
.section {
  padding: 88px 0;
  position: relative;

  &.alt { background: linear-gradient(180deg, rgba(255,255,255,.02), rgba(255,255,255,.00)); }
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 18px;
  margin-bottom: 28px;

  h2 {
    margin: 0;
    font-size: clamp(1.9rem, 4vw, 3rem);
    letter-spacing: -.03em;
  }

  p { margin: 0; max-width: 70ch; color: var(--muted); line-height: 1.7; }
}

.section-copy,
.legal p,
.legal li {
  margin: 0;
  max-width: 70ch;
  color: var(--muted);
  line-height: 1.7;
}


/* ============================================================
   BOTONES
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 20px;
  border-radius: 999px;
  font-weight: 800;
  border: 1px solid transparent;
  transition: transform .18s ease, box-shadow .18s ease,
              border-color .18s ease, background .18s ease;
  box-shadow: var(--shadow);

  &:hover { transform: translateY(-2px); }

  &.btn-primary {
    background: linear-gradient(135deg, var(--green), var(--green-2));
    color: #09110b;
  }

  &.btn-secondary {
    background: rgba(255,255,255,.04);
    border-color: rgba(255,255,255,.08);
    color: var(--text);
  }
}


/* ============================================================
   GRIDS
   ============================================================ */
.grid-3, .grid-2, .grid-1 { display: grid; gap: 22px; }
.grid-3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.grid-2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.grid-1 { grid-template-columns: 1fr; }


/* ============================================================
   CARDS
   ============================================================ */
.card {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.03));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform .24s ease, border-color .24s ease, box-shadow .24s ease;

  &:hover {
    transform: translateY(-6px);
    border-color: rgba(76,217,100,.30);
    box-shadow: 0 30px 70px rgba(0,0,0,.42);

    .card-media img,
    .card-media video { transform: scale(1.05); }
  }
}

.card-media {
  aspect-ratio: 16 / 10;
  background: linear-gradient(180deg, rgba(76,217,100,.10), rgba(232,93,158,.08));
  overflow: hidden;

  img, video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .35s ease;
  }
}

.card-body { padding: 18px 18px 20px; }

.card h3 { margin: 0 0 10px; font-size: 1.18rem; letter-spacing: -.02em; }

.card p,
.list p { margin: 0; color: var(--muted); line-height: 1.72; }

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.07);
  color: var(--muted);
  font-size: .82rem;
  margin-bottom: 12px;
}

.project-card {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.project-meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 18px;

  span {
    font-size: .82rem;
    color: var(--muted);
    border: 1px solid rgba(255,255,255,.08);
    background: rgba(255,255,255,.03);
    padding: 7px 10px;
    border-radius: 999px;
  }
}


/* ============================================================
   LISTAS
   ============================================================ */
.list { display: grid; gap: 14px; }

.list-item {
  padding: 18px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.03);
}


/* ============================================================
   CONTACTO
   ============================================================ */
.contact-box {
  padding: 28px;
  border-radius: 28px;
  border: 1px solid var(--line);
  background:
    linear-gradient(135deg, rgba(76,217,100,.10), transparent 38%),
    linear-gradient(315deg, rgba(232,93,158,.12), transparent 34%),
    rgba(255,255,255,.04);
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 24px;
  align-items: center;

  h2 { margin: 0 0 10px; }

  p { margin: 0; color: var(--muted); line-height: 1.75; max-width: 58ch; }
}

.legal h2 { margin: 0 0 10px; }

.contact-actions {
  display: flex;
  gap: 14px;
  justify-content: flex-end;
  flex-wrap: wrap;
}


/* ============================================================
   UTILIDADES
   ============================================================ */

/* Animación reveal al hacer scroll */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .7s ease, transform .7s ease;

  &.visible { opacity: 1; transform: translateY(0); }
}

/* Breadcrumbs */
.breadcrumbs {
  display: flex;
  gap: 10px;
  align-items: center;
  color: var(--muted);
  margin-bottom: 18px;
  font-size: .92rem;

  span.sep { opacity: .45; }
}


/* ============================================================
   LEGAL
   ============================================================ */
.legal {
  display: grid;
  gap: 24px;

  .block {
    padding: 22px;
    border-radius: 20px;
    border: 1px solid var(--line);
    background: rgba(255,255,255,.03);
  }

  ul { margin: 12px 0 0 18px; }
}


/* ============================================================
   BANNER DE COOKIES
   ============================================================ */
.cookie-banner {
  position: fixed;
  left: 20px;
  right: 20px;
  bottom: 20px;
  z-index: 1200;
  display: none;
  gap: 18px;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: rgba(9,13,12,.92);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow);

  &.show { display: flex; }

  p { margin: 0; color: var(--muted); line-height: 1.6; max-width: 70ch; }
}

.cookie-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;

  button {
    min-height: 44px;
    padding: 0 16px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,.08);
    cursor: pointer;
  }
}

.cookie-accept { background: linear-gradient(135deg, var(--green), var(--green-2)); color: #09110b; }
.cookie-reject { background: rgba(255,255,255,.04); color: var(--text); }


/* ============================================================
   HOME
   ============================================================ */
.home-hero { max-width: 780px; }

.highlight-green { color: var(--green-2); }

.hero p.lead {
  color: var(--muted);
  font-size: 1rem;
  letter-spacing: .12em;
  font-weight: 600;
  margin: 0 0 16px;
}

/* Specialty cards */
.specialty-card {
  display: flex;
  flex-direction: column;

  .card-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
  }
}

.specialty-icon { font-size: 2rem; display: block; }

.specialty-link { color: var(--green-2); font-size: .9rem; font-weight: 600; margin-top: auto; }

/* Social featured */
.social-featured {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.social-card-icon {
  width: 36px;
  height: 36px;
  fill: var(--muted);
  display: block;
  margin-bottom: 12px;
  transition: fill .2s ease;
}

.social-card:hover .social-card-icon { fill: var(--pink-2); }


/* ============================================================
   MODEL VIEWER
   ============================================================ */
.model-viewer-wrap {
  width: 100%;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);

  iframe { width: 100%; height: 100%; border: none; display: block; }
}


/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .hero-grid,
  .contact-box,
  .grid-3,
  .grid-2 { grid-template-columns: 1fr; }

  .contact-actions { justify-content: flex-start; }
  .section-head { align-items: start; flex-direction: column; }
}

@media (max-width: 900px) {
  .menu { display: none; }
  .menu-toggle { display: inline-flex; }
  .hero { padding-top: 34px; min-height: auto; }
  h1 { max-width: none; }
}

@media (max-width: 768px) {
  .footer { padding: 24px 20px; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .footer-links { justify-content: center; }
}

@media (max-width: 640px) {
  .container { width: min(var(--max), calc(100% - 22px)); }

  .hero-actions,
  .contact-actions,
  .cookie-actions { flex-direction: column; align-items: stretch; }

  .btn,
  .cookie-actions button { width: 100%; }

  .hero-badge,
  .hero-stat { padding: 10px 12px; }

  .hero-overlay { inset: auto 12px 12px 12px; }

  .cookie-banner {
    left: 12px;
    right: 12px;
    bottom: 12px;
    flex-direction: column;
    align-items: stretch;
  }
}
