/* 
 * styles.css
 * Modern design system for MeowUSB Homepage (home_v2)
 */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Outfit:wght@500;600;700;800&display=swap');

/* --- Design Tokens --- */
:root {
  /* Colors */
  --bg-primary: #f8fafc;        /* slate-50 */
  --bg-secondary: #ffffff;      /* pure white */
  --bg-tertiary: #f1f5f9;       /* slate-100 */
  
  --primary: #4f46e5;           /* indigo-600 */
  --primary-hover: #4338ca;     /* indigo-700 */
  --primary-light: #e0e7ff;     /* indigo-100 */
  
  --text-main: #0f172a;         /* slate-900 */
  --text-body: #334155;         /* slate-700 */
  --text-muted: #64748b;        /* slate-500 */
  
  --border: #e2e8f0;            /* slate-200 */
  --border-focus: #cbd5e1;      /* slate-300 */
  
  --success: #059669;           /* green-600 */
  --success-bg: #ecfdf5;        /* green-50 */
  --warning: #d97706;           /* amber-600 */
  --warning-bg: #fffbeb;        /* amber-50 */
  
  /* Typography */
  --font-display: 'Outfit', system-ui, -apple-system, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -2px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.06), 0 4px 6px -4px rgba(0, 0, 0, 0.06);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.08);
  --shadow-premium: 0 30px 60px -15px rgba(15, 23, 42, 0.12), 0 10px 20px -5px rgba(15, 23, 42, 0.04);
  
  /* Transitions */
  --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  
  /* Spacing / Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-primary);
  color: var(--text-body);
  line-height: 1.6;
  overflow-x: hidden;
}

/* --- Typography --- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--text-main);
  font-weight: 700;
  line-height: 1.25;
}

h1 {
  font-size: 3rem;
  letter-spacing: -0.02em;
}

h2 {
  font-size: 2.25rem;
  letter-spacing: -0.01em;
}

h3 {
  font-size: 1.5rem;
}

p {
  color: var(--text-body);
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

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

/* --- Layout Utilities --- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
}

.section {
  padding: 96px 0;
}

.section-alt {
  background-color: var(--bg-secondary);
}

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

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 9999px;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background-color: var(--primary-light);
  color: var(--primary);
}

/* --- Buttons & CTAs --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1.0625rem;
  padding: 14px 28px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-normal);
  border: 1px solid transparent;
  outline: none;
}

.btn-primary {
  background-color: var(--primary);
  color: #ffffff;
  box-shadow: 0 4px 14px 0 rgba(79, 70, 229, 0.4);
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px 0 rgba(79, 70, 229, 0.5);
  color: #ffffff;
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-outline {
  background-color: transparent;
  border: 2px solid var(--border);
  color: var(--text-main);
}

.btn-outline:hover {
  border-color: var(--text-main);
  background-color: var(--bg-tertiary);
  transform: translateY(-2px);
}

/* --- Header / Navigation --- */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  transition: all var(--transition-normal);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.35rem;
  color: var(--text-main);
}

.logo-icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.logo-icon img,
.footer-logo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}

.nav-link {
  font-weight: 500;
  font-size: 0.9375rem;
  color: var(--text-body);
}

.nav-link:hover {
  color: var(--primary);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* Language Dropdown Selector */
.lang-selector {
  position: relative;
  display: inline-block;
}

.lang-btn {
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-body);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all var(--transition-fast);
}

.lang-btn:hover {
  background-color: var(--border);
}

.lang-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  background-color: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xl);
  min-width: 160px;
  list-style: none;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all var(--transition-normal);
  z-index: 1000;
  overflow: hidden;
}

.lang-selector:hover .lang-dropdown,
.lang-dropdown.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.lang-item {
  display: block;
  cursor: pointer;
  padding: 10px 16px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-body);
  transition: all var(--transition-fast);
}

/* In the per-locale builds the dropdown items are <a> links. */
a.lang-item {
  color: var(--text-body);
  text-decoration: none;
}

.lang-item:hover {
  background-color: var(--bg-tertiary);
  color: var(--primary);
}

.lang-item.active {
  background-color: var(--primary-light);
  color: var(--primary);
  font-weight: 600;
}

/* --- Hero Section --- */
.hero-wrapper {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
  padding: 48px 0 96px;
}

.hero-content {
  max-width: 580px;
}

.hero-headline {
  font-size: 3.5rem;
  line-height: 1.15;
  margin-bottom: 20px;
}

.hero-headline span {
  background: linear-gradient(135deg, var(--primary) 0%, #3b82f6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subcopy {
  font-size: 1.25rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 36px;
}

.hero-cta-group {
  margin-bottom: 16px;
}

.hero-trustline {
  font-size: 0.875rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.hero-visual {
  display: flex;
  justify-content: center;
  position: relative;
}

.hero-mockup-wrapper {
  width: 100%;
  max-width: 500px;
  background-color: var(--bg-secondary);
  border-radius: var(--radius-xl);
  padding: 6px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-premium);
  transform: rotate(-1deg);
  transition: transform var(--transition-slow);
  animation: float 6s ease-in-out infinite;
}

.hero-mockup-wrapper:hover {
  transform: rotate(0deg) scale(1.02);
}

.hero-mockup {
  width: 100%;
  height: auto;
  border-radius: calc(var(--radius-xl) - 6px);
  display: block;
}

@keyframes float {
  0% { transform: translateY(0px) rotate(-1deg); }
  50% { transform: translateY(-10px) rotate(0.5deg); }
  100% { transform: translateY(0px) rotate(-1deg); }
}

/* --- Section Headings --- */
.section-header {
  max-width: 680px;
  margin: 0 auto 64px;
}

.section-pretitle {
  color: var(--primary);
  font-family: var(--font-body);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.875rem;
  margin-bottom: 12px;
  display: block;
}

.section-title {
  font-size: 2.25rem;
  margin-bottom: 16px;
}

.section-subtitle {
  color: var(--text-muted);
  font-size: 1.125rem;
}

/* --- Problem Section --- */
.problem-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.problem-card {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px;
  transition: all var(--transition-normal);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.problem-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: #cbd5e1;
}

.problem-icon-wrapper {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  background-color: #fef2f2; /* red-50 */
  color: #ef4444; /* red-500 */
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  font-size: 1.25rem;
}

.problem-title {
  margin-bottom: 12px;
  font-size: 1.25rem;
}

.problem-desc {
  color: var(--text-muted);
  font-size: 0.9375rem;
}

/* --- How It Works Section --- */
.how-works-container {
  max-width: 800px;
  margin: 0 auto;
}

.step-card {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px 32px;
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 24px;
  align-items: center;
  position: relative;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
}

.step-card:hover {
  border-color: var(--primary);
  transform: translateX(4px);
  box-shadow: var(--shadow-md);
}

.step-number {
  width: 48px;
  height: 48px;
  background-color: var(--primary-light);
  color: var(--primary);
  border-radius: 9999px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.35rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.step-text {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.step-title {
  font-size: 1.15rem;
  margin-bottom: 4px;
}

.step-desc {
  color: var(--text-muted);
  font-size: 0.875rem;
}

.step-icon {
  color: var(--text-muted);
  font-size: 1.5rem;
  opacity: 0.7;
}

.warn-banner {
  background-color: var(--warning-bg);
  border: 1px solid #fde68a; /* amber-200 */
  border-radius: var(--radius-md);
  padding: 16px 20px;
  margin-top: 32px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  color: #92400e; /* amber-800 */
  font-size: 0.875rem;
}

.warn-icon {
  font-size: 1.25rem;
  flex-shrink: 0;
  margin-top: 2px;
}

/* --- Features Section --- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.feature-card {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  transition: all var(--transition-normal);
  height: 100%;
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-light);
}

.feature-icon-wrapper {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  background-color: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  font-size: 1.25rem;
}

.feature-title {
  margin-bottom: 8px;
  font-size: 1.15rem;
}

.feature-desc {
  color: var(--text-muted);
  font-size: 0.875rem;
  line-height: 1.5;
}

/* --- Comparison Section --- */
.comparison-container {
  max-width: 960px;
  margin: 0 auto;
  overflow-x: auto;
}

.comp-table {
  width: 100%;
  border-collapse: collapse;
  background-color: var(--bg-secondary);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
  min-width: 600px;
}

.comp-table th, .comp-table td {
  padding: 18px 24px;
  text-align: left;
}

.comp-table th {
  background-color: var(--bg-tertiary);
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--text-main);
  border-bottom: 2px solid var(--border);
  font-size: 0.9375rem;
}

.comp-table th:first-child {
  width: 35%;
}

.comp-table th:not(:first-child) {
  text-align: center;
  width: 21.6%;
}

.comp-table td {
  border-bottom: 1px solid var(--border);
  font-size: 0.9375rem;
}

.comp-table td:not(:first-child) {
  text-align: center;
}

.comp-table tr:last-child td {
  border-bottom: none;
}

.comp-table tbody tr:hover {
  background-color: #fafafa;
}

.comp-feature-name {
  font-weight: 600;
  color: var(--text-main);
}

.comp-table td.highlight {
  font-weight: 600;
  color: var(--primary);
  background-color: rgba(79, 70, 229, 0.02);
}

.th-highlight {
  background-color: var(--primary-light) !important;
  color: var(--primary) !important;
}

.recommend-badge {
  display: block;
  font-size: 0.625rem;
  font-weight: 800;
  background-color: var(--primary);
  color: #ffffff;
  padding: 2px 8px;
  border-radius: 9999px;
  letter-spacing: 0.05em;
  margin: 0 auto 6px;
  width: fit-content;
  text-transform: uppercase;
}

.check-icon {
  color: var(--success);
  font-weight: bold;
  font-size: 1.15rem;
}

.cross-icon {
  color: var(--text-muted);
  opacity: 0.4;
  font-size: 1.15rem;
}

/* --- Confidence / Trust row --- */
.trust-row {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 40px;
  margin-top: 64px;
  padding-top: 48px;
  border-top: 1px dashed var(--border);
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 12px;
}

.trust-icon {
  font-size: 1.75rem;
  color: var(--primary);
}

.trust-title {
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--text-main);
  line-height: 1.2;
}

.trust-desc {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

/* --- Final CTA Section --- */
.cta-section {
  padding: 120px 0;
  position: relative;
  background: radial-gradient(circle at 10% 20%, rgba(224, 231, 255, 0.5) 0%, rgba(248, 250, 252, 0.5) 90%);
}

.cta-box {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 80px 48px;
  max-width: 900px;
  margin: 0 auto;
  box-shadow: var(--shadow-xl);
  position: relative;
  overflow: hidden;
}

.cta-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary) 0%, #3b82f6 100%);
}

.cta-title {
  font-size: 2.5rem;
  margin-bottom: 16px;
}

.cta-desc {
  font-size: 1.125rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto 36px;
}

/* --- Footer --- */
.footer {
  background-color: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 48px 0;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.footer-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--text-main);
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 24px;
  list-style: none;
}

.footer-link {
  color: var(--text-muted);
}

.footer-link:hover {
  color: var(--primary);
}

.footer-langs {
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer-lang-btn {
  background: none;
  border: none;
  font-family: var(--font-body);
  font-size: 0.8125rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: color var(--transition-fast);
}

.footer-lang-btn:hover, .footer-lang-btn.active {
  color: var(--primary);
  font-weight: 600;
}

/* --- Responsive Adaptations --- */
@media (max-width: 1024px) {
  h1 { font-size: 2.75rem; }
  .hero-wrapper {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 40px;
    padding-bottom: 48px;
  }
  .hero-content {
    max-width: 100%;
    margin: 0 auto;
  }
  .hero-cta-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
  }
  .hero-trustline {
    justify-content: center;
  }
  .hero-mockup-wrapper {
    margin: 0 auto;
  }
  .problem-grid, .features-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .section {
    padding: 64px 0;
  }
  .nav-links {
    display: none; /* simple hide navigation on mobile */
  }
  .nav-container {
    justify-content: space-between;
  }
  .problem-grid, .features-grid {
    grid-template-columns: 1fr;
  }
  .comp-table th, .comp-table td {
    padding: 12px 16px;
    font-size: 0.8125rem;
  }
  .comp-table th:first-child {
    width: 40%;
  }
  .cta-box {
    padding: 48px 24px;
  }
  .cta-title {
    font-size: 2rem;
  }
  .footer-container {
    flex-direction: column;
    text-align: center;
  }
  .footer-links {
    justify-content: center;
    width: 100%;
  }
  .footer-langs {
    justify-content: center;
    width: 100%;
  }
  .step-text {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
  .step-icon {
    display: none;
  }
}
