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

:root {
  --gradient-primary: linear-gradient(135deg, #d4380d, #e8611a, #f7941d);
  --gradient-hero: linear-gradient(160deg, #c41d1d 0%, #e8511a 40%, #f7941d 100%);
  --gradient-card: linear-gradient(135deg, #fff5f0, #fff1eb, #fff8f0);
  --gradient-text: linear-gradient(135deg, #d4380d, #e8611a, #f7941d);
  --color-primary: #e8511a;
  --color-secondary: #d4380d;
  --color-accent: #f7941d;
  --color-dark: #1a0a00;
  --color-text: #2d1a0a;
  --color-text-light: #7a5a42;
  --color-white: #fff;
  --color-bg: #fffaf7;
  --radius-sm: 14px;
  --radius-md: 20px;
  --radius-lg: 28px;
  --radius-full: 100px;
  --shadow-card: 0 4px 24px rgba(232, 81, 26, 0.06), 0 1px 4px rgba(0, 0, 0, 0.04);
  --shadow-hover: 0 16px 48px rgba(232, 81, 26, 0.14), 0 4px 12px rgba(0, 0, 0, 0.06);
  --shadow-glow: 0 0 40px rgba(232, 81, 26, 0.2);
  --font-heading: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-body: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-bg);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ===== Nav ===== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(255, 250, 247, 0.85);
  backdrop-filter: blur(20px) saturate(1.5);
  -webkit-backdrop-filter: blur(20px) saturate(1.5);
  border-bottom: 1px solid rgba(232, 81, 26, 0.06);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.7rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 800;
  text-decoration: none;
  color: var(--color-dark);
  letter-spacing: -0.5px;
  flex-shrink: 0;
}

.nav-logo-img {
  width: 34px;
  height: 34px;
  border-radius: 9px;
}

.nav-links {
  display: flex;
  gap: 1.5rem;
  margin-left: auto;
}

.nav-link {
  text-decoration: none;
  color: var(--color-text-light);
  font-weight: 600;
  font-size: 0.88rem;
  letter-spacing: 0.01em;
  transition: color 0.2s;
  white-space: nowrap;
  position: relative;
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--gradient-primary);
  border-radius: 1px;
  transform: scaleX(0);
  transition: transform 0.25s ease;
}

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

.nav-link:hover::after {
  transform: scaleX(1);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.btn-nav {
  background: var(--gradient-primary);
  color: var(--color-white);
  padding: 8px 20px;
  font-size: 0.85rem;
  box-shadow: 0 2px 12px rgba(232, 81, 26, 0.25);
  white-space: nowrap;
  letter-spacing: 0.01em;
}

.btn-nav:hover {
  box-shadow: 0 6px 24px rgba(232, 81, 26, 0.35);
}

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

.lang-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  background: rgba(255, 255, 255, 0.8);
  border: 1.5px solid rgba(232, 81, 26, 0.1);
  border-radius: var(--radius-full);
  padding: 7px 14px;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 700;
  font-family: var(--font-body);
  color: var(--color-text);
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
  white-space: nowrap;
}

.lang-btn:hover {
  border-color: var(--color-primary);
  background: rgba(255, 255, 255, 1);
}

.lang-arrow {
  font-size: 0.55rem;
  opacity: 0.4;
  transition: transform 0.25s;
}

.lang-dropdown.open .lang-arrow {
  transform: rotate(180deg);
}

.lang-menu {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(232, 81, 26, 0.08);
  border-radius: var(--radius-sm);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.1), 0 2px 8px rgba(0, 0, 0, 0.04);
  list-style: none;
  padding: 6px 0;
  min-width: 150px;
  z-index: 200;
}

.lang-dropdown.open .lang-menu {
  display: block;
  animation: dropIn 0.2s ease;
}

@keyframes dropIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

.lang-menu li {
  padding: 9px 18px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--color-text);
  cursor: pointer;
  transition: background 0.15s, color 0.15s, padding-left 0.15s;
}

.lang-menu li:hover {
  background: rgba(232, 81, 26, 0.04);
  color: var(--color-primary);
  padding-left: 22px;
}

.lang-menu li.active {
  color: var(--color-primary);
  font-weight: 700;
}

/* ===== Hero ===== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 7rem 1.5rem 5rem;
  background: var(--gradient-hero);
  background-size: 200% 200%;
  animation: heroShift 12s ease-in-out infinite;
  overflow: hidden;
}

@keyframes heroShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(255, 255, 255, 0.15) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(255, 200, 100, 0.1) 0%, transparent 40%),
    radial-gradient(ellipse at 50% 100%, rgba(0, 0, 0, 0.08) 0%, transparent 50%);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 820px;
}

.hero-top {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-full);
  padding: 6px 22px 6px 6px;
  margin-bottom: 2rem;
}

.hero-logo {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  transition: transform 0.4s ease;
  flex-shrink: 0;
}

.hero-logo:hover {
  transform: scale(1.08) rotate(-2deg);
}

.hero-badge {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-white);
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.hero-title {
  font-family: var(--font-heading);
  font-size: clamp(2.6rem, 6vw, 4.5rem);
  font-weight: 900;
  color: var(--color-white);
  line-height: 1.08;
  margin-bottom: 1.25rem;
  letter-spacing: -2px;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
  white-space: nowrap;
}

.hero-sub {
  font-size: clamp(1.05rem, 2.2vw, 1.3rem);
  color: rgba(255, 255, 255, 0.92);
  line-height: 1.65;
  margin-bottom: 2.5rem;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
  font-weight: 400;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ===== Buttons ===== */
.btn {
  display: inline-block;
  text-decoration: none;
  font-family: var(--font-heading);
  font-weight: 700;
  border-radius: var(--radius-full);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  cursor: pointer;
  border: none;
  letter-spacing: 0.01em;
}

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

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

.btn-primary {
  background: var(--color-white);
  color: var(--color-primary);
  padding: 15px 38px;
  font-size: 1.05rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12), 0 0 0 0 rgba(255, 255, 255, 0.3);
}

.btn-primary:hover {
  box-shadow: 0 10px 36px rgba(0, 0, 0, 0.18), 0 0 0 3px rgba(255, 255, 255, 0.15);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(8px);
  color: var(--color-white);
  padding: 15px 38px;
  font-size: 1.05rem;
  border: 1.5px solid rgba(255, 255, 255, 0.4);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.7);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.btn-lg {
  padding: 17px 42px;
  font-size: 1.1rem;
}

/* ===== Decorative Emojis ===== */
.hero-deco {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.deco-emoji {
  position: absolute;
  font-size: 2.8rem;
  animation: float 7s ease-in-out infinite;
  opacity: 0.35;
  filter: blur(0.5px);
}

.deco-1 { top: 15%; left: 6%; animation-delay: 0s; font-size: 3.5rem; }
.deco-2 { top: 22%; right: 8%; animation-delay: 1.2s; }
.deco-3 { bottom: 22%; left: 10%; animation-delay: 2.4s; }
.deco-4 { top: 8%; right: 22%; animation-delay: 0.6s; font-size: 2.2rem; }
.deco-5 { bottom: 12%; right: 6%; animation-delay: 1.8s; font-size: 3.2rem; }
.deco-6 { bottom: 32%; left: 28%; animation-delay: 3s; font-size: 2rem; }

@keyframes float {
  0%, 100% { transform: translateY(0) rotate(0deg) scale(1); }
  33% { transform: translateY(-18px) rotate(6deg) scale(1.04); }
  66% { transform: translateY(-8px) rotate(-4deg) scale(0.98); }
}

/* ===== How It Works ===== */
.how-it-works {
  padding: 7rem 1.5rem;
  max-width: 1000px;
  margin: 0 auto;
}

.steps {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 0;
}

.step {
  flex: 1;
  text-align: center;
  padding: 0 1.5rem;
  position: relative;
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--gradient-primary);
  color: var(--color-white);
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1rem;
  margin-bottom: 1.25rem;
  box-shadow: 0 4px 16px rgba(232, 81, 26, 0.25);
}

.step-icon {
  font-size: 3.2rem;
  margin-bottom: 1rem;
}

.step-title {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--color-dark);
  margin-bottom: 0.6rem;
  letter-spacing: -0.3px;
}

.step-desc {
  font-size: 0.93rem;
  color: var(--color-text-light);
  line-height: 1.65;
}

.step-connector {
  width: 60px;
  height: 2px;
  background: var(--gradient-primary);
  margin-top: 72px;
  flex-shrink: 0;
  border-radius: 1px;
  opacity: 0.4;
}

/* ===== Section Title ===== */
.section-title {
  text-align: center;
  font-family: var(--font-heading);
  font-size: clamp(2rem, 4.5vw, 2.8rem);
  font-weight: 900;
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 3.5rem;
  letter-spacing: -0.8px;
}

/* ===== Features ===== */
.features {
  padding: 7rem 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
}

.feature-card {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(232, 81, 26, 0.06);
  border-radius: var(--radius-md);
  padding: 2.25rem 2rem;
  transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-primary);
  opacity: 0;
  transition: opacity 0.35s ease;
}

.feature-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(232, 81, 26, 0.1);
}

.feature-card:hover::before {
  opacity: 1;
}

.feature-icon {
  font-size: 2.8rem;
  margin-bottom: 1.25rem;
  display: inline-block;
  transition: transform 0.35s ease;
}

.feature-card:hover .feature-icon {
  transform: scale(1.15);
}

.feature-title {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--color-dark);
  margin-bottom: 0.65rem;
  letter-spacing: -0.3px;
}

.feature-desc {
  font-size: 0.95rem;
  color: var(--color-text-light);
  line-height: 1.7;
}

/* ===== Fade-in Animation ===== */
.fade-in {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Stagger delays */
.feature-card:nth-child(1) { transition-delay: 0s; }
.feature-card:nth-child(2) { transition-delay: 0.08s; }
.feature-card:nth-child(3) { transition-delay: 0.16s; }
.feature-card:nth-child(4) { transition-delay: 0.24s; }
.feature-card:nth-child(5) { transition-delay: 0.32s; }
.feature-card:nth-child(6) { transition-delay: 0.4s; }

/* ===== Stats ===== */
.stats {
  background: var(--gradient-hero);
  background-size: 200% 200%;
  animation: heroShift 12s ease-in-out infinite;
  padding: 5rem 1.5rem;
  position: relative;
}

.stats::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 50%, rgba(255, 255, 255, 0.06) 0%, transparent 70%);
}

.stats-inner {
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
  gap: 2rem;
  position: relative;
}

.stat {
  text-align: center;
  min-width: 150px;
}

.stat-number {
  display: block;
  font-family: var(--font-heading);
  font-size: 3rem;
  font-weight: 900;
  color: var(--color-white);
  line-height: 1.1;
  letter-spacing: -1px;
}

.stat-plus {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.7);
}

.stat-label {
  display: block;
  margin-top: 0.6rem;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.75);
  font-weight: 500;
  letter-spacing: 0.02em;
}

/* ===== Testimonials ===== */
.testimonials {
  padding: 7rem 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
}

.testimonial-card {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(232, 81, 26, 0.06);
  border-radius: var(--radius-md);
  padding: 2.25rem 2rem;
  box-shadow: var(--shadow-card);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
  position: relative;
}

.testimonial-card::before {
  content: "\201C";
  position: absolute;
  top: 16px;
  right: 20px;
  font-size: 4rem;
  font-family: Georgia, serif;
  line-height: 1;
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  opacity: 0.15;
}

.testimonial-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
}

.testimonial-stars {
  color: var(--color-accent);
  font-size: 1.1rem;
  margin-bottom: 1rem;
  letter-spacing: 3px;
}

.testimonial-text {
  font-size: 0.98rem;
  color: var(--color-text);
  line-height: 1.7;
  margin-bottom: 1.5rem;
  font-style: italic;
  font-weight: 400;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 12px;
}

.testimonial-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--gradient-primary);
  color: var(--color-white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1rem;
  flex-shrink: 0;
  box-shadow: 0 3px 10px rgba(232, 81, 26, 0.2);
}

.testimonial-name {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--color-dark);
}

.testimonial-role {
  font-size: 0.82rem;
  color: var(--color-text-light);
  font-weight: 400;
}

/* ===== CTA ===== */
.cta {
  background: var(--gradient-hero);
  background-size: 200% 200%;
  animation: heroShift 12s ease-in-out infinite;
  padding: 7rem 1.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 100%, rgba(0, 0, 0, 0.05) 0%, transparent 40%);
}

.cta-content {
  position: relative;
  z-index: 2;
  max-width: 620px;
  margin: 0 auto;
}

.cta-title {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 4.5vw, 2.8rem);
  font-weight: 900;
  color: var(--color-white);
  margin-bottom: 1.25rem;
  letter-spacing: -0.8px;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.08);
}

.cta-sub {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.65;
  margin-bottom: 2.5rem;
  font-weight: 400;
}

.cta-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.cta-note {
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.55);
  font-weight: 400;
}

/* ===== Footer ===== */
.footer {
  background: var(--color-dark);
  padding: 3.5rem 1.5rem;
  text-align: center;
}

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

.footer-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--color-white);
  margin-bottom: 0.75rem;
}

.footer-logo-img {
  width: 26px;
  height: 26px;
  border-radius: 6px;
}

.footer-copy {
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.88rem;
  margin-bottom: 1.25rem;
}

.footer-links {
  display: flex;
  gap: 2rem;
  justify-content: center;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.5);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--color-white);
}

/* ===== Responsive ===== */

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

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

  .testimonials-grid .testimonial-card:nth-child(3) {
    grid-column: 1 / -1;
    max-width: 480px;
    margin: 0 auto;
  }

  .deco-emoji {
    font-size: 2rem;
  }
}

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

  .btn-nav {
    display: none;
  }

  .nav-inner {
    justify-content: space-between;
  }

  .hero {
    min-height: auto;
    padding: 8rem 1.25rem 4.5rem;
  }

  .hero-title {
    letter-spacing: -1px;
    white-space: normal;
    font-size: clamp(2.2rem, 8vw, 3rem);
  }

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

  .steps {
    flex-direction: column;
    align-items: center;
    gap: 2rem;
  }

  .step {
    padding: 0;
    max-width: 320px;
  }

  .step-connector {
    width: 2px;
    height: 40px;
    margin: 0;
  }

  .how-it-works {
    padding: 4.5rem 1.25rem;
  }

  .features {
    padding: 4.5rem 1.25rem;
  }

  .features-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .feature-card {
    padding: 1.75rem 1.5rem;
  }

  .stats {
    padding: 3.5rem 1.25rem;
  }

  .stats-inner {
    gap: 1.5rem;
  }

  .stat {
    min-width: 120px;
  }

  .stat-number {
    font-size: 2.4rem;
  }

  .testimonials {
    padding: 4.5rem 1.25rem;
  }

  .testimonials-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .testimonials-grid .testimonial-card:nth-child(3) {
    max-width: none;
  }

  .cta {
    padding: 4.5rem 1.25rem;
  }

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

  .btn-lg {
    width: 100%;
    max-width: 300px;
    text-align: center;
  }

  .deco-emoji {
    font-size: 1.5rem;
    opacity: 0.25;
  }

  .section-title {
    margin-bottom: 2.5rem;
  }
}
