/* site.css — burgundy, white, and light gold. Company site, not a game canvas. */
:root {
  --wine: #6e1e2f;
  --wine-deep: #4c1420;
  --gold: #c4a574;
  --paper: #f7f3ee;
  --ink: #24181b;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  /* System stacks that carry full Vietnamese diacritics; Palatino/Iowan do not on many devices. */
  font: 18px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
}
.bar, .foot {
  background: var(--wine);
  color: #fff;
  padding: 1rem 1.5rem;
}
.bar { display: flex; gap: 1.5rem; align-items: center; flex-wrap: wrap; }
.brand { color: var(--gold); font-weight: 700; letter-spacing: 0.08em; text-decoration: none; }
nav a, .foot a { color: #fff; margin-right: 1rem; }
main { max-width: 72rem; margin: 0 auto; padding: 2rem 1.25rem 4rem; }
main > p, main > h2, main > ul:not(.grid):not(.strip):not(.gallery), main > form, main > section > p { max-width: 46rem; }
h1 { font-size: 2.2rem; line-height: 1.2; color: var(--wine-deep); }
.lead { font-size: 1.2rem; }
.cards { list-style: none; padding: 0; }
.cards li { border-top: 1px solid var(--gold); padding: 0.8rem 0; }
.button, button {
  background: var(--wine);
  color: #fff;
  border: 0;
  padding: 0.7rem 1.1rem;
  text-decoration: none;
  display: inline-block;
}
form.inbox { display: grid; gap: 0.8rem; margin-top: 1.5rem; }
input, textarea { width: 100%; font: inherit; padding: 0.5rem; border: 1px solid var(--gold); }
.langs a[aria-current="true"] { color: var(--gold); }
/* Work gallery: cover on the card, photo grid on the case page. */
.cards img, .gallery img { display: block; width: 100%; height: auto; }
.gallery { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
/* Per-script fallbacks so each locale gets a font that has its glyphs. */
html:lang(zh-Hans) body { font-family: system-ui, "PingFang SC", "Microsoft YaHei", "Noto Sans SC", "Noto Sans CJK SC", sans-serif; }
html:lang(zh-Hant) body { font-family: system-ui, "PingFang TC", "Microsoft JhengHei", "Noto Sans TC", "Noto Sans CJK TC", sans-serif; }
html:lang(ja) body { font-family: system-ui, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, "Noto Sans JP", "Noto Sans CJK JP", sans-serif; }
html:lang(hi) body { font-family: system-ui, "Nirmala UI", "Kohinoor Devanagari", "Noto Sans Devanagari", Mangal, sans-serif; line-height: 1.8; }
/* Layout v2: header, hero, card grids, strips, gallery, lightbox, footer sitemap. */
.bar { position: sticky; top: 0; z-index: 10; justify-content: space-between; }
.brand { display: inline-flex; align-items: center; gap: 0.6rem; }
.brand img { height: 40px; width: auto; }
nav a[aria-current="page"] { color: var(--gold); }
.nav-cta { border: 1px solid var(--gold); padding: 0.3rem 0.7rem; }
section { margin: 3rem 0; }
.hero { margin: -2rem -1.25rem 3rem; min-height: 70vh; display: flex; align-items: flex-end; background: var(--wine-deep) center/cover no-repeat; color: #fff; }
.hero-inner { width: 100%; padding: 4rem 1.5rem 3rem; background: linear-gradient(transparent, rgba(40, 10, 18, 0.88) 45%); }
.hero h1 { color: #fff; font-size: clamp(2rem, 5vw, 3.4rem); max-width: 40rem; }
.hero .lead { max-width: 42rem; }
.hero .logo { height: 110px; width: auto; }
.eyebrow { color: var(--gold); letter-spacing: 0.12em; text-transform: uppercase; font-size: 0.85rem; }
.button.ghost { background: transparent; border: 1px solid var(--gold); color: inherit; }
.grid { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; }
.grid.four { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.grid.three { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.card a { display: block; color: inherit; text-decoration: none; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.12); height: 100%; }
.card img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; }
.card a:hover img { opacity: .9; }
.card-body { display: block; padding: 0.7rem 0.9rem 0.9rem; }
.card-body strong { display: block; color: var(--wine-deep); }
.meta { display: block; font-size: 0.85rem; color: #6b5a5e; }
.panel { background: #fff; padding: 1rem 1.1rem; border-top: 3px solid var(--gold); }
.panel ul { padding-left: 1.1rem; }
.split { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2rem; }
.ticks { list-style: none; padding: 0; }
.ticks li::before { content: "✓ "; color: var(--gold); font-weight: 700; }
.cta { background: var(--wine); color: #fff; padding: 2.5rem 1.5rem; }
.cta h2 { color: var(--gold); }
.strip { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; }
.strip img, .gallery img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; }
.service-block { border-top: 1px solid var(--gold); padding-top: 1rem; }
.tag { background: var(--gold); color: var(--wine-deep); padding: 0.1rem 0.5rem; font-size: 0.8rem; }
.filters { display: flex; flex-wrap: wrap; gap: 0.4rem; max-width: none; }
.filters button { background: #fff; color: var(--wine); border: 1px solid var(--wine); padding: 0.4rem 0.8rem; cursor: pointer; }
.filters button[aria-pressed="true"] { background: var(--wine); color: #fff; }
.card[hidden] { display: none; }
.columns { columns: 16rem; }
.foot-nav { display: flex; flex-wrap: wrap; gap: 0.3rem 1.2rem; padding-bottom: 1rem; border-bottom: 1px solid rgba(255,255,255,.2); }
.lightbox { position: fixed; inset: 0; background: rgba(0,0,0,.9); display: flex; align-items: center; justify-content: center; z-index: 50; }
.lightbox img { max-width: 94vw; max-height: 86vh; }
.lightbox button { position: absolute; top: 1rem; right: 1rem; }
.lightbox .prev, .lightbox .next { top: 50%; right: auto; }
.lightbox .next { right: 1rem; }
.lightbox .prev { left: 1rem; }
.lightbox[hidden] { display: none; }
/* Chat widget: floating launcher bottom-right, popup panel, icon picker. Orange and black as the logo. */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.chat-launcher { position: fixed; right: 18px; bottom: 18px; z-index: 40; width: 60px; height: 60px; border-radius: 50%; background: #1a1a1a; border: 2px solid #e8711a; padding: 0; display: grid; place-items: center; box-shadow: 0 4px 14px rgba(0,0,0,.3); cursor: pointer; }
.chat-launcher:focus-visible, .chat-panel button:focus-visible, .chat-panel input:focus-visible { outline: 3px solid #e8711a; outline-offset: 2px; }
.chat-panel { position: fixed; right: 18px; bottom: 90px; z-index: 41; width: min(380px, calc(100vw - 24px)); height: min(560px, calc(100vh - 110px)); display: flex; flex-direction: column; background: #fff; border: 1px solid #1a1a1a; box-shadow: 0 10px 30px rgba(0,0,0,.3); font-size: 16px; }
.chat-panel[hidden] { display: none; }
.chat-head { display: flex; align-items: center; gap: .6rem; background: #1a1a1a; color: #fff; padding: .6rem .8rem; }
.chat-head strong { flex: 1; color: #e8711a; }
.chat-close { background: transparent; color: #fff; font-size: 1.5rem; padding: 0 .4rem; }
.chat-log { flex: 1; overflow-y: auto; padding: .8rem; background: #faf6f2; }
.msg { margin: 0 0 .6rem; padding: .5rem .7rem; max-width: 85%; line-height: 1.45; }
.msg.bot { background: #fff; border-left: 3px solid #e8711a; }
.msg.user { background: #1a1a1a; color: #fff; margin-left: auto; }
.msg a { color: #e8711a; }
.ico-wrap .ico { vertical-align: -4px; }
.chat-quick { display: flex; flex-wrap: wrap; gap: .3rem; padding: .5rem .6rem; border-top: 1px solid #eee; }
.chat-quick button { background: #fff; color: #1a1a1a; border: 1px solid #e8711a; padding: .25rem .6rem; font-size: .85rem; border-radius: 1rem; }
.chat-icons { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; padding: .4rem; border-top: 1px solid #eee; }
.chat-icons[hidden] { display: none; }
.chat-icons button { background: transparent; padding: .3rem; }
.chat-icons button:hover { background: #fdebdc; }
.chat-form { display: flex; gap: .3rem; padding: .5rem; border-top: 1px solid #ddd; margin: 0; }
.chat-form input { flex: 1; border: 1px solid #1a1a1a; }
.chat-icon-toggle { background: transparent; padding: .2rem; }
.chat-send { background: #e8711a; color: #1a1a1a; font-weight: 700; }
@media (max-width: 480px) { .chat-panel { right: 0; bottom: 0; width: 100vw; height: 100vh; border: 0; } }
/* Work timeline */
.tl-tools { display: flex; flex-wrap: wrap; gap: .6rem 1rem; align-items: end; margin: 1rem 0; padding: .8rem; background: #fff; border: 1px solid #ddd; }
.tl-tools[hidden] { display: none; }
.tl-tools label { display: flex; flex-direction: column; font-size: .85rem; gap: .2rem; }
.tl-tools input, .tl-tools select { font: inherit; padding: .35rem .5rem; min-width: 10rem; }
.tl-count { font-size: .85rem; }
.tl-none { flex-basis: 100%; margin: 0; }
.tl-year > h2 { border-bottom: 2px solid var(--gold); padding-bottom: .2rem; }
.card time, .card .undated, .meta time { font-variant-numeric: tabular-nums; }
.pager { display: flex; justify-content: space-between; gap: 1rem; margin: 1.5rem 0; flex-wrap: wrap; }
.journal-list { padding-left: 1.2rem; }
/* Sign-in and account */
.nav-login { background: transparent; color: inherit; border: 1px solid var(--gold); padding: .3rem .8rem; font: inherit; cursor: pointer; }
.nav-login[hidden] { display: none; }
.login-backdrop { position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,.55); display: grid; place-items: center; padding: 1rem; }
.login-backdrop[hidden] { display: none; }
.login-modal { background: #fff; color: #1a1a1a; width: min(420px, 100%); padding: 1rem 1.2rem; border-top: 4px solid #e8711a; }
.login-modal header { display: flex; justify-content: space-between; align-items: center; margin-bottom: .8rem; }
.login-close { background: transparent; font-size: 1.5rem; color: #1a1a1a; }
.login-providers { display: grid; gap: .5rem; }
.login-provider { display: flex; align-items: center; gap: .6rem; padding: .6rem .8rem; border: 1px solid #1a1a1a; color: #1a1a1a; text-decoration: none; font-weight: 600; }
.login-provider:hover, .login-provider:focus-visible { background: #fdebdc; }
.account .panel { margin: 1rem 0; }
.account .avatar { border-radius: 50%; }
.account .check { display: block; margin: .8rem 0; }
.account button.danger { background: #8b1a1a; color: #fff; }
.account button.ghost, .account .ghost { background: transparent; color: inherit; border: 1px solid currentColor; }
.form-notice { padding: .6rem .8rem; background: #fdebdc; border-left: 4px solid #e8711a; }
.form-notice[hidden] { display: none; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
