/* ====================================================================
   Bugpapa shared landing-page stylesheet
   Used by all multilingual blog landing pages under /es /hi /ja /ko /zh
   --------------------------------------------------------------------
   To override per language, set CSS custom properties or font-family
   inside a <style> block AFTER linking this file. Example:
     <style>
       :root { --base-font-size: 16px; --h1-size: 30px; --h2-size: 22px; }
       body { font-family: 'Noto Sans TC', system-ui, sans-serif; }
     </style>
   ==================================================================== */

:root {
  /* Brand colors */
  --accent:       #ff7a2d;
  --accent-dark:  #e25e10;
  --ink:          #1f2330;
  --muted:        #5b6275;
  --rule:         #e6e8ee;
  --tip-bg:       #fff8e1;
  --tip-border:   #ffd54f;

  /* Tunable typography (pages may override) */
  --base-font-size:   17px;
  --base-line-height: 1.8;
  --h1-size:          34px;
  --h2-size:          24px;
  --h1-mobile:        26px;
  --h2-mobile:        20px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
  font-family: system-ui, -apple-system, sans-serif;
  background: #fff;
  color: var(--ink);
  font-size: var(--base-font-size);
  line-height: var(--base-line-height);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }

/* ----- TOP BAR ----- */
.topbar { background: #fff; border-bottom: 1px solid var(--rule); position: sticky; top: 0; z-index: 10; }
.topbar-inner { max-width: 1140px; margin: 0 auto; padding: 14px 24px;
  display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.brand-logo { display: flex; align-items: center; gap: 10px; }
.brand-logo img { width: 36px; height: 36px; }
.brand-logo .brand-text { font-weight: 900; font-size: 20px; color: var(--ink); letter-spacing: -0.01em; }
.topnav { display: flex; gap: 22px; margin-left: auto; flex-wrap: wrap; align-items: center; }
.topnav a { color: var(--ink); font-weight: 500; font-size: 15px; }
.topnav a:hover { color: var(--accent-dark); text-decoration: none; }
.lang-switch { display: flex; gap: 12px; padding-left: 16px; border-left: 1px solid var(--rule); }
.lang-switch a { font-size: 13px; color: var(--muted); }

/* ----- SOCIAL STRIP (icons under topbar) ----- */
.social-strip { background: #fafbfd; border-bottom: 1px solid var(--rule); padding: 6px 24px; font-size: 13px; }
.social-strip .inner { max-width: 1140px; margin: 0 auto;
  display: flex; gap: 14px; justify-content: flex-end; align-items: center; flex-wrap: wrap; }
.social-strip a { color: var(--muted); display: inline-flex; align-items: center; padding: 4px; }
.social-strip a:hover { color: var(--accent-dark); text-decoration: none; }
.social-strip svg { width: 18px; height: 18px; display: block; }

/* ----- HERO IMAGE ----- */
.hero { max-width: 1080px; margin: 32px auto 0; padding: 0 24px; }
.hero img { width: 100%; border-radius: 10px; border: 1px solid var(--rule); }

/* ----- ARTICLE ----- */
main { max-width: 760px; margin: 32px auto; padding: 0 24px; }
h1 { font-size: var(--h1-size); line-height: 1.35; font-weight: 900; margin: 0 0 14px; letter-spacing: -0.01em; }
h2 { font-size: var(--h2-size); font-weight: 800; margin: 36px 0 14px; letter-spacing: -0.005em; }
h3 { font-size: 18px; font-weight: 700; margin: 28px 0 10px; }
p  { margin: 0 0 18px; }

.byline { font-size: 14px; color: var(--muted); margin: 0 0 32px; }
.byline a { color: var(--muted); }
.byline .sep { margin: 0 8px; }

.video-embed { width: 100%; aspect-ratio: 16/9; border-radius: 8px; margin: 28px 0;
  overflow: hidden; background: #11131a; }
.video-embed iframe { width: 100%; height: 100%; border: 0; display: block; }

ul.features, ul.chapter-list, ul.esl-list { padding-left: 0; list-style: none; margin: 0 0 24px; }
ul.features li { margin-bottom: 14px; padding-left: 6px; }
ul.chapter-list li { margin-bottom: 10px; font-variant-numeric: tabular-nums; }
ul.chapter-list a { color: var(--ink); display: inline-block; }
ul.chapter-list a:hover { color: var(--accent-dark); text-decoration: none; }
ul.chapter-list .ts { font-weight: 800; color: var(--accent-dark); margin-right: 8px; }
ul.esl-list li { margin-bottom: 10px; }

.inline-shot { margin: 24px 0; display: block; }
.inline-shot img { border-radius: 6px; border: 1px solid var(--rule); }

.tip { background: var(--tip-bg); border-left: 5px solid var(--tip-border);
  padding: 20px 24px; border-radius: 6px; margin: 28px 0; }
.tip strong.label { display: block; margin-bottom: 6px; font-size: 14px;
  color: var(--accent-dark); letter-spacing: 0.06em; }

.cta-card { background: #1f2330; color: #fff; padding: 28px 32px; border-radius: 10px;
  margin: 36px 0; text-align: center; }
.cta-card h3 { color: #fff; margin: 0 0 8px; font-size: 20px; font-weight: 800; }
.cta-card p { color: #c7cad4; margin: 0 0 16px; font-size: 15px; }
.cta-card a.btn { display: inline-block; background: var(--accent); color: #fff;
  padding: 12px 24px; border-radius: 999px; font-weight: 700; }
.cta-card a.btn:hover { background: var(--accent-dark); text-decoration: none; }

.tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 28px 0; }
.tags a { background: #f1f3f8; color: var(--muted); padding: 6px 14px;
  border-radius: 999px; font-size: 13px; }
.tags a:hover { background: var(--accent); color: #fff; text-decoration: none; }

.post-nav { border-top: 1px solid var(--rule); padding-top: 20px; margin-top: 28px; font-size: 14px; }
.post-nav a { color: var(--muted); }

/* ----- FOOTER ----- */
footer { background: #1f2330; color: #c7cad4; margin-top: 60px; padding: 36px 24px; }
.footer-inner { max-width: 1140px; margin: 0 auto;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.footer-brand { display: flex; align-items: center; gap: 12px; color: #fff; font-weight: 800; }
.footer-brand img { width: 32px; height: 32px; }
.footer-links a { color: #fff; margin: 0 10px; font-size: 14px; }
.footer-social { display: flex; gap: 12px; align-items: center; }
.footer-social a { color: #c7cad4; display: inline-flex; align-items: center; padding: 4px; }
.footer-social a:hover { color: #fff; text-decoration: none; }
.footer-social svg { width: 18px; height: 18px; display: block; }
.footer-bottom { max-width: 1140px; margin: 16px auto 0; font-size: 12px; color: #8b91a2;
  border-top: 1px solid #2a2f3e; padding-top: 14px;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }

/* ----- MOBILE ----- */
@media (max-width: 720px) {
  h1 { font-size: var(--h1-mobile); }
  h2 { font-size: var(--h2-mobile); }
  main { margin: 24px auto; padding: 0 18px; }
  .topbar-inner { padding: 12px 16px; gap: 12px; }
  .topnav { gap: 14px; }
  .topnav a { font-size: 14px; }
  .lang-switch { border-left: none; padding-left: 0; }
}