/* Basic Reset and Variables */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; color: #0f172a; background: #ffffff; line-height: 1.55; }

/* Language-based font stacks */
html[lang="en"] body {
  font-family: "Sansation", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans", "Helvetica Neue", Arial, sans-serif;
}
html[lang="zh-HK"] body,
html[lang="zh-TW"] body {
  font-family: "Noto Sans TC", "PingFang TC", "Heiti TC", "Microsoft JhengHei", "Noto Sans CJK TC", sans-serif;
}
html[lang="zh-Hans"] body {
  font-family: "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
}
html[lang="ja"] body {
  font-family: "Noto Sans JP", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo", sans-serif;
}

:root {
  --bg: #ffffff;
  --text: #0f172a; /* slate-900 */
  --muted: #475569; /* slate-600 */
  --border: #e2e8f0; /* slate-200 */
  --primary: #274690; /* indigo-blue */
  --primary-600: #3556a8;
  --accent: #14b8a6; /* teal-500 */
  --accent-600: #0ea5a3;
  --surface: #f8fafc; /* slate-50 */
  --focus: #94a3b8; /* slate-400 */
  --shadow: 0 10px 30px rgba(2, 6, 23, 0.08);
}

/* Accessibility */
.skip-link { position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.skip-link:focus { position: static; width: auto; height: auto; padding: .5rem .75rem; background: var(--primary); color: #fff; }

a { color: var(--primary); text-decoration: none; }
a:hover, a:focus { text-decoration: underline; }

img { max-width: 100%; height: auto; border-radius: 12px; }

/* Layout */
.container { max-width: 1120px; margin-inline: auto; padding: 0 1rem; }
.section { padding: 64px 0; }
.grid-2 { display: grid; gap: 32px; grid-template-columns: 1fr; align-items: center; }
@media (min-width: 900px) { .grid-2 { grid-template-columns: 1.1fr 0.9fr; gap: 48px; } }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,0.9); backdrop-filter: saturate(180%) blur(10px); border-bottom: 1px solid var(--border); }
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: .6rem; font-weight: 700; color: var(--text); }
.brand-logo { display: inline-block; width: 28px; height: 28px; border-radius: 6px; box-shadow: var(--shadow); }
.brand-text { letter-spacing: .2px; }

.nav-list { display: none; gap: 1rem; list-style: none; margin: 0; padding: 0; }
@media (min-width: 900px) { .nav-list { display: flex; } }
.nav-list a { color: var(--muted); font-weight: 600; padding: .5rem .25rem; border-radius: 6px; }
.nav-list a:hover, .nav-list a:focus { color: var(--text); background: var(--surface); outline: none; }

/* Floating language toggle */
.lang-float { position: fixed; right: max(16px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom)); z-index: 60; display: grid; justify-items: end; gap: 6px; }
.lang-float .btn { background: #fff; border-color: var(--border); box-shadow: var(--shadow); }
.lang-menu { position: absolute; right: 0; bottom: calc(100% + 6px); background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: .25rem; box-shadow: var(--shadow); min-width: 240px; display: none; }
.lang-menu.open { display: block; }
.lang-menu li { list-style: none; padding: .55rem .8rem; border-radius: 8px; cursor: pointer; }
.lang-menu li:focus, .lang-menu li:hover { background: var(--surface); outline: none; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; font-weight: 700; border-radius: 12px; padding: .75rem 1rem; border: 1px solid transparent; cursor: pointer; transition: transform .06s ease, background .2s ease, box-shadow .2s ease; }
.btn:active { transform: translateY(1px); }
.btn.small { padding: .5rem .75rem; border-radius: 10px; font-weight: 600; }
.btn.primary { background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%); color: #fff; box-shadow: var(--shadow); }
.btn.primary:hover, .btn.primary:focus { filter: brightness(1.05); }
.btn.ghost { background: #fff; color: var(--text); border-color: var(--border); }
.btn.ghost:hover, .btn.ghost:focus { background: var(--surface); }

/* Hero */
.hero { background: radial-gradient(1000px 600px at 10% -10%, rgba(20, 184, 166, 0.10), transparent 60%), radial-gradient(800px 500px at 90% -10%, rgba(39, 70, 144, 0.12), transparent 60%); }
.hero .headline { font-size: clamp(1.8rem, 3.2vw, 2.6rem); line-height: 1.15; margin: 0 0 .5rem; }
.hero .subhead { color: var(--muted); font-size: clamp(1rem, 1.8vw, 1.1rem); margin: 0 0 .75rem; }
.hero .vision { color: var(--primary); font-weight: 700; margin-bottom: 1rem; }
.hero .cta-group { display: flex; gap: .75rem; flex-wrap: wrap; }

/* Cards */
.cards { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 760px) { .cards { grid-template-columns: repeat(3, 1fr); gap: 20px; } }
.card { background: #fff; border: 1px solid var(--border); border-radius: 16px; padding: 18px; box-shadow: var(--shadow); }
.card h3 { margin-top: 0; margin-bottom: .5rem; }
.card p { margin: 0; color: var(--muted); }

/* Who / Product */
.who, .product { background: var(--surface); }
.product .container { align-items: start; }

/* Partners */
.partners p { color: var(--muted); max-width: 65ch; }

/* Contact */
.contact .contact-form { max-width: 640px; margin-top: 1rem; }
.form-row { display: grid; gap: .35rem; margin-bottom: .85rem; }
.form-row input, .form-row textarea { border: 1px solid var(--border); border-radius: 10px; padding: .65rem .75rem; font: inherit; }
.form-row input:focus, .form-row textarea:focus { outline: 2px solid var(--focus); outline-offset: 2px; border-color: var(--focus); }
.form-note { color: var(--muted); font-size: .9rem; }

/* Footer */
.site-footer { border-top: 1px solid var(--border); background: #fff; }
.footer-inner { padding: 24px 0; color: var(--muted); font-size: .95rem; }

/* Fade-in Animations */
.fadein { opacity: 0; transform: translateY(12px); transition: opacity .6s ease, transform .6s ease; }
.fadein.in-view { opacity: 1; transform: translateY(0); }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .btn { transition: none !important; }
  .fadein { transition: none !important; opacity: 1 !important; transform: none !important; }
}

/* Smooth scroll */
html { scroll-behavior: smooth; }

/* Headings spacing */
h1, h2, h3 { color: var(--text); }
h2 { margin: 0 0 1rem; font-size: clamp(1.4rem, 2.4vw, 2rem); }
h3 { font-size: clamp(1.1rem, 1.6vw, 1.3rem); }

/* Temporary: hide Contact section and links */
#contact { display: none !important; }
.nav-list a[href="#contact"],
a[href="#contact"] { display: none !important; }
