/* ==============================================
   CastFlow Landing Page — landing.css
   ============================================== */

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

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: #1e293b;
  background: #ffffff;
  line-height: 1.6;
  overflow-x: hidden;
}

/* ---- Utilities ---- */
.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
}

.hide-mobile { display: inline; }
@media (max-width: 768px) { .hide-mobile { display: none; } }

.gradient-text {
  background: linear-gradient(135deg, #3b82f6, #8b5cf6, #ec4899);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: inherit;
  font-weight: 600;
  font-size: 15px;
  padding: 12px 28px;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.25s ease;
  text-decoration: none;
}

.btn-icon {
  font-size: 12px;
}

.btn-primary {
  background: linear-gradient(135deg, #3b82f6, #6366f1);
  color: #fff;
  box-shadow: 0 4px 16px rgba(59,130,246,0.3);
}
.btn-primary:hover {
  box-shadow: 0 6px 24px rgba(59,130,246,0.45);
  transform: translateY(-2px);
}

.btn-secondary {
  background: #f1f5f9;
  color: #334155;
}
.btn-secondary:hover {
  background: #e2e8f0;
}

.btn-lg { padding: 16px 36px; font-size: 16px; }

.btn-nav {
  background: rgba(59,130,246,0.1);
  color: #3b82f6;
  padding: 10px 20px;
  font-size: 14px;
}
.btn-nav:hover {
  background: rgba(59,130,246,0.2);
}

/* ---- Nav right group ---- */
.nav-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* ---- Language toggle ---- */
.lang-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: #475569;
  transition: all 0.2s ease;
}
.lang-toggle:hover {
  border-color: #3b82f6;
  background: rgba(59,130,246,0.04);
}
.lang-flag {
  font-size: 16px;
  line-height: 1;
}
.lang-code {
  letter-spacing: 0.05em;
}

/* ======================== NAV ======================== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0,0,0,0.06);
  transition: box-shadow 0.3s;
}
.nav.scrolled {
  box-shadow: 0 2px 20px rgba(0,0,0,0.06);
}

.nav-inner {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-weight: 700;
  font-size: 20px;
  color: #1e293b;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, #3b82f6, #6366f1);
  color: #fff;
  border-radius: 8px;
  font-size: 13px;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 32px;
}
.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: #64748b;
  text-decoration: none;
  transition: color 0.2s;
}
.nav-links a:hover { color: #1e293b; }

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

/* ======================== HERO ======================== */
.hero {
  position: relative;
  padding: 160px 24px 100px;
  text-align: center;
  overflow: hidden;
  background: linear-gradient(180deg, #f8faff 0%, #ffffff 100%);
}

.hero-bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(59,130,246,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(59,130,246,0.04) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black 30%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black 30%, transparent 100%);
}

.hero-content {
  position: relative;
  max-width: 720px;
  margin: 0 auto;
}

.hero-badge {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 999px;
  background: rgba(59,130,246,0.08);
  color: #3b82f6;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 24px;
}

.hero-title {
  font-size: 56px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
  color: #0f172a;
}

.hero-subtitle {
  font-size: 19px;
  color: #64748b;
  max-width: 560px;
  margin: 0 auto 36px;
  line-height: 1.7;
}
.hero-subtitle strong { color: #1e293b; }

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 48px;
}

.hero-stats {
  display: flex;
  gap: 24px;
  justify-content: center;
  align-items: center;
}
.stat {
  font-size: 14px;
  color: #94a3b8;
}
.stat-num {
  font-weight: 700;
  color: #475569;
}
.stat-sep {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #cbd5e1;
}

/* Floating decorations */
.hero-float {
  position: absolute;
  font-size: 40px;
  opacity: 0.15;
  animation: float 6s ease-in-out infinite;
  pointer-events: none;
}
.hero-float-1 { top: 20%; left: 8%; animation-delay: 0s; }
.hero-float-2 { top: 30%; right: 10%; animation-delay: 2s; }
.hero-float-3 { bottom: 20%; left: 15%; animation-delay: 4s; }

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-20px); }
}

/* ======================== SECTIONS ======================== */
.section {
  padding: 100px 0;
}
.section-alt {
  background: #f8fafc;
}

.section-header {
  text-align: center;
  margin-bottom: 64px;
}

.section-tag {
  display: inline-block;
  padding: 4px 14px;
  border-radius: 999px;
  background: rgba(59,130,246,0.08);
  color: #3b82f6;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 16px;
}

.section-header h2 {
  font-size: 40px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #0f172a;
  margin-bottom: 12px;
}

.section-desc {
  font-size: 17px;
  color: #64748b;
  max-width: 540px;
  margin: 0 auto;
}

/* ======================== FEATURES GRID ======================== */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

@media (max-width: 900px) { .features-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .features-grid { grid-template-columns: 1fr; } }

.feature-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 32px 28px;
  transition: all 0.3s ease;
}
.feature-card:hover {
  border-color: #c7d2fe;
  box-shadow: 0 8px 30px rgba(99,102,241,0.08);
  transform: translateY(-4px);
}

.feature-icon {
  font-size: 32px;
  margin-bottom: 16px;
}

.feature-card h3 {
  font-size: 17px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 8px;
}

.feature-card p {
  font-size: 14px;
  color: #64748b;
  line-height: 1.6;
}

/* ======================== USE CASES ======================== */
.usecases-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

@media (max-width: 768px) { .usecases-grid { grid-template-columns: 1fr; } }

.usecase-card {
  display: flex;
  gap: 20px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 28px;
  transition: all 0.3s ease;
}
.usecase-card:hover {
  border-color: #c7d2fe;
  box-shadow: 0 8px 30px rgba(99,102,241,0.08);
}

.usecase-icon {
  font-size: 36px;
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f8fafc;
  border-radius: 14px;
}

.usecase-body h3 {
  font-size: 17px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 6px;
}

.usecase-body p {
  font-size: 14px;
  color: #64748b;
  line-height: 1.6;
  margin-bottom: 10px;
}

.usecase-examples {
  font-size: 12px;
  color: #94a3b8;
  font-weight: 500;
}

/* ======================== HOW IT WORKS — Steps ======================== */
.steps-row {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  justify-content: center;
}

@media (max-width: 900px) {
  .steps-row { flex-direction: column; align-items: center; }
  .step-arrow { transform: rotate(90deg); }
}

.step-card {
  flex: 1;
  max-width: 320px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 32px 28px;
  text-align: center;
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, #3b82f6, #6366f1);
  color: #fff;
  font-weight: 700;
  font-size: 18px;
  margin-bottom: 16px;
}

.step-card h3 {
  font-size: 17px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 8px;
}

.step-card p {
  font-size: 14px;
  color: #64748b;
  line-height: 1.6;
  margin-bottom: 16px;
}

.step-arrow {
  font-size: 24px;
  color: #cbd5e1;
  font-weight: 700;
  margin-top: 60px;
  flex-shrink: 0;
}

.step-code {
  background: #0f172a;
  border-radius: 10px;
  padding: 16px;
  text-align: left;
  overflow-x: auto;
}

.step-code pre {
  margin: 0;
}

.step-code code {
  font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
  font-size: 12px;
  color: #e2e8f0;
  line-height: 1.6;
}

/* Mini player visual */
.step-visual {
  display: flex;
  justify-content: center;
}

.mini-player {
  width: 100%;
  max-width: 260px;
  background: #0f172a;
  border-radius: 10px;
  padding: 14px 16px;
}

.mini-player-bar {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mini-play {
  color: #3b82f6;
  font-size: 14px;
}

.mini-timeline {
  flex: 1;
  height: 4px;
  background: #334155;
  border-radius: 2px;
  overflow: hidden;
}

.mini-progress {
  width: 35%;
  height: 100%;
  background: linear-gradient(90deg, #3b82f6, #8b5cf6);
  border-radius: 2px;
  animation: mini-advance 3s ease-in-out infinite;
}

@keyframes mini-advance {
  0% { width: 10%; }
  50% { width: 70%; }
  100% { width: 10%; }
}

.mini-time {
  color: #94a3b8;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}

/* ======================== EXTENSION SECTION ======================== */
.extension-layout {
  display: flex;
  gap: 64px;
  align-items: center;
}

@media (max-width: 900px) {
  .extension-layout { flex-direction: column; gap: 40px; }
}

.extension-text {
  flex: 1;
}

.extension-text h2 {
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #0f172a;
  margin-bottom: 16px;
}

.extension-text p {
  font-size: 16px;
  color: #64748b;
  line-height: 1.7;
  margin-bottom: 24px;
}

.extension-features {
  list-style: none;
  margin-bottom: 32px;
}
.extension-features li {
  font-size: 15px;
  color: #334155;
  padding: 6px 0;
}

/* Browser mockup */
.extension-visual {
  flex: 1;
  max-width: 500px;
}

.browser-mockup {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.12), 0 0 0 1px rgba(0,0,0,0.06);
}

.browser-bar {
  background: #f1f5f9;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.browser-dots {
  display: flex;
  gap: 6px;
}
.browser-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #cbd5e1;
}
.browser-dots span:first-child { background: #fca5a5; }
.browser-dots span:nth-child(2) { background: #fcd34d; }
.browser-dots span:last-child { background: #86efac; }

.browser-url {
  flex: 1;
  background: #fff;
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 12px;
  color: #64748b;
}

.browser-ext-icon {
  flex-shrink: 0;
}

.ext-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: linear-gradient(135deg, #3b82f6, #6366f1);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
}

.browser-body {
  display: flex;
  background: #fff;
  height: 260px;
  position: relative;
}

.mock-sidebar {
  width: 60px;
  background: #f8fafc;
  padding: 16px 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-right: 1px solid #e2e8f0;
}

.mock-item {
  height: 8px;
  border-radius: 4px;
  background: #e2e8f0;
}
.mock-item.mock-active {
  background: #3b82f6;
}

.mock-content {
  flex: 1;
  padding: 20px;
  position: relative;
}

.mock-header-bar {
  height: 10px;
  width: 60%;
  background: #e2e8f0;
  border-radius: 4px;
  margin-bottom: 20px;
}

.mock-cards {
  display: flex;
  gap: 12px;
}

.mock-card {
  flex: 1;
  height: 80px;
  background: #f1f5f9;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}

.mock-spotlight {
  position: absolute;
  top: 60px;
  left: 90px;
  width: 100px;
  height: 80px;
  border-radius: 8px;
  box-shadow: 0 0 0 4px rgba(59,130,246,0.5), 0 0 0 2000px rgba(0,0,0,0.35);
  animation: mock-pulse 2.5s ease-in-out infinite;
}

@keyframes mock-pulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(59,130,246,0.5), 0 0 0 2000px rgba(0,0,0,0.35); }
  50% { box-shadow: 0 0 0 6px rgba(59,130,246,0.7), 0 0 0 2000px rgba(0,0,0,0.40); }
}

.mock-tooltip {
  position: absolute;
  top: 150px;
  left: 80px;
  background: #fff;
  border-radius: 10px;
  padding: 14px 16px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.15);
  width: 160px;
}

.mock-tooltip-title {
  height: 8px;
  width: 70%;
  background: #1e293b;
  border-radius: 3px;
  margin-bottom: 8px;
}
.mock-tooltip-text {
  height: 6px;
  width: 100%;
  background: #e2e8f0;
  border-radius: 3px;
  margin-bottom: 5px;
}
.mock-tooltip-text.short { width: 60%; }

/* ======================== COMPARISON TABLE ======================== */
.comparison-table-wrap {
  overflow-x: auto;
}

.comparison-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.comparison-table th,
.comparison-table td {
  padding: 16px 20px;
  text-align: left;
  border-bottom: 1px solid #e2e8f0;
}

.comparison-table th {
  font-weight: 600;
  color: #64748b;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.comparison-table th.comp-highlight,
.comparison-table td.comp-highlight {
  background: rgba(59,130,246,0.04);
  font-weight: 600;
  color: #1e293b;
}

.comparison-table th.comp-highlight {
  color: #3b82f6;
}

.comp-yes { color: #059669; }
.comp-no { color: #dc2626; }
.comp-partial { color: #d97706; }
.comp-na { color: #94a3b8; }

/* ======================== CTA ======================== */
.section-cta {
  background: linear-gradient(135deg, #0f172a, #1e293b);
  text-align: center;
  padding: 80px 0;
}
.section-cta h2 {
  font-size: 36px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 12px;
}
.section-cta p {
  font-size: 17px;
  color: #94a3b8;
  margin-bottom: 32px;
}

.cta-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.section-cta .btn-secondary {
  background: rgba(255,255,255,0.1);
  color: #fff;
}
.section-cta .btn-secondary:hover {
  background: rgba(255,255,255,0.2);
}

/* ======================== FOOTER ======================== */
.footer {
  padding: 32px 0;
  border-top: 1px solid #e2e8f0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-logo {
  font-weight: 700;
  font-size: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.footer p {
  font-size: 13px;
  color: #94a3b8;
}

@media (max-width: 600px) {
  .footer-inner {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }
}

/* ======================== RESPONSIVE ======================== */
@media (max-width: 768px) {
  .hero { padding: 120px 16px 60px; }
  .hero-title { font-size: 36px; }
  .hero-subtitle { font-size: 16px; }
  .section { padding: 64px 0; }
  .section-header h2 { font-size: 28px; }
  .extension-text h2 { font-size: 28px; }
}
