/* CSS Variables - SommOS OKLCH Color System */
:root {
  /* Core theme variables using OKLCH for better color accuracy */
  --radius: 0.625rem;

  /* Light theme colors (OKLCH format from SommOS platform) */
  --background: oklch(1 0 0);              /* Pure white background */
  --foreground: oklch(0.145 0 0);          /* Very dark text */
  --card: oklch(1 0 0);                    /* White cards */
  --card-foreground: oklch(0.145 0 0);     /* Dark text on cards */
  --popover: oklch(1 0 0);                 /* White popover bg */
  --popover-foreground: oklch(0.145 0 0);  /* Dark popover text */
  --primary: oklch(0.205 0 0);             /* Professional dark gray */
  --primary-foreground: oklch(0.985 0 0);  /* Nearly white text */
  --secondary: oklch(0.97 0 0);            /* Very light gray */
  --secondary-foreground: oklch(0.205 0 0);/* Dark gray text */
  --muted: oklch(0.97 0 0);                /* Light muted background */
  --muted-foreground: oklch(0.556 0 0);    /* Medium gray text */
  --accent: oklch(0.488 0.243 264.376);    /* Subtle blue accent */
  --accent-foreground: oklch(0.985 0 0);   /* White on accent */
  --destructive: oklch(0.577 0.245 27.325);/* Error red */
  --border: oklch(0.922 0 0);              /* Light borders */
  --input: oklch(0.922 0 0);               /* Input borders */
  --ring: oklch(0.708 0 0);                /* Focus rings */

  /* Brand colors - SommOS identity */
  --brand-red: #B75856;                    /* Primary brand color - isotipo red */
  --brand-detail: #54524C;                 /* Secondary brand color - detail gray-brown */
  --brand-red-hover: #a04846;              /* Darker red for hover states */

  /* Legacy color mappings for backward compatibility */
  --bg-primary: var(--background);
  --bg-secondary: var(--secondary);
  --bg-tertiary: var(--muted);
  --text-primary: var(--foreground);
  --text-secondary: var(--muted-foreground);
  --text-muted: oklch(0.708 0 0);
  --border-color: var(--border);
  --accent-blue: var(--primary);
  --accent-hover: var(--brand-red);

  /* Status colors using OKLCH */
  --success-color: oklch(0.646 0.222 142);
  --success-bg: oklch(0.95 0.05 142);
  --error-color: var(--destructive);
  --error-bg: oklch(0.95 0.05 27);
  --warning-color: oklch(0.769 0.188 70.08);
  --warning-bg: oklch(0.95 0.05 70);

  /* Enhanced shadows for professional look */
  --shadow-sm: 0 1px 2px 0 oklch(0 0 0 / 0.03);
  --shadow-md: 0 4px 6px -1px oklch(0 0 0 / 0.08), 0 2px 4px -2px oklch(0 0 0 / 0.03);
  --shadow-lg: 0 10px 15px -3px oklch(0 0 0 / 0.08), 0 4px 6px -4px oklch(0 0 0 / 0.03);
  --shadow-xl: 0 20px 25px -5px oklch(0 0 0 / 0.08), 0 8px 10px -6px oklch(0 0 0 / 0.03);
}


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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', 'SF Pro Display', 'Helvetica Neue', Arial, sans-serif;
  font-weight: 500;
  line-height: 1.5;
  background-color: var(--background);
  color: var(--foreground);
  transition: background-color 0.2s ease, color 0.2s ease;
  font-feature-settings: 'kern' 1, 'liga' 1, 'calt' 1;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  margin-bottom: 0.75rem;
  line-height: 1.2;
  letter-spacing: -0.025em;
  color: var(--brand-detail);
}

h1 {
  font-size: clamp(2.5rem, 4vw, 4rem);
  font-weight: 700;
  letter-spacing: -0.04em;
}
h2 {
  font-size: clamp(2rem, 3vw, 3rem);
  font-weight: 650;
}
h3 {
  font-size: clamp(1.5rem, 2.5vw, 2rem);
}
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

p {
  margin-bottom: 1.25rem;
  color: var(--muted-foreground);
  font-size: 1.0625rem;
  line-height: 1.6;
  font-weight: 400;
}

.text-large {
  font-size: 1.25rem;
  line-height: 1.5;
}

.text-small {
  font-size: 0.875rem;
  line-height: 1.5;
}

a {
  color: var(--accent-blue);
  text-decoration: none;
  transition: color 0.15s ease;
}

a.btn-primary {
  color: white !important;
}

a.btn-primary:hover,
a.btn-primary:visited,
a.btn-primary:focus,
a.btn-primary:active {
  color: white !important;
}

a:hover {
  color: var(--accent-hover);
}

/* Layout */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: clamp(4rem, 8vw, 8rem) 0;
}

.section-tight {
  padding: clamp(2rem, 4vw, 4rem) 0;
}

.section-loose {
  padding: clamp(6rem, 12vw, 12rem) 0;
}

/* Header/Navbar */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background-color: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(20px);
  padding: 1.25rem 0;
  z-index: 1000;
  transition: all 0.2s ease;
}

.nav-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
}

.logo {
  flex: 1;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--foreground);
  letter-spacing: -0.02em;
}

.logo a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: inherit;
}

.logo-isotipo {
  height: 1.75rem;
  width: auto;
  display: block;
}

.logo-tipografico {
  height: 1.25rem;
  width: auto;
  display: block;
}

.logo a:hover .logo-isotipo,
.logo a:hover .logo-tipografico {
  opacity: 0.8;
  transition: opacity 0.2s ease;
}

/* Legacy logo-img style */
.logo-img {
  height: 2.15rem;
  width: auto;
  display: block;
  transition: opacity 0.2s ease;
}

.logo-img:hover {
  opacity: 0.8;
}

/* Legacy logo styles (kept for backward compatibility) */
.logo-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  background-color: var(--primary);
  color: var(--primary-foreground);
  border-radius: var(--radius);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.logo-text {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--foreground);
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 2.5rem;
  align-items: center;
  flex: 1;
  justify-content: center;
}


.nav-links a {
  color: var(--brand-detail);
  font-weight: 500;
  font-size: 0.9375rem;
  transition: color 0.15s ease;
  position: relative;
}

.nav-links a:hover {
  color: var(--brand-red);
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--brand-red);
  transition: width 0.15s ease;
}

.nav-links a:hover::after {
  width: 100%;
}

.nav-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex: 1;
  justify-content: flex-end;
}

/* Language Switcher */
.language-switcher {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 0.875rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--foreground);
  background-color: transparent;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  text-decoration: none;
  transition: all 0.2s ease;
  margin-right: 0.75rem;
}

.language-switcher:hover {
  background-color: var(--bg-secondary);
  border-color: var(--primary);
  color: var(--primary);
}

.language-switcher svg {
  stroke: currentColor;
}

/* Mobile-only navigation items (hidden on desktop) */
.mobile-only {
  display: none;
}

/* Hide file upload for now */
.file-attachment,
.file-upload-container,
.file-upload-input,
.file-attachment-btn {
  display: none !important;
}

/* Analyzing animation state */
.problem-analysis-container.analyzing {
  position: relative;
  pointer-events: none;
}

.problem-analysis-container.analyzing::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(0, 123, 255, 0.1) 0%, rgba(0, 123, 255, 0.05) 50%, rgba(0, 123, 255, 0.1) 100%);
  background-size: 200% 200%;
  animation: analyzingGradient 3s ease-in-out infinite;
  border-radius: var(--radius);
  z-index: 1;
}

.problem-analysis-container.analyzing::after {
  content: 'Analizando tu problema...';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 1rem 2rem;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  z-index: 2;
  backdrop-filter: blur(10px);
}

.problem-analysis-container.analyzing .problem-input,
.problem-analysis-container.analyzing .action-bar {
  opacity: 0.5;
  filter: blur(1px);
}

@keyframes analyzingGradient {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

/* Thinking messages animation */
.problem-analysis-container.analyzing::after {
  content: 'Analizando tu problema...';
  animation: thinkingMessages 12s infinite;
}

@keyframes thinkingMessages {
  0%, 15% {
    content: 'Analizando tu problema...';
  }
  17%, 32% {
    content: 'Entendiendo tu necesidad...';
  }
  34%, 49% {
    content: 'Pensando...';
  }
  51%, 66% {
    content: 'Procesando información...';
  }
  68%, 83% {
    content: 'Buscando soluciones...';
  }
  85%, 98% {
    content: 'Casi listo...';
  }
  99%, 100% {
    content: 'Analizando tu problema...';
  }
}

/* Dashboard Preview Styles - Option 2: Centered above cards */
.dashboard-preview {
  display: flex;
  justify-content: center;
  align-items: center;
}

.dashboard-image-wrapper {
  position: relative;
  max-width: 800px;
  width: 100%;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04), 0 0 0 1px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.dashboard-image-wrapper:hover {
  transform: translateY(-4px);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15), 0 15px 20px -5px rgba(0, 0, 0, 0.1), 0 0 0 1px rgba(0, 0, 0, 0.05);
}

.dashboard-image {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius);
}


/* Responsive dashboard preview - Option 2 */
@media (max-width: 768px) {
  .dashboard-image-wrapper {
    max-width: 100%;
    margin: 0 1rem;
  }
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--foreground);
  font-size: 1.5rem;
  cursor: pointer;
}

/* Buttons - Shadcn/UI Style */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  border-radius: var(--radius);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 150ms;
  outline: none;
  cursor: pointer;
  border: 1px solid transparent;
  position: relative;
}

.btn:focus-visible {
  outline: 2px solid var(--brand-red);
  outline-offset: 2px;
}

.btn:disabled {
  pointer-events: none;
  opacity: 0.5;
}

/* Primary Button */
.btn-primary {
  background-color: var(--brand-red);
  color: white;
  padding: 0.625rem 1rem;
  height: 2.5rem;
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  background-color: var(--brand-red-hover);
  color: white;
}

.btn-primary:active {
  scale: 0.98;
}

/* Secondary Button */
.btn-secondary {
  background-color: var(--secondary);
  color: var(--secondary-foreground);
  padding: 0.625rem 1rem;
  height: 2.5rem;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
  background-color: var(--secondary);
  opacity: 0.8;
}

.btn-secondary:active {
  scale: 0.98;
}

/* Outline Button */
.btn-outline {
  border: 1px solid var(--border);
  background-color: var(--background);
  color: var(--foreground);
  padding: 0.625rem 1rem;
  height: 2.5rem;
}

.btn-outline:hover {
  background-color: var(--accent);
  color: var(--accent-foreground);
}

.btn-outline:active {
  scale: 0.98;
}

/* Ghost Button */
.btn-ghost {
  background-color: transparent;
  color: var(--foreground);
  padding: 0.625rem 1rem;
  height: 2.5rem;
}

.btn-ghost:hover {
  background-color: var(--accent);
  color: var(--accent-foreground);
}

.btn-ghost:active {
  scale: 0.98;
}

/* Button Sizes */
.btn-small {
  height: 2.25rem;
  border-radius: calc(var(--radius) - 2px);
  padding: 0.5rem 0.75rem;
  font-size: 0.75rem;
}

.btn-large {
  height: 2.75rem;
  border-radius: calc(var(--radius) + 2px);
  padding: 0.75rem 2rem;
  font-size: 1rem;
}

.btn-icon {
  height: 2.5rem;
  width: 2.5rem;
  padding: 0;
}

.btn-icon.btn-small {
  height: 2.25rem;
  width: 2.25rem;
}

.btn-icon.btn-large {
  height: 2.75rem;
  width: 2.75rem;
}

/* Forms - Shadcn/UI Style */
.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--foreground);
  font-size: 0.875rem;
  line-height: 1.25rem;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 0.625rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background-color: var(--background);
  color: var(--foreground);
  font-family: inherit;
  font-size: 0.875rem;
  line-height: 1.25rem;
  transition: all 150ms cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-sm);
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--muted-foreground);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--brand-red);
  box-shadow: 0 0 0 2px rgba(183, 88, 86, 0.1);
}

.form-input:disabled,
.form-select:disabled,
.form-textarea:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.form-textarea {
  resize: vertical;
  min-height: 4rem;
}

/* Chat Interface - Professional SommOS Style */
.problem-analysis-container {
  position: relative;
  max-width: 768px;
  margin: 2rem auto;
  background-color: var(--background);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  transition: all 200ms cubic-bezier(0.4, 0, 0.2, 1);
}

.problem-analysis-container:focus-within {
  border-color: var(--brand-red);
  box-shadow: var(--shadow-xl), 0 0 0 1px var(--brand-red);
}

.problem-input-wrapper {
  position: relative;
  padding: 1rem 1rem 0.5rem 1rem;
}

.problem-input {
  width: 100%;
  min-height: 80px;
  max-height: 180px;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) - 2px);
  background-color: var(--background);
  color: var(--foreground);
  font-family: inherit;
  font-size: 0.875rem;
  line-height: 1.5;
  resize: none;
  outline: none;
  overflow-y: auto;
  transition: all 150ms cubic-bezier(0.4, 0, 0.2, 1);
}

.problem-input:focus {
  border-color: var(--brand-red);
  box-shadow: 0 0 0 1px var(--brand-red);
}

.problem-input::placeholder {
  color: var(--muted-foreground);
  font-weight: 400;
}

.problem-input::-webkit-scrollbar {
  width: 6px;
}

.problem-input::-webkit-scrollbar-track {
  background: transparent;
}

.problem-input::-webkit-scrollbar-thumb {
  background-color: var(--border);
  border-radius: 3px;
}

.problem-input::-webkit-scrollbar-thumb:hover {
  background-color: var(--muted-foreground);
}

/* Action Bar */
.action-bar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding: 0.5rem 1rem;
  background-color: var(--muted);
  border-top: 1px solid var(--border);
}

.file-attachment {
  display: flex;
  align-items: center;
}

.file-upload-container {
  position: relative;
}

.file-upload-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.file-attachment-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  height: 2rem;
  padding: 0.375rem 0.75rem;
  background-color: transparent;
  border: none;
  border-radius: calc(var(--radius) - 2px);
  color: var(--muted-foreground);
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: 500;
  transition: all 150ms cubic-bezier(0.4, 0, 0.2, 1);
}

.file-attachment-btn:hover {
  background-color: var(--accent);
  color: var(--accent-foreground);
}

.file-attachment-icon {
  font-size: 14px;
  line-height: 1;
}

.file-attachment-text {
  font-size: 0.75rem;
  font-weight: 500;
}

/* Submit Button - Professional Style */
.analyze-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  height: 2.5rem;
  padding: 0.5rem 1rem;
  background-color: var(--brand-red);
  color: white;
  border: none;
  border-radius: calc(var(--radius) - 2px);
  cursor: pointer;
  font-size: 1.125rem;
  font-weight: 500;
  transition: all 150ms cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-sm);
}

.analyze-submit:hover:not(:disabled) {
  background-color: var(--brand-red-hover);
  scale: 1.02;
}

.analyze-submit:active:not(:disabled) {
  scale: 0.98;
}

.analyze-submit:disabled {
  background-color: var(--muted);
  color: var(--muted-foreground);
  cursor: not-allowed;
  opacity: 0.5;
  scale: 1;
}

.analyze-text {
  font-size: 0.75rem;
  font-weight: 500;
}

.analyze-icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}



/* Mobile Responsive */
@media (max-width: 768px) {
  .chat-input-container {
    margin: 1rem;
    max-width: none;
  }
  
  .chat-input-wrapper {
    min-height: 100px;
    padding: 1rem 3rem 1rem 1rem;
  }
  
  .chat-submit {
    right: 0.75rem;
    bottom: 0.75rem;
  }
  
  .chat-controls {
    right: 3rem;
    bottom: 0.5rem;
  }
  
  .char-counter {
    right: 3.5rem;
    bottom: 0.25rem;
  }
  
  .attached-files {
    left: 0.75rem;
    right: 3rem;
    bottom: 3rem;
  }
}

/* Drag and Drop Styles */
.chat-input-container.drag-over {
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 1px var(--accent-blue);
  background-color: rgba(37, 99, 235, 0.02);
}

.chat-input-container.drag-over::after {
  content: "Suelta los archivos aquí";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: var(--accent-blue);
  font-weight: 500;
  font-size: 0.9rem;
  pointer-events: none;
  z-index: 10;
  background: var(--bg-primary);
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  border: 1px solid var(--accent-blue);
}

/* Hero Section */
.hero {
  padding: clamp(8rem, 15vw, 12rem) 0 clamp(4rem, 8vw, 8rem);
  text-align: center;
}

.hero h1 {
  font-size: clamp(3rem, 6vw, 4.5rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  margin-bottom: 1.5rem;
  line-height: 1.1;
}

.hero p {
  font-size: clamp(1.125rem, 2vw, 1.375rem);
  margin-bottom: 3rem;
  color: var(--text-secondary);
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
  font-weight: 400;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin: 3rem 0 2rem;
  flex-wrap: wrap;
}

/* Grid Layouts */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 2.5rem;
  margin: 3rem 0;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin: 3rem 0;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  margin: 3rem 0;
}

/* Cards */
.card {
  background-color: var(--bg-primary);
  border: 1px solid rgba(183, 88, 86, 0.15);
  border-radius: 0.75rem;
  padding: 1.5rem;
  transition: all 0.2s ease;
  position: relative;
  box-shadow: var(--shadow-sm);
}

.card:hover {
  border-color: var(--brand-red);
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
  background-color: var(--bg-highlight);
}

.card h3 {
  color: var(--text-primary);
  margin-bottom: 0.75rem;
  font-size: 1.125rem;
  line-height: 1.3;
}

.card p {
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
  line-height: 1.6;
}

.card ul {
  list-style: none;
  padding: 0;
}

.card li {
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
  padding-left: 1.25rem;
  position: relative;
  line-height: 1.5;
}

.card li:before {
  content: "→";
  color: var(--brand-red);
  font-weight: 500;
  position: absolute;
  left: 0;
  top: 0;
}

.card-icon {
  width: 48px;
  height: 48px;
  background-color: rgba(183, 88, 86, 0.02);
  border: 1px solid rgba(183, 88, 86, 0.05);
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  color: var(--primary-foreground);
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
}

.card-icon svg {
  width: 24px;
  height: 24px;
  color: inherit;
}

.card:hover .card-icon {
  transform: scale(1.05);
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.animate-fade-in-up {
  animation: fadeInUp 0.8s ease forwards;
}

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

/* Staggered animations */
.grid-3 .card:nth-child(1) { animation-delay: 0.1s; }
.grid-3 .card:nth-child(2) { animation-delay: 0.2s; }
.grid-3 .card:nth-child(3) { animation-delay: 0.3s; }

.grid-4 > div:nth-child(1) { animation-delay: 0.1s; }
.grid-4 > div:nth-child(2) { animation-delay: 0.2s; }
.grid-4 > div:nth-child(3) { animation-delay: 0.3s; }
.grid-4 > div:nth-child(4) { animation-delay: 0.4s; }

/* Intersection Observer classes */
.fade-in-up {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s ease;
}

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

/* Subtle hover effects */
.hero-cta .btn {
  transition: all 0.2s ease;
}

.hero-cta .btn:hover {
  transform: translateY(-2px);
}

/* Loading States */
.loading {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-secondary);
}

.spinner {
  width: 1rem;
  height: 1rem;
  border: 2px solid var(--border-color);
  border-top: 2px solid var(--accent-blue);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Messages */
.message {
  padding: 1rem;
  border-radius: 0.5rem;
  margin: 1rem 0;
}

.message-success {
  background-color: var(--success-bg);
  border: 1px solid var(--success-color);
  color: var(--success-color);
}

.message-error {
  background-color: var(--error-bg);
  border: 1px solid var(--error-color);
  color: var(--error-color);
}

.message-warning {
  background-color: var(--warning-bg);
  border: 1px solid var(--warning-color);
  color: var(--warning-color);
}

/* Footer */
.footer {
  background-color: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: 3rem 0 2rem;
  margin-top: 4rem;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-section h4 {
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.footer-links {
  list-style: none;
  padding: 0;
}

.footer-links li {
  margin-bottom: 0.5rem;
}

.footer-links a {
  color: var(--text-secondary);
  transition: color 0.3s ease;
}

.footer-links a:hover {
  color: var(--accent-hover);
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
  color: var(--text-muted);
}

/* Responsive Design */
@media (max-width: 1024px) {
  .container {
    padding: 0 2rem;
  }
  
  .grid-3, .grid-4 {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }
}

@media (max-width: 768px) {
  .container {
    padding: 0 1.5rem;
  }

  /* Navigation */
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: var(--bg-primary);
    border-top: 1px solid var(--border-color);
    flex-direction: column;
    padding: 1.5rem;
    gap: 1rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(20px);
  }

  .nav-links li:last-child {
    margin-left: 0 !important;
    padding-left: 0 !important;
  }

  .nav-links.open {
    display: flex;
  }

  /* Show mobile-only items in dropdown */
  .nav-links .mobile-only {
    display: list-item;
  }

  .mobile-menu-toggle {
    display: block;
  }

  /* Hide waitlist button in mobile navbar - available in menu dropdown */
  .nav-controls .btn-primary {
    display: none;
  }

  /* Language switcher mobile styles */
  .language-switcher {
    padding: 0.5rem;
    margin-right: 0.5rem;
    min-width: 2.5rem;
    min-height: 2.5rem;
  }

  .nav-links li a {
    display: block;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
  }

  .nav-links li:last-child a {
    border-bottom: none;
  }

  /* Hero Section - Adjust for navbar */
  .hero {
    padding: clamp(6rem, 12vw, 8rem) 0 clamp(3rem, 6vw, 5rem);
    padding-top: 6rem;
  }

  /* Typography */
  .hero h1 {
    font-size: clamp(2rem, 6vw, 2.5rem);
    line-height: 1.2;
    margin-bottom: 1.5rem;
  }

  .hero p {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 2rem;
  }

  h2 {
    font-size: clamp(1.75rem, 5vw, 2.25rem);
  }

  h3 {
    font-size: 1.25rem;
  }

  /* Sections */
  .section {
    padding: 4rem 0;
  }

  .section-tight {
    padding: 3rem 0;
  }

  /* Grids */
  .grid-3, .grid-4 {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  /* Cards */
  .card {
    padding: 2rem 1.5rem;
  }

  .card-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
  }

  /* Hero CTA */
  .hero-cta {
    flex-direction: column;
    align-items: center;
    gap: 1rem;
  }

  .hero-cta .btn {
    width: 100%;
    max-width: 280px;
  }

  /* Problem Analysis Interface */
  .problem-analysis-container {
    margin: 1rem;
    max-width: none;
  }

  .problem-input-wrapper {
    padding: 1rem;
  }

  .problem-input {
    font-size: 16px; /* Prevents zoom on iOS */
    min-height: 80px;
  }

  .action-bar {
    padding: 0.75rem 1rem;
  }

  .file-attachment-btn {
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
  }

  .analyze-submit {
    padding: 0.75rem 1.25rem;
    font-size: 0.8rem;
  }



  /* Buttons */
  .btn {
    padding: 0.875rem 1.5rem;
  }

  .btn-primary, .btn-secondary {
    font-size: 0.95rem;
  }

  /* Footer */
  .footer {
    padding: 2.5rem 0 2rem;
  }

  .footer-content {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 1rem;
  }

  /* Hero Section - Extra padding for very small screens */
  .hero {
    padding-top: 6rem !important;
  }

  /* Typography */
  .hero h1 {
    font-size: clamp(1.75rem, 7vw, 2rem);
    line-height: 1.3;
  }

  .hero p {
    font-size: 1rem;
    margin-bottom: 1.5rem;
  }

  h2 {
    font-size: clamp(1.5rem, 6vw, 1.75rem);
  }

  /* Sections */
  .section {
    padding: 3rem 0;
  }

  .section-tight {
    padding: 2rem 0;
  }

  /* Cards */
  .card {
    padding: 1.5rem 1rem;
  }

  .card h3 {
    font-size: 1.125rem;
  }

  /* Stats */
  .grid-4 > div {
    text-align: center;
  }

  .grid-4 > div > div {
    font-size: 2.5rem !important;
  }

  /* Problem Analysis Interface */
  .problem-analysis-container {
    margin: 0.75rem;
  }

  .problem-input-wrapper {
    padding: 0.75rem;
  }

  .problem-input {
    min-height: 60px;
    font-size: 16px;
  }

  .action-bar {
    padding: 0.5rem 0.75rem;
  }

  .file-attachment-btn {
    padding: 0.375rem 0.5rem;
    font-size: 0.75rem;
  }

  .analyze-submit {
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
  }



  /* Footer */
  .footer {
    padding: 2rem 0 1.5rem;
  }

  .footer-content {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

/* Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-1 { margin-top: 0.25rem; }

/* Back to Top Button */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 3rem;
  height: 3rem;
  background-color: var(--brand-red);
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  transition: all 200ms cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background-color: var(--brand-red-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-xl);
}

.back-to-top:active {
  transform: translateY(0);
  scale: 0.95;
}

@media (max-width: 768px) {
  .back-to-top {
    bottom: 1.5rem;
    right: 1.5rem;
    width: 2.75rem;
    height: 2.75rem;
    font-size: 1.125rem;
  }
}

/* Waitlist Modal */
.modal-overlay {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  background-color: rgba(0, 0, 0, 0.6) !important;
  z-index: 10000 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 1rem !important;
  backdrop-filter: blur(4px) !important;
  box-sizing: border-box !important;
  margin: 0 !important;
  border: none !important;
}

.modal-overlay.hidden {
  display: none !important;
}

.modal-content {
  background: var(--background) !important;
  border-radius: var(--radius) !important;
  box-shadow: var(--shadow-xl) !important;
  max-width: 500px !important;
  width: 100% !important;
  max-height: 90vh !important;
  overflow-y: auto !important;
  position: relative !important;
  border: 1px solid var(--border) !important;
  margin: 0 auto !important;
  flex-shrink: 0 !important;
}

.modal-header {
  padding: 2rem 2rem 1rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h2 {
  margin: 0;
  color: var(--text-primary);
  font-size: 1.5rem;
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--muted-foreground);
  padding: 0.5rem;
  border-radius: 0.25rem;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
}

.modal-close:hover {
  background-color: var(--muted);
  color: var(--text-primary);
}

.modal-body {
  padding: 1.5rem 2rem 2rem;
}

.modal-body .form-group {
  margin-bottom: 1.5rem;
}

.modal-body .form-group:last-of-type {
  margin-bottom: 2rem;
}

.modal-body label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--text-primary);
  font-size: 0.9rem;
}

.modal-body input {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background-color: var(--background);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.9rem;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.modal-body input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--primary), 0 0 0 0.1rem var(--background);
}

.modal-body input::placeholder {
  color: var(--muted-foreground);
}

/* Mobile modal adjustments */
@media (max-width: 768px) {
  .modal-content {
    margin: 1rem;
    max-width: none;
    width: calc(100% - 2rem);
  }

  .modal-header,
  .modal-body {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }

  .modal-header h2 {
    font-size: 1.25rem;
  }
}
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }

.hidden { display: none !important; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Honeypot field (hidden from users, visible to bots) */
.honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
  tab-index: -1;
}

/* Mobile landscape orientation fix */
@media (max-width: 768px) and (orientation: landscape) {
  .hero {
    padding-top: 8rem !important;
    padding-bottom: 2rem !important;
  }

  .hero h1 {
    font-size: clamp(1.75rem, 5vw, 2.25rem);
    line-height: 1.2;
    margin-bottom: 1rem;
  }

  .hero p {
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 2rem;
  }

  .problem-analysis-container {
    margin-top: 1.5rem;
  }
}