/* ==========================================================================
   Estudio Carletti — hoja de estilos
   Paleta tomada del isologo: verde petróleo + gris.
   ========================================================================== */

:root {
  --teal-900: #0c3839;
  --teal-800: #10504f;
  --teal-700: #14615f;
  --teal-600: #17797a;
  --teal-500: #2d9c9c;
  --teal-100: #d8ecec;
  --teal-050: #f1f8f8;

  --gris: #58595b;
  --ink: #1b2224;
  --muted: #6c757a;
  --linea: #e4e8e9;
  --papel: #ffffff;
  --papel-2: #f7f9f9;

  --radio: 14px;
  --sombra-sm: 0 2px 10px rgba(12, 56, 57, .06);
  --sombra: 0 12px 34px rgba(12, 56, 57, .10);
  --sombra-lg: 0 24px 60px rgba(12, 56, 57, .18);
  --nav-h: 76px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-h);
}

body {
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color: var(--ink);
  background: var(--papel);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4 { font-weight: 700; letter-spacing: -.02em; }

a { text-decoration: none; }

.skip-link {
  position: absolute; top: 8px; left: 8px; z-index: 2000;
  background: var(--teal-700); color: #fff; padding: .6rem 1rem; border-radius: 8px;
}

/* ---------- Botones ---------- */
.btn-brand {
  background: var(--teal-600);
  border: 1px solid var(--teal-600);
  color: #fff;
  font-weight: 600;
  border-radius: 999px;
  transition: background .2s ease, transform .2s ease, box-shadow .2s ease;
}
.btn-brand:hover, .btn-brand:focus {
  background: var(--teal-700);
  border-color: var(--teal-700);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(20, 97, 95, .32);
}
.btn-outline-light { border-radius: 999px; font-weight: 600; }

/* ---------- Navbar ---------- */
.nav-carletti {
  min-height: var(--nav-h);
  padding: .5rem 0;
  background: transparent;
  transition: background .35s ease, box-shadow .35s ease, padding .35s ease;
}
.nav-carletti .nav-logo {
  height: 44px;
  width: auto;
  transition: height .35s ease, filter .35s ease;
  /* Sobre el hero oscuro el isologo se muestra en blanco. */
  filter: brightness(0) invert(1);
}
.nav-carletti .nav-link {
  color: rgba(255, 255, 255, .88);
  font-weight: 500;
  font-size: .95rem;
  padding: .5rem .85rem;
  position: relative;
  transition: color .2s ease;
}
.nav-carletti .nav-link::after {
  content: '';
  position: absolute;
  left: .85rem; right: .85rem; bottom: .25rem;
  height: 2px;
  background: var(--teal-500);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .25s ease;
}
.nav-carletti .nav-link:hover::after { transform: scaleX(1); }
.nav-carletti .nav-link:hover { color: #fff; }

.nav-carletti.nav-solida {
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(10px);
  box-shadow: var(--sombra-sm);
}
.nav-carletti.nav-solida .nav-logo { height: 38px; filter: none; }
.nav-carletti.nav-solida .nav-link { color: var(--gris); }
.nav-carletti.nav-solida .nav-link:hover { color: var(--teal-700); }

.navbar-toggler {
  border-color: rgba(255, 255, 255, .5);
  padding: .35rem .6rem;
}
.navbar-toggler:focus { box-shadow: none; }
.navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(255,255,255,0.9)' stroke-width='2.2' stroke-linecap='round' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}
.nav-solida .navbar-toggler { border-color: rgba(88, 89, 91, .35); }
.nav-solida .navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(88,89,91,0.9)' stroke-width='2.2' stroke-linecap='round' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

@media (max-width: 991.98px) {
  .nav-carletti .navbar-collapse {
    background: rgba(12, 56, 57, .97);
    backdrop-filter: blur(10px);
    margin-top: .75rem;
    padding: 1rem;
    border-radius: var(--radio);
  }
  .nav-carletti.nav-solida .navbar-collapse { background: #fff; box-shadow: var(--sombra); }
  .nav-carletti .nav-link { padding: .65rem .5rem; }
  .nav-carletti .nav-link::after { display: none; }
  .navbar-nav .btn-brand { margin-top: .5rem; display: inline-block; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  overflow: hidden;
  color: #fff;
}
.hero-bg {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.06);
  animation: heroZoom 18s ease-out forwards;
}
@keyframes heroZoom { to { transform: scale(1); } }

.hero-veil {
  position: absolute; inset: 0;
  background:
    linear-gradient(100deg, rgba(7, 38, 39, .96) 0%, rgba(10, 48, 49, .90) 45%, rgba(14, 74, 73, .74) 100%),
    radial-gradient(120% 90% at 82% 18%, rgba(45, 156, 156, .28), transparent 62%);
}
.hero-inner { position: relative; z-index: 2; padding: 8rem 0 6rem; }

.hero-eyebrow {
  display: inline-block;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: #8fd3d2;
  border: 1px solid rgba(143, 211, 210, .4);
  border-radius: 999px;
  padding: .35rem 1rem;
  margin-bottom: 1.5rem;
}
.hero-title {
  font-size: clamp(2.6rem, 7vw, 5rem);
  line-height: 1.02;
  margin-bottom: .4rem;
}
.hero-sub {
  font-size: clamp(1.05rem, 2.4vw, 1.5rem);
  font-weight: 300;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: #8fd3d2;
  margin-bottom: 1.75rem;
}
.hero-lead {
  font-size: clamp(1rem, 1.6vw, 1.18rem);
  line-height: 1.75;
  color: rgba(255, 255, 255, .85);
  max-width: 46rem;
  margin-bottom: 2.25rem;
}
.hero-acciones { display: flex; flex-wrap: wrap; gap: .85rem; }

.hero-scroll {
  position: absolute;
  left: 50%; bottom: 2rem;
  transform: translateX(-50%);
  z-index: 2;
  width: 46px; height: 46px;
  display: grid; place-items: center;
  border: 1px solid rgba(255, 255, 255, .35);
  border-radius: 50%;
  color: #fff;
  animation: flotar 2.4s ease-in-out infinite;
  transition: background .2s ease;
}
.hero-scroll:hover { background: rgba(255, 255, 255, .15); color: #fff; }
@keyframes flotar {
  0%, 100% { transform: translate(-50%, 0); }
  50%      { transform: translate(-50%, 9px); }
}

/* ---------- Estructura de secciones ---------- */
.seccion { padding: clamp(4rem, 9vw, 7rem) 0; }
.bg-suave { background: var(--papel-2); }

.eyebrow {
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--teal-600);
  margin-bottom: .75rem;
}
.eyebrow-claro { color: #8fd3d2; }

.titulo-seccion {
  font-size: clamp(1.7rem, 3.4vw, 2.5rem);
  line-height: 1.18;
  margin-bottom: 1.15rem;
}

.texto-cuerpo {
  color: var(--muted);
  line-height: 1.85;
}

.marca-linea {
  width: 64px; height: 4px;
  background: var(--teal-500);
  border-radius: 999px;
}

/* ---------- Datos rápidos ---------- */
.datos-rapidos { border-top: 1px solid var(--linea); padding-top: 1.5rem; }
.dato-num {
  display: block;
  font-size: clamp(1.15rem, 2.2vw, 1.6rem);
  font-weight: 700;
  color: var(--teal-700);
  line-height: 1.2;
}
.dato-lbl { display: block; font-size: .82rem; color: var(--muted); }

/* ---------- Objetivos (banda oscura) ---------- */
.seccion-objetivos {
  padding: clamp(4rem, 9vw, 7rem) 0;
  background:
    linear-gradient(135deg, var(--teal-900) 0%, var(--teal-800) 55%, var(--teal-700) 100%);
  position: relative;
  overflow: hidden;
}
.seccion-objetivos::before {
  content: '';
  position: absolute;
  width: 620px; height: 620px;
  right: -220px; top: -220px;
  background: radial-gradient(circle, rgba(45, 156, 156, .28), transparent 68%);
  border-radius: 50%;
}
.seccion-objetivos .container { position: relative; z-index: 1; }

.foto-marco {
  border-radius: var(--radio);
  overflow: hidden;
  box-shadow: var(--sombra-lg);
  line-height: 0;
}
.foto-marco img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .6s ease;
}
.foto-marco:hover img { transform: scale(1.04); }

/* ---------- Tarjetas de servicio ---------- */
.card-servicio {
  background: var(--papel);
  border: 1px solid var(--linea);
  border-radius: var(--radio);
  padding: 2.25rem 1.9rem;
  box-shadow: var(--sombra-sm);
  transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
}
.card-servicio:hover {
  transform: translateY(-6px);
  box-shadow: var(--sombra);
  border-color: var(--teal-100);
}
.icono-servicio {
  display: inline-grid;
  place-items: center;
  width: 60px; height: 60px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--teal-600), var(--teal-800));
  color: #fff;
  font-size: 1.5rem;
  margin-bottom: 1.35rem;
  box-shadow: 0 8px 20px rgba(20, 97, 95, .28);
}
.card-servicio h3 { font-size: 1.2rem; margin-bottom: .8rem; }
.card-servicio p {
  color: var(--muted);
  line-height: 1.8;
  font-size: .95rem;
  margin-bottom: 0;
}

/* ---------- RRHH ---------- */
.item-rrhh {
  display: flex;
  align-items: flex-start;
  gap: .7rem;
  background: var(--teal-050);
  border: 1px solid var(--teal-100);
  border-radius: 10px;
  padding: .85rem 1rem;
  height: 100%;
  font-size: .92rem;
  line-height: 1.55;
  color: #33474a;
  transition: transform .2s ease, background .2s ease;
}
.item-rrhh:hover { transform: translateX(4px); background: var(--teal-100); }
.item-rrhh i {
  color: var(--teal-600);
  font-size: 1.05rem;
  flex-shrink: 0;
  margin-top: .1rem;
}

/* ---------- Embeds ---------- */
.marco-embed {
  border-radius: var(--radio);
  overflow: hidden;
  box-shadow: var(--sombra);
  background: #000;
}
.marco-embed iframe { border: 0; }

/* ---------- Galería ---------- */
.galeria-item {
  display: block;
  position: relative;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: var(--radio);
  overflow: hidden;
  cursor: pointer;
  background: #0c3839;
  box-shadow: var(--sombra-sm);
  aspect-ratio: 4 / 3;
}
.galeria-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .55s ease, opacity .35s ease;
}
.galeria-item:hover img { transform: scale(1.07); opacity: .55; }
.galeria-lupa {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  color: #fff;
  font-size: 1.5rem;
  opacity: 0;
  transition: opacity .3s ease;
}
.galeria-item:hover .galeria-lupa { opacity: 1; }
.galeria-item:focus-visible { outline: 3px solid var(--teal-500); outline-offset: 3px; }

#modalFoto .modal-content { box-shadow: none; }
#modalFoto .modal-dialog { display: flex; align-items: center; min-height: calc(100% - 1rem); }
#modalFotoImg {
  max-height: 86vh;
  width: auto;
  max-width: 100%;
  margin: 0 auto;
  display: block;
  object-fit: contain;
}
#modalFoto .btn-close {
  position: absolute;
  top: -2.4rem; right: 0;
  z-index: 2;
  opacity: .9;
}

/* ---------- Contacto ---------- */
.seccion-contacto {
  padding: clamp(4rem, 9vw, 7rem) 0;
  background:
    linear-gradient(135deg, var(--teal-900) 0%, var(--teal-800) 60%, var(--teal-700) 100%);
  color: #fff;
}

.lista-contacto { list-style: none; padding: 0; margin: 2rem 0 0; }
.lista-contacto li {
  display: flex;
  align-items: center;
  gap: .85rem;
  padding: .6rem 0;
}
.lista-contacto i {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, .1);
  color: #8fd3d2;
  flex-shrink: 0;
}
.lista-contacto a { color: rgba(255, 255, 255, .88); }
.lista-contacto a:hover { color: #8fd3d2; }

.redes { display: flex; gap: .6rem; }
.redes a {
  width: 42px; height: 42px;
  display: grid; place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .25);
  color: rgba(255, 255, 255, .85);
  font-size: 1.05rem;
  transition: background .2s ease, transform .2s ease, border-color .2s ease;
}
.redes a:hover {
  background: var(--teal-500);
  border-color: var(--teal-500);
  color: #fff;
  transform: translateY(-3px);
}

.form-contacto {
  background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: var(--radio);
  padding: clamp(1.5rem, 3vw, 2.5rem);
  backdrop-filter: blur(6px);
}
.form-contacto .form-label {
  color: rgba(255, 255, 255, .82);
  font-size: .88rem;
  font-weight: 500;
  margin-bottom: .4rem;
}
.form-contacto .form-control {
  background: rgba(255, 255, 255, .95);
  border: 1px solid transparent;
  border-radius: 10px;
  padding: .75rem 1rem;
  font-size: .95rem;
  color: var(--ink);
}
.form-contacto .form-control::placeholder { color: #9aa4a6; }
.form-contacto .form-control:focus {
  background: #fff;
  border-color: var(--teal-500);
  box-shadow: 0 0 0 .22rem rgba(45, 156, 156, .3);
}
.form-error {
  color: #ffc9c9;
  font-size: .84rem;
  margin-top: .35rem;
}
/* Honeypot: fuera de la vista pero accesible para los bots. */
.campo-trampa {
  position: absolute;
  left: -9999px;
  width: 1px; height: 1px;
  overflow: hidden;
}

/* Aviso flotante: siempre visible, sin depender del scroll de la página. */
.mensajes-flash {
  position: fixed;
  top: calc(var(--nav-h) + .75rem);
  left: 50%;
  transform: translateX(-50%);
  z-index: 1080;
  width: min(560px, calc(100vw - 2rem));
  padding: 0;
}
.mensajes-flash .alert {
  border: 0;
  border-radius: var(--radio);
  box-shadow: var(--sombra-lg);
  display: flex;
  align-items: center;
  padding: 1rem 3rem 1rem 1.15rem;
  font-size: .95rem;
}
.mensajes-flash .alert-success {
  background: #0f6b4f;
  color: #fff;
}
.mensajes-flash .alert-danger {
  background: #a32a2a;
  color: #fff;
}
.mensajes-flash .btn-close { filter: invert(1) grayscale(1) brightness(2); }

/* ---------- Pie ---------- */
.pie {
  background: #0a2c2d;
  color: rgba(255, 255, 255, .6);
  padding: 3rem 0 2.25rem;
}
.pie-logo {
  height: 52px;
  width: auto;
  filter: brightness(0) invert(1);
  opacity: .92;
}
.pie-legal { font-size: .85rem; line-height: 1.7; }
.pie-legal a { color: #8fd3d2; }
.pie-legal a:hover { color: #fff; }
.redes-pie { justify-content: flex-start; }
@media (min-width: 768px) { .redes-pie { justify-content: flex-end; } }

/* ---------- Botón volver arriba ---------- */
.btn-arriba {
  position: fixed;
  right: 1.25rem; bottom: 1.25rem;
  z-index: 1030;
  width: 46px; height: 46px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--teal-600);
  color: #fff;
  box-shadow: var(--sombra);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity .3s ease, transform .3s ease, visibility .3s;
}
.btn-arriba.visible { opacity: 1; visibility: visible; transform: translateY(0); }
.btn-arriba:hover { background: var(--teal-700); color: #fff; }

/* ---------- Animación de aparición ---------- */
.revelar {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .7s ease, transform .7s ease;
}
.revelar.visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .revelar { opacity: 1; transform: none; }
}


/* ---------- Dónde estamos ---------- */
.direccion-destacada {
  display: flex;
  align-items: flex-start;
  gap: .8rem;
  margin: 1.75rem 0;
  font-size: 1.02rem;
  line-height: 1.7;
  color: var(--ink);
}
.direccion-destacada i {
  color: var(--teal-600);
  font-size: 1.2rem;
  margin-top: .2rem;
}

.foto-edificio { aspect-ratio: 3 / 4; max-height: 460px; }
.foto-edificio img { height: 100%; }

.pie-media {
  margin-top: .75rem;
  font-size: .86rem;
  color: var(--muted);
}
.pie-media a { color: var(--teal-600); font-weight: 500; }
.pie-media a:hover { text-decoration: underline; }

/* Tarjeta del video: enlaza a YouTube (el video no admite embebido). */
.video-tarjeta { display: block; background: #000; text-decoration: none; }
.video-tarjeta img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: opacity .3s ease, transform .5s ease;
}
.video-tarjeta:hover img { opacity: .65; transform: scale(1.03); }
.video-play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
}
.video-play i {
  width: 74px; height: 74px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: rgba(23, 121, 122, .92);
  color: #fff;
  font-size: 2.2rem;
  padding-left: .18em;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .4);
  transition: transform .25s ease, background .25s ease;
}
.video-tarjeta:hover .video-play i { transform: scale(1.1); background: var(--teal-500); }

.video-pie {
  /* Bootstrap estira los hijos de .ratio a todo el alto: lo anulamos
     para que la franja quede pegada abajo. */
  position: absolute;
  top: auto;
  height: auto;
  left: 0; right: 0; bottom: 0;
  padding: 1.5rem 1rem .9rem;
  background: linear-gradient(to top, rgba(0, 0, 0, .8), transparent);
  color: #fff;
  font-size: .88rem;
  font-weight: 600;
  text-align: center;
}
.video-tarjeta:focus-visible { outline: 3px solid var(--teal-500); outline-offset: 3px; }
