/* =========================================
   WhatsApp Landing Site - Shared Styles
   Base variables, typography, layout, components, animations
   ========================================= */

:root {
  --color-primary: #25D366;
  --color-primary-dark: #1EBE57;
  --color-bg: #FFFFFF;
  --color-surface: #F8F9FA;
  --color-border: #E5E7EB;
  --color-text: #111827;
  --color-text-muted: #4B5563;
  --color-text-faint: #9CA3AF;
  --font-serif: 'Georgia', 'Noto Serif SC', 'SimSun', serif;
  --font-sans: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans SC', sans-serif;
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --shadow-card: 0 4px 12px rgba(0, 0, 0, 0.04);
  --shadow-hover: 0 8px 24px rgba(0, 0, 0, 0.08);
  --transition-base: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --max-width: 1200px;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-sans);
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

h1 { font-size: clamp(2.25rem, 5vw, 3.5rem); margin-bottom: 1rem; }
h2 { font-size: clamp(1.75rem, 3.5vw, 2.5rem); margin-bottom: 1.5rem; }
h3 { font-size: clamp(1.25rem, 2vw, 1.5rem); margin-bottom: 0.75rem; }

p { margin-bottom: 1rem; color: var(--color-text-muted); max-width: 75ch; }
strong { color: var(--color-text); font-weight: 600; }

a { color: var(--color-primary-dark); text-decoration: none; transition: color var(--transition-base); }
a:hover { color: var(--color-primary); }
a:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 4px; border-radius: 2px; }

/* Layout Utilities */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 5rem 0;
  position: relative;
}

.section-alt {
  background-color: var(--color-surface);
}

.grid {
  display: grid;
  gap: 2rem;
}

.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

/* Header & Navigation */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
  padding: 1rem 0;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--color-text);
  text-decoration: none;
}

.brand img {
  height: 36px;
  width: auto;
  object-fit: contain;
}

.main-nav ul {
  display: flex;
  list-style: none;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.main-nav a {
  color: var(--color-text-muted);
  font-weight: 500;
  font-size: 0.95rem;
  padding: 0.5rem 0;
  position: relative;
}

.main-nav a:hover,
.main-nav [aria-current="page"] {
  color: var(--color-primary-dark);
}

.main-nav [aria-current="page"]::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--color-primary);
  border-radius: 2px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.75rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all var(--transition-base);
  border: none;
  text-decoration: none;
}

.btn-primary {
  background-color: var(--color-primary);
  color: #FFFFFF;
  box-shadow: 0 4px 10px rgba(37, 211, 102, 0.3);
}

.btn-primary:hover {
  background-color: var(--color-primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(37, 211, 102, 0.4);
  color: #fff;
}

.btn-outline {
  background: transparent;
  border: 1.5px solid var(--color-border);
  color: var(--color-text);
}

.btn-outline:hover {
  border-color: var(--color-primary);
  color: var(--color-primary-dark);
  background: rgba(37, 211, 102, 0.05);
}

/* Cards */
.card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  transition: all var(--transition-base);
}

.card:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-hover);
  transform: translateY(-3px);
}

.card-icon {
  width: 48px;
  height: 48px;
  margin-bottom: 1rem;
  color: var(--color-primary);
}

.card-icon svg {
  width: 100%;
  height: 100%;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--color-border);
  font-size: 0.85rem;
  color: var(--color-text-faint);
}

/* Table */
.table-wrapper {
  overflow-x: auto;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-bg);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

th, td {
  padding: 1rem 1.25rem;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
}

th {
  background: var(--color-surface);
  font-weight: 600;
  color: var(--color-text);
}

tr:last-child td { border-bottom: none; }
td { color: var(--color-text-muted); }

/* FAQ */
.faq-list details {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  margin-bottom: 0.75rem;
  background: var(--color-bg);
  transition: all var(--transition-base);
}

.faq-list details[open] {
  border-color: var(--color-primary);
  box-shadow: 0 2px 8px rgba(37, 211, 102, 0.1);
}

.faq-list summary {
  padding: 1.1rem 1.25rem;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-list summary::-webkit-details-marker { display: none; }

.faq-list summary::after {
  content: '+';
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--color-text-faint);
  transition: transform var(--transition-base);
}

.faq-list details[open] summary::after {
  transform: rotate(45deg);
  color: var(--color-primary);
}

.faq-list p {
  padding: 0 1.25rem 1.25rem;
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.6;
}

/* Footer */
.site-footer {
  background: #0F172A;
  color: #CBD5E1;
  padding: 3rem 0 2rem;
  margin-top: 2rem;
  font-size: 0.9rem;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1.5rem;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-links a {
  color: #94A3B8;
  transition: color var(--transition-base);
}

.footer-links a:hover { color: #FFFFFF; }

.copyright {
  color: #64748B;
  font-size: 0.8rem;
  margin-top: 1rem;
}

/* SVG Animations */
.svg-animate-container {
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
}

.wave-path {
  pathLength: 1;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
  animation: flow-line 6s ease-in-out infinite alternate;
}

.connect-line {
  pathLength: 1;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
  animation: draw-path 4s ease-out forwards;
}

.pulse-node {
  transform-box: fill-box;
  transform-origin: center;
  animation: pulse-scale 3s ease-in-out infinite;
}

@keyframes flow-line {
  from { stroke-dashoffset: 1; }
  to { stroke-dashoffset: 0; }
}

@keyframes draw-path {
  from { stroke-dashoffset: 1; }
  to { stroke-dashoffset: 0; }
}

@keyframes pulse-scale {
  0%, 100% { transform: scale(1); opacity: 0.8; }
  50% { transform: scale(1.08); opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .wave-path, .connect-line, .pulse-node {
    animation: none !important;
  }
  .wave-path { stroke-dashoffset: 0.5; }
  .connect-line { stroke-dashoffset: 0; }
}

/* Responsive */
@media (max-width: 768px) {
  .section { padding: 3.5rem 0; }
  .grid { gap: 1.25rem; }
  .card { padding: 1.25rem; }
  th, td { padding: 0.75rem 1rem; font-size: 0.85rem; }
  .header-inner { justify-content: center; }
  .main-nav ul { gap: 1rem; }
}
