/* Landing Pages — Common Styles */

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

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans SC', 'Noto Sans TC', sans-serif;
  color: #1d1d1f;
  background: #fff;
  line-height: 1.5;
  overflow-x: hidden;
}

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

/* ── Animations ── */
.fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

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

.fade-up:nth-child(2) { transition-delay: 0.1s; }
.fade-up:nth-child(3) { transition-delay: 0.2s; }
.fade-up:nth-child(4) { transition-delay: 0.3s; }
.fade-up:nth-child(5) { transition-delay: 0.4s; }

/* ── Navigation ── */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  transition: background 0.3s;
}

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

.nav-brand {
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: #1d1d1f;
}

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

.nav-links a {
  font-size: 0.85rem;
  color: #6e6e73;
  transition: color 0.2s;
}

.nav-links a:hover {
  color: #1d1d1f;
}

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

.lang-btn {
  font-size: 0.82rem;
  color: #6e6e73;
  background: none;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  padding: 5px 12px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 4px;
}

.lang-btn:hover {
  border-color: rgba(0, 0, 0, 0.25);
  color: #1d1d1f;
}

.lang-btn::after {
  content: '';
  border: 4px solid transparent;
  border-top: 5px solid currentColor;
  margin-top: 2px;
}

.lang-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
  padding: 6px;
  min-width: 160px;
  z-index: 200;
}

.lang-dropdown.hidden {
  display: none;
}

.lang-option {
  display: block;
  width: 100%;
  text-align: left;
  font-size: 0.82rem;
  padding: 8px 12px;
  border: none;
  background: none;
  border-radius: 8px;
  cursor: pointer;
  color: #1d1d1f;
  transition: background 0.15s;
}

.lang-option:hover {
  background: #f5f5f7;
}

.lang-option.active {
  background: #0071e3;
  color: #fff;
}

/* Mobile nav */
.mobile-nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.mobile-nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: #1d1d1f;
  margin: 4px 0;
  border-radius: 1px;
}

/* Mobile nav menu — hidden by default */
.mobile-nav-menu {
  display: none;
}

/* ── Hero ── */
.hero {
  padding: 140px 24px 80px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero-gradient {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 50% at 50% -20%, rgba(0, 113, 227, 0.12), transparent);
  pointer-events: none;
}

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

.hero h1 {
  font-size: clamp(2.4rem, 6vw, 4rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 20px;
  color: #1d1d1f;
}

.hero p {
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  color: #6e6e73;
  max-width: 600px;
  margin: 0 auto 36px;
  line-height: 1.5;
}

/* ── Buttons ── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  font-size: 1rem;
  font-weight: 500;
  color: #fff;
  background: #0071e3;
  border: none;
  border-radius: 980px;
  cursor: pointer;
  transition: all 0.3s;
}

.btn-primary:hover {
  background: #0077ed;
  transform: scale(1.02);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  font-size: 1rem;
  font-weight: 500;
  color: #0071e3;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all 0.3s;
}

.btn-secondary:hover {
  text-decoration: underline;
}

.btn-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 16px 32px;
  font-size: 1.05rem;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, #0071e3, #34a4ff);
  border: none;
  border-radius: 980px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 113, 227, 0.3);
  transition: all 0.3s;
}

.btn-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 113, 227, 0.4);
}

/* ── Sections ── */
.section {
  padding: 100px 50px 50px 50px;
}

.section-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.section-title {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  text-align: center;
  margin-bottom: 16px;
}

.section-subtitle {
  font-size: 1.15rem;
  color: #6e6e73;
  text-align: center;
  max-width: 560px;
  margin: 0 auto 60px;
}

/* ── Extension Cards (Homepage) ── */
.extensions-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  max-width: 900px;
  margin: 0 auto;
}

.ext-card {
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 20px;
  padding: 36px 32px;
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.ext-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  border-radius: 20px 20px 0 0;
  transition: height 0.3s;
}

.ext-card:nth-child(1)::before { background: linear-gradient(90deg, #0071e3, #34a4ff); }
.ext-card:nth-child(2)::before { background: linear-gradient(90deg, #e84393, #fd79a8); }
.ext-card:nth-child(3)::before { background: linear-gradient(90deg, #00b894, #55efc4); }
.ext-card:nth-child(4)::before { background: linear-gradient(90deg, #6c5ce7, #a29bfe); }

.ext-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
  border-color: transparent;
}

.ext-card:hover::before {
  height: 6px;
}

.ext-card-icon {
  font-size: 2.4rem;
  margin-bottom: 16px;
}

.ext-card h3 {
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}

.ext-card p {
  font-size: 0.92rem;
  color: #6e6e73;
  line-height: 1.5;
  margin-bottom: 20px;
}

.ext-card .card-link {
  font-size: 0.9rem;
  font-weight: 500;
  color: #0071e3;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.ext-card .card-link::after {
  content: '→';
  transition: transform 0.2s;
}

.ext-card:hover .card-link::after {
  transform: translateX(4px);
}

/* ── Features Grid ── */
.features-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px;
}

.features-grid-5 {
  grid-template-columns: repeat(3, 1fr);
}

.feature-item {
  padding: 24px 0;
}

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 16px;
  background: #f5f5f7;
}

.feature-item h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}

.feature-item p {
  font-size: 0.92rem;
  color: #6e6e73;
  line-height: 1.6;
}

/* ── Pricing ── */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 26px;
  max-width: 1000px;
  margin: 0 auto;
}

.plan-card {
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 20px;
  padding: 32px 24px 16px;
  text-align: center;
  position: relative;
  transition: all 0.3s;
  display: flex;
  flex-direction: column;
  min-height: 280px;
}

.plan-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06);
}

.plan-card.popular {
  border-color: #0071e3;
  box-shadow: 0 4px 20px rgba(0, 113, 227, 0.15);
}

.plan-card.popular:hover {
  box-shadow: 0 8px 30px rgba(0, 113, 227, 0.2);
}

.plan-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: #0071e3;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 4px 14px;
  border-radius: 980px;
  white-space: nowrap;
}

.plan-name {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: #1d1d1f;
}

.plan-price-row {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 2px;
}

.plan-price {
  font-size: 2rem;
  font-weight: 700;
  color: #1d1d1f;
  letter-spacing: -0.02em;
}

.plan-price-period {
  font-size: 0.82rem;
  color: #6e6e73;
}

.plan-quota {
  font-size: 0.85rem;
  color: #0071e3;
  font-weight: 500;
  margin-bottom: 16px;
}

.plan-desc {
  font-size: 0.82rem;
  color: #6e6e73;
  line-height: 1.5;
  margin-bottom: 24px;
  min-height: 40px;
}

.plan-cta {
  display: inline-block;
  width: 100%;
  padding: 12px;
  font-size: 0.9rem;
  font-weight: 500;
  border: none;
  border-radius: 980px;
  cursor: pointer;
  transition: all 0.2s;
  margin-top: auto;
}

.plan-cta-primary {
  background: #0071e3;
  color: #fff;
}

.plan-cta-primary:hover {
  background: #0077ed;
}

.plan-cta-secondary {
  background: #f5f5f7;
  color: #1d1d1f;
}

.plan-cta-secondary:hover {
  background: #e8e8ed;
}

/* ── Share section ── */
.share-section {
  text-align: center;
  padding: 80px 24px 60px;
}

.share-title {
  font-size: 1.1rem;
  color: #1d1d1f;
  font-weight: 600;
  margin-bottom: 28px;
}

.share-buttons {
  display: flex;
  justify-content: center;
  gap: 32px;
  flex-wrap: wrap;
}

.share-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  background: none;
  border: none;
  cursor: pointer;
  transition: transform 0.2s;
}

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

.share-btn-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: box-shadow 0.2s;
}

.share-btn:hover .share-btn-icon {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.share-btn-icon.x {
  background: #000;
  color: #fff;
}

.share-btn-icon.facebook {
  background: #1877F2;
  color: #fff;
}

.share-btn-icon.linkedin {
  background: #0A66C2;
  color: #fff;
}

.share-btn-icon.copy-link {
  background: #6e6e73;
  color: #fff;
}

.share-btn-label {
  font-size: 0.8rem;
  color: #6e6e73;
}

.share-btn-icon svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

/* ── Footer ── */
.footer {
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  padding: 40px 24px;
  text-align: center;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.footer-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 24px;
  margin-bottom: 24px;
}

.footer-links a {
  font-size: 0.85rem;
  color: #6e6e73;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: #0071e3;
}

.footer-copy {
  font-size: 0.78rem;
  color: #86868b;
}

.footer-links--meta {
  margin-bottom: 16px;
}

/* ── Legal pages (privacy, etc.) ── */
.legal-page {
  padding: 120px 24px 80px;
}

.legal-inner {
  max-width: 720px;
  margin: 0 auto;
}

.legal-page h1 {
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.legal-updated {
  font-size: 0.88rem;
  color: #6e6e73;
  margin-bottom: 40px;
}

.legal-section {
  margin-bottom: 32px;
}

.legal-section h2 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 10px;
  color: #1d1d1f;
}

.legal-section p {
  font-size: 0.95rem;
  color: #424245;
  line-height: 1.65;
}

.legal-section a {
  color: #0071e3;
}

.legal-section a:hover {
  text-decoration: underline;
}

/* ── Detail hero (gradient per extension) ── */
.hero-te { background: linear-gradient(180deg, #fff 0%, #e8f4fd 100%); }
.hero-sc { background: linear-gradient(180deg, #fff 0%, #fde8f0 100%); }
.hero-dr { background: linear-gradient(180deg, #fff 0%, #e8fdf0 100%); }
.hero-rv { background: linear-gradient(180deg, #fff 0%, #ede8fd 100%); }

/* ── Responsive (desktop-first) ──
 * Default styles above target desktop (≥1025px).
 * Tablet  — max-width: 1024px  iPad / small laptop
 * Mobile  — max-width: 768px   phone layout
 * Narrow  — max-width: 480px   compact pricing on small phones
 */

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

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

@media (max-width: 768px) {
  .nav-links { display: none !important; }
  .mobile-nav-toggle { display: block; }

  .mobile-nav-menu {
    display: none;
    position: absolute;
    top: 52px;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    padding: 16px 24px;
  }

  .mobile-nav-menu.show {
    display: block;
  }

  .mobile-nav-menu a {
    display: block;
    padding: 10px 0;
    font-size: 0.9rem;
    color: #1d1d1f;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
  }

  .section {
    padding: 100px 20px 50px 20px;
  }

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

  .feature-item {
    padding: 12px 0;
  }

  .feature-icon {
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
    margin-bottom: 10px;
  }

  .feature-item h3 {
    font-size: 0.95rem;
    margin-bottom: 4px;
  }

  .feature-item p {
    font-size: 0.8rem;
  }

  .share-section {
    padding: 100px 24px 12px 24px;
  }

  .share-title {
    font-size: 0.95rem;
    margin-bottom: 20px;
  }

  .share-buttons {
    gap: 20px;
  }

  .share-btn-icon {
    width: 46px;
    height: 46px;
    border-radius: 12px;
  }

  .share-btn-icon svg {
    width: 18px;
    height: 18px;
  }

  .share-btn-label {
    font-size: 0.72rem;
  }
}

@media (max-width: 480px) {
  .pricing-grid {
    column-gap: 16px;
    row-gap: 20px;
  }

  .plan-card {
    padding: 16px 12px 16px;
    border-radius: 14px;
    min-height: 240px;
  }

  .plan-name { font-size: 0.95rem; }
  .plan-price { font-size: 1.5rem; }
  .plan-price-period { font-size: 0.72rem; }
  .plan-quota { font-size: 0.75rem; margin-bottom: 8px; }
  .plan-desc { font-size: 0.72rem; margin-bottom: 12px; min-height: auto; }
  .plan-cta { padding: 8px; font-size: 0.8rem; }
}
