:root {
  --blue: #5B77A2;        /* brand primary — large text / accents only */
  --blue-deep: #3E547A;   /* interactive bg, small accent text (AA on white) */
  --navy: #2B3350;        /* body + headings (high contrast) */
  --navy-soft: #4A5169;   /* secondary text */
  --paper: #FBFAF7;       /* warm near-white page bg */
  --ivory: #ECE7DA;       /* warm section bg */
  --white: #FFFFFF;
  --line: #DCD6C8;

  --f-latin: "Figtree", system-ui, -apple-system, sans-serif;
  --f-cjk: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
  --f: var(--f-cjk);

  --maxw: 1080px;
  --radius: 18px;
}

/* Per-language font wiring */
html[lang="zh-Hant"] { --f-cjk: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif; --f: var(--f-cjk); }
html[lang="ja"]      { --f-cjk: "Noto Sans JP", "Hiragino Sans", "Yu Gothic", sans-serif; --f: var(--f-cjk); }
html[lang="ko"]      { --f-cjk: "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif; --f: var(--f-cjk); }
html[lang="en"]      { --f: var(--f-latin); }

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  font-family: var(--f);
  color: var(--navy);
  background: var(--paper);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

:lang(en), .latin { font-family: var(--f-latin); }
a { color: var(--blue-deep); }

a:focus-visible, button:focus-visible, .btn:focus-visible {
  outline: 3px solid var(--blue-deep);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip {
  position: absolute; left: 16px; top: -60px;
  background: var(--navy); color: var(--white);
  padding: 12px 18px; border-radius: 10px;
  z-index: 100; transition: top .2s ease; font-weight: 600;
  text-decoration: none;
}
.skip:focus { top: 16px; color: var(--white); }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ---------- Braille motif ---------- */
.braille {
  font-family: var(--f-latin);
  color: var(--blue);
  letter-spacing: .28em;
  line-height: 1;
  user-select: none;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(1.1) blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; min-height: 74px;
}
.header-right { display: flex; align-items: center; gap: 18px; }

.logo { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.logo .mark { height: 40px; width: auto; display: block; }
.logo .wordmark-img { height: 21px; width: auto; display: block; }

.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
  text-decoration: none; color: var(--navy); font-weight: 500;
  padding: 8px 12px; border-radius: 10px; font-size: .98rem;
}
.nav a:hover { background: var(--ivory); }
.nav .nav-cta { background: var(--blue-deep); color: var(--white); font-weight: 600; }
.nav .nav-cta:hover { background: var(--navy); }

/* Language switcher */
.lang {
  display: flex; align-items: center; gap: 2px;
  padding-left: 16px; border-left: 1px solid var(--line);
}
.lang a {
  text-decoration: none; color: var(--navy-soft);
  font-family: var(--f-latin); font-weight: 600; font-size: .9rem;
  padding: 6px 9px; border-radius: 8px; line-height: 1;
}
.lang a:hover { background: var(--ivory); color: var(--navy); }
.lang a[aria-current="true"] { color: var(--white); background: var(--blue-deep); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 26px; border-radius: 999px;
  font-weight: 600; font-size: 1.02rem; text-decoration: none; cursor: pointer;
  border: 2px solid transparent;
  transition: transform .15s ease, background .15s ease, border-color .15s ease;
}
.btn-primary { background: var(--blue-deep); color: var(--white); }
.btn-primary:hover { background: var(--navy); transform: translateY(-2px); }
.btn-ghost { background: transparent; color: var(--navy); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--blue-deep); color: var(--blue-deep); transform: translateY(-2px); }

/* ---------- Section shared ---------- */
section { padding: 96px 0; }
.eyebrow {
  display: inline-block; font-family: var(--f-latin); font-weight: 600;
  letter-spacing: .16em; text-transform: uppercase; font-size: .8rem;
  color: var(--blue-deep); margin: 0 0 18px;
}
h1, h2, h3 { line-height: 1.25; font-weight: 700; color: var(--navy); }
.section-title { font-size: clamp(1.7rem, 3.4vw, 2.5rem); margin: 0 0 22px; letter-spacing: -.01em; }
.lead { font-size: 1.12rem; color: var(--navy-soft); max-width: 62ch; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding: clamp(72px, 12vw, 140px) 0 clamp(64px, 9vw, 120px); }
.hero::before {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(var(--blue) 1.4px, transparent 1.5px);
  background-size: 26px 26px; opacity: .06; pointer-events: none;
}
.hero-inner { position: relative; max-width: 780px; }
.hero h1 { font-size: clamp(2.1rem, 6vw, 3.7rem); letter-spacing: -.02em; margin: 0 0 24px; }
.hero .lead { font-size: clamp(1.05rem, 2.2vw, 1.28rem); margin: 0 0 38px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }

.hero-signature {
  margin-top: 64px; padding-top: 34px; border-top: 1px solid var(--line);
  display: flex; align-items: baseline; flex-wrap: wrap; gap: 14px 22px;
}
.hero-signature .word { font-family: var(--f-latin); font-weight: 700; font-size: clamp(1.6rem, 4vw, 2.2rem); color: var(--navy); }
.hero-signature .word .dot { color: var(--blue); }
.hero-signature .braille { font-size: clamp(1.5rem, 4vw, 2rem); }
.hero-signature .cap { font-size: .82rem; color: var(--navy-soft); letter-spacing: .04em; width: 100%; }

/* ---------- About ---------- */
.about { background: var(--ivory); }
.about p { max-width: 66ch; color: var(--navy); font-size: 1.08rem; }
.about p + p { margin-top: 20px; }
.founder {
  margin-top: 34px; padding: 22px 26px; background: var(--white);
  border-radius: var(--radius); border: 1px solid var(--line);
  max-width: 66ch; font-size: 1rem; color: var(--navy-soft);
}
.founder strong { color: var(--navy); }

.principles {
  list-style: none; margin: 56px 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 24px;
}
.principles li { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 24px; }
.principles .p-braille { font-size: 1.5rem; }
.principles h3 { font-size: 1.22rem; margin: 14px 0 8px; }
.principles p { font-size: .98rem; color: var(--navy-soft); margin: 0; }

/* ---------- What we do ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 26px; margin-top: 52px; }
.card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 38px 34px; transition: transform .18s ease, box-shadow .18s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 18px 40px rgba(43,51,80,.08); }
.card .card-icon { width: 52px; height: 52px; border-radius: 14px; background: var(--ivory); display: grid; place-items: center; margin-bottom: 22px; }
.card h3 { font-size: 1.4rem; margin: 0 0 12px; }
.card p { margin: 0; color: var(--navy-soft); font-size: 1.04rem; }

/* ---------- Contact ---------- */
.contact { background: var(--navy); color: var(--white); }
.contact .eyebrow { color: #A9BBD6; }
.contact h2 { color: var(--white); }
.contact .lead { color: #C8CEDD; }
.contact-grid { margin-top: 44px; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; max-width: 820px; }
.contact-item { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.14); border-radius: var(--radius); padding: 24px; }
.contact-item .label { font-family: var(--f-latin); text-transform: uppercase; letter-spacing: .14em; font-size: .74rem; color: #A9BBD6; margin: 0 0 10px; }
.contact-item a { color: var(--white); text-decoration: none; font-weight: 600; word-break: break-word; }
.contact-item a:hover { text-decoration: underline; }
.contact-item p { margin: 0; color: #DDE2EC; font-size: .98rem; }
.contact-cta { margin-top: 40px; }
.contact .btn-primary { background: var(--white); color: var(--navy); }
.contact .btn-primary:hover { background: var(--ivory); }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy); color: #B7BECF; padding: 44px 0; border-top: 1px solid rgba(255,255,255,.12); }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; font-size: .9rem; }
.footer-logo { height: 54px; width: auto; opacity: .95; }
.footer-meta { display: flex; flex-direction: column; gap: 6px; }
.footer-meta a { color: #DDE2EC; text-decoration: none; }
.footer-meta a:hover { text-decoration: underline; }
.footer-inner .braille { color: #7f93b8; font-size: 1.15rem; }

/* ---------- Responsive ---------- */
@media (max-width: 680px) {
  .header-right { gap: 10px; }
  .logo .wordmark-img { display: none; }  /* keep just the hand mark on small screens */
}
@media (max-width: 560px) {
  section { padding: 72px 0; }
  .nav a { padding: 7px 8px; font-size: .9rem; }
  .lang { padding-left: 10px; }
  .lang a { padding: 5px 7px; font-size: .84rem; }
  .hero-signature { gap: 10px 16px; }
}

/* Wave animation on the logo hand */
@keyframes wave {
  0%, 60%, 100% { transform: rotate(0deg); }
  20% { transform: rotate(12deg); }
  40% { transform: rotate(-7deg); }
}
.logo .mark { transform-origin: 60% 90%; }
.logo:hover .mark { animation: wave 1.1s ease-in-out; }
