/* ─────────────────────────────────────────────
   TW page — Taiwan-only adjustments on top of cedarwind.css
   - CJK font fallback so zh-Hant renders cleanly even without Geist CJK
   - Language toggle button styling
   - Slight loosening of letter-spacing for CJK headlines
   ───────────────────────────────────────────── */

:root {
  /* Geist has no CJK glyphs — fall through to Noto Sans TC for Chinese
     characters while keeping Latin in Geist. */
  --sans: "Geist", "Noto Sans TC", "PingFang TC", "Microsoft JhengHei",
          "Helvetica Neue", sans-serif;
  --serif: "Geist", "Noto Serif TC", "Songti TC", "Helvetica Neue", sans-serif;
  --mono:  "Geist", "Noto Sans TC", ui-monospace, "SF Mono", Menlo, monospace;
}

/* Tighten the brand-aggressive letter-spacing slightly when displaying CJK */
html[lang^="zh"] h1,
html[lang^="zh"] h2,
html[lang^="zh"] h3,
html[lang^="zh"] .display {
  letter-spacing: -0.01em;
}
html[lang^="zh"] .hero h1.display {
  letter-spacing: -0.015em;
}
html[lang^="zh"] .display {
  line-height: 1.12;
}

/* Make sure max-width:18ch etc don't crush CJK headlines */
html[lang^="zh"] .hero h1.display { max-width: 22ch; }
html[lang^="zh"] .problem-item h3,
html[lang^="zh"] .why-item h3,
html[lang^="zh"] .advantage-left h3,
html[lang^="zh"] .founder-body h3 { max-width: none; }

/* ── Language toggle ── */
.lang-toggle {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  background: transparent;
  transition: color .2s ease, border-color .2s ease, background .2s ease;
  margin-right: 14px;
}
.lang-toggle:hover {
  color: var(--ink);
  border-color: var(--ink);
  background: var(--cream);
}
.lang-toggle[aria-pressed="true"] { color: var(--ink); border-color: var(--ink); }

/* On small viewports, ditch the "Services / Process / ..." nav links (already
   handled by cedarwind.css), but keep the lang toggle visible. */
@media (max-width: 720px) {
  .nav-tw-cluster { display: flex; align-items: center; }
  .lang-toggle { margin-right: 8px; padding: 5px 10px; font-size: 10.5px; }
}

/* Hero secondary CTA on the dark navy buttons — match the brand */
.btn-line {
  background: #06C755;     /* LINE green */
  color: #ffffff;
  border: 0;
}
.btn-line:hover { background: #05a847; }
.btn-line svg { width: 16px; height: 16px; }

/* ─── Insights teaser strip (between founder and final CTA on /tw) ────── */
.insights-teaser-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-top: 56px;
}
.insights-teaser-card {
  display: flex;
  flex-direction: column;
  padding: 32px 32px 28px;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 4px;
  color: var(--ink);
  text-decoration: none;
  transition: transform .35s ease, box-shadow .35s ease, border-color .35s ease;
}
.insights-teaser-card:hover {
  transform: translateY(-3px);
  border-color: var(--ink);
  box-shadow: 0 22px 40px -28px rgba(10, 20, 16, 0.18);
}
.insights-teaser-card .teaser-meta {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.insights-teaser-card .teaser-meta .dot-sep { color: var(--rule); }
.insights-teaser-card .teaser-meta .tag { color: var(--amber-2); }
.insights-teaser-card .teaser-title {
  font-size: 21px;
  letter-spacing: -0.018em;
  line-height: 1.24;
  margin-bottom: 16px;
  text-wrap: balance;
}
.insights-teaser-card .teaser-excerpt {
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink-3);
  margin-bottom: 24px;
  flex: 1;
}
.insights-teaser-card .teaser-cta {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
  border-top: 1px solid var(--rule-soft);
  padding-top: 18px;
  margin-top: auto;
}
.insights-teaser-foot {
  margin-top: 48px;
  text-align: center;
}
.insights-teaser-foot .link-amber {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--amber-2);
  border-bottom: 1px solid currentColor;
  padding-bottom: 4px;
  text-decoration: none;
  transition: color .2s ease;
}
.insights-teaser-foot .link-amber:hover { color: var(--ink); }

@media (max-width: 1080px) {
  .insights-teaser-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .insights-teaser-grid { grid-template-columns: 1fr; gap: 16px; margin-top: 36px; }
  .insights-teaser-card { padding: 26px 24px 24px; }
  .insights-teaser-card .teaser-title { font-size: 19px; }
}
