/**
 * portfolio/assets/estilos.css
 *
 * Identidad basada en el isotipo real de Cauccen (la "C" con el árbol, las
 * colinas y el sol saliendo) — paleta muestreada del propio archivo del
 * logo (portfolio/assets/logo-cauccen.png), no inventada. Historia visual:
 * crecimiento natural, horizonte, futuro — "Creamos soluciones, construimos
 * futuro". Los separadores de sección son colinas (el mismo motivo del
 * isotipo), no líneas rectas.
 */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@500;600;700&family=Inter:ital,wght@0,400;0,500;0,600;1,400&family=IBM+Plex+Mono:wght@500;600&family=Instrument+Serif:ital@0;1&display=swap');

:root {
  --bg: #fbfaf5;
  --superficie: #ffffff;
  --tinta: #00111f;
  --tinta-media: #3d4f5c;
  --tinta-tenue: #7c8a91;
  --teal: #0a5175;
  --teal-bg: #e5eef2;
  --verde: #4f7a3d;
  --verde-bg: #e9efe2;
  --naranja: #f2811a;
  --naranja-claro: #f6a428;
  --naranja-bg: #fdead9;
  --linea: #e7e1d0;
  --sombra: 0 1px 2px rgba(0, 17, 31, 0.04), 0 16px 32px -20px rgba(0, 17, 31, 0.18);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

body {
  background: var(--bg);
  color: var(--tinta);
  font-family: 'Inter', -apple-system, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

.f-display {
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.f-mono {
  font-family: 'IBM Plex Mono', monospace;
  font-variant-numeric: tabular-nums;
}

:focus-visible { outline: 2px solid var(--naranja); outline-offset: 3px; }

a { color: inherit; }

.envoltorio { max-width: 1080px; margin: 0 auto; padding: 0 1.5rem; }

/* ── Primera pantalla: header + hero llenan el viewport, para que el
   primer impacto se vea entero sin scrollear (en pantallas normales;
   min-height en vez de height fija para no atrapar contenido en celulares
   chicos o con barras del navegador que ocupan espacio). ── */
.pantalla-inicial {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  overflow: hidden;
}

/* Fondo "con vida" sin video: manchas de gradiente con los colores reales
   del logo, grandes y desenfocadas, con una deriva lenta — la versión
   honesta de un video ambiental cuando no hay footage real de Cauccen. */
.mancha {
  position: absolute;
  z-index: 0;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.5;
  pointer-events: none;
}
.mancha-1 {
  top: -12%;
  right: -8%;
  width: 46vw;
  height: 46vw;
  background: radial-gradient(circle, var(--naranja-claro), var(--naranja) 70%);
  animation: deriva-1 22s ease-in-out infinite;
}
.mancha-2 {
  top: 8%;
  left: -14%;
  width: 38vw;
  height: 38vw;
  background: radial-gradient(circle, var(--teal), transparent 72%);
  animation: deriva-2 26s ease-in-out infinite;
}
.mancha-3 {
  bottom: -18%;
  left: 22%;
  width: 42vw;
  height: 42vw;
  background: radial-gradient(circle, var(--verde), transparent 72%);
  opacity: 0.35;
  animation: deriva-3 30s ease-in-out infinite;
}

@keyframes deriva-1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-4%, 5%) scale(1.08); }
}
@keyframes deriva-2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(5%, -4%) scale(1.06); }
}
@keyframes deriva-3 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(3%, -6%) scale(1.05); }
}

@media (prefers-reduced-motion: reduce) {
  .mancha { animation: none !important; }
}

.pantalla-inicial > .encabezado,
.pantalla-inicial > #menu-mobile,
.pantalla-inicial > .hero {
  position: relative;
  z-index: 1;
}

/* ── Header ── */
.encabezado {
  background: transparent;
  border-bottom: 1px solid var(--linea);
}
.encabezado-fila {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1.5rem;
  max-width: 1080px;
  margin: 0 auto;
}
.marca {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
}
.marca img { height: 38px; width: auto; display: block; }
.marca span {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.01em;
  color: var(--tinta);
}

.nav-principal { display: flex; align-items: center; gap: 2rem; }
.nav-principal a {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--tinta-media);
  text-decoration: none;
}
.nav-principal a:hover { color: var(--teal); }
.nav-principal .btn-cta { margin-left: 0.5rem; }

.btn-menu {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.4rem;
}
.btn-menu svg { width: 24px; height: 24px; }

@media (max-width: 720px) {
  .nav-principal { display: none; }
  .btn-menu { display: block; }
}

.menu-mobile {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: var(--superficie);
  height: 0;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
  transition: height 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
}
.menu-mobile.abierto { height: 100vh; opacity: 1; pointer-events: auto; }
.menu-mobile-contenido {
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 1.75rem;
}
.menu-mobile-contenido a {
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 1.7rem;
  color: var(--tinta);
  text-decoration: none;
}
.menu-mobile-cerrar {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: none;
  border: none;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--tinta-media);
  cursor: pointer;
}

/* ── Botones ── */
.btn-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--naranja);
  color: #ffffff;
  border: none;
  border-radius: 10px;
  padding: 0.8rem 1.5rem;
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 0.92rem;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
  box-shadow: 0 8px 20px -8px rgba(242, 129, 26, 0.55);
}
.btn-cta:hover { background: var(--naranja-claro); transform: translateY(-1px); }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: transparent;
  color: var(--teal);
  border: 1.5px solid var(--teal);
  border-radius: 10px;
  padding: 0.78rem 1.5rem;
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 0.92rem;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease;
}
.btn-ghost:hover { background: var(--teal); color: #fff; }

/* ── Hero ── */
.hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2.5rem 1.5rem 2rem;
  text-align: center;
  position: relative;
}
.hero-logo { width: 64px; height: 64px; margin: 0 auto 1.25rem; display: block; }

.badge-inicial {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid var(--linea);
  background: var(--superficie);
  border-radius: 999px;
  padding: 0.45rem 1rem;
  margin-bottom: 1.5rem;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--tinta-media);
}
.badge-inicial::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--verde);
  flex-shrink: 0;
}

.hero h1 {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: clamp(2rem, 5.4vw, 3.1rem);
  line-height: 1.16;
  letter-spacing: -0.015em;
  max-width: 16ch;
  margin: 0 auto;
  text-wrap: balance;
}
.hero .franja {
  background: linear-gradient(90deg, var(--teal), var(--verde));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero .acento-serif {
  font-family: 'Instrument Serif', serif;
  font-style: italic;
  font-weight: 400;
  color: var(--naranja);
  letter-spacing: 0;
}

.hero p.sub {
  margin: 1.1rem auto 0;
  max-width: 46ch;
  font-size: 1.05rem;
  color: var(--tinta-media);
}

.hero-acciones {
  margin-top: 1.9rem;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.9rem;
  flex-wrap: wrap;
}

.btn-play {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  flex-shrink: 0;
  border-radius: 50%;
  border: none;
  background: var(--superficie);
  box-shadow: 0 2px 12px rgba(0, 17, 31, 0.1);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.btn-play:hover { transform: scale(1.06); box-shadow: 0 4px 16px rgba(0, 17, 31, 0.16); }
.btn-play svg { width: 15px; height: 15px; fill: var(--tinta); margin-left: 2px; }

/* ── Vista previa del panel: no es un mockup inventado — reproduce la UI
   real de AutoFlow (estados "Listo para retirar"/"En el taller", el aviso
   de WhatsApp) en una tarjeta de vidrio esmerilado, apoyada sobre el resto
   del hero. select-none/pointer-events-none: es decorativa, el link real
   para probarla está arriba en los botones. ── */
.vista-previa {
  margin-top: 2.25rem;
  width: 100%;
  max-width: 560px;
  padding: 0.65rem;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: 0 30px 70px -24px rgba(0, 17, 31, 0.28), 0 0 0 1px rgba(0, 17, 31, 0.04);
  backdrop-filter: none; /* evitar el bug de captura visto con backdrop-filter + sticky */
  user-select: none;
  pointer-events: none;
  text-align: left;
}

.vp-marco {
  background: var(--superficie);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(0, 17, 31, 0.06);
}

.vp-barra {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 0.8rem;
  background: var(--bg);
  border-bottom: 1px solid var(--linea);
}
.vp-puntos { display: flex; gap: 5px; }
.vp-puntos span { width: 7px; height: 7px; border-radius: 50%; background: var(--linea); }
.vp-url {
  flex: 1;
  text-align: center;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.66rem;
  color: var(--tinta-tenue);
}

.vp-cuerpo { padding: 0.9rem 1rem 1.1rem; }

.vp-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}
.vp-header-titulo { font-family: 'Poppins', sans-serif; font-weight: 600; font-size: 0.88rem; }
.vp-header-fecha { font-size: 0.7rem; color: var(--tinta-tenue); }

.vp-fila {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0.55rem 0;
  border-top: 1px solid var(--linea);
}
.vp-fila:first-of-type { border-top: none; }

.vp-fila-info { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.vp-patente {
  font-family: 'IBM Plex Mono', monospace;
  font-weight: 600;
  font-size: 0.72rem;
  letter-spacing: 0.02em;
}
.vp-cliente { font-size: 0.72rem; color: var(--tinta-tenue); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.vp-badge {
  flex-shrink: 0;
  font-size: 0.62rem;
  font-weight: 600;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  white-space: nowrap;
}
.vp-badge.listo { background: var(--naranja-bg); color: var(--naranja); }
.vp-badge.en-taller { background: var(--teal-bg); color: var(--teal); }
.vp-badge.entregado { background: var(--verde-bg); color: var(--verde); }

.vp-whatsapp {
  margin: 0.5rem 0 0.15rem;
  padding: 0.5rem 0.65rem;
  background: var(--verde-bg);
  border-radius: 10px;
  font-size: 0.68rem;
  color: var(--verde);
  line-height: 1.4;
}

/* Separador tipo "colina" — el mismo motivo del isotipo */
.colina {
  display: block;
  width: 100%;
  height: 64px;
}
.colina--bg-superficie { color: var(--superficie); }
.colina--bg-bg { color: var(--bg); }

/* ── Secciones ── */
.seccion { padding: 4rem 1.5rem; }
.seccion.con-fondo { background: var(--superficie); }

.etiqueta {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 0.6rem;
}
.titulo-seccion {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: clamp(1.6rem, 3.4vw, 2.1rem);
  letter-spacing: -0.01em;
  margin-bottom: 2.2rem;
  max-width: 24ch;
}

/* ── Proyectos ── */
.grilla-proyectos {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.1rem;
}
@media (max-width: 860px) {
  .grilla-proyectos { grid-template-columns: 1fr; }
}

.tarjeta-proyecto {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  background: var(--bg);
  border: 1px solid var(--linea);
  border-radius: 18px;
  padding: 1.6rem;
  text-decoration: none;
  color: inherit;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease, border-color 0.25s ease;
}
.tarjeta-proyecto:hover {
  transform: translateY(-4px);
  box-shadow: var(--sombra);
  border-color: transparent;
}

.tarjeta-proyecto.destacada {
  background: linear-gradient(165deg, var(--teal-bg) 0%, var(--verde-bg) 55%, var(--naranja-bg) 100%);
  border-color: transparent;
  box-shadow: var(--sombra);
}

.tarjeta-cabecera { display: flex; align-items: flex-start; justify-content: space-between; gap: 0.6rem; }

.tarjeta-numero {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.72rem;
  color: var(--tinta-tenue);
}

.tarjeta-estado {
  flex-shrink: 0;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.22rem 0.6rem;
  border-radius: 999px;
  white-space: nowrap;
}
.tarjeta-estado.entregado { background: var(--verde-bg); color: var(--verde); }
.tarjeta-estado.en-taller { background: var(--naranja-bg); color: var(--naranja); }
.destacada .tarjeta-estado { background: rgba(255,255,255,0.7); }

.tarjeta-titulo {
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 1.2rem;
  line-height: 1.25;
}

.tarjeta-desc { font-size: 0.9rem; color: var(--tinta-media); line-height: 1.55; flex: 1; }

.tarjeta-link {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--teal);
}
.destacada .tarjeta-link { color: var(--naranja); }

/* ── Cómo trabajo ── */
.pasos {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
}
@media (max-width: 720px) {
  .pasos { grid-template-columns: 1fr; }
}
.paso .paso-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 50%;
  background: var(--teal-bg);
  color: var(--teal);
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 1rem;
}
.paso h3 {
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 1.05rem;
  margin-bottom: 0.5rem;
}
.paso p { font-size: 0.92rem; color: var(--tinta-media); line-height: 1.6; }

/* ── Contacto ── */
.panel-contacto {
  background: linear-gradient(120deg, var(--teal) 0%, var(--verde) 55%, var(--naranja) 130%);
  border-radius: 24px;
  padding: 3rem 2rem;
  text-align: center;
  color: #fff;
}
.panel-contacto h2 {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: clamp(1.5rem, 3.4vw, 2rem);
  margin-bottom: 0.75rem;
}
.panel-contacto p { max-width: 42ch; margin: 0 auto 1.75rem; opacity: 0.92; }
.panel-contacto .btn-cta { background: #fff; color: var(--tinta); box-shadow: none; }
.panel-contacto .btn-cta:hover { background: var(--bg); }

/* ── Footer ── */
.pie {
  padding: 2.25rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.8rem;
  color: var(--tinta-tenue);
  max-width: 1080px;
  margin: 0 auto;
}

/* Carga escalonada, sutil */
@keyframes aparecer { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
.aparece { opacity: 0; animation: aparecer 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards; }
.aparece-1 { animation-delay: 0.05s; }
.aparece-2 { animation-delay: 0.16s; }
.aparece-3 { animation-delay: 0.27s; }
.aparece-4 { animation-delay: 0.38s; }
.aparece-5 { animation-delay: 0.52s; }
