/* ============================================================
   WhatsApp Landing Page — Shared Styles (style.css)
   Theme: Deep Green → Lime Gradient, Playful & Natural
   ============================================================ */

/* ---------- Design Tokens ---------- */
:root {
  /* Colors */
  --c-brand-start: #0a6e4f;
  --c-brand-mid: #0d8b5f;
  --c-brand-end: #7cd664;
  --c-accent: #25d366;
  --c-bg-primary: #ffffff;
  --c-bg-secondary: #f4faf6;
  --c-bg-tertiary: #e8f5ec;
  --c-text-primary: #1a2e23;
  --c-text-secondary: #4a6354;
  --c-text-muted: #6b8576;
  --c-border: #d4e6da;
  --c-white: #ffffff;
  --c-card-shadow: rgba(10, 110, 79, 0.08);

  /* Typography */
  --ff-display: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --ff-body: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  --fs-hero: clamp(2.2rem, 5vw, 4rem);
  --fs-h1: clamp(1.8rem, 4vw, 2.8rem);
  --fs-h2: clamp(1.5rem, 3vw, 2.2rem);
  --fs-h3: clamp(1.2rem, 2.5vw, 1.6rem);
  --fs-body: clamp(1rem, 1.5vw, 1.125rem);
  --fs-small: 0.875rem;
  --lh-tight: 1.15;
  --lh-normal: 1.7;
  --tracking-wide: 0.02em;

  /* Spacing */
  --section-padding-y: clamp(3rem, 8vw, 6rem);
  --container-max: 1200px;
  --gutter: clamp(1rem, 3vw, 2rem);

  /* Animation */
  --anim-duration-slow: 8s;
  --anim-duration-med: 5s;
  --anim-duration-fast: 3s;
}

/* ---------- Reset & Base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--ff-body);
  font-size: var(--fs-body);
  line-height: var(--lh-normal);
  color: var(--c-text-primary);
  background-color: var(--c-bg-primary);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--c-border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand img {
  width: 32px;
  height: 32px;
}

.brand-name {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: var(--tracking-wide);
  color: var(--c-brand-start);
}

.nav-list {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.nav-link {
  font-size: 0.938rem;
  color: var(--c-text-secondary);
  transition: color 0.2s;
  position: relative;
}

.nav-link:hover,
.nav-link[aria-current="page"] {
  color: var(--c-brand-start);
}

.nav-link[aria-current="page"]::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--c-accent);
  border-radius: 1px;
}

.header-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: 100px;
  font-size: var(--fs-small);
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, background 0.3s;
  outline: none;
}

.btn:focus-visible {
  outline: 3px solid var(--c-accent);
  outline-offset: 3px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--c-brand-start), var(--c-brand-mid));
  color: var(--c-white);
  box-shadow: 0 4px 14px rgba(10, 110, 79, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(10, 110, 79, 0.4);
}

.btn-secondary {
  background: var(--c-bg-tertiary);
  color: var(--c-brand-start);
}

.btn-secondary:hover {
  background: var(--c-border);
}

.btn-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* ---------- Hero ---------- */
.hero {
  padding: clamp(4rem, 10vw, 7rem) 0 clamp(3rem, 8vw, 5rem);
  background: linear-gradient(175deg, var(--c-bg-secondary) 0%, var(--c-bg-primary) 60%);
  position: relative;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.hero-content h1 {
  font-size: var(--fs-hero);
  font-weight: 800;
  line-height: var(--lh-tight);
  letter-spacing: -0.02em;
  color: var(--c-text-primary);
  margin-bottom: 1rem;
}

.hero-content .gradient-text {
  background: linear-gradient(135deg, var(--c-brand-start), var(--c-accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  color: var(--c-text-secondary);
  line-height: var(--lh-normal);
  margin-bottom: 1.5rem;
  max-width: 520px;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
}

/* ---------- Section Titles ---------- */
.section-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: var(--fs-small);
  font-weight: 600;
  color: var(--c-brand-mid);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.75rem;
}

.section-title {
  font-size: var(--fs-h2);
  font-weight: 700;
  line-height: var(--lh-tight);
  color: var(--c-text-primary);
  margin-bottom: 0.5rem;
  text-wrap: balance;
}

.section-desc {
  font-size: var(--fs-body);
  color: var(--c-text-secondary);
  max-width: 600px;
  margin-bottom: 2.5rem;
  line-height: var(--lh-normal);
}

/* ---------- Section Wrapper ---------- */
.section {
  padding: var(--section-padding-y) 0;
}

.section-alt {
  background: var(--c-bg-secondary);
}

/* ---------- Feature Cards ---------- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
}

.feature-card {
  background: var(--c-white);
  border: 1px solid var(--c-border);
  border-radius: 16px;
  padding: 1.75rem;
  transition: box-shadow 0.3s, transform 0.2s;
}

.feature-card:hover {
  box-shadow: 0 8px 24px var(--c-card-shadow);
  transform: translateY(-3px);
}

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--c-bg-tertiary), var(--c-bg-secondary));
}

.feature-icon svg {
  width: 24px;
  height: 24px;
  stroke: var(--c-brand-start);
  fill: none;
  stroke-width: 1.8;
}

.feature-card h3 {
  font-size: var(--fs-h3);
  font-weight: 600;
  margin-bottom: 0.6rem;
  color: var(--c-text-primary);
}

.feature-card p {
  color: var(--c-text-secondary);
  line-height: var(--lh-normal);
  font-size: 0.95rem;
}

/* ---------- Dual-column Sections ---------- */
.dual-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.visual-block {
  position: relative;
  background: linear-gradient(145deg, var(--c-bg-secondary), var(--c-bg-tertiary));
  border-radius: 20px;
  padding: 2rem;
  min-height: 360px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.visual-block svg {
  max-width: 100%;
  height: auto;
}

/* ---------- Scenario Cards ---------- */
.scenario-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.scenario-card {
  display: flex;
  gap: 1.25rem;
  padding: 1.5rem;
  background: var(--c-white);
  border: 1px solid var(--c-border);
  border-radius: 14px;
  transition: box-shadow 0.25s;
}

.scenario-card:hover {
  box-shadow: 0 4px 16px var(--c-card-shadow);
}

.scenario-number {
  font-size: 1.6rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--c-brand-start), var(--c-accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  min-width: 36px;
}

.scenario-content h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: var(--c-text-primary);
}

.scenario-content p {
  color: var(--c-text-secondary);
  font-size: 0.938rem;
  line-height: 1.65;
}

/* ---------- Steps ---------- */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  counter-reset: step-counter;
}

.step-item {
  counter-increment: step-counter;
  padding: 1.5rem;
  background: var(--c-white);
  border: 1px solid var(--c-border);
  border-radius: 14px;
  position: relative;
}

.step-item::before {
  content: counter(step-counter);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--c-brand-start), var(--c-accent));
  color: var(--c-white);
  font-size: 0.875rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.step-item h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: var(--c-text-primary);
}

.step-item p {
  font-size: 0.9rem;
  color: var(--c-text-secondary);
  line-height: 1.6;
}

/* ---------- Table ---------- */
.platform-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.938rem;
  background: var(--c-white);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px var(--c-card-shadow);
}

.platform-table thead {
  background: linear-gradient(135deg, var(--c-brand-start), var(--c-brand-mid));
  color: var(--c-white);
}

.platform-table th {
  padding: 14px 20px;
  text-align: left;
  font-weight: 600;
  font-size: 0.875rem;
}

.platform-table td {
  padding: 14px 20px;
  border-bottom: 1px solid var(--c-border);
  color: var(--c-text-secondary);
}

.platform-table tr:last-child td {
  border-bottom: none;
}

.platform-table tbody tr:hover {
  background: var(--c-bg-tertiary);
}

/* ---------- FAQ ---------- */
.faq-list {
  max-width: 800px;
  margin: 0 auto;
}

details {
  border: 1px solid var(--c-border);
  border-radius: 12px;
  margin-bottom: 0.75rem;
  background: var(--c-white);
  overflow: hidden;
  transition: box-shadow 0.2s;
}

details:hover {
  box-shadow: 0 2px 10px var(--c-card-shadow);
}

details[open] {
  box-shadow: 0 4px 16px var(--c-card-shadow);
}

summary {
  padding: 1.1rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--c-text-primary);
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  user-select: none;
}

summary::-webkit-details-marker { display: none; }

summary::marker { display: none; content: ""; }

summary::after {
  content: '';
  width: 20px;
  height: 20px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234a6354' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  transition: transform 0.3s;
  flex-shrink: 0;
}

details[open] > summary::after {
  transform: rotate(180deg);
}

.details-content {
  padding: 0 1.5rem 1.2rem;
  color: var(--c-text-secondary);
  line-height: 1.7;
  font-size: 0.938rem;
}

/* ---------- News Cards ---------- */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.news-card {
  background: var(--c-white);
  border: 1px solid var(--c-border);
  border-radius: 16px;
  overflow: hidden;
  transition: box-shadow 0.3s, transform 0.2s;
}

.news-card:hover {
  box-shadow: 0 8px 24px var(--c-card-shadow);
  transform: translateY(-3px);
}

.news-card-body {
  padding: 1.5rem;
}

.news-date {
  display: block;
  font-size: 0.8rem;
  color: var(--c-text-muted);
  margin-bottom: 0.5rem;
}

.news-card h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--c-text-primary);
  line-height: 1.4;
}

.news-card p {
  font-size: 0.9rem;
  color: var(--c-text-secondary);
  line-height: 1.65;
  margin-bottom: 1rem;
}

/* ---------- Read More Links ---------- */
.read-more-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem 2rem;
}

.read-more-item {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 0.6rem 0;
  border-bottom: 1px dashed var(--c-border);
  transition: color 0.2s;
}

.read-more-item:hover {
  color: var(--c-brand-start);
}

.read-more-item::before {
  content: '→';
  color: var(--c-accent);
  font-size: 1.1rem;
  flex-shrink: 0;
}

.read-more-item span {
  font-size: 0.938rem;
  color: var(--c-text-secondary);
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--c-text-primary);
  color: rgba(255, 255, 255, 0.7);
  padding: 3rem 0 2rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-brand img {
  width: 28px;
  height: 28px;
}

.footer-brand-name {
  font-size: 1rem;
  font-weight: 600;
  color: var(--c-white);
}

.footer-links {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.footer-links a {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.6);
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--c-accent);
}

.footer-bottom {
  text-align: center;
  padding-top: 1.5rem;
  font-size: 0.813rem;
  color: rgba(255, 255, 255, 0.4);
}

/* ---------- Download Section ---------- */
.download-section {
  background: linear-gradient(145deg, var(--c-brand-start), var(--c-brand-mid));
  color: var(--c-white);
  border-radius: 20px;
  padding: clamp(2.5rem, 6vw, 4rem);
  margin-top: 2rem;
}

.download-section .section-title,
.download-section .section-desc,
.download-section .section-label {
  color: var(--c-white);
}

.download-section .section-label {
  opacity: 0.8;
}

.download-section .section-desc {
  opacity: 0.9;
}

.download-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.download-info-item {
  padding: 1rem;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
}

.download-info-item label {
  display: block;
  font-size: 0.8rem;
  opacity: 0.7;
  margin-bottom: 0.3rem;
}

.download-info-item strong {
  font-size: 1rem;
  font-weight: 600;
}

.download-btn-large {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 40px;
  background: var(--c-white);
  color: var(--c-brand-start);
  border-radius: 100px;
  font-size: 1.1rem;
  font-weight: 700;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s, box-shadow 0.2s;
}

.download-btn-large:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 6px 28px rgba(0, 0, 0, 0.3);
}

.install-steps {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.install-steps h3 {
  font-size: var(--fs-h3);
  margin-bottom: 1.25rem;
}

.install-steps .steps-grid {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.install-steps .step-item {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

.install-steps .step-item::before {
  background: var(--c-white);
  color: var(--c-brand-start);
}

.install-steps .step-item h3,
.install-steps .step-item p {
  color: var(--c-white);
}

.install-steps .step-item p {
  opacity: 0.8;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero-grid,
  .dual-grid {
    grid-template-columns: 1fr;
  }

  .hero-visual { order: -1; }

  .nav-list { display: none; }
}

@media (max-width: 600px) {
  .feature-grid,
  .news-grid {
    grid-template-columns: 1fr;
  }

  .steps-grid {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    flex-direction: column;
    text-align: center;
  }
}

/* ---------- Reduced Motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html { scroll-behavior: auto; }

  .draw, .spin-slow, .pulse-gentle, .progress-ring-animate {
    animation: none !important;
  }
}

/* ========== SVG Animations ========== */

/* Progress ring stroke drawing */
.progress-ring-animate {
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
  animation: draw-progress 6s ease-in-out infinite;
}

@keyframes draw-progress {
  0% { stroke-dashoffset: 1; }
  50% { stroke-dashoffset: 0; }
  100% { stroke-dashoffset: 1; }
}

/* Arc sweep animation */
.arc-animate {
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
  animation: arc-sweep 7s ease-in-out infinite;
}

@keyframes arc-sweep {
  0% { stroke-dashoffset: 1; }
  40% { stroke-dashoffset: 0; }
  80% { stroke-dashoffset: 0; }
  100% { stroke-dashoffset: 1; }
}

/* Slow rotation */
.spin-slow {
  animation: spin-slow 12s linear infinite;
  transform-box: fill-box;
  transform-origin: center;
}

@keyframes spin-slow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Gentle pulse */
.pulse-gentle {
  animation: pulse-gentle 4s ease-in-out infinite;
}

@keyframes pulse-gentle {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

/* Wave motion */
.wave-animate {
  animation: wave-move 5s ease-in-out infinite;
}

@keyframes wave-move {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

/* Slide in from bottom */
.slide-up {
  animation: slide-up-anim 0.6s ease-out both;
}

@keyframes slide-up-anim {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Stagger children */
.stagger > *:nth-child(1) { animation-delay: 0ms; }
.stagger > *:nth-child(2) { animation-delay: 100ms; }
.stagger > *:nth-child(3) { animation-delay: 200ms; }
.stagger > *:nth-child(4) { animation-delay: 300ms; }
.stagger > *:nth-child(5) { animation-delay: 400ms; }
.stagger > *:nth-child(6) { animation-delay: 500ms; }
