/* Palette: the mascot's cold blues only. Dark ink for the stage, the team band and the footer;
   frost for everything read in between. */
:root {
  --frost: #EEF3F9;
  --snow: #F8FAFD;
  --ink: #0A1322;
  --ink-soft: #46546B;
  --cobalt: #2F5FC4;
  --ice: #A8CBF7;
  --line: #CBD7E6;
  --rule-dark: #24344F;
  --mute-dark: #B7C5DC;
  --display: "YouSheBiaoTiHei", "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", sans-serif;
  --text: "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", system-ui, sans-serif;
  --gutter: clamp(20px, 5vw, 72px);
  --measure: 1180px;
  --section: clamp(56px, 7vw, 104px);
  --split: minmax(0, 1fr) minmax(0, 1.25fr); /* heading on the left, reading column on the right */
  --split-gap: clamp(20px, 4vw, 64px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--frost);
  color: var(--ink);
  font: 17px/1.75 var(--text);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
h1, h2, h3 { font-family: var(--display); font-weight: 400; margin: 0; }
h1, h2, h3, .brand { word-spacing: -.3em; } /* the display face has a very wide space */
h2 { font-size: clamp(1.9rem, 3.8vw, 3.1rem); line-height: 1.25; }
p { margin: 0; text-wrap: pretty; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--ice); outline-offset: 4px; border-radius: 6px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* Nav: always on the dark bar so it reads over both the stage and the light page */
.nav {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px var(--gutter);
  background: color-mix(in srgb, var(--ink) 82%, transparent);
  backdrop-filter: blur(14px);
  color: var(--snow);
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--display); font-size: 20px; }
.nav nav { display: flex; align-items: center; gap: clamp(14px, 2.6vw, 34px); font-size: 15px; }
.nav nav a { text-decoration: none; color: #AEBDD6; }
.nav nav a:hover { color: var(--snow); }
.lang { display: inline-flex; padding: 2px; border: 1.5px solid #3A4C6B; border-radius: 999px; font-size: 13px; }
.nav nav .lang a { padding: 2px 10px; border-radius: 999px; }
.nav nav .lang a[aria-current="true"] { background: var(--rule-dark); color: var(--snow); }
.nav nav .nav-cta { color: var(--ink); background: var(--ice); border-radius: 999px; padding: 5px 16px; font-weight: 500; }
.nav nav .nav-cta:hover { background: var(--snow); color: var(--ink); }
.nav-links { display: contents; }
.nav-toggle { display: none; }

/* Stage: the dark opening. One soft light behind the mascot, nothing else moving but the mascot. */
.stage {
  position: relative; color: var(--snow); margin-top: -62px; padding-top: 62px;
  background:
    radial-gradient(46% 62% at 78% 48%, rgba(79, 127, 219, .30), transparent 72%),
    var(--ink);
}
.hero {
  max-width: var(--measure); margin: 0 auto;
  min-height: min(82vh, 760px);
  padding: clamp(40px, 7vw, 96px) var(--gutter) clamp(56px, 8vw, 104px);
  display: grid; grid-template-columns: 1.4fr .6fr; align-items: center; gap: clamp(24px, 4vw, 64px);
}
.hero h1 { font-size: clamp(2.3rem, 5.4vw, 4.7rem); line-height: 1.2; letter-spacing: .01em; }
.line { display: block; overflow: hidden; padding-bottom: .06em; }
.lede { margin-top: 26px; max-width: 34em; font-size: clamp(1rem, 1.5vw, 1.2rem); color: var(--mute-dark); }

/* The idea prompt: type a sentence, press Enter, and it becomes an email to us */
.prompt {
  margin-top: 32px; max-width: 34em;
  display: flex; align-items: center; gap: 12px; padding: 7px 7px 7px 16px;
  border: 1.5px solid #3A4C6B; border-radius: 18px; background: rgba(10, 19, 34, .55);
  transition: border-color .2s, box-shadow .2s;
}
.prompt:focus-within { border-color: var(--ice); box-shadow: 0 0 0 4px rgba(168, 203, 247, .16); }
.prompt-mark { flex: none; width: 22px; height: auto; overflow: visible; }
.prompt input {
  flex: 1; min-width: 0; border: 0; outline: 0; background: none; color: var(--snow);
  font: inherit; font-size: 1.05rem; padding: 12px 0; caret-color: var(--ice);
}
.prompt input::placeholder { color: #8FA3C4; opacity: 1; }
.prompt button {
  flex: none; border: 0; cursor: pointer; font: inherit; font-weight: 600;
  background: var(--ice); color: var(--ink); padding: 12px 26px; border-radius: 12px;
  transition: background .2s;
}
.prompt button:hover { background: var(--snow); }
.prompt-hint { margin-top: 12px; color: #8FA3C4; font-size: .92rem; }
.hero-note { margin-top: 30px; padding-left: 14px; border-left: 2px solid var(--ice); color: var(--ice); font-size: .95rem; max-width: 34em; }

/* Arrival: the headline rises line by line while the mascot draws itself. The only load animation. */
.js .line > span { display: block; transform: translateY(112%); animation: rise .95s cubic-bezier(.2, .8, .2, 1) forwards; }
.js .line:nth-child(2) > span { animation-delay: .12s; }
.js .line:nth-child(3) > span { animation-delay: .24s; }
.js .lede, .js .prompt, .js .prompt-hint, .js .hero-note { opacity: 0; animation: fade-up .8s ease .7s forwards; }
.js .prompt { animation-delay: .82s; }
.js .prompt-hint { animation-delay: .9s; }
.js .hero-note { animation-delay: 1s; }
@keyframes rise { to { transform: none; } }
@keyframes fade-up { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

/* The hero mascot: drawn on load, eyes follow the pointer, reacts to the idea prompt */
.hero-mascot { animation: float 5.5s ease-in-out 2.2s infinite; }
.hero-mascot svg {
  width: 100%; max-width: 400px; display: block; margin: 0 auto; overflow: visible;
  filter: drop-shadow(0 0 26px rgba(120, 170, 255, .45));
  transform: rotate(var(--tilt, 0deg)) translateY(var(--nod, 0px));
  transition: transform .5s cubic-bezier(.2, .7, .2, 1), filter .5s;
}
.stage.is-listening .hero-mascot svg { filter: drop-shadow(0 0 34px rgba(150, 195, 255, .7)); }
.m-body { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 1.5s cubic-bezier(.6, 0, .2, 1) .2s forwards; }
.m-shade, .m-hi, .m-ground { opacity: 0; animation: appear .6s ease 1.5s forwards; }
.m-shade { --o: .9; } .m-hi { --o: .45; } .m-ground { --o: .45; }
.m-face { opacity: 0; animation: appear .5s ease 1.7s forwards; --o: 1; }
.m-pupils { transition: transform .12s ease-out; }
.m-mood { transition: opacity .16s ease; }
.m-mood-wow, .m-mood-happy { opacity: 0; }
#mascot[data-mood="wow"] .m-mood-cool, #mascot[data-mood="happy"] .m-mood-cool { opacity: 0; }
#mascot[data-mood="wow"] .m-mood-wow, #mascot[data-mood="happy"] .m-mood-happy { opacity: 1; }
.hero-mascot svg.is-nodding { --nod: 6px; transition-duration: .09s, .5s; }
.hero-mascot svg.is-hopping { animation: hop .7s cubic-bezier(.3, .6, .3, 1); }
@keyframes hop {
  30% { transform: rotate(var(--tilt, 0deg)) translateY(-22px); }
  60% { transform: rotate(var(--tilt, 0deg)) translateY(3px); }
}
.m-eyes { transform-box: fill-box; transform-origin: center; transition: transform .09s ease-in; }
.is-blinking .m-eyes { transform: scaleY(.12); }
@keyframes float { 50% { transform: translateY(-12px); } }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes appear { to { opacity: var(--o); } }

/* Drip: the dark stage sheds a drop that lands on the first rule of the light section */
.drip { --cycle: 4.6s; position: absolute; top: 100%; left: var(--drip-x, 82%); width: 0; height: 0; z-index: 3; pointer-events: none; }
.drip i { position: absolute; display: block; }
.bulge {
  left: -17px; top: -1px; width: 34px; height: 18px; background: var(--ink);
  border-radius: 0 0 50% 50% / 0 0 100% 100%; transform-origin: top; transform: scaleY(0);
  animation: bulge var(--cycle) ease-in-out infinite;
}
.drop {
  left: -9px; top: 0; width: 18px; height: 18px; background: var(--ink);
  border-radius: 0 50% 50% 50%; opacity: 0;
  animation: drop var(--cycle) linear infinite;
}
.ripple {
  left: -26px; top: calc(var(--fall, 200px) - 6px); width: 52px; height: 12px;
  border: 2px solid var(--cobalt); border-radius: 50%; opacity: 0;
  animation: ripple var(--cycle) ease-out infinite;
}
@keyframes bulge {
  0% { transform: scaleY(0); }
  24% { transform: scaleY(1); }
  31% { transform: scale(.62, 1.7); }
  37% { transform: scale(.9, .25); }
  45%, 100% { transform: scaleY(0); }
}
@keyframes drop {
  0%, 30% { opacity: 0; transform: translateY(14px) rotate(45deg); }
  31% { opacity: 1; transform: translateY(16px) rotate(45deg) scale(.9); animation-timing-function: cubic-bezier(.55, 0, 1, .6); }
  58% { opacity: 1; transform: translateY(calc(var(--fall, 200px) - 16px)) rotate(45deg) scale(.82, 1.12); }
  59%, 100% { opacity: 0; transform: translateY(calc(var(--fall, 200px) - 16px)) rotate(45deg); }
}
@keyframes ripple {
  0%, 57% { opacity: 0; transform: scale(.15); }
  59% { opacity: .9; transform: scale(.3); }
  84%, 100% { opacity: 0; transform: scale(1.5); }
}

/* Light sections share one frame */
.services, .process { max-width: var(--measure); margin: 0 auto; padding: var(--section) var(--gutter); }

/* Services: one ruled row each, name on the left, what it means on the right */
.services > h2 { margin-bottom: clamp(20px, 3vw, 40px); }
.service {
  display: grid; grid-template-columns: var(--split); gap: 8px var(--split-gap); align-items: baseline;
  padding: clamp(24px, 3vw, 38px) 0; border-top: 1.5px solid var(--line);
}
.service:last-child { border-bottom: 1.5px solid var(--line); }
.service h3 { font-size: clamp(1.6rem, 3.1vw, 2.6rem); line-height: 1.25; }
.s-body p { font-size: 1.1rem; }
.s-body .s-scope { margin-top: 6px; color: var(--ink-soft); font-size: .98rem; }

/* The case page: text on the left; the product itself on a dark panel, like the stage. */
.work { max-width: var(--measure); margin: 0 auto; padding: clamp(36px, 5vw, 72px) var(--gutter) var(--section); }
.case { display: grid; grid-template-columns: var(--split); gap: var(--split-gap); align-items: center; }
.case + .case { margin-top: var(--section); padding-top: var(--section); border-top: 1.5px solid var(--line); }
.case h2 { font-size: clamp(1.6rem, 3.1vw, 2.6rem); line-height: 1.25; }
.case-kind { margin-top: 6px; color: var(--cobalt); }
.case-pitch { margin-top: 18px; font-size: 1.1rem; }
.case-facts { list-style: none; margin: 14px 0 0; padding: 0; color: var(--ink-soft); font-size: .98rem; }
.case-facts li { padding-left: 18px; position: relative; }
.case-facts li::before { content: ""; position: absolute; left: 0; top: .8em; width: 8px; height: 2.5px; border-radius: 2px; background: var(--cobalt); }
.case-actions { margin-top: 26px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; }
.case-meta, .case-note { color: var(--ink-soft); font-size: .92rem; }
.case-note { margin-top: 12px; }
.case-shot {
  margin: 0; padding: clamp(24px, 4vw, 52px); border-radius: 24px; display: grid; place-items: center;
  background: radial-gradient(70% 70% at 50% 40%, rgba(79, 127, 219, .34), transparent 75%), var(--ink);
}
.case-shot img { display: block; width: min(100%, 358px); height: auto; border-radius: 8px; box-shadow: 0 26px 60px -22px rgba(0, 0, 0, .7); }
.case-shot img.is-phone { width: min(100%, 290px); border-radius: 24px; } /* a phone screenshot: narrower, rounder */
/* A whole desktop screen: it needs the width, so the frame is thinner and the picture column wider. */
.case.has-wide .case-shot { padding: clamp(12px, 1.8vw, 22px); }
.case-shot a { display: block; width: 100%; border-radius: 8px; }
.case-shot img.is-wide { width: 100%; }
@media (min-width: 861px) { .case.has-wide { grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); } }

/* Team: a dark band mid-page. The part of the mascot a line talks about lights up. */
.team {
  color: var(--snow);
  background: radial-gradient(45% 70% at 88% 10%, rgba(79, 127, 219, .28), transparent 70%), var(--ink);
}
.team-inner {
  max-width: var(--measure); margin: 0 auto; padding: clamp(64px, 8vw, 112px) var(--gutter);
  display: grid; grid-template-columns: var(--split); grid-template-rows: auto 1fr;
  grid-template-areas: "head list" "figure list"; gap: 0 var(--split-gap); align-items: start;
}
.team-head { grid-area: head; }
.team-head h2 { text-wrap: balance; }
.team-head p { margin-top: 18px; color: var(--mute-dark); font-size: clamp(1rem, 1.4vw, 1.15rem); max-width: 22em; }
.anatomy { grid-area: figure; display: block; width: clamp(170px, 20vw, 250px); margin: clamp(28px, 4vw, 48px) 0 0 -8px; overflow: visible; color: #B4D3FA; filter: drop-shadow(0 0 18px rgba(120, 170, 255, .4)); }
.anatomy { transition: filter .3s; }
.a-part { transition: color .3s, opacity .3s, filter .3s; }
.a-part[data-part="brain"], .a-part[data-part="core"] { opacity: .55; }
.anatomy[data-active="brain"] [data-part="brain"], .anatomy[data-active="core"] [data-part="core"],
.anatomy[data-active="eyes"] [data-part="eyes"], .anatomy[data-active="mouth"] [data-part="mouth"] {
  color: #FFFFFF; opacity: 1; filter: drop-shadow(0 0 7px var(--ice));
}
.team-list { grid-area: list; list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 3.4vw, 44px) clamp(24px, 3vw, 44px); }
.team-list li { padding-top: 18px; border-top: 2px solid var(--rule-dark); position: relative; }
.team-list li::before { content: ""; position: absolute; left: 0; top: -2px; width: 44px; height: 2px; background: var(--ice); transition: width .4s cubic-bezier(.2, .7, .2, 1), background .3s; }
.team-list li.is-active::before { width: 100%; background: #FFFFFF; }
.team-list li:last-child:nth-child(odd) { grid-column: 1 / -1; } /* an odd one out takes the full row */
.anatomy[data-active="name"] { filter: drop-shadow(0 0 26px rgba(170, 205, 255, .85)); } /* the name is the whole droplet */
.team-list h3 { font-size: clamp(1.4rem, 2.1vw, 1.8rem); line-height: 1.3; color: var(--ice); }
.team-list p { margin-top: 8px; color: #C9D5E8; font-size: 1rem; }

/* Process: a real sequence, so it is numbered. The mascot's mood changes along the way. */
.track { position: relative; margin-top: clamp(28px, 4vw, 48px); }
.progress { position: absolute; left: 0; top: 0; height: 3px; width: calc(var(--p, 0) * 100%); background: var(--cobalt); z-index: 1; transition: width .15s linear; }
.process ol { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(18px, 2.6vw, 36px); counter-reset: step; }
.process li { counter-increment: step; padding-top: 24px; border-top: 3px solid var(--line); }
.process li .mm { width: clamp(52px, 5.4vw, 68px); margin-left: -4px; }
.process h3 { margin-top: 16px; font-size: 1.5rem; line-height: 1.3; }
.process h3::before { content: counter(step); margin-right: .4em; color: var(--cobalt); }
.process li p { margin-top: 6px; color: var(--ink-soft); font-size: .98rem; }
@media (prefers-reduced-motion: no-preference) {
  /* A step's mascot wakes up when the progress line reaches it (main.js sets .is-on) */
  .js .process li .mm { opacity: .3; transition: opacity .5s; }
  .js .process li.is-on .mm { opacity: 1; }
}


/* Contact / footer */
.contact { color: var(--snow); background: radial-gradient(50% 80% at 12% 0%, rgba(79, 127, 219, .28), transparent 70%), var(--ink); }
.contact-main {
  max-width: var(--measure); margin: 0 auto; padding: clamp(64px, 9vw, 128px) var(--gutter) clamp(40px, 5vw, 72px);
  display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); gap: clamp(28px, 4vw, 64px); align-items: end;
}
.contact h2 { font-size: clamp(2.2rem, 5.2vw, 4.6rem); line-height: 1.22; }
.contact-head .mm { width: clamp(84px, 9vw, 128px); margin: 0 0 clamp(14px, 2vw, 26px) -6px; overflow: visible; }
.contact dl { margin: 0; }
.contact dl div { display: grid; grid-template-columns: 5em 1fr; padding: 14px 0; border-top: 1.5px solid var(--rule-dark); }
.contact dl div:last-child { border-bottom: 1.5px solid var(--rule-dark); }
.contact dt { color: var(--ice); }
.contact dd { margin: 0; font-size: 1.1rem; }
.contact dd a { color: inherit; text-decoration: underline; text-decoration-color: var(--ice); text-underline-offset: .25em; overflow-wrap: anywhere; }
.contact dd a:hover, .contact dd a:focus-visible { color: var(--ice); }
.copy { display: inline-flex; align-items: baseline; gap: 14px; padding: 0; border: 0; background: none; color: inherit; font: inherit; cursor: pointer; text-align: left; }
.copy-hint { color: var(--ice); font-size: .85rem; text-decoration: underline; text-underline-offset: .25em; }
.copy.is-copied .copy-hint { color: var(--snow); text-decoration: none; }
.contact-hint { margin-top: 16px; color: #A9B7CE; font-size: .95rem; line-height: 1.7; }
.legal {
  max-width: var(--measure); margin: 0 auto; padding: 22px var(--gutter) 30px;
  display: flex; flex-wrap: wrap; gap: 10px 28px; align-items: center; font-size: .85rem; color: #8FA2C0;
}
.legal .brand { font-size: 1.1rem; color: var(--snow); margin-right: auto; }
.legal .icp { text-decoration: none; }
.legal .icp:hover, .legal .icp:focus-visible { color: var(--ice); text-decoration: underline; text-underline-offset: .25em; }

/* Small mascots: the droplet with different expressions */
.mm { display: block; height: auto; overflow: visible; }
.mm-light { color: var(--cobalt); }
.mm-dark { color: #B4D3FA; filter: drop-shadow(0 0 14px rgba(120, 170, 255, .45)); }
.mm-arm { transform-box: fill-box; transform-origin: 0% 100%; animation: wave 1.6s ease-in-out infinite; }
@keyframes wave { 0%, 100% { transform: rotate(-8deg); } 50% { transform: rotate(18deg); } }

/* Buttons (blog) */
.btn { display: inline-block; text-decoration: none; padding: 14px 32px; border-radius: 999px; font-weight: 600; transition: background .2s; }
.btn-dark { background: var(--ink); color: var(--snow); }
.btn-dark:hover { background: var(--cobalt); color: var(--snow); }

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; min-height: 0; }
  .hero-mascot { order: -1; }
  .hero-mascot svg { max-width: 170px; margin: 0; }
  .service, .case, .contact-main { grid-template-columns: 1fr; }
  .process ol { grid-template-columns: 1fr 1fr; gap: 28px 20px; }
  /* The figure stays in view on the left while the list scrolls past it */
  .team-inner { grid-template-columns: clamp(76px, 20vw, 150px) minmax(0, 1fr); grid-template-rows: auto auto; grid-template-areas: "head head" "figure list"; gap: 32px 18px; }
  .anatomy { position: sticky; top: 92px; width: 100%; margin: 0 0 0 -4px; }
  .team-list { grid-template-columns: 1fr; }
  /* Phone and tablet: the section links move into a panel opened by the menu button */
  .nav nav { gap: 10px; }
  .nav nav .nav-cta { padding: 7px 16px; }
  .nav-links {
    display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column;
    padding: 6px var(--gutter) 18px; background: var(--ink); border-top: 1px solid #1D2B45;
    box-shadow: 0 24px 40px -20px rgba(3, 10, 22, .8);
  }
  .nav.is-open .nav-links { display: flex; }
  .nav .nav-links a { padding: 15px 0; font-size: 1.1rem; color: var(--snow); border-bottom: 1px solid #1D2B45; }
  .nav .nav-links .lang { align-self: flex-start; margin-top: 18px; font-size: .95rem; }
  .nav .nav-links .lang a { padding: 6px 16px; font-size: inherit; border-bottom: 0; color: #AEBDD6; }
  .nav-toggle {
    display: block; position: relative; width: 44px; height: 44px; margin-right: -10px; padding: 0;
    border: 0; background: none; color: var(--snow); cursor: pointer;
  }
  .no-js .nav-toggle { display: none; }
  .nav-toggle i, .nav-toggle i::after { position: absolute; left: 11px; width: 22px; height: 2px; border-radius: 2px; background: currentColor; transition: transform .25s ease; }
  .nav-toggle i { top: 17px; }
  .nav-toggle i::after { content: ""; left: 0; top: 8px; }
  .nav.is-open .nav-toggle i { transform: translateY(4px) rotate(45deg); }
  .nav.is-open .nav-toggle i::after { transform: translateY(-8px) rotate(-90deg); }
}
@media (max-width: 560px) {
  .prompt { gap: 8px; padding-left: 12px; }
  .prompt-mark { width: 18px; }
  .prompt input { font-size: 1rem; }
  .prompt button { padding: 12px 18px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .m-body { animation: none; stroke-dashoffset: 0; }
  .m-shade, .m-hi, .m-ground, .m-face { animation: none; opacity: var(--o); }
  .m-pupils, .m-mood, .a-part, .team-list li::before, .nav-toggle i, .nav-toggle i::after { transition: none; }
  .hero-mascot, .hero-mascot svg.is-hopping, .mm-arm { animation: none; }
  .hero-mascot svg.is-nodding { --nod: 0px; }
  .js .line > span, .js .lede, .js .prompt, .js .prompt-hint, .js .hero-note { animation: none; transform: none; opacity: 1; }
  .drip { display: none; }
}

/* Language switch: hide a not-yet-translated first paint, and cross-fade the text when switching */
html[data-lang-pending] body { visibility: hidden; }
main [data-i18n], .contact [data-i18n], .nav nav [data-i18n], .brand [data-i18n] { transition: opacity .16s ease; }
.is-switching main [data-i18n], .is-switching .contact [data-i18n], .is-switching .nav nav [data-i18n], .is-switching .brand [data-i18n] { opacity: 0; }

/* Traditional Chinese: the display face only has Simplified glyphs, so headlines use the system's
   Traditional heavy sans, slanted to keep the same forward lean. */
html[lang="zh-Hant"] {
  --display: "PingFang HK", "PingFang TC", "Microsoft JhengHei", "Noto Sans TC", "Noto Sans CJK TC", sans-serif;
  --text: "PingFang HK", "PingFang TC", "Microsoft JhengHei", "Noto Sans TC", system-ui, sans-serif;
}
html[lang="zh-Hant"] :is(h1, h2, h3, .brand) { font-weight: 600; font-style: italic; word-spacing: normal; }
html[lang="zh-Hant"] .hero h1 { font-size: clamp(2.1rem, 4.9vw, 4.2rem); line-height: 1.28; }
html[lang="zh-Hant"] .contact h2 { font-size: clamp(2rem, 4.7vw, 4.1rem); }

/* English: Latin headlines are longer, so they run a little smaller and wrap evenly */
html[lang="en"] .hero h1 { font-size: clamp(2.1rem, 4.6vw, 4rem); line-height: 1.12; }
html[lang="en"] .line { padding-bottom: .12em; }
html[lang="en"] h2, html[lang="en"] h3 { text-wrap: balance; }
html[lang="en"] .service h3 { font-size: clamp(1.4rem, 2.5vw, 2.1rem); }
html[lang="en"] .team-list h3 { font-size: clamp(1.2rem, 1.8vw, 1.5rem); }
html[lang="en"] .process h3 { font-size: 1.25rem; }
html[lang="en"] .contact h2 { font-size: clamp(2rem, 4.4vw, 3.9rem); line-height: 1.14; }

/* Blog */
.page-head {
  position: relative; color: var(--snow); margin-top: -62px;
  padding: calc(62px + clamp(40px, 6vw, 84px)) max(var(--gutter), calc((100% - var(--measure)) / 2 + var(--gutter))) clamp(40px, 6vw, 84px);
  background: radial-gradient(50% 90% at 82% 40%, rgba(79, 127, 219, .30), transparent 70%), var(--ink);
  display: flex; align-items: flex-end; justify-content: space-between; gap: 32px;
}
.page-head h1 { font-size: clamp(2.4rem, 5.6vw, 4.6rem); line-height: 1.2; }
.page-head .lede { margin-top: 14px; }
.page-head .mm { width: clamp(84px, 11vw, 150px); flex: none; }
.page-head-post h1 { font-size: clamp(1.9rem, 4.2vw, 3.3rem); max-width: 18em; }
.page-head time { display: block; margin-top: 18px; color: var(--ice); font-size: .95rem; }
.back { display: inline-block; margin-bottom: 22px; color: #AEBDD6; text-decoration: none; font-size: .95rem; }
.back::before { content: ""; display: inline-block; width: .5em; height: .5em; margin-right: .5em; border-left: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); }
.back:hover { color: var(--snow); }

.posts { max-width: var(--measure); margin: 0 auto; padding: clamp(32px, 5vw, 72px) var(--gutter) clamp(48px, 7vw, 104px); }
.post-row {
  display: grid; grid-template-columns: 8.5em minmax(0, 1fr); gap: 6px clamp(16px, 3vw, 48px);
  padding: clamp(24px, 3vw, 38px) 0; border-top: 1.5px solid var(--line); text-decoration: none; color: inherit;
}
.post-row:last-child { border-bottom: 1.5px solid var(--line); }
.post-row time { color: var(--cobalt); font-size: .95rem; padding-top: .5em; grid-row: span 2; }
.post-row h2 { font-size: clamp(1.4rem, 2.6vw, 2.1rem); line-height: 1.3; text-decoration: underline transparent; text-decoration-thickness: 2px; text-underline-offset: .22em; transition: color .2s, text-decoration-color .2s; }
.post-row p { color: var(--ink-soft); max-width: 40em; }
.post-row:hover h2, .post-row:focus-visible h2 { color: var(--cobalt); text-decoration-color: currentColor; }

.prose { max-width: calc(40em + var(--gutter) * 2); margin: 0 auto; padding: clamp(36px, 5vw, 72px) var(--gutter) clamp(48px, 7vw, 104px); font-size: 1.08rem; line-height: 1.95; }
.prose p { margin: 0 0 1.3em; }
.prose h2 { font-size: clamp(1.4rem, 2.4vw, 1.9rem); line-height: 1.35; margin: 2.2em 0 .8em; }
.prose ul { margin: 0 0 1.3em; padding: 0; list-style: none; }
.prose li { padding-left: 22px; position: relative; margin-bottom: .35em; }
.prose li::before { content: ""; position: absolute; left: 0; top: .85em; width: 10px; height: 2.5px; border-radius: 2px; background: var(--cobalt); }
.prose strong { font-weight: 600; box-shadow: inset 0 -.5em 0 rgba(168, 203, 247, .55); }
.prose-cta { margin-top: 3em; }

@media (max-width: 860px) {
  .post-row { grid-template-columns: 1fr; }
  .post-row time { grid-row: auto; padding-top: 0; }
  .page-head .mm { display: none; }
}

/* 阿灵岛岛记账本: the app's own page (daodao/). Text beside a picture throughout, like the case page. */
.app-head {
  color: var(--snow); margin-top: -62px;
  padding: calc(62px + clamp(36px, 5vw, 72px)) max(var(--gutter), calc((100% - var(--measure)) / 2 + var(--gutter))) clamp(44px, 6vw, 84px);
  background: radial-gradient(50% 90% at 82% 40%, rgba(79, 127, 219, .30), transparent 70%), var(--ink);
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: var(--split-gap); align-items: center;
}
.app-head h1 { font-size: clamp(2.3rem, 5vw, 4.2rem); line-height: 1.2; }
.app-head .lede { margin-top: 16px; }
.app-get { margin-top: 28px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; }
.btn-ice { background: var(--ice); color: var(--ink); }
.btn-ice:hover { background: var(--snow); }
.app-meta { color: var(--ice); font-size: .92rem; }
.app-note { margin-top: 14px; max-width: 34em; color: var(--mute-dark); font-size: .92rem; }
.app-shot { margin: 0; }
.app-shot img { display: block; width: 100%; height: auto; border-radius: 16px; border: 1.5px solid var(--rule-dark); box-shadow: 0 26px 60px -22px rgba(0, 0, 0, .7); }

.app-does, .app-start {
  max-width: var(--measure); margin: 0 auto; padding: var(--section) var(--gutter);
  display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(20px, 3vw, 40px) var(--split-gap); align-items: start;
}
.app-does h2, .app-start h2 { grid-column: 1 / -1; }
.app-list { list-style: none; margin: 0; padding: 0; }
.app-list > li { display: grid; grid-template-columns: 7.6em minmax(0, 1fr); gap: 4px 20px; padding: clamp(18px, 2.2vw, 28px) 0; border-top: 1.5px solid var(--line); }
.app-list > li:last-child { border-bottom: 1.5px solid var(--line); }
.app-list h3, .app-steps h3 { font-size: clamp(1.25rem, 1.9vw, 1.6rem); line-height: 1.5; }
.app-list h3 { white-space: nowrap; }
.app-list p + p, .app-steps p { margin-top: 4px; color: var(--ink-soft); font-size: .98rem; }
/* A few of the skill icons the app can watch, at their own pixel size */
.app-icons { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.app-icons img { display: block; width: 32px; height: 32px; border-radius: 4px; image-rendering: pixelated; }

.app-safe { color: var(--snow); background: radial-gradient(45% 70% at 88% 10%, rgba(79, 127, 219, .28), transparent 70%), var(--ink); }
.app-safe-inner { max-width: var(--measure); margin: 0 auto; padding: var(--section) var(--gutter); }
.app-safe .lede { margin-top: 14px; }
.app-safe ul { list-style: none; margin: clamp(28px, 4vw, 48px) 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px clamp(18px, 2.4vw, 32px); }
.app-safe li { padding-top: 18px; border-top: 2px solid var(--rule-dark); }
.app-safe h3 { font-size: clamp(1.25rem, 1.9vw, 1.6rem); line-height: 1.4; color: var(--ice); }
.app-safe li p { margin-top: 6px; color: #A9B7CE; font-size: .98rem; }
.app-fine { margin-top: 28px; color: #8FA2C0; font-size: .9rem; }

.app-video { margin: 0; }
.app-video video { display: block; width: 100%; height: auto; border-radius: 16px; background: var(--ink); }
.app-video figcaption { margin-top: 8px; color: var(--ink-soft); font-size: .9rem; }
.app-steps { list-style: none; margin: 0; padding: 0; counter-reset: step; }
.app-steps li { counter-increment: step; padding: 16px 0; border-top: 1.5px solid var(--line); }
.app-steps li:last-child { border-bottom: 1.5px solid var(--line); }
.app-steps h3::before { content: counter(step); margin-right: .4em; color: var(--cobalt); }
.app-start .case-facts { margin-top: 20px; }

.app-release { max-width: var(--measure); margin: 0 auto; padding: 0 var(--gutter) var(--section); }
.app-release-box {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 20px 40px; align-items: center;
  padding: clamp(24px, 4vw, 48px); border: 1.5px solid var(--line); border-radius: 24px; background: var(--snow);
}
.app-release h2 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); }
.app-release .app-get { margin-top: 0; flex-direction: column; align-items: flex-start; }
.app-credits { max-width: var(--measure); margin: 0 auto; padding: 0 var(--gutter) clamp(40px, 6vw, 72px); color: var(--ink-soft); font-size: .88rem; }

@media (max-width: 860px) {
  .app-head, .app-does, .app-start, .app-release-box { grid-template-columns: 1fr; }
  .app-safe ul { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .app-list > li { grid-template-columns: 1fr; }
  .app-safe ul { grid-template-columns: 1fr; }
}
