/* luwu.ai — shares the palette and type of luwu.dev so the family of sites reads as one. */
:root {
  --bg: #F5F1E8; --surface: #FBF9F4; --surface-2: #F0EADC; --line: #E2D9C6; --line-strong: #CDBF9F;
  --ink: #1D2433; --muted: #5F6779; --gold: #7A5C22; --gold-bright: #C9A35A; --gold-soft: #F0E6CF;
  --term: #0E1525; --term-ink: #E6E2D6; --green: #2F7D5B; --green-soft: #DDEFE4; --amber-soft: #F6E7C6;
  --sans: "IBM Plex Sans", -apple-system, "Segoe UI", system-ui, "PingFang TC", "Hiragino Sans CNS", "Noto Sans CJK TC", "Microsoft JhengHei", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;
  --han: "Noto Serif TC", "Songti TC", "PingFang TC", serif;
  --radius: 14px; --wrap: 1120px; --gutter: 16px;
  --shadow: 0 1px 2px rgba(29,36,51,.06), 0 12px 32px -16px rgba(29,36,51,.25);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0E1525; --surface: #151E33; --surface-2: #1B2540; --line: #2C3A5C; --line-strong: #3C4C72;
    --ink: #E6E2D6; --muted: #9AA2B5; --gold: #D2AE68; --gold-bright: #C9A35A; --gold-soft: #2A2A22;
    --term: #0A101D; --green: #6FC59A; --green-soft: #17311F; --amber-soft: #3A3119;
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 12px 32px -16px rgba(0,0,0,.6);
  }
}
:root[data-theme="dark"] {
  --bg: #0E1525; --surface: #151E33; --surface-2: #1B2540; --line: #2C3A5C; --line-strong: #3C4C72;
  --ink: #E6E2D6; --muted: #9AA2B5; --gold: #D2AE68; --gold-bright: #C9A35A; --gold-soft: #2A2A22;
  --term: #0A101D; --green: #6FC59A; --green-soft: #17311F; --amber-soft: #3A3119;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--sans); font-size: 17px; line-height: 1.6; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--gold); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -.01em; margin: 0 0 .5em; font-weight: 600; }
h1 { font-size: clamp(2rem, 5vw, 3.1rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
[data-lang="zh-hant"] h1, [data-lang="zh-hant"] h2, .name-han, .han { font-family: var(--han); }
[data-lang="zh-hant"] h1 { letter-spacing: 0; font-weight: 700; }
[data-lang="zh-hant"] h2 { letter-spacing: 0; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--bg); padding: 8px 12px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }
.eyebrow { font-family: var(--mono); font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; color: var(--gold); margin: 0 0 .9em; }
[data-lang="zh-hant"] .eyebrow { letter-spacing: .2em; }
.lead { font-size: 1.2rem; color: var(--muted); max-width: 60ch; }
.muted { color: var(--muted); }
.link { font-weight: 500; display: inline-flex; align-items: center; gap: .35em; }
.link svg { flex: none; }
.han { color: var(--muted); font-weight: 500; font-size: .85em; margin-left: .2em; }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: .5em; padding: .65em 1.15em; border-radius: 999px; border: 1px solid var(--line-strong); color: var(--ink); background: var(--surface); font-weight: 500; font-size: .95rem; transition: background .15s, border-color .15s, transform .15s; }
.btn:hover { text-decoration: none; border-color: var(--gold-bright); background: var(--gold-soft); }
.btn-primary { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn-primary:hover { background: var(--gold); border-color: var(--gold); color: #fff; }
.btn-small { padding: .45em .95em; font-size: .9rem; }
.btn-lg { padding: .85em 1.4em; font-size: 1.05rem; }
.btn svg { width: 18px; height: 18px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 1.6em 0; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid transparent; transition: border-color .2s; }
.site-header.scrolled { border-bottom-color: var(--line); }
.nav-row { display: flex; align-items: center; gap: 24px; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); font-weight: 600; font-size: 1.15rem; letter-spacing: -.01em; }
.brand:hover { text-decoration: none; }
.brand-mark { width: 30px; height: 30px; color: var(--gold); }
.brand-dot { color: var(--gold-bright); }
.brand-han { font-family: var(--han); color: var(--muted); font-weight: 600; font-size: .95rem; margin-left: 2px; }
.site-nav { margin-left: auto; }
.site-nav ul, .mobile-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; }
.site-nav a { display: block; padding: 8px 12px; color: var(--ink); border-radius: 8px; font-weight: 500; font-size: .95rem; }
.site-nav a:hover { background: var(--surface-2); text-decoration: none; }
.site-nav a[aria-current="page"] { color: var(--gold); }
.nav-tools { display: flex; align-items: center; gap: 8px; }
.lang-switch { display: inline-flex; align-items: center; justify-content: center; min-width: 38px; height: 36px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--line); color: var(--ink); font-weight: 600; font-size: .85rem; font-family: var(--han); }
.lang-switch:hover { text-decoration: none; border-color: var(--gold-bright); background: var(--gold-soft); }
.menu-btn { display: none; width: 40px; height: 40px; border: 1px solid var(--line); background: var(--surface); border-radius: 8px; cursor: pointer; flex-direction: column; justify-content: center; gap: 6px; align-items: center; }
.menu-btn span { display: block; width: 18px; height: 2px; background: var(--ink); transition: transform .2s; }
.menu-btn[aria-expanded="true"] span:first-child { transform: translateY(4px) rotate(45deg); }
.menu-btn[aria-expanded="true"] span:last-child { transform: translateY(-4px) rotate(-45deg); }
.mobile-nav { border-top: 1px solid var(--line); background: var(--bg); }
.mobile-nav ul { flex-direction: column; padding: 8px var(--gutter) 16px; }
.mobile-nav a { display: block; padding: 12px 8px; color: var(--ink); font-weight: 500; border-bottom: 1px solid var(--line); }
@media (max-width: 820px) {
  .site-nav, .nav-tools .btn { display: none; }
  .menu-btn { display: flex; }
  .nav-tools { margin-left: auto; }
  .brand-han { display: none; }
}

/* Sections */
.section { padding: 72px 0; }
.section + .section { padding-top: 0; }
.sec-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 8px; }
.sec-head h2 { margin-bottom: .3em; }
.two { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin-top: 28px; }
.three { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 28px; }
.four { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 28px; list-style: none; padding: 0; }
@media (max-width: 960px) { .four { grid-template-columns: repeat(2, 1fr); } .three { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .two, .three, .four { grid-template-columns: 1fr; } }

/* Hero */
.hero { padding: 56px 0 40px; position: relative; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 40px; align-items: center; }
.hero h1 { margin-bottom: .45em; }
.hero .lead { font-size: 1.15rem; }
.facts { list-style: none; padding: 0; margin: 1.5em 0 0; display: flex; gap: 16px; border-top: 1px solid var(--line); padding-top: 1.2em; }
.facts li { display: flex; flex-direction: column; flex: 1 1 0; min-width: 0; }
.facts strong { font-family: var(--mono); font-size: 1.4rem; color: var(--gold); font-weight: 500; }
.facts span { font-size: .85rem; color: var(--muted); }
.hero-art { position: relative; aspect-ratio: 16 / 11; border-radius: 20px; background: linear-gradient(180deg, var(--surface) 0%, var(--surface-2) 100%); border: 1px solid var(--line); overflow: hidden; box-shadow: var(--shadow); }
.ridge { position: absolute; inset: 0; width: 100%; height: 100%; }
.tiles { position: absolute; left: 18px; right: 18px; bottom: 18px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.tile { background: color-mix(in srgb, var(--surface) 92%, transparent); border: 1px solid var(--line); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 4px; align-items: flex-start; backdrop-filter: blur(6px); }
.tile .picon { width: 32px; height: 32px; margin-bottom: 4px; }
.tile .picon img, .tile .picon svg { width: 32px; height: 32px; }
.tile span { font-weight: 600; font-size: .85rem; line-height: 1.2; }
.tile small { font-family: var(--mono); color: var(--muted); font-size: .7rem; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } .hero-art { aspect-ratio: 16 / 10; } }
@media (max-width: 480px) { .tiles { grid-template-columns: 1fr 1fr; } .tile:nth-child(3) { display: none; } }

/* Cards */
.focus-card, .pcard, .svc-card, .ccard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); }
.ficon { display: inline-flex; width: 44px; height: 44px; border-radius: 10px; background: var(--gold-soft); color: var(--gold); align-items: center; justify-content: center; margin-bottom: 14px; }
.ficon svg { width: 26px; height: 26px; }
.pcard { display: flex; flex-direction: column; }
.pcard p { flex: 1; color: var(--muted); }
.pcard-head { display: flex; gap: 14px; align-items: center; margin-bottom: 14px; }
.pcard-head h3, .pcard-head h2 { margin: 0 0 4px; }
.picon { display: inline-flex; width: 44px; height: 44px; border-radius: 11px; overflow: hidden; align-items: center; justify-content: center; background: var(--term); flex: none; }
.picon img { width: 44px; height: 44px; }
.picon-luwu svg { width: 30px; height: 30px; color: var(--gold-bright); }
.status { display: inline-block; font-family: var(--mono); font-size: .72rem; padding: 2px 8px; border-radius: 999px; background: var(--green-soft); color: var(--green); }
.status-dev { background: var(--amber-soft); color: var(--gold); }
.pcard-foot { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 14px; margin-top: 4px; font-size: .95rem; }

/* Screenshots */
.shots { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.shots figure { margin: 0; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: var(--term); box-shadow: var(--shadow); }
.shots figcaption { font-family: var(--mono); font-size: .78rem; color: var(--term-ink); padding: 10px 14px; opacity: .8; }
@media (max-width: 700px) { .shots { grid-template-columns: 1fr; } }

/* Numbered lists */
.four li, .steps li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.num { font-family: var(--mono); color: var(--gold); font-size: .85rem; display: block; margin-bottom: 10px; }
.four p, .steps p { color: var(--muted); font-size: .95rem; margin: 0; }
.steps { list-style: none; padding: 0; margin: 24px 0 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; counter-reset: s; }
@media (max-width: 960px) { .steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .steps { grid-template-columns: 1fr; } }

/* Name section */
.name-section .wrap { border-top: 1px solid var(--line); padding-top: 72px; }
.name-grid { display: grid; grid-template-columns: 240px 1fr; gap: 40px; align-items: center; }
.name-han { font-size: clamp(5rem, 14vw, 9rem); line-height: 1; color: var(--gold-bright); font-weight: 700; writing-mode: vertical-rl; text-align: center; justify-self: center; opacity: .9; }
.name-grid p { max-width: 62ch; }
@media (max-width: 700px) { .name-grid { grid-template-columns: 1fr; } .name-han { writing-mode: horizontal-tb; justify-self: start; font-size: 4.5rem; } }

/* CTA */
.cta-box { background: var(--term); color: var(--term-ink); border-radius: 20px; padding: 44px; display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.cta-box h2 { color: #fff; margin-bottom: .3em; }
.cta-box p { margin: 0; color: #B8BECB; max-width: 56ch; }
.cta-box .btn-primary { background: var(--gold-bright); border-color: var(--gold-bright); color: #1D2433; }
.cta-box .btn-primary:hover { background: #fff; border-color: #fff; }

/* Page head */
.page-head { padding-top: 56px; padding-bottom: 40px; }
.page-head h1 { max-width: 20ch; }
.notfound { min-height: 50vh; }

/* Products page */
.product-list { display: flex; flex-direction: column; gap: 56px; }
.product-block { display: grid; grid-template-columns: 1fr 1fr; gap: 36px; align-items: center; padding-top: 56px; border-top: 1px solid var(--line); scroll-margin-top: 80px; }
.product-block:nth-child(even) .product-text { order: 2; }
.product-block h2 { font-size: 1.7rem; }
.pmedia { margin: 0; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: var(--term); box-shadow: var(--shadow); }
.checks { list-style: none; padding: 0; margin: 1em 0; display: grid; gap: 8px; }
.checks li { position: relative; padding-left: 26px; font-size: .95rem; }
.checks li::before { content: ""; position: absolute; left: 0; top: .5em; width: 14px; height: 7px; border-left: 2px solid var(--gold); border-bottom: 2px solid var(--gold); transform: rotate(-45deg); }
.courses { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; margin: 1em 0; }
.courses h3 { font-size: .9rem; color: var(--muted); margin-bottom: .5em; font-weight: 500; }
.courses ul { margin: 0; padding-left: 1.2em; font-size: .95rem; }
.links { display: flex; gap: 20px; flex-wrap: wrap; margin-top: 1em; }
@media (max-width: 860px) { .product-block { grid-template-columns: 1fr; } .product-block:nth-child(even) .product-text { order: 0; } }

/* HaangSaanTung device illustration */
.pmedia-dev { display: flex; align-items: center; justify-content: center; padding: 40px; background: linear-gradient(160deg, var(--surface-2), var(--surface)); border-color: var(--line); aspect-ratio: 16/10; }
.device { width: 220px; aspect-ratio: 65/95; background: #E9611F; border-radius: 26px; padding: 16px 14px 14px; box-shadow: 0 20px 40px -20px rgba(0,0,0,.5), inset 0 2px 0 rgba(255,255,255,.35); display: flex; flex-direction: column; gap: 12px; }
.device-screen { flex: 1; background: #1E2A2E; border-radius: 12px; padding: 12px; color: #D9F2E6; display: flex; flex-direction: column; justify-content: space-between; }
.device-map { color: #7EDBA7; }
.device-text { display: flex; flex-direction: column; font-size: .68rem; line-height: 1.4; }
.device-text strong { color: #fff; font-size: .78rem; }
.device-text span:last-child { font-family: var(--mono); opacity: .7; }
.device-keys { display: flex; gap: 8px; justify-content: center; }
.device-keys i { width: 34px; height: 12px; border-radius: 6px; background: rgba(0,0,0,.25); }
.device-keys i.sos { width: auto; height: auto; padding: 1px 8px; background: #fff; color: #E9611F; font: 700 .6rem/1.5 var(--mono); font-style: normal; }

/* Services */
.svc .svc-head { max-width: 62ch; }
.svc .svc-head p { color: var(--muted); }
.svc-card h3 { margin-bottom: .4em; }
.svc-card p { color: var(--muted); font-size: .97rem; }
.process .wrap { border-top: 1px solid var(--line); padding-top: 72px; }

/* About */
.prose-grid { display: grid; grid-template-columns: 1fr 2fr; gap: 32px; }
.prose p { max-width: 64ch; }
.facts-table { display: grid; gap: 0; margin: 24px 0 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.facts-table > div { display: grid; grid-template-columns: 180px 1fr; gap: 16px; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.facts-table > div:last-child { border-bottom: 0; }
.facts-table dt { color: var(--muted); font-size: .9rem; }
.facts-table dd { margin: 0; }
@media (max-width: 700px) { .prose-grid { grid-template-columns: 1fr; } .facts-table > div { grid-template-columns: 1fr; gap: 2px; } }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.ccard h2 { font-size: 1rem; color: var(--muted); font-weight: 500; margin-bottom: .4em; }
.ccard .big { font-size: 1.35rem; font-weight: 600; display: inline-block; margin-bottom: .4em; word-break: break-all; }
.ccard .big-text { font-size: 1.05rem; margin-bottom: .4em; }
.ccard p { color: var(--muted); font-size: .95rem; margin: 0; }
.cicon { display: inline-flex; width: 40px; height: 40px; border-radius: 10px; background: var(--gold-soft); color: var(--gold); align-items: center; justify-content: center; margin-bottom: 12px; }
.cicon svg { width: 22px; height: 22px; }
.plain { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; font-size: .95rem; color: var(--muted); }
.plain a { display: inline-flex; align-items: center; gap: .3em; }
.mail-form { margin-top: 28px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; }
.mail-form h2 { font-size: 1.1rem; margin-bottom: 1em; }
.mail-form .row { display: grid; grid-template-columns: 1fr 1fr auto; gap: 16px; align-items: end; }
.mail-form label { display: flex; flex-direction: column; gap: 6px; font-size: .85rem; color: var(--muted); }
.mail-form select, .mail-form input { font: inherit; color: var(--ink); background: var(--bg); border: 1px solid var(--line-strong); border-radius: 10px; padding: 10px 12px; }
@media (max-width: 760px) { .contact-grid { grid-template-columns: 1fr; } .mail-form .row { grid-template-columns: 1fr; } }

/* Footer */
.site-footer { border-top: 1px solid var(--line); margin-top: 40px; padding: 48px 0 28px; background: var(--surface); font-size: .93rem; }
.foot-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1.3fr; gap: 32px; }
.foot-grid h2 { font-size: .8rem; font-family: var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: .9em; font-weight: 500; }
.foot-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.foot-grid a { color: var(--ink); }
.foot-grid a:hover { color: var(--gold); }
.foot-brand p { color: var(--muted); max-width: 40ch; margin-top: 12px; }
.foot-quote { font-family: var(--han); color: var(--gold); font-size: .9rem; }
.foot-addr { color: var(--muted); line-height: 1.5; }
.foot-bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: .85rem; }
.foot-bottom p { margin: 0; }
@media (max-width: 860px) { .foot-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .foot-grid { grid-template-columns: 1fr; } }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .btn, .menu-btn span { transition: none; } }
