/* ============================================
   WhatsApp Brand Site - Global Styles
   Theme: Earth Tones + Natural Texture | Refined & Restrained
   ============================================ */

/* ---------- Design Tokens ---------- */
:root {
  --color-bg: #F6F3EC;
  --color-surface: #FFFFFF;
  --color-primary: #3A4D3F;
  --color-primary-hover: #2C3D30;
  --color-secondary: #7A6B5C;
  --color-accent: #C4A98E;
  --color-border: #E2DDD5;
  --color-text: #2B2B2B;
  --color-text-muted: #5C5852;
  --color-link: #3A4D3F;
  --color-focus: #8FA893;

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --shadow-card: 0 4px 24px rgba(30, 30, 30, 0.06);
  --shadow-elevated: 0 8px 32px rgba(30, 30, 30, 0.10);

  --font-sans: system-ui, -apple-system, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --text-base: clamp(0.95rem, 0.9rem + 0.25vw, 1.05rem);
  --text-lg: clamp(1.1rem, 1rem + 0.4vw, 1.25rem);
  --text-xl: clamp(1.5rem, 1.3rem + 0.8vw, 2rem);
  --text-2xl: clamp(1.8rem, 1.5rem + 1.2vw, 2.6rem);
  --text-3xl: clamp(2.2rem, 1.8rem + 1.8vw, 3.2rem);

  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.75rem;
  --space-lg: 3rem;
  --space-xl: 5rem;
  --space-xxl: 8rem;

  --container-max: 1200px;
  --gutter: 1.5rem;
}

/* ---------- Reset & Base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-sans);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.7;
  font-size: var(--text-base);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; height: auto; }
a { color: var(--color-link); text-decoration: none; transition: color 0.2s ease; }
a:hover, a:focus-visible { color: var(--color-primary-hover); }
ul, ol { padding-left: 1.5em; }
li { margin-bottom: 0.5em; }

/* ---------- Focus & Accessibility ---------- */
:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 3px; border-radius: 2px; }
.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; }

/* ---------- Layout ---------- */
.container { width: 100%; max-width: var(--container-max); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: var(--space-xl) 0; }
.section-alt { background: var(--color-surface); }

/* ---------- Typography ---------- */
h1, h2, h3, h4 { line-height: 1.25; font-weight: 700; letter-spacing: -0.01em; color: var(--color-primary); }
h1 { font-size: var(--text-3xl); margin-bottom: var(--space-md); text-wrap: balance; }
h2 { font-size: var(--text-2xl); margin-bottom: var(--space-md); }
h3 { font-size: var(--text-xl); margin-bottom: var(--space-sm); }
p { margin-bottom: var(--space-sm); max-width: 75ch; }
.subtitle { font-size: var(--text-lg); color: var(--color-text-muted); margin-bottom: var(--space-lg); }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(246, 243, 236, 0.92); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--color-border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand { display: flex; align-items: center; gap: var(--space-sm); font-weight: 600; font-size: var(--text-lg); }
.brand img { height: 36px; width: auto; object-fit: contain; }
nav ul { display: flex; gap: var(--space-md); list-style: none; padding: 0; margin: 0; }
nav a { font-weight: 500; font-size: var(--text-base); padding: 0.4em 0; position: relative; }
nav a::after { content: ""; position: absolute; bottom: 0; left: 0; width: 0; height: 2px; background: var(--color-primary); transition: width 0.25s ease; }
nav a:hover::after, nav a[aria-current="page"]::after { width: 100%; }
nav a[aria-current="page"] { color: var(--color-primary); font-weight: 700; }

/* ---------- Footer ---------- */
.site-footer { background: var(--color-primary); color: #EAE8E3; padding: var(--space-xl) 0 var(--space-md); }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: var(--space-lg); margin-bottom: var(--space-lg); }
.footer-col h4 { color: #BFC9BE; margin-bottom: var(--space-sm); font-size: var(--text-base); }
.footer-col a { color: #D4CEC5; display: block; margin-bottom: 0.6em; }
.footer-col a:hover { color: #FFF; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.15); padding-top: var(--space-md); font-size: var(--text-base); color: #A8A29A; display: flex; justify-content: space-between; flex-wrap: wrap; gap: var(--space-sm); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5em;
  padding: 0.8em 1.6em; border-radius: var(--radius-sm); font-weight: 600; font-size: var(--text-base);
  cursor: pointer; border: 1px solid transparent; transition: all 0.2s ease; text-align: center;
}
.btn-primary { background: var(--color-primary); color: #FFF; border-color: var(--color-primary); }
.btn-primary:hover, .btn-primary:focus-visible { background: var(--color-primary-hover); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(58, 77, 63, 0.25); }
.btn-secondary { background: transparent; color: var(--color-primary); border-color: var(--color-border); }
.btn-secondary:hover { background: rgba(58, 77, 63, 0.06); }
.btn-icon { width: 20px; height: 20px; flex-shrink: 0; }

/* ---------- Cards ---------- */
.card { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: var(--space-md); box-shadow: var(--shadow-card); transition: transform 0.2s ease, box-shadow 0.2s ease; }
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-elevated); }
.card-meta { font-size: 0.85rem; color: var(--color-text-muted); margin-bottom: 0.5em; }
.card-title { font-size: var(--text-lg); font-weight: 600; margin-bottom: 0.5em; }
.card-excerpt { font-size: var(--text-base); color: var(--color-text-muted); line-height: 1.6; margin-bottom: var(--space-sm); }

/* ---------- Grids ---------- */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-md); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-md); }
@media (max-width: 900px) { .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

/* ---------- Table ---------- */
.table-wrapper { overflow-x: auto; border: 1px solid var(--color-border); border-radius: var(--radius-md); }
table { width: 100%; border-collapse: collapse; background: var(--color-surface); }
th, td { padding: 1em; text-align: left; border-bottom: 1px solid var(--color-border); }
th { background: #EDEAE4; font-weight: 600; color: var(--color-primary); }
td { vertical-align: middle; }
tr:last-child td { border-bottom: none; }

/* ---------- FAQ (Details/Summary) ---------- */
.faq-list { display: flex; flex-direction: column; gap: 1rem; }
details { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: 1.2em; }
summary { cursor: pointer; font-weight: 600; list-style: none; position: relative; padding-right: 2em; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; position: absolute; right: 0; top: 50%; transform: translateY(-50%); font-weight: 400; color: var(--color-text-muted); transition: transform 0.2s; }
details[open] summary::after { content: "−"; }
details p { margin-top: 1em; color: var(--color-text-muted); line-height: 1.7; }

/* ---------- Staggered Layout Helpers ---------- */
.stagger-row { display: flex; align-items: center; gap: var(--space-lg); margin-bottom: var(--space-xl); }
.stagger-row.reverse { flex-direction: row-reverse; }
.stagger-content { flex: 1; }
.stagger-visual { flex: 1; display: flex; justify-content: center; }
@media (max-width: 800px) {
  .stagger-row, .stagger-row.reverse { flex-direction: column; }
  .stagger-visual { order: -1; }
}

/* ---------- SVG Animation Utilities ---------- */
.svg-geo-group { transform-box: fill-box; transform-origin: center; }
.draw-path {
  pathLength: 1;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 0.3s ease;
}
@keyframes geo-spin-slow {
  0%, 100% { transform: rotate(0deg); }
  50% { transform: rotate(180deg); }
}
@keyframes geo-assemble {
  0%, 100% { transform: translate(0, 0) scale(1); opacity: 1; }
  50% { transform: translate(-6px, 6px) scale(0.95); opacity: 0.85; }
}
@keyframes draw-stroke {
  0% { stroke-dashoffset: 1; }
  100% { stroke-dashoffset: 0; }
}
.anim-spin { animation: geo-spin-slow 12s linear infinite; }
.anim-assemble { animation: geo-assemble 8s ease-in-out infinite alternate; }
.anim-draw { animation: draw-stroke 4s ease-in-out infinite alternate; }

@media (prefers-reduced-motion: reduce) {
  .anim-spin, .anim-assemble, .anim-draw { animation: none !important; }
  .draw-path { stroke-dashoffset: 0 !important; }
}

/* ---------- Misc Utilities ---------- */
.text-center { text-align: center; }
.mx-auto { margin-left: auto; margin-right: auto; }
.mb-md { margin-bottom: var(--space-md); }
.link-arrow { display: inline-flex; align-items: center; gap: 0.4em; font-weight: 600; }
.link-arrow svg { width: 16px; height: 16px; }
