/* ===========================================================================
   Yihui Tech — company site.  Minimal / premium. Dark, restrained, lots of air.
   Palette aligned with the BuildScan app (teal accent). Wordmark plus the company mark.
   =========================================================================== */

:root {
  color-scheme: dark;
  --bg: #090c11;
  --bg-2: #0c1018;
  --panel: rgba(255, 255, 255, 0.024);
  --panel-2: rgba(255, 255, 255, 0.04);
  --line: rgba(231, 238, 247, 0.10);
  --line-2: rgba(231, 238, 247, 0.18);
  --text: #f1f5fa;
  --soft: #cad4e0;
  --muted: #8b97a6;
  --accent: #4fa1b4;
  --accent-2: #7fd0df;
  --gold: #d6a451;
  --danger: #ee6b72;
  --ok: #6fcf9b;
  --maxw: 1080px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  min-height: 100vh;
  color: var(--soft);
  background: var(--bg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', 'PingFang SC',
    'Microsoft YaHei', sans-serif;
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3 { color: var(--text); line-height: 1.14; letter-spacing: -0.022em; font-weight: 700; }
h1 { letter-spacing: -0.032em; }
h2 { font-size: clamp(1.6rem, 3vw, 2.35rem); }
h3 { font-size: 1.1rem; letter-spacing: -0.01em; }
p { color: var(--soft); }
a { color: var(--accent-2); text-decoration: none; }
strong { color: var(--text); font-weight: 600; }
em { font-style: normal; color: var(--accent-2); }
::selection { background: rgba(79, 161, 180, 0.32); color: #fff; }
:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 3px; border-radius: 3px; }

.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 26px; }

.skip-link { position: absolute; left: -999px; top: 0; z-index: 100; background: var(--accent); color: #04161b; padding: 10px 16px; font-weight: 600; }
.skip-link:focus { left: 0; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: 0.76rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 20px;
}
.eyebrow::before { content: ""; width: 18px; height: 1px; background: var(--accent); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: 10px; font-weight: 600; font-size: 0.94rem;
  border: 1px solid transparent; cursor: pointer; white-space: nowrap;
  transition: background 0.2s, border-color 0.2s, color 0.2s, opacity 0.2s;
}
.btn--primary { color: #04141a; background: var(--accent-2); }
.btn--primary:hover { background: #9ce0ee; }
.btn--ghost { color: var(--text); border-color: var(--line-2); }
.btn--ghost:hover { border-color: var(--accent-2); color: var(--accent-2); }
.btn--lg { padding: 14px 28px; font-size: 1rem; }

.link-arrow { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; color: var(--accent-2); }
.link-arrow:hover { gap: 11px; }

/* ---------- header / nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(9, 12, 17, 0.72);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; gap: 18px; height: 66px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-weight: 700; font-size: 1.1rem; letter-spacing: -0.01em; }
.brand__mark { display: block; width: 30px; height: 30px; object-fit: contain; }
.nav__right { display: flex; align-items: center; gap: 22px; }
.nav__menu { display: flex; align-items: center; gap: 28px; }
.nav__links { display: flex; align-items: center; gap: 26px; list-style: none; }
.nav__links a { color: var(--muted); font-weight: 500; font-size: 0.93rem; transition: color 0.18s; }
.nav__links a:hover { color: var(--text); }
.nav__cta { padding: 9px 17px; }

/* language toggle */
.lang { display: inline-flex; border: 1px solid var(--line-2); border-radius: 8px; overflow: hidden; }
.lang button {
  background: none; border: none; cursor: pointer; color: var(--muted);
  font: inherit; font-size: 0.8rem; font-weight: 600; padding: 6px 11px; transition: color 0.18s, background 0.18s;
}
.lang button.is-active { color: var(--text); background: rgba(255, 255, 255, 0.07); }
.lang button:hover { color: var(--text); }

.nav-toggle { display: none; flex-direction: column; gap: 5px; width: 40px; height: 38px; align-items: center; justify-content: center; background: none; border: 1px solid var(--line-2); border-radius: 9px; cursor: pointer; }
.nav-toggle span { width: 17px; height: 1.5px; background: var(--text); transition: transform 0.25s var(--ease), opacity 0.2s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ---------- hero (typographic, no graphic) ----------
   The headline carries the width. An earlier version capped .hero__inner at
   50ch, which squeezed the h1 into a narrow three-line column and left most of
   the viewport empty beside it — so the type scale, not a graphic, fills it. */
.hero { position: relative; overflow: hidden; }
.hero::after {
  content: ""; position: absolute; top: -20%; right: -6%; width: 62%; height: 95%;
  background: radial-gradient(closest-side, rgba(79, 161, 180, 0.13), transparent 70%);
  pointer-events: none;
}
.hero__inner { position: relative; padding: clamp(48px, 7vw, 92px) 0 clamp(44px, 6vw, 76px); }
.hero__title {
  font-size: clamp(2.5rem, 7vw, 6rem); font-weight: 700;
  margin-bottom: 24px; max-width: 20ch;
}
.hero__lede { font-size: clamp(1.05rem, 1.5vw, 1.24rem); color: var(--soft); max-width: 50ch; margin-bottom: 32px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 13px; }
.hero__caps {
  margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--line);
  color: var(--muted); font-size: 0.86rem; letter-spacing: 0.02em;
}

/* ---------- sections ---------- */
/* scroll-margin-top: the header is sticky, and every nav link is now a same-page
   anchor — without this the sticky bar covers the heading you jumped to. */
.section { padding: clamp(64px, 9vw, 120px) 0; border-top: 1px solid var(--line); scroll-margin-top: 66px; }
.section--plain { border-top: none; }
.section__head { max-width: 62ch; margin-bottom: 52px; }
.section__head h2 { margin-bottom: 16px; }
.section__lede { font-size: 1.06rem; color: var(--muted); }
.section__cta { margin-top: 34px; }

/* ---------- feature grid ---------- */
.grid { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
.cell { background: var(--bg); padding: 30px 26px; transition: background 0.22s; }
.cell:hover { background: var(--bg-2); }
.cell__icon { color: var(--accent-2); margin-bottom: 18px; display: block; }
.cell h3 { margin-bottom: 9px; }
.cell p { color: var(--muted); font-size: 0.93rem; }

/* ---------- steps ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px; list-style: none; }
.step__n { font-size: 0.82rem; font-weight: 700; letter-spacing: 0.1em; color: var(--accent-2); }
.step h3 { margin: 14px 0 8px; padding-top: 14px; border-top: 1px solid var(--line-2); }
.step p { color: var(--muted); font-size: 0.93rem; }

/* The .split / .domains / .tag / .deflist / .faq / .cta-band rules that used to
   live here belonged to the Vision section and the separate BuildScan page, both
   of which are gone. Removed rather than left as dead weight. */

/* ---------- people ---------- */
.people {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; list-style: none;
  background: var(--line); border: 1px solid var(--line); border-radius: 14px; overflow: hidden;
}
.person { background: var(--bg); padding: 28px 24px 30px; transition: background 0.22s; }
.person:hover { background: var(--bg-2); }
.person__photo {
  width: 84px; height: 84px; border-radius: 50%; object-fit: cover;
  display: block; margin-bottom: 18px; border: 1px solid var(--line-2);
}
.person h3 { margin-bottom: 7px; }
.person__role { color: var(--soft); font-size: 0.89rem; line-height: 1.5; }
.person__org { color: var(--muted); font-size: 0.85rem; line-height: 1.5; margin-top: 5px; }

/* ---------- contact ---------- */
.contact { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: clamp(34px, 6vw, 72px); align-items: start; }
.contact__meta { list-style: none; margin-top: 30px; display: grid; gap: 18px; }
.contact__meta li { display: grid; gap: 3px; }
.contact__meta span { font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); }
.contact__meta a, .contact__meta strong { color: var(--text); font-size: 1.02rem; font-weight: 500; }
.contact__meta a:hover { color: var(--accent-2); }

.form { display: grid; gap: 18px; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { display: grid; gap: 8px; }
.field label { font-size: 0.82rem; color: var(--muted); font-weight: 500; }
.field .opt { color: rgba(139, 151, 166, 0.7); font-weight: 400; }
.field input, .field textarea {
  width: 100%; padding: 13px 15px; border-radius: 10px; color: var(--text);
  background: var(--panel); border: 1px solid var(--line-2); font-family: inherit; resize: vertical;
  transition: border-color 0.18s, background 0.18s;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); background: var(--panel-2); }
.field input::placeholder, .field textarea::placeholder { color: rgba(202, 212, 224, 0.34); }
.form .btn { justify-self: start; }
.form__status { font-size: 0.92rem; min-height: 1.2em; color: var(--muted); }
.form__status.is-ok { color: var(--ok); }
.form__status.is-err { color: var(--danger); }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--line); padding: 54px 0 34px; }
.footer__inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 26px; padding-bottom: 30px; border-bottom: 1px solid var(--line); }
.footer__brand p { color: var(--muted); font-size: 0.9rem; margin-top: 12px; max-width: 30ch; }
.footer__links { display: flex; flex-wrap: wrap; gap: 24px; align-items: center; }
.footer__links a { color: var(--muted); font-size: 0.92rem; }
.footer__links a:hover { color: var(--text); }
.footer__legal { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; padding-top: 24px; color: var(--muted); font-size: 0.83rem; }

/* Reveal-on-scroll animation intentionally omitted for a calmer, more premium
   feel (and so content never depends on JS/transitions to be visible). The
   .reveal class is kept in markup as a harmless hook for any future use. */

/* ---------- responsive ---------- */
@media (max-width: 880px) {
  .grid--4, .steps, .people { grid-template-columns: repeat(2, 1fr); }
  .steps { gap: 26px; }
  .contact { grid-template-columns: 1fr; }
  .nav-toggle { display: flex; }
  .nav__menu {
    position: fixed; inset: 66px 0 auto 0; flex-direction: column; align-items: stretch; gap: 0;
    background: rgba(9, 12, 17, 0.98); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--line); padding: 8px 26px 22px;
    transform: translateY(-10px); opacity: 0; pointer-events: none; transition: opacity 0.22s, transform 0.22s var(--ease);
  }
  .nav__menu.open { transform: none; opacity: 1; pointer-events: auto; }
  .nav__links { flex-direction: column; align-items: stretch; gap: 0; }
  .nav__links li { border-bottom: 1px solid var(--line); }
  .nav__links a { display: block; padding: 15px 2px; }
  .nav__cta { margin-top: 16px; text-align: center; }
}
@media (max-width: 560px) {
  .grid--4, .steps, .form__row { grid-template-columns: 1fr; }
  .container { padding-inline: 20px; }
  .footer__inner { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
