/* ========================================
   TheCookFlow Landing Page - Estilo Pizarra
   ========================================
   Diseño optimizado con estilo "pizarra con tiza"
   Optimizado para rendimiento y SEO
   ======================================== */

/* Fuente principal personalizada - Cheveuxdange */
@font-face {
  font-family: 'Cheveuxdange';
  src: url('../images/Cheveuxdange.ttf') format('truetype');
  font-display: swap;
}

/* Reset básico */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Body - Fondo de pizarra con textura grunge */
body {
  margin: 0;
  padding: 0;
  line-height: 1.6;
  font-family: 'Cheveuxdange', 'Kalam', 'Caveat', 'Crafty Girls', sans-serif;
  background-color: #0f0f0f;
  /* Fallback para navegadores antiguos */
  background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('../images/textura-grunge-oscura.jpg');
  /* WebP optimizado para navegadores modernos */
  background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('../images/textura-grunge-oscura.webp');
  background-size: cover;
  background-repeat: no-repeat;
  background-attachment: fixed;
  background-position: center;
  color: #e8e8e8;
  min-height: 100vh;
}

/* Títulos - Efecto tiza */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Cheveuxdange', 'Kalam', 'Caveat', 'Crafty Girls', sans-serif;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
  color: #f5f5f5;
  font-weight: normal;
}

h1 {
  font-size: 2.8rem;
}

h2 {
  font-size: 2.5rem;
}

/* Logo */
.logo {
  width: 700px;
  max-width: 100%;
  height: auto;
  margin: 1.5rem auto;
  display: block;
  filter: brightness(1.1) contrast(1.05);
}

/* Secciones principales con separadores */
.seccion {
  padding: 4rem 2rem;
  text-align: center;
  max-width: 960px;
  margin: auto;
  position: relative;
}

.seccion:not(:last-child):after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 10%;
  right: 10%;
  height: 2px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 1px;
}

/* Clases de texto - Efecto tiza */
.text-chalk {
  color: #e8e8e8;
}

.text-chalk-white {
  color: #f5f5f5;
}

.text-chalk-green {
  color: #4a9b8e;
}

/* Botón principal - Rojo tiza outline */
.btn-red-chalk-outline {
  display: inline-block;
  padding: 1rem 2.5rem;
  background: transparent;
  color: #dc2626;
  border: 3px solid rgba(220, 38, 38, 0.6);
  border-radius: 25px;
  font-size: 1.2rem;
  font-family: 'Cheveuxdange';
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(185, 28, 28, 0.2);
  transition: all 0.3s ease;
  text-decoration: none;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
  position: relative;
  overflow: hidden;
}

.btn-red-chalk-outline::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(220, 38, 38, 0.1), transparent);
  transition: left 0.5s;
}

.btn-red-chalk-outline:hover::before {
  left: 100%;
}

.btn-red-chalk-outline:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 8px 25px rgba(185, 28, 28, 0.3);
  background: rgba(220, 38, 38, 0.1);
  border-color: rgba(239, 68, 68, 0.8);
  color: #ef4444;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

/* Botón Google Play - Destacado */
.btn-google-play {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 2.5rem;
  background: linear-gradient(135deg, #34a853 0%, #2d8e47 100%);
  color: white;
  border: 3px solid rgba(52, 168, 83, 0.8);
  border-radius: 25px;
  font-size: 1.2rem;
  font-family: 'Cheveuxdange';
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(52, 168, 83, 0.4);
  transition: all 0.3s ease;
  text-decoration: none;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
  position: relative;
  overflow: hidden;
}

.btn-google-play::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

.btn-google-play:hover::before {
  left: 100%;
}

.btn-google-play:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 8px 30px rgba(52, 168, 83, 0.5);
  background: linear-gradient(135deg, #3bb75f 0%, #329952 100%);
  border-color: rgba(59, 183, 95, 1);
}

.google-play-icon {
  width: 1.5rem;
  height: 1.5rem;
  flex-shrink: 0;
}

/* Botón secundario - Tiza verde */
.btn-chalk {
  display: inline-block;
  background: rgba(255, 255, 255, 0.15);
  color: white;
  padding: 1rem 2rem;
  border-radius: 25px;
  font-size: 1.1rem;
  font-family: 'Cheveuxdange';
  border: 2px solid rgba(255, 255, 255, 0.25);
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(5px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
  text-decoration: none;
}

.btn-chalk:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.4);
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(255, 255, 255, 0.1);
}

/* Inputs del formulario de contacto */
.contact-input {
  width: 100%;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  color: white;
  font-family: 'Cheveuxdange', sans-serif;
  font-size: 1.1rem;
  transition: all 0.3s ease;
}

.contact-input:focus {
  outline: none;
  border-color: #4a9b8e;
  background: rgba(255, 255, 255, 0.15);
  box-shadow: 0 0 0 3px rgba(74, 155, 142, 0.2);
}

.contact-input::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

/* Screen reader only - Accesibilidad */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* Decoraciones - Imágenes de vegetales */
.decoraciones {
  opacity: 0.7;
  filter: brightness(1.1) sepia(0.1) hue-rotate(10deg);
}

/* Grid de features */
.grid {
  display: grid;
}

.grid-cols-1 {
  grid-template-columns: repeat(1, minmax(0, 1fr));
}

.grid-cols-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-cols-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid-cols-5 {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

/* Utilidades Flexbox */
.flex {
  display: flex;
}

.flex-col {
  flex-direction: column;
}

.gap-4 {
  gap: 1rem;
}

.gap-6 {
  gap: 1.5rem;
}

.gap-8 {
  gap: 2rem;
}

.gap-12 {
  gap: 3rem;
}

.justify-center {
  justify-content: center;
}

.justify-between {
  justify-content: space-between;
}

.items-center {
  align-items: center;
}

/* Utilidades de espaciado */
.mb-4 {
  margin-bottom: 1rem;
}

.mb-6 {
  margin-bottom: 1.5rem;
}

.mb-8 {
  margin-bottom: 2rem;
}

.mb-12 {
  margin-bottom: 3rem;
}

.mb-16 {
  margin-bottom: 4rem;
}

.mt-6 {
  margin-top: 1.5rem;
}

.mt-10 {
  margin-top: 2.5rem;
}

.p-8 {
  padding: 2rem;
}

.p-12 {
  padding: 3rem;
}

.p-16 {
  padding: 4rem;
}

.px-8 {
  padding-left: 2rem;
  padding-right: 2rem;
}

.px-12 {
  padding-left: 3rem;
  padding-right: 3rem;
}

.px-16 {
  padding-left: 4rem;
  padding-right: 4rem;
}

.py-4 {
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.py-6 {
  padding-top: 1.5rem;
  padding-bottom: 1.5rem;
}

.py-8 {
  padding-top: 2rem;
  padding-bottom: 2rem;
}

/* Utilidades de tamaño */
.w-12 {
  width: 3rem;
}

.h-12 {
  height: 3rem;
}

.w-20 {
  width: 5rem;
}

.h-20 {
  height: 5rem;
}

.w-28 {
  width: 7rem;
}

.h-28 {
  height: 7rem;
}

.max-w-3xl {
  max-width: 48rem;
}

.max-w-4xl {
  max-width: 56rem;
}

.max-w-6xl {
  max-width: 72rem;
}

.max-w-7xl {
  max-width: 80rem;
}

.mx-auto {
  margin-left: auto;
  margin-right: auto;
}

/* Utilidades de texto */
.text-lg {
  font-size: 1.125rem;
  line-height: 1.75rem;
}

.text-xl {
  font-size: 1.25rem;
  line-height: 1.75rem;
}

.text-2xl {
  font-size: 1.5rem;
  line-height: 2rem;
}

.text-3xl {
  font-size: 1.875rem;
  line-height: 2.25rem;
}

.text-4xl {
  font-size: 2.25rem;
  line-height: 2.5rem;
}

.text-5xl {
  font-size: 3rem;
  line-height: 1;
}

.text-8xl {
  font-size: 6rem;
  line-height: 1;
}

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

.font-semibold {
  font-weight: 600;
}

.font-medium {
  font-weight: 500;
}

.leading-tight {
  line-height: 1.25;
}

.leading-relaxed {
  line-height: 1.625;
}

/* Iconos sociales */
.social-icon {
  width: 3rem;
  height: 3rem;
  border-radius: 9999px;
  border: 2px solid #e8e8e8;
  background-color: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  transform: scale(1);
}

.social-icon:hover {
  border-color: #4a9b8e;
  background-color: rgba(74, 155, 142, 0.1);
  transform: scale(1.1);
}

.social-icon svg {
  width: 1.5rem;
  height: 1.5rem;
  fill: #e8e8e8;
  transition: fill 0.3s ease;
}

.social-icon:hover svg {
  fill: #4a9b8e;
}

/* Border y backgrounds */
.border-2 {
  border-width: 2px;
}

.border-dashed {
  border-style: dashed;
}

.border-chalk-green {
  border-color: #4a9b8e;
}

.rounded-lg {
  border-radius: 0.5rem;
}

.rounded-full {
  border-radius: 9999px;
}

.bg-transparent {
  background-color: transparent;
}

/* Footer */
footer {
  border-top: 2px solid rgba(255, 255, 255, 0.2);
  margin-top: 3rem;
  padding-top: 2rem;
}

footer a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: underline;
  transition: color 0.3s ease;
}

footer a:hover {
  color: white;
}

/* Responsive - Móviles */
@media (max-width: 768px) {
  .seccion {
    padding: 2rem 1rem;
  }

  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.8rem;
  }

  .logo {
    width: 90%;
    max-width: 560px;
  }

  .grid-cols-2,
  .grid-cols-3,
  .grid-cols-5 {
    grid-template-columns: repeat(1, minmax(0, 1fr));
  }

  .btn-red-chalk-outline,
  .btn-google-play,
  .btn-chalk {
    padding: 0.8rem 2rem;
    font-size: 1rem;
  }

  .text-5xl {
    font-size: 2rem;
  }

  .text-4xl {
    font-size: 1.75rem;
  }

  .text-3xl {
    font-size: 1.5rem;
  }

  .text-8xl {
    font-size: 4rem;
  }

  .google-play-icon {
    width: 1.25rem;
    height: 1.25rem;
  }
}

/* Media queries para tablet */
@media (min-width: 768px) {
  .md\:grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .md\:grid-cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .md\:col-span-1 {
    grid-column: span 1 / span 1;
  }
}

@media (min-width: 640px) {
  .sm\:flex-row {
    flex-direction: row;
  }
}

@media (min-width: 1024px) {
  .lg\:grid-cols-5 {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

/* Utilidades adicionales */
.space-y-3 > * + * {
  margin-top: 0.75rem;
}

.space-y-6 > * + * {
  margin-top: 1.5rem;
}

.space-x-6 > * + * {
  margin-left: 1.5rem;
}

.opacity-80 {
  opacity: 0.8;
}

.col-span-2 {
  grid-column: span 2 / span 2;
}

.justify-items-center {
  justify-items: center;
}

/* Optimizaciones de rendimiento */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
