/* ============================================================
   AI Flow — Official CSS
   ============================================================ */

/* ---- CSS Variables & Reset ---- */
:root {
  --color-primary: #4F46E5;
  --color-primary-hover: #4338CA;
  --color-bg: #fff;
  --color-text: #1E293B;
  --color-muted: #64748B;
  --color-border: #E2E8F0;
  --radius: 8px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
    'Helvetica Neue', Arial, sans-serif;
  color: var(--color-text);
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}

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

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

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

.logo svg {
  flex-shrink: 0;
}

.nav {
  display: flex;
  gap: 32px;
}

.nav-link {
  text-decoration: none;
  color: var(--color-muted);
  font-size: 15px;
  font-weight: 500;
  transition: color 0.2s;
}

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

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

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

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

/* ---- Buttons ---- */
.btn-text {
  text-decoration: none;
  color: var(--color-text);
  font-size: 14px;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: var(--radius);
  transition: background 0.2s;
}

.btn-text:hover {
  background: #F1F5F9;
}

.btn-primary {
  background: var(--color-primary);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  border-radius: var(--radius);
  transition: background 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

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

.btn-sm {
  padding: 8px 18px;
  font-size: 14px;
}

.btn-md {
  padding: 12px 32px;
  font-size: 16px;
}

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

.btn-outline {
  border: 1.5px solid var(--color-border);
  color: var(--color-text);
  text-decoration: none;
  font-weight: 600;
  border-radius: var(--radius);
  padding: 12px 32px;
  font-size: 16px;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-outline:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

/* ---- Language Switch ---- */
.lang-switch {
  position: relative;
}

.lang-toggle {
  display: flex;
  align-items: center;
  gap: 4px;
  background: none;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text);
  cursor: pointer;
  transition: border-color 0.2s;
}

.lang-toggle:hover {
  border-color: var(--color-primary);
}

.lang-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  list-style: none;
  min-width: 120px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
  z-index: 200;
}

.lang-dropdown.show {
  display: block;
}

.lang-dropdown a {
  display: block;
  padding: 10px 16px;
  text-decoration: none;
  color: var(--color-text);
  font-size: 14px;
  transition: background 0.2s;
}

.lang-dropdown a:hover {
  background: #F8FAFC;
  color: var(--color-primary);
}

/* ---- Hero ---- */
.hero {
  padding: 100px 24px 80px;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #EEF2FF;
  color: var(--color-primary);
  font-size: 13px;
  font-weight: 600;
  padding: 6px 16px;
  border-radius: 50px;
  margin-bottom: 24px;
}

.hero h1 {
  font-size: clamp(32px, 5vw, 56px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
  background: linear-gradient(135deg, #1E293B 0%, #4F46E5 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: clamp(16px, 2.5vw, 20px);
  color: var(--color-muted);
  line-height: 1.7;
  margin-bottom: 36px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

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

.trusted {
  margin-top: 48px;
  font-size: 14px;
  color: var(--color-muted);
}

/* ---- Sections (Features / How / FAQ) ---- */
.section {
  padding: 80px 24px;
}

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

.section-header h2 {
  font-size: clamp(26px, 4vw, 40px);
  font-weight: 800;
  letter-spacing: -0.01em;
  margin-bottom: 16px;
}

.section-header p {
  font-size: 18px;
  color: var(--color-muted);
  line-height: 1.7;
}

/* Features Grid */
.features-grid {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.feature-card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 16px;
  padding: 40px 32px;
  transition: all 0.3s;
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(79, 70, 229, 0.08);
  border-color: var(--color-primary);
}

.feature-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  font-size: 24px;
}

.feature-icon.blue {
  background: #EEF2FF;
  color: #4F46E5;
}

.feature-icon.green {
  background: #ECFDF5;
  color: #059669;
}

.feature-icon.orange {
  background: #FFF7ED;
  color: #EA580C;
}

.feature-card h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 12px;
}

.feature-card p {
  font-size: 15px;
  color: var(--color-muted);
  line-height: 1.7;
}

/* How it Works */
.how {
  background: #F8FAFC;
}

.steps {
  max-width: 900px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  counter-reset: step;
}

.step {
  text-align: center;
  position: relative;
}

.step-number {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  font-size: 20px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}

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

.step p {
  font-size: 14px;
  color: var(--color-muted);
  line-height: 1.6;
}

.step-line {
  display: none;
}

/* FAQ */
.faq-list {
  max-width: 720px;
  margin: 0 auto;
}

.faq-item {
  border-bottom: 1px solid var(--color-border);
  padding: 24px 0;
}

.faq-item h3 {
  font-size: 17px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  user-select: none;
}

.faq-item h3::after {
  content: '+';
  font-size: 22px;
  color: var(--color-primary);
  flex-shrink: 0;
  transition: transform 0.3s;
}

.faq-item.open h3::after {
  content: '\00d7';
  transform: rotate(90deg);
}

.faq-item p {
  font-size: 15px;
  color: var(--color-muted);
  line-height: 1.7;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding-top 0.4s ease;
}

.faq-item.open p {
  max-height: 300px;
  padding-top: 12px;
}

/* CTA */
.cta {
  background: linear-gradient(135deg, #4F46E5 0%, #7C3AED 100%);
  color: #fff;
  text-align: center;
  padding: 80px 24px;
}

.cta h2 {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 800;
  margin-bottom: 16px;
}

.cta p {
  font-size: 18px;
  opacity: 0.9;
  margin-bottom: 32px;
}

.cta .btn-primary {
  background: #fff;
  color: var(--color-primary);
}

.cta .btn-primary:hover {
  background: #F1F5F9;
}

/* Pricing */
.pricing-grid {
  max-width: 900px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
  align-items: start;
}

.pricing-card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 16px;
  padding: 40px 32px;
  text-align: center;
  transition: all 0.3s;
  position: relative;
}

.pricing-card:hover {
  box-shadow: 0 20px 40px rgba(79, 70, 229, 0.08);
}

.pricing-card-featured {
  border-color: var(--color-primary);
  box-shadow: 0 8px 30px rgba(79, 70, 229, 0.12);
  transform: scale(1.03);
}

.pricing-badge {
  position: absolute;
  top: -13px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-primary);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 20px;
  border-radius: 50px;
  letter-spacing: 0.02em;
}

.pricing-card-header {
  margin-bottom: 20px;
}

.pricing-card-header h3 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 8px;
}

.pricing-tag {
  display: inline-block;
  font-size: 13px;
  color: var(--color-muted);
  background: #F8FAFC;
  padding: 3px 14px;
  border-radius: 50px;
}

.pricing-price {
  margin-bottom: 28px;
}

.pricing-amount {
  font-size: 42px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--color-text);
}

.pricing-features {
  list-style: none;
  margin-bottom: 32px;
  text-align: left;
  padding: 0;
}

.pricing-features li {
  padding: 8px 0;
  font-size: 14px;
  color: var(--color-muted);
  display: flex;
  align-items: center;
  gap: 10px;
}

.pricing-features li::before {
  content: '';
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  background: #ECFDF5;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%23059669' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");
  background-size: 10px 10px;
  background-position: center;
  background-repeat: no-repeat;
}

.pricing-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 14px 24px;
  font-size: 16px;
  font-weight: 600;
  border-radius: 10px;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.25s;
}

.pricing-btn-outline {
  background: #fff;
  color: var(--color-primary);
  border: 2px solid var(--color-primary);
}

.pricing-btn-outline:hover {
  background: var(--color-primary);
  color: #fff;
}

.pricing-btn-primary {
  background: var(--color-primary);
  color: #fff;
  border: 2px solid var(--color-primary);
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.3);
}

.pricing-btn-primary:hover {
  background: var(--color-primary-hover);
  border-color: var(--color-primary-hover);
  box-shadow: 0 6px 20px rgba(79, 70, 229, 0.4);
  transform: translateY(-1px);
}

/* ---- About Page ---- */
.page-header {
  padding: 80px 24px 48px;
  text-align: center;
  max-width: 700px;
  margin: 0 auto;
}

.page-header h1 {
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.page-header p {
  font-size: 18px;
  color: var(--color-muted);
  line-height: 1.7;
}

.content-section {
  padding: 0 24px 80px;
  max-width: 800px;
  margin: 0 auto;
}

.story,
.mission {
  padding: 64px 0;
  border-bottom: 1px solid var(--color-border);
}

.story h2,
.mission h2,
.values h2 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 20px;
}

.story p,
.mission p {
  font-size: 17px;
  color: var(--color-muted);
  line-height: 1.85;
}

.mission blockquote {
  font-size: 22px;
  font-weight: 600;
  color: var(--color-primary);
  border-left: 4px solid var(--color-primary);
  padding-left: 24px;
  margin: 24px 0;
  font-style: italic;
}

.values-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-top: 32px;
}

.value-card {
  background: #F8FAFC;
  border-radius: 12px;
  padding: 32px;
}

.value-card h3 {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 8px;
}

.value-card p {
  font-size: 14px;
  color: var(--color-muted);
  line-height: 1.7;
}

/* ---- Blog ---- */
.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;
}

.blog-header {
  max-width: 760px;
}

.blog-section {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px 88px;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.blog-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
}

.blog-card:hover {
  transform: translateY(-3px);
  border-color: #CBD5E1;
  box-shadow: 0 18px 34px rgba(15, 23, 42, 0.08);
}

.blog-card-media {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: linear-gradient(135deg, #EEF2FF 0%, #F8FAFC 50%, #ECFDF5 100%);
  color: var(--color-primary);
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.blog-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.blog-card:hover .blog-card-media img {
  transform: scale(1.04);
}

.blog-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 24px;
}

.blog-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-bottom: 12px;
  color: var(--color-muted);
  font-size: 13px;
}

.blog-card h2 {
  margin-bottom: 12px;
  font-size: 20px;
  line-height: 1.35;
}

.blog-card h2 a {
  color: var(--color-text);
  text-decoration: none;
}

.blog-card h2 a:hover {
  color: var(--color-primary);
}

.blog-card p {
  flex: 1;
  color: var(--color-muted);
  font-size: 15px;
  line-height: 1.75;
}

.blog-read-more,
.blog-back {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  margin-top: 22px;
  color: var(--color-primary);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.blog-read-more:hover,
.blog-back:hover {
  color: var(--color-primary-hover);
}

.blog-empty {
  max-width: 560px;
  margin: 0 auto;
  padding: 56px 24px;
  text-align: center;
  background: #F8FAFC;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
}

.blog-empty h2,
.blog-empty h1 {
  margin-bottom: 12px;
  font-size: 28px;
}

.blog-empty p {
  color: var(--color-muted);
}

.article-shell {
  max-width: 860px;
  margin: 0 auto;
  padding: 56px 24px 96px;
}

.article-header {
  padding: 26px 0 34px;
  border-bottom: 1px solid var(--color-border);
}

.article-header h1 {
  max-width: 780px;
  margin-bottom: 18px;
  font-size: clamp(32px, 5vw, 52px);
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.article-header p {
  max-width: 720px;
  color: var(--color-muted);
  font-size: 18px;
  line-height: 1.8;
}

.article-cover {
  display: block;
  width: 100%;
  max-height: 460px;
  margin: 36px 0;
  object-fit: cover;
  border-radius: var(--radius);
}

.article-content {
  padding-top: 34px;
  color: #334155;
  font-size: 18px;
  line-height: 1.9;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.article-empty {
  margin-top: 32px;
}

/* ---- Footer ---- */
.footer {
  background: #0F172A;
  color: #94A3B8;
  padding: 64px 24px 0;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 3fr;
  gap: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 18px;
  margin-bottom: 16px;
}

.footer-desc {
  font-size: 14px;
  line-height: 1.7;
  max-width: 320px;
}

.footer-email {
  display: inline-block;
  margin-top: 12px;
  color: #94A3B8;
  text-decoration: none;
  font-size: 14px;
  transition: color 0.2s;
}

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

.footer-links {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
}

.footer-col h4 {
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 16px;
}

.footer-col a {
  display: block;
  color: #94A3B8;
  text-decoration: none;
  font-size: 14px;
  padding: 6px 0;
  transition: color 0.2s;
}

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

.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
}

.footer-lang {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  justify-content: center;
}

.footer-lang a {
  color: #94A3B8;
  text-decoration: none;
  transition: color 0.2s;
}

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

/* ---- Responsive ---- */
@media (max-width: 768px) {
  /* Navigation */
  .nav {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: #fff;
    flex-direction: column;
    gap: 0;
    border-bottom: 1px solid var(--color-border);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
  }

  .nav.open {
    display: flex;
  }

  .nav-link {
    padding: 16px 24px;
    border-top: 1px solid var(--color-border);
  }

  .menu-toggle {
    display: flex;
  }

  .header-actions .btn-text {
    display: none;
  }

  /* Grid columns collapse */
  .features-grid,
  .steps,
  .blog-grid {
    grid-template-columns: 1fr;
  }

  .blog-section {
    padding-bottom: 64px;
  }

  .blog-card-body {
    padding: 20px;
  }

  .article-shell {
    padding-top: 36px;
  }

  .step::after {
    display: none !important;
  }

  /* About */
  .values-grid {
    grid-template-columns: 1fr;
  }

  /* Pricing */
  .pricing-grid {
    grid-template-columns: 1fr;
    max-width: 420px;
  }

  .pricing-card-featured {
    transform: none;
  }

  /* Footer */
  .footer-inner {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .footer-links {
    grid-template-columns: 1fr;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }

  .footer-lang {
    justify-content: center;
  }
}

@media (min-width: 769px) {
  .step {
    position: relative;
  }

  .step::after {
    content: '';
    position: absolute;
    top: 24px;
    left: calc(50% + 32px);
    width: calc(100% - 64px);
    height: 2px;
    background: var(--color-border);
  }

  .step:last-child::after {
    display: none;
  }
}
