/* =========================================================
   style.css  |  Diseño Futurista con Gradientes Dinámicos
   ========================================================= */

/* -------------------- VARIABLES DE TEMA ----------------- */
:root {
  /* Neutros */
  --color-bg: #f3f4f6;
  --color-surface: #ffffff;
  --color-text: #222222;
  --color-text-light: #666666;

  /* Acentos (gradiente dinámico) */
  --color-accent-start: #6366f1;   /* indigo-500 */
  --color-accent-mid:   #8b5cf6;   /* violet-500 */
  --color-accent-end:   #ec4899;   /* fuchsia-500 */

  --color-border: rgba(0, 0, 0, 0.1);

  /* Glasmorfismo */
  --glass-bg: rgba(255, 255, 255, 0.55);
  --glass-blur: 16px;

  /* Transiciones */
  --transition-fast: .25s ease;
  --transition-med:  .45s ease;
}

/* ------------------- RESETEO BÁSICO --------------------- */
*, *::before, *::after { box-sizing: border-box; }
html, body           { margin: 0; padding: 0; width: 100%; }
body {
  font-family: 'DM Sans', sans-serif;
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.7;
}
h1, h2, h3, h4, h5, h6 {
  font-family: 'Space Grotesk', sans-serif;
  color: var(--color-text);
  line-height: 1.2;
}

/* ---------------------- UTILIDADES ---------------------- */
.text-gradient {
  background: linear-gradient(90deg,var(--color-accent-start),var(--color-accent-mid),var(--color-accent-end));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.bg-gradient {
  background: linear-gradient(135deg,var(--color-accent-start),var(--color-accent-end));
}
.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
}
.bg-cover-img {
  background-size: cover !important;
  background-repeat: no-repeat !important;
  background-position: center;
}
.read-more {
  color: var(--color-accent-start);
  font-weight: 600;
  position: relative;
  transition: var(--transition-fast);
}
.read-more::after {
  content: '';
  position: absolute;
  left: 0; bottom: -2px;
  width: 100%; height: 2px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform var(--transition-fast);
}
.read-more:hover { color: var(--color-accent-end); }
.read-more:hover::after { transform: scaleX(1); transform-origin: left; }

/* ------------------------ BOTONES ----------------------- */
.btn,
button,
input[type='submit'] {
  display: inline-block;
  padding: 0.85rem 2.25rem;
  border-radius: 9999px;
  font-weight: 600;
  color: #ffffff;
  background: linear-gradient(90deg,var(--color-accent-start),var(--color-accent-mid),var(--color-accent-end));
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
  box-shadow: 0 8px 20px rgba(0,0,0,0.1);
  cursor: pointer;
  border: none;
}
.btn:hover,
button:hover,
input[type='submit']:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(0,0,0,0.15);
}
.btn:active,
button:active,
input[type='submit']:active {
  transform: translateY(0);
  box-shadow: 0 6px 16px rgba(0,0,0,0.1);
}

/* -------------- NAVBAR & BURGER PERSONALIZADO ----------- */
header {
  transition: background var(--transition-med), box-shadow var(--transition-fast);
}
header.scrolled {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}
#burger span { transition: var(--transition-fast); }
#burger:hover span:nth-child(1) { transform: translateY(-2px); }
#burger:hover span:nth-child(3) { transform: translateY(2px); }

/* ------------------------ HERO -------------------------- */
#hero {
  position: relative;
  color: #ffffff; /* Garantiza texto blanco */
}
#hero::before { /* Overlay semioscuro */
  content:'';
  position:absolute;
  inset:0;
  background:linear-gradient(rgba(0,0,0,0.55),rgba(0,0,0,0.45));
  z-index:0;
}
#hero > * { position: relative; z-index:1; }

/* Texto hero animación trazada */
@keyframes sketch {
  0%   { stroke-dasharray: 0 100%; }
  70%  { stroke-dasharray: 100% 0; }
  100% { stroke-dasharray: 100% 0; }
}
.sketch-title {
  display: inline-block;
  position: relative;
}
.sketch-title::after {
  content: attr(data-text);
  position: absolute;
  left: 0; top: 0;
  width: 100%; height: 100%;
  color: transparent;
  -webkit-text-stroke: 2px #fff;
  animation: sketch 4s ease forwards;
  stroke-dashoffset: 100%;
  stroke-dasharray: 100% 0;
}

/* ---------------------- TARJETAS ------------------------ */
.card,
.item,
.testimonial,
.team-member,
.product-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 0.75rem;
  overflow: hidden;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}
.card:hover,
.item:hover,
.team-member:hover,
.product-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 32px rgba(0,0,0,0.08);
}
.card-image,
.image-container {
  width: 100%;
  height: 14rem;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.card-image img,
.image-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  margin: 0 auto;
}

/* --------------------- TIMELINE ------------------------- */
.timeline-line {
  position: absolute;
  left: 50%;
  top: 0;
  height: 100%;
  width: 4px;
  background: linear-gradient(var(--color-accent-start),var(--color-accent-end));
}

/* --------------- EFECTOS DE PARALLAX -------------------- */
.parallax {
  background-attachment: fixed;
}

/* --------------- SECCIONES ESPECÍFICAS ------------------ */
#sostenibilidad .flex>div { flex: 1; }

/* ------- SUCCESS PAGE & PADDING PARA PAGES -------------- */
.page-success {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  text-align: center;
  background: var(--color-bg);
}
.privacy-page,
.terms-page { padding-top: 100px; }

/* ----------------- SOCIAL LINKS FOOTER ------------------ */
.social-link {
  font-weight: 600;
  position: relative;
  transition: color var(--transition-fast);
}
.social-link::after {
  content:'↗';
  margin-left: 4px;
  opacity: 0;
  transition: opacity var(--transition-fast), transform var(--transition-fast);
  transform: translateY(2px);
}
.social-link:hover {
  color: var(--color-accent-end);
}
.social-link:hover::after {
  opacity: 1;
  transform: translateY(0);
}

/* --------- ANIMACIÓN APARICIÓN (PARA JS Motion) --------- */
[data-motion] { opacity: 1; transform: translateY(50px); }

/* -------------- ANIMACIONES DIBUJADAS CSS --------------- */
@keyframes handDraw {
  0%   { stroke-dashoffset: 350; }
  60%  { stroke-dashoffset: 0; }
  100% { stroke-dashoffset: 0; }
}
.drawn-path {
  stroke: var(--color-accent-start);
  stroke-width: 3;
  fill: transparent;
  stroke-dasharray: 350;
  animation: handDraw 3s ease forwards;
}

/* ------------------ PLACEHOLDERS EXTRA ------------------ */
.link-reset { text-decoration: none; color: inherit; }

/* -------------------- RESPONSIVE FIX -------------------- */
@media (max-width: 768px) {
  .card-image, .image-container { height: 12rem; }
  nav a { display: block; margin: 0.75rem 0; }
}