/* ========================================
   CodeShift — MATLAB to Python Migration
   styles.css
   ======================================== */

/* --- Reset & Base --- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --color-bg: #fafafa;
  --color-bg-alt: #f3f4f6;
  --color-surface: #ffffff;
  --color-text: #111827;
  --color-text-secondary: #6b7280;
  --color-primary: #6366f1;
  --color-primary-dark: #4f46e5;
  --color-primary-light: #a5b4fc;
  --color-accent: #8b5cf6;
  --color-success: #22c55e;
  --color-danger: #ef4444;
  --color-border: #e5e7eb;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.1);
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --max-width: 1200px;
}

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

body {
  font-family: var(--font-sans);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
  font-size: 16px;
}

img, svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

/* --- Container --- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* --- Navbar --- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.navbar.scrolled {
  border-bottom-color: var(--color-border);
  box-shadow: var(--shadow-sm);
}

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

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--color-text);
}

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

.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-text-secondary);
  transition: color var(--transition);
}

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

/* --- Language Switcher --- */
.lang-switch {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--color-text-secondary);
  background: transparent;
  border: 1.5px solid var(--color-border);
  border-radius: 6px;
  padding: 4px 12px;
  cursor: pointer;
  letter-spacing: 0.04em;
  transition: all var(--transition);
  line-height: 1.4;
}

.lang-switch:hover {
  color: var(--color-text);
  border-color: var(--color-text-secondary);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
  transition: var(--transition);
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}

.btn-sm {
  padding: 10px 24px;
  font-size: 0.9rem;
  font-weight: 700;
  border-radius: var(--radius-sm);
  background: var(--color-primary);
  color: #fff;
  letter-spacing: 0.01em;
}

.nav-links .btn-sm,
.btn-sm:hover {
  background: var(--color-primary-dark);
  color: #fff;
}

.btn-primary {
  background: var(--color-primary);
  color: #fff;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
  background: var(--color-primary-dark);
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.4);
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--color-text-secondary);
  border: 1px solid var(--color-border);
}

.btn-ghost:hover {
  border-color: var(--color-text-secondary);
  color: var(--color-text);
}

.btn-light {
  background: #fff;
  color: var(--color-primary);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.btn-light:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.btn-full {
  width: 100%;
}

/* --- Badge / Label --- */
.badge {
  display: inline-block;
  padding: 6px 16px;
  background: rgba(99, 102, 241, 0.1);
  color: var(--color-primary);
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 100px;
  letter-spacing: 0.02em;
  margin-bottom: 20px;
}

.label {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-primary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 12px;
}

.label--light {
  color: var(--color-primary-light);
}

/* --- Hero --- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 72px;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(99, 102, 241, 0.08) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 20%, rgba(139, 92, 246, 0.06) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 80%, rgba(99, 102, 241, 0.04) 0%, transparent 60%);
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 780px;
  padding: 80px 24px;
}

.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 24px;
  color: var(--color-text);
}

.hero-sub {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  color: var(--color-text-secondary);
  line-height: 1.7;
  max-width: 600px;
  margin-bottom: 40px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* --- Sections --- */
.section {
  padding: 100px 0;
}

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

.section-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 60px;
}

.section-header h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.section-sub {
  font-size: 1.05rem;
  color: var(--color-text-secondary);
  line-height: 1.7;
}

/* --- Cost Section --- */
.cost-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 24px;
  align-items: start;
  margin-bottom: 40px;
}

.cost-card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--color-border);
}

.cost-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.cost-card-header h3 {
  font-size: 1.1rem;
  font-weight: 700;
}

.cost-card ul li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 12px 0;
  border-bottom: 1px solid var(--color-border);
  gap: 12px;
}

.cost-card ul li:last-child {
  border-bottom: none;
}

.cost-card ul li strong {
  font-size: 0.9rem;
  font-weight: 600;
}

.cost-card ul li span {
  font-size: 0.85rem;
  color: var(--color-text-secondary);
  text-align: right;
  flex-shrink: 0;
}

.cost-card--proprietary {
  border-color: rgba(239, 68, 68, 0.2);
}

.cost-card--open {
  border-color: rgba(34, 197, 94, 0.2);
}

.cost-card-footer {
  margin-top: 20px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  text-align: center;
}

.cost-card-footer--bad {
  background: rgba(239, 68, 68, 0.06);
  color: var(--color-danger);
}

.cost-card-footer--good {
  background: rgba(34, 197, 94, 0.06);
  color: var(--color-success);
}

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

.cost-vs span {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-text-secondary);
  background: var(--color-bg-alt);
  padding: 10px 16px;
  border-radius: 100px;
}

.cost-note {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}

.cost-note p {
  font-size: 0.95rem;
  color: var(--color-text-secondary);
  line-height: 1.7;
}

/* --- Advantages Grid --- */
.advantages-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.advantage-card {
  background: var(--color-surface);
  border-radius: var(--radius);
  padding: 28px 24px;
  border: 1px solid var(--color-border);
  transition: all var(--transition);
}

.advantage-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.advantage-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(99, 102, 241, 0.08);
  border-radius: var(--radius-sm);
  color: var(--color-primary);
  margin-bottom: 16px;
}

.advantage-card h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.advantage-card p {
  font-size: 0.88rem;
  color: var(--color-text-secondary);
  line-height: 1.6;
}

/* --- Process Grid --- */
.process-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-bottom: 48px;
}

.process-step {
  text-align: center;
  padding: 32px 20px;
  position: relative;
}

.step-number {
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--color-primary);
  opacity: 0.15;
  margin-bottom: 12px;
  line-height: 1;
}

.process-step h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.process-step p {
  font-size: 0.88rem;
  color: var(--color-text-secondary);
  line-height: 1.6;
}

/* --- Guarantees --- */
.guarantees {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 24px;
}

.guarantee {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-text-secondary);
}

/* --- Audience Grid --- */
.audience-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.audience-card {
  background: var(--color-surface);
  border-radius: var(--radius);
  padding: 32px 28px;
  border: 1px solid var(--color-border);
  transition: all var(--transition);
}

.audience-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.audience-icon {
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(99, 102, 241, 0.08);
  border-radius: var(--radius);
  color: var(--color-primary);
  margin-bottom: 20px;
}

.audience-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.audience-card p {
  font-size: 0.9rem;
  color: var(--color-text-secondary);
  line-height: 1.6;
}

/* --- ROI Section --- */
.section--roi {
  background: linear-gradient(135deg, #1e1b4b 0%, #312e81 50%, #3b0764 100%);
  color: #fff;
  padding: 100px 0;
}

.roi-content {
  text-align: center;
  max-width: 720px;
  margin: 0 auto;
}

.roi-content h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
}

.roi-content > p {
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.7;
  margin-bottom: 48px;
}

.roi-stats {
  display: flex;
  justify-content: center;
  gap: 60px;
  margin-bottom: 48px;
}

.roi-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.roi-stat-value {
  font-size: 2.4rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}

.roi-stat-label {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.5);
  font-weight: 500;
}

/* --- Contact Form --- */
.contact-form {
  max-width: 640px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-text);
}

.form-group input,
.form-group textarea {
  font-family: var(--font-sans);
  font-size: 0.95rem;
  padding: 14px 16px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  color: var(--color-text);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: #9ca3af;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

/* --- Form Success --- */
.form-success {
  display: none;
  text-align: center;
  max-width: 480px;
  margin: 0 auto;
  padding: 48px 24px;
}

.form-success.visible {
  display: block;
  animation: fadeUp 0.5s ease;
}

.form-success svg {
  margin: 0 auto 20px;
}

.form-success h3 {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.form-success p {
  font-size: 0.95rem;
  color: var(--color-text-secondary);
  line-height: 1.7;
}

/* --- Footer --- */
.footer {
  background: var(--color-text);
  color: rgba(255, 255, 255, 0.7);
  padding-top: 60px;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-brand {
  max-width: 300px;
}

.footer-brand .logo {
  margin-bottom: 12px;
  color: #fff;
}

.footer-brand p {
  font-size: 0.88rem;
  line-height: 1.6;
}

.footer-links {
  display: flex;
  gap: 60px;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-col h4 {
  font-size: 0.8rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.4);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 4px;
}

.footer-col a {
  font-size: 0.88rem;
  transition: color var(--transition);
}

.footer-col a:hover {
  color: #fff;
}

.footer-bottom {
  padding: 24px 24px;
  text-align: center;
}

.footer-bottom p {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.3);
}

/* --- Animations --- */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

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

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --- Responsive --- */
@media (max-width: 1024px) {
  .advantages-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--color-surface);
    flex-direction: column;
    padding: 24px;
    gap: 16px;
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--shadow-md);
    transform: translateY(-120%);
    opacity: 0;
    transition: transform var(--transition), opacity var(--transition);
    pointer-events: none;
  }

  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
  }

  .hero-content {
    padding: 60px 24px;
  }

  .section {
    padding: 72px 0;
  }

  .cost-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .cost-vs {
    order: 0;
  }

  .advantages-grid {
    grid-template-columns: 1fr;
  }

  .process-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .audience-grid {
    grid-template-columns: 1fr;
  }

  .roi-stats {
    flex-direction: column;
    gap: 24px;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .footer-content {
    flex-direction: column;
  }

  .footer-links {
    gap: 40px;
  }

  .guarantees {
    flex-direction: column;
    align-items: center;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 1.9rem;
  }

  .section-header h2 {
    font-size: 1.6rem;
  }

  .roi-content h2 {
    font-size: 1.6rem;
  }

  .roi-stat-value {
    font-size: 2rem;
  }
}
