
/* Brand Trabem v1.0 — Inter · Source Serif 4 · JetBrains Mono */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Source+Serif+4:ital,opsz,wght@0,8..60,400;0,8..60,500;1,8..60,400;1,8..60,500&family=JetBrains+Mono:wght@400;500&display=swap');

@tailwind base;
@tailwind components;
@tailwind utilities;

@layer base {
  :root {
    /* === BRAND TRABEM v1.0 (Brand Book 2026.04) ===
       Paper #F5F7FA · Ink #0A6E6E · Signal #1DBDBD · Night #0A1E3F · Mist #C9D7EC
    */
    --background: 210 25% 97%;          /* Paper #F5F7FA */
    --foreground: 218 72% 14%;          /* Night #0A1E3F como tinta de texto */

    --card: 0 0% 100%;
    --card-foreground: 218 72% 14%;

    --popover: 0 0% 100%;
    --popover-foreground: 218 72% 14%;

    --primary: 180 83% 24%;             /* Ink #0A6E6E */
    --primary-foreground: 210 25% 97%;

    --secondary: 180 74% 43%;           /* Signal #1DBDBD */
    --secondary-foreground: 218 72% 14%;

    --muted: 210 25% 94%;
    --muted-foreground: 215 16% 40%;

    --accent: 180 74% 43%;              /* Signal */
    --accent-foreground: 218 72% 14%;

    --destructive: 0 84.2% 60.2%;
    --destructive-foreground: 210 25% 97%;

    --border: 214 25% 88%;
    --input: 214 25% 88%;
    --ring: 180 83% 24%;                /* Ink */

    --radius: 0.5rem;

    /* Tokens semánticos extendidos */
    --night: 218 72% 14%;
    --ink: 180 83% 24%;
    --signal: 180 74% 43%;
    --paper: 210 25% 97%;
    --mist: 218 39% 86%;

    --sidebar-background: 0 0% 98%;
    --sidebar-foreground: 240 5.3% 26.1%;
    --sidebar-primary: 240 5.9% 10%;
    --sidebar-primary-foreground: 0 0% 98%;
    --sidebar-accent: 240 4.8% 95.9%;
    --sidebar-accent-foreground: 240 5.9% 10%;
    --sidebar-border: 220 13% 91%;
    --sidebar-ring: 217.2 91.2% 59.8%;
  }
}

@layer base {
  * {
    @apply border-border;
  }

  body {
    @apply bg-background text-foreground font-sans;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    font-feature-settings: "ss01", "ss02", "cv01", "cv02", "cv03";
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }

  /* Improve text rendering */
  h1, h2, h3, h4, h5, h6 {
    text-rendering: optimizeLegibility;
    font-family: 'Inter', system-ui, sans-serif;
    letter-spacing: -0.02em;
  }

  /* Promesa de marca · Source Serif 4 italic */
  .brand-promise {
    font-family: 'Source Serif 4', 'Source Serif Pro', Georgia, serif;
    font-style: italic;
    font-weight: 400;
  }

  /* Descriptor en caps tracking ancho · Brand Book v1.0 */
  .brand-descriptor {
    font-family: 'Inter', system-ui, sans-serif;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.24em;
  }

  /* UI/datos · JetBrains Mono */
  .brand-mono {
    font-family: 'JetBrains Mono', ui-monospace, monospace;
  }
}

/* Optimized animation utilities */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(15px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes blob {
  0% {
    transform: translate(0px, 0px) scale(1);
  }
  33% {
    transform: translate(30px, -30px) scale(1.05);
  }
  66% {
    transform: translate(-20px, 20px) scale(0.95);
  }
  100% {
    transform: translate(0px, 0px) scale(1);
  }
}

/* Added float animation for the efficiency badge */
@keyframes float {
  0% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-5px);
  }
  100% {
    transform: translateY(0px);
  }
}

.animate-float {
  animation: float 3s ease-in-out infinite;
}

.animate-fade-in {
  animation: fadeIn 0.6s ease forwards;
}

.animate-blob {
  animation: blob 10s infinite alternate;
}

.animation-delay-2000 {
  animation-delay: 2s;
}

.animation-delay-4000 {
  animation-delay: 4s;
}

.animation-delay-500 {
  animation-delay: 0.5s;
}

.btn-primary {
  @apply bg-[#0A6E6E] hover:bg-[#085858] text-white font-semibold py-3 px-6 rounded-lg transition-all duration-300 text-center shadow-md hover:shadow-lg;
}

.btn-secondary {
  @apply bg-[#1DBDBD] hover:bg-[#15a3a3] text-[#0A1E3F] font-semibold py-3 px-6 rounded-lg transition-all duration-300 text-center shadow-md hover:shadow-lg;
}

.btn-outline {
  @apply border-2 border-[#0A6E6E] text-[#0A6E6E] hover:bg-[#C9D7EC]/40 font-semibold py-3 px-6 rounded-lg transition-all duration-300 text-center;
}

/* Improved section animations */
.fade-in-section {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
  will-change: opacity, transform;
}

.fade-in-section.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.feature-card {
  @apply bg-white p-6 rounded-xl shadow-sm hover:shadow-md transition-all duration-300 border border-gray-200 hover:border-[#0A6E6E]/30;
}

.section-title {
  @apply text-3xl md:text-4xl font-semibold mb-4 text-[#0A1E3F];
  letter-spacing: -0.02em;
}

.section-subtitle {
  @apply text-xl text-gray-700 max-w-3xl mx-auto mb-8;
}

.module-card {
  @apply bg-white p-6 rounded-xl shadow-sm hover:shadow-md transition-all duration-300 border border-gray-200 hover:border-[#0A6E6E]/30;
  @apply flex flex-col items-center text-center;
  @apply transform transition-transform duration-300 hover:-translate-y-2;
}

.module-icon {
  @apply text-[#0A6E6E] mb-4;
}

.advantage-item {
  @apply flex items-start gap-3 mb-4;
}

.advantage-icon {
  @apply text-[#0A6E6E] mt-1;
}

/* Smooth scrolling for the whole page */
html {
  scroll-behavior: smooth;
}

/* Added focus styles for accessibility */
a:focus,
button:focus,
input:focus {
  @apply ring-2 ring-blue-400 outline-none;
}

/* Better tap targets on mobile */
@media (max-width: 768px) {
  button, 
  a {
    @apply min-h-[44px] min-w-[44px];
  }
}
