/* Fanyi2u — "Ink & Seal" design system */

:root {
  --paper: #F5F1E8;
  --surface: #FFFDF8;
  --ink: #17212B;
  --body: #3E444B;
  --muted: #5A5F66;
  --border: #DDD5C4;
  --accent: #A8201A;
  --radius: 8px;
  --serif: "Noto Serif SC", "Songti SC", serif;
  --sans: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
html { scroll-padding-top: 84px; }
body {
  font-family: var(--sans);
  background: var(--paper);
  color: var(--body);
  line-height: 1.7;
}
h1, h2, h3 { color: var(--ink); }
img, svg { display: block; }
a { color: inherit; }
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.container { max-width: 1248px; margin: 0 auto; padding: 0 24px; }
.serif { font-family: var(--serif); }

.skip-link {
  position: absolute; left: -999px; top: 0;
  background: var(--ink); color: #fff; padding: 10px 18px; z-index: 100;
}
.skip-link:focus { left: 0; }

/* ── Header ─────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--paper);
  border-bottom: 1px solid var(--border);
}
.site-header .container {
  display: flex; align-items: center; gap: 28px;
  min-height: 72px; position: relative;
}
.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; margin-right: auto; }
.brand-mark {
  width: 44px; height: 44px; flex: none;
  background: var(--accent); color: #FDF8EF; border-radius: var(--radius);
  font-family: var(--serif); font-weight: 900; font-size: 24px;
  display: grid; place-items: center;
}
.brand-name { font-family: var(--serif); font-weight: 700; font-size: 21px; line-height: 1.25; color: var(--ink); }
.brand-sub { font-size: 11.5px; color: var(--muted); letter-spacing: 0.08em; }
.site-nav { display: flex; gap: 8px; }
.site-nav a {
  text-decoration: none; font-size: 15px; font-weight: 500; color: var(--ink);
  padding: 10px 12px; border-radius: var(--radius);
}
.site-nav a:hover { color: var(--accent); }
.nav-toggle {
  display: none;
  width: 44px; height: 44px; flex: none;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); color: var(--ink); cursor: pointer;
  place-items: center;
}
.lang-switch {
  text-decoration: none; font-size: 13px; font-weight: 700; color: var(--ink);
  border: 1px solid var(--border); border-radius: 999px;
  padding: 9px 14px; letter-spacing: 0.05em; white-space: nowrap;
}
.lang-switch:hover { border-color: var(--ink); }
.header-cta {
  background: var(--ink); color: #fff; text-decoration: none;
  padding: 10px 20px; border-radius: var(--radius); font-weight: 700; font-size: 15px;
  white-space: nowrap;
}
.header-cta:hover { background: #22303d; }

/* ── Buttons ────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 48px; padding: 12px 28px; border-radius: var(--radius);
  font-size: 16px; font-weight: 700; text-decoration: none;
  border: 2px solid transparent;
}
.btn-accent { background: var(--accent); color: #FDF8EF; }
.btn-accent:hover { background: #8C1A15; }
.btn-outline { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn-outline:hover { background: var(--ink); color: #fff; }

/* ── Hero ───────────────────────────────── */
.hero { padding: 80px 0 72px; }
.hero .container {
  display: grid; grid-template-columns: 1.1fr 0.9fr;
  gap: 56px; align-items: center;
}
.eyebrow {
  display: flex; align-items: center; gap: 12px;
  color: var(--accent); font-weight: 700; font-size: 15px;
  letter-spacing: 0.06em;
}
.eyebrow::before { content: ""; width: 40px; height: 3px; background: var(--accent); flex: none; }
.hero h1 {
  font-family: var(--serif); font-weight: 900;
  font-size: clamp(38px, 5vw, 60px); line-height: 1.22;
  margin: 20px 0 24px;
}
html[lang="en"] .hero h1 { font-size: clamp(30px, 3.6vw, 44px); line-height: 1.25; }
.hero-lede { font-size: 17px; color: var(--muted); max-width: 34em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 16px; margin: 32px 0 20px; }
.hero-note { font-size: 14px; color: var(--muted); letter-spacing: 0.04em; }

/* CSS-only certified document illustration */
.doc-visual { position: relative; max-width: 400px; justify-self: end; width: 100%; }
.doc-visual::before {
  content: ""; position: absolute; inset: 0;
  background: #EDE7D9; border-radius: var(--radius);
  transform: rotate(4deg) translate(10px, 6px);
}
.doc-paper {
  position: relative;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 40px 36px 48px;
  box-shadow: 0 24px 48px -24px rgba(23, 33, 43, 0.25);
}
.doc-paper h2 { font-family: var(--serif); font-weight: 700; font-size: 26px; }
.doc-en {
  font-size: 11px; letter-spacing: 0.3em; color: var(--muted);
  margin: 6px 0 24px; text-transform: uppercase;
}
.doc-line { height: 9px; border-radius: 4px; background: #E6E0D2; margin-bottom: 12px; }
.doc-line.w80 { width: 80%; } .doc-line.w95 { width: 95%; }
.doc-line.w70 { width: 70%; } .doc-line.w88 { width: 88%; }
.doc-sign { margin-top: 36px; width: 55%; }
.doc-sign-line { border-bottom: 2px solid var(--ink); height: 22px; }
.doc-sign span { font-size: 12px; color: var(--muted); }
.doc-seal {
  position: absolute; right: 26px; bottom: 34px;
  width: 110px; height: 110px; border-radius: 50%;
  border: 3px solid var(--accent);
  display: grid; place-items: center;
  transform: rotate(-12deg);
  color: var(--accent); text-align: center;
}
.doc-seal::before {
  content: ""; position: absolute; inset: 6px;
  border: 1.5px solid var(--accent); border-radius: 50%;
}
.doc-seal b { font-family: var(--serif); font-size: 15px; letter-spacing: 0.06em; display: block; }
.doc-seal i { font-style: normal; font-size: 11px; letter-spacing: 0.18em; text-indent: 0.18em; display: block; }

/* ── Pillars ────────────────────────────── */
.pillars { padding: 8px 0 72px; }
.pillars-band {
  background: var(--ink); color: #EDF1F5; border-radius: var(--radius);
  display: grid; grid-template-columns: repeat(4, 1fr);
  padding: 40px 8px;
}
.pillar { padding: 8px 32px; border-left: 1px solid rgba(255, 255, 255, 0.14); }
.pillar:first-child { border-left: none; }
.pillar h2 { font-family: var(--serif); font-size: 25px; font-weight: 700; margin-bottom: 10px; color: #EDF1F5; }
.pillar p { font-size: 14px; color: #B9C2CC; }

/* ── Shared section pieces ──────────────── */
.section { padding: 88px 0; }
.section-surface { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-head { display: grid; grid-template-columns: 1fr 0.8fr; gap: 40px; align-items: end; margin-bottom: 48px; }
.section h2 {
  font-family: var(--serif); font-weight: 900;
  font-size: clamp(28px, 3.4vw, 40px); line-height: 1.3;
  margin-top: 16px;
}
html[lang="en"] .section h2 { font-size: clamp(26px, 3.2vw, 38px); }
.section-side { color: var(--muted); font-size: 16px; }

/* ── Services ───────────────────────────── */
.services-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.service-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 28px;
}
.service-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 18px; }
.service-icon { color: var(--accent); }
.service-num { font-family: var(--serif); font-weight: 700; color: var(--accent); font-size: 18px; }
.service-card h3 { font-family: var(--serif); font-size: 20px; margin-bottom: 8px; }
.service-card p { font-size: 14.5px; color: var(--muted); }

/* ── Documents ──────────────────────────── */
.docs-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 56px; align-items: start; }
.docs-grid > div > p { color: var(--muted); margin-top: 16px; }
.pill-cloud { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; }
.pill {
  background: var(--surface); border: 1px solid var(--border); border-radius: 999px;
  padding: 8px 18px; font-size: 14.5px; font-weight: 500;
}
.fields { margin-top: 36px; border-top: 1px solid var(--border); padding-top: 28px; }
.fields h3 { font-family: var(--serif); font-size: 17px; margin-bottom: 16px; }
.fields ul {
  list-style: none;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px 20px;
}
.fields li { font-size: 14.5px; color: var(--muted); display: flex; align-items: center; gap: 10px; }
.fields li::before { content: ""; width: 6px; height: 6px; background: var(--accent); flex: none; transform: rotate(45deg); }

/* ── About ──────────────────────────────── */
.about-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 56px; }
.about-grid p { color: var(--muted); font-size: 16px; }
.about-grid p + p { margin-top: 20px; }

/* ── Contact ────────────────────────────── */
.contact-head { text-align: center; max-width: 560px; margin: 0 auto 48px; }
.contact-head .eyebrow { justify-content: center; }
.contact-head .eyebrow::after { content: ""; width: 40px; height: 3px; background: var(--accent); flex: none; }
.contact-sub { color: var(--muted); margin-top: 14px; }
.contact-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.contact-card {
  border-radius: var(--radius); padding: 32px 28px; text-decoration: none;
  display: block; border: 2px solid transparent;
}
.contact-card small { display: block; font-size: 13px; letter-spacing: 0.1em; opacity: 0.75; margin-bottom: 10px; }
.contact-card strong { font-size: 19px; font-weight: 700; word-break: break-all; }
.contact-accent { background: var(--accent); color: #FDF8EF; }
.contact-accent:hover { background: #8C1A15; }
.contact-ink { background: var(--ink); color: #fff; }
.contact-ink:hover { background: #22303d; }
.contact-plain { border-color: var(--ink); color: var(--ink); }
.contact-plain:hover { background: var(--ink); color: #fff; }

.contact-address {
  margin-top: 32px;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  flex-wrap: wrap; text-align: center;
  color: var(--muted); font-size: 15px;
}
.contact-address svg { color: var(--accent); flex: none; }
.contact-address a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.contact-address a:hover { color: var(--accent); }

/* ── Footer ─────────────────────────────── */
.site-footer { border-top: 1px solid var(--border); padding: 28px 0; }
.site-footer .container { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.site-footer p { font-size: 14px; color: var(--muted); }
.footer-motto { font-family: var(--serif); font-weight: 700; color: var(--ink); }

/* ── WhatsApp float ─────────────────────── */
.wa-float {
  display: none;
  position: fixed; right: 18px; bottom: 18px; z-index: 60;
  width: 56px; height: 56px; border-radius: 50%;
  background: #25D366; color: #fff;
  place-items: center;
  box-shadow: 0 8px 24px rgba(23, 33, 43, 0.3);
}

/* ── Responsive ─────────────────────────── */
@media (max-width: 1024px) {
  .nav-toggle { display: grid; }
  .site-nav {
    display: none;
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; gap: 0;
    background: var(--paper); border-bottom: 1px solid var(--border);
    padding: 8px 24px 12px;
  }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 13px 4px; border-bottom: 1px solid var(--border); border-radius: 0; }
  .site-nav a:last-child { border-bottom: none; }
  .hero .container { gap: 40px; }
  .doc-visual { max-width: 330px; }
  .services-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .hero { padding: 56px 0 48px; }
  .hero .container { grid-template-columns: 1fr; }
  .doc-visual { justify-self: start; max-width: 360px; }
  .pillars-band { grid-template-columns: 1fr 1fr; padding: 16px 8px; }
  .pillar { padding: 20px 24px; }
  .pillar:nth-child(odd) { border-left: none; }
  .section { padding: 64px 0; }
  .section-head, .docs-grid, .about-grid { grid-template-columns: 1fr; gap: 24px; }
  .contact-grid { grid-template-columns: 1fr; }
  .fields ul { grid-template-columns: 1fr 1fr; }
  .wa-float { display: grid; }
}
@media (max-width: 640px) {
  .cta-num { display: none; }
}
@media (max-width: 480px) {
  .site-header .container { gap: 10px; }
  .brand { gap: 10px; }
  .brand-name { font-size: 17px; }
  .brand-sub { font-size: 10.5px; letter-spacing: 0.04em; }
  .sub-full { display: none; }
  /* The floating WhatsApp bubble covers this on phones; free the space for the brand. */
  .header-cta { display: none; }
  .wa-float { display: grid; }
  .lang-switch { padding: 8px 12px; }
  .doc-visual { display: none; }
  .services-grid { grid-template-columns: 1fr; }
  .pillars-band { grid-template-columns: 1fr; }
  .pillar { border-left: none; border-top: 1px solid rgba(255, 255, 255, 0.14); }
  .pillar:first-child { border-top: none; }
  .fields ul { grid-template-columns: 1fr; }
}
