/* assets/style.css */
:root{
  --bg: #0b1020;
  --surface: rgba(255,255,255,.06);
  --surface-2: rgba(255,255,255,.10);
  --border: rgba(255,255,255,.14);

  --text: rgba(255,255,255,.92);
  --muted: rgba(255,255,255,.70);
  --muted-2: rgba(255,255,255,.55);

  --primary: #5eead4;    /* teal */
  --primary-2: #60a5fa;  /* blue */
  --accent: #a78bfa;     /* purple */
  --danger: #fb7185;

  --shadow: 0 16px 50px rgba(0,0,0,.35);
  --radius: 18px;
  --maxw: 1120px;

  --font-en: Inter, ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Apple Color Emoji","Segoe UI Emoji";
  --font-zh: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", var(--font-en);
}

@media (prefers-color-scheme: light){
  :root{
    --bg: #f7f8fb;
    --surface: rgba(2,6,23,.04);
    --surface-2: rgba(2,6,23,.07);
    --border: rgba(2,6,23,.12);

    --text: rgba(2,6,23,.92);
    --muted: rgba(2,6,23,.70);
    --muted-2: rgba(2,6,23,.55);

    --shadow: 0 18px 60px rgba(2,6,23,.10);
  }
}


html[data-theme="dark"]{
  --bg: #0b1020;
  --surface: rgba(255,255,255,.06);
  --surface-2: rgba(255,255,255,.10);
  --border: rgba(255,255,255,.14);
  --text: rgba(255,255,255,.92);
  --muted: rgba(255,255,255,.70);
  --muted-2: rgba(255,255,255,.55);
  --shadow: 0 16px 50px rgba(0,0,0,.35);
}
html[data-theme="light"]{
  --bg: #f7f8fb;
  --surface: rgba(2,6,23,.04);
  --surface-2: rgba(2,6,23,.07);
  --border: rgba(2,6,23,.12);
  --text: rgba(2,6,23,.92);
  --muted: rgba(2,6,23,.70);
  --muted-2: rgba(2,6,23,.55);
  --shadow: 0 18px 60px rgba(2,6,23,.10);
}

*{ box-sizing:border-box; }
html,body{ min-height:100%; }
body{
  margin:0;
  min-height:100vh;
  position:relative;
  overflow-x:hidden;
  background: var(--bg);
  color:var(--text);
  line-height:1.6;
  letter-spacing:.2px;
}
body::before{
  content:"";
  position:fixed;
  inset:0;
  z-index:-2;
  pointer-events:none;
  background:
    radial-gradient(1200px 700px at 18% 12%, rgba(96,165,250,.20), transparent 60%),
    radial-gradient(1200px 700px at 85% 20%, rgba(94,234,212,.18), transparent 60%),
    radial-gradient(900px 600px at 50% 90%, rgba(167,139,250,.15), transparent 65%),
    var(--bg);
  background-repeat:no-repeat;
  background-size:cover;
}
body::after{
  content:"";
  position:fixed;
  inset:0;
  z-index:-1;
  pointer-events:none;
  background:
    linear-gradient(180deg, rgba(255,255,255,.02), transparent 18%, transparent 82%, rgba(255,255,255,.02));
}
main, .header, .footer, .section, .hero{
  position:relative;
  z-index:1;
  background:transparent;
}
body[data-lang="zh"]{ font-family: var(--font-zh); }
body[data-lang="en"]{ font-family: var(--font-en); }

a{ color:inherit; text-decoration:none; }
a:hover{ opacity:.92; }
img{ max-width:100%; display:block; }

.container{
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 20px;
}

.skip{
  position:absolute; left:-999px; top:auto;
  width:1px; height:1px; overflow:hidden;
}
.skip:focus{
  left:16px; top:16px; width:auto; height:auto;
  background: var(--surface-2);
  padding:10px 12px;
  border-radius:12px;
  border:1px solid var(--border);
  z-index:9999;
}

.header{
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  background: color-mix(in srgb, var(--bg) 70%, transparent);
  border-bottom: 1px solid var(--border);
}
.navbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding: 12px 0;
}
.brand{
  display:flex;
  align-items:center;
  gap:10px;
  min-width: 180px;
}
.brand .name{
  font-weight: 650;
  letter-spacing:.3px;
}
.brand .tag{
  font-size:12px;
  color:var(--muted);
  margin-top:2px;
}
.brand .logo{
  width:34px; height:34px;
  border-radius:12px;
  box-shadow: var(--shadow);
}

.navlinks{
  display:flex;
  align-items:center;
  gap: 14px;
}
.navlinks a{
  font-size: 14px;
  color: var(--muted);
  padding: 8px 10px;
  border-radius: 12px;
}
.navlinks a.active{
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
}

.actions{
  display:flex;
  align-items:center;
  gap:10px;
}
.lang{
  font-size: 13px;
  color: var(--muted);
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
}

.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  padding: 10px 14px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-weight: 600;
  font-size: 14px;
  cursor:pointer;
  box-shadow: none;
}
.btn:hover{ background: var(--surface-2); }
.btn.primary{
  border: 1px solid color-mix(in srgb, var(--primary) 40%, var(--border));
  background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 22%, transparent),
                                     color-mix(in srgb, var(--primary-2) 18%, transparent));
}
.btn.ghost{
  background: transparent;
}
.btn.small{ padding: 8px 10px; font-size: 13px; border-radius: 12px; }

.hamburger{
  display:none;
  width:42px; height:42px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--surface);
  align-items:center;
  justify-content:center;
}
.hamburger svg{ width:18px; height:18px; opacity:.9; }

.mobilemenu{
  display:none;
  padding: 10px 0 14px;
}
.mobilemenu a{
  display:block;
  padding: 10px 12px;
  border-radius: 14px;
  border:1px solid transparent;
  color: var(--muted);
}
.mobilemenu a.active{
  color: var(--text);
  background: var(--surface);
  border-color: var(--border);
}
.mobilemenu .row{
  display:flex; gap:10px; flex-wrap:wrap;
  margin-top: 10px;
}

.hero{
  padding: 64px 0 24px;
}
.hero .grid{
  display:grid;
  grid-template-columns: 1.25fr .75fr;
  gap: 28px;
  align-items: start;
}
.kicker{
  display:inline-flex;
  align-items:center;
  gap:10px;
  font-size: 13px;
  color: var(--muted);
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
}
.kicker .dot{
  width:8px; height:8px; border-radius: 999px;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  box-shadow: 0 0 0 6px color-mix(in srgb, var(--primary-2) 20%, transparent);
}
h1{
  font-size: 44px;
  line-height: 1.12;
  margin: 14px 0 10px;
  letter-spacing: -0.6px;
}
.lead{
  font-size: 16px;
  color: var(--muted);
  margin: 0 0 18px;
  max-width: 62ch;
}
.hero .cta{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-top: 16px;
}
.panel{
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: linear-gradient(180deg, var(--surface), transparent);
  box-shadow: var(--shadow);
  padding: 18px;
}
.panel .stat{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.metric{
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--surface);
  padding: 12px;
}
.metric .n{
  font-weight: 800;
  font-size: 18px;
}
.metric .d{
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}

.section{
  padding: 28px 0;
}
.section h2{
  font-size: 26px;
  margin: 0 0 10px;
}
.section p.sub{
  color: var(--muted);
  margin: 0 0 16px;
  max-width: 80ch;
}

.cards{
  display:grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 14px;
}
.card{
  grid-column: span 4;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  padding: 16px;
  box-shadow: none;
}
.card h3{
  margin: 0 0 6px;
  font-size: 16px;
  letter-spacing: -0.2px;
}
.card p{
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}
.badge{
  display:inline-flex;
  align-items:center;
  gap:8px;
  font-size: 12px;
  color: var(--muted);
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface) 70%, transparent);
  margin-bottom: 10px;
}
.badge b{ color: var(--text); font-weight: 700; }

.split{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  align-items: start;
}
.list{
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
}
.list li{ margin: 8px 0; }

.quote{
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: linear-gradient(135deg, color-mix(in srgb, var(--primary-2) 12%, transparent),
                                     color-mix(in srgb, var(--accent) 10%, transparent));
  padding: 18px;
}
.quote p{ margin: 0; color: var(--muted); }
.quote b{ color: var(--text); }
/* desktop quote alignment: move right-side quote down to align with left column heading */
@media (min-width: 921px){
  .split > .quote:last-child{
    margin-top: 22px;
  }
}


.form{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 14px;
}
.field{
  display:flex;
  flex-direction:column;
  gap: 6px;
}
.field label{
  font-size: 13px;
  color: var(--muted);
}
.field input, .field select, .field textarea{
  width:100%;
  padding: 12px 12px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface) 80%, transparent);
  color: var(--text);
  outline: none;
}
.field textarea{ min-height: 120px; resize: vertical; }
.field.full{ grid-column: 1 / -1; }

.notice{
  margin-top: 10px;
  font-size: 12px;
  color: var(--muted-2);
}
.hr{
  height:1px;
  background: var(--border);
  margin: 18px 0;
  border:0;
}

.footer{
  padding: 28px 0 40px;
  border-top: 1px solid var(--border);
  margin-top: 30px;
}
.footer .grid{
  display:grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 16px;
  align-items:start;
}
.footer .mini{
  color: var(--muted);
  font-size: 13px;
}
.footer .links{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  justify-items:start;
}
.footer .links a{
  color: var(--muted);
  font-size: 13px;
  padding: 6px 8px;
  border-radius: 12px;
}
.footer .links a:hover{ background: var(--surface); }

.smallprint{
  margin-top: 16px;
  color: var(--muted-2);
  font-size: 12px;
}

/* Responsive */
@media (max-width: 920px){
  .hero .grid{ grid-template-columns: 1fr; }
  h1{ font-size: 38px; }
  .card{ grid-column: span 6; }
  .split{ grid-template-columns: 1fr; }
  .footer .grid{ grid-template-columns: 1fr; }
}
@media (max-width: 720px){
  .navlinks{ display:none; }
  .hamburger{ display:flex; }
  .mobilemenu{ display:block; }
  .card{ grid-column: span 12; }
  .form{ grid-template-columns: 1fr; }
}


/* bilingual support enhancements */
.lang[aria-current="true"],
.btn.small[aria-current="true"]{
  color: var(--text);
  border-color: color-mix(in srgb, var(--primary) 35%, var(--border));
  background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 18%, transparent),
                                     color-mix(in srgb, var(--primary-2) 14%, transparent));
}


.theme-toggle{
  min-width: 46px;
  padding: 10px 12px;
}
.theme-toggle .theme-icon{ font-size: 15px; line-height: 1; }
.theme-toggle .theme-label{ font-size: 13px; }
.sr-only{
  position:absolute !important;
  width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0;
}
@media (max-width: 720px){
  .theme-toggle .theme-label{ display:none; }
}


/* visual upgrade */
.hero-stack{display:grid;gap:16px;}
.image-frame{position:relative;overflow:hidden;border-radius: calc(var(--radius) + 6px);border:1px solid var(--border);background: linear-gradient(180deg, color-mix(in srgb, var(--surface) 85%, transparent), transparent);box-shadow: var(--shadow);}
.image-frame img{width:100%;aspect-ratio: 16 / 10;object-fit: cover;}
.image-frame figcaption{position:absolute;left:16px;right:16px;bottom:16px;display:flex;justify-content:space-between;gap:10px;align-items:center;padding:12px 14px;border-radius: 16px;border:1px solid color-mix(in srgb, var(--border) 85%, transparent);background: color-mix(in srgb, var(--bg) 48%, transparent);backdrop-filter: blur(14px);color: var(--text);font-size: 13px;}
.image-frame .caption-title{font-weight:700;letter-spacing:.1px;}
.image-frame .caption-text{color: var(--muted);}
.image-pill{display:inline-flex;align-items:center;gap:8px;padding:7px 10px;border-radius:999px;border:1px solid var(--border);background: color-mix(in srgb, var(--surface) 80%, transparent);font-size:12px;color: var(--muted);white-space: nowrap;}
.media-grid{display:grid;grid-template-columns: 1.08fr .92fr;gap:18px;align-items:stretch;margin: 26px 0 22px;}
.media-grid.reverse{grid-template-columns: .92fr 1.08fr;}
.visual-points{display:grid;gap:14px;}
.visual-point{border-radius: 18px;border:1px solid var(--border);background: color-mix(in srgb, var(--surface) 92%, transparent);padding:16px;}
.visual-point h3{margin:0 0 6px;font-size:16px;}
.visual-point p{margin:0;color:var(--muted);font-size:14px;}
.contact-hint{margin-top: 6px;color: var(--muted);font-size: 14px;}
.hero .panel.compact{padding:16px;}
.hero .panel.compact h3{margin:0 0 8px;font-size:18px;}
.hero .panel.compact p{margin:0;color:var(--muted);}
@media (max-width: 920px){.media-grid,.media-grid.reverse{grid-template-columns: 1fr;}.image-frame img{aspect-ratio: 16 / 11;}}
@media (max-width: 720px){.container{ padding: 0 16px; }.hero{ padding: 42px 0 18px; }h1{ font-size: 32px; }.actions{ gap:8px; }.panel .stat{ grid-template-columns: 1fr; }.image-frame figcaption{position:static;border-top:1px solid var(--border);border-left:0;border-right:0;border-bottom:0;border-radius:0;background: color-mix(in srgb, var(--surface) 85%, transparent);backdrop-filter: none;flex-direction:column;align-items:flex-start;}.image-pill{ white-space: normal; }}
@media (max-width: 480px){h1{ font-size: 28px; }.navbar{ gap:10px; }.brand{ min-width: 0; }.brand .name{ font-size: 15px; }.btn{ padding: 10px 12px; }.image-frame img{ aspect-ratio: 4 / 3; }}


/* full-page background consistency */
.footer{
  background: transparent;
}


/* header text wrapping fix */
.navlinks a,
.actions .lang,
.actions .btn,
.mobilemenu .row .btn{
  white-space: nowrap;
}
.actions{
  flex-shrink: 0;
}
.lang{
  min-width: 54px;
  text-align: center;
}
@media (min-width: 721px){
  .navlinks{
    gap: 10px;
  }
  .navlinks a{
    padding: 8px 9px;
  }
}
