/* ==========================================================================
   Wajia 瓦家仓 — Company site
   Warm paper / stationery aesthetic. Zero dependencies, no external assets.
   ========================================================================== */

:root {
  --paper: #F4EFE4;
  --paper-deep: #ECE4D2;
  --surface: #FCF8EF;
  --surface-warm: #F8F3E8;
  --ink: #231F1A;
  --ink-soft: #5D5547;
  --ink-faint: #8A8171;
  --ink-blue: #2B4C7C;
  --ink-blue-deep: #1F3A62;
  --ink-blue-soft: #E7EBF1;
  --seal: #B8452E;
  --seal-deep: #97341F;
  --line: rgba(35, 31, 26, 0.14);
  --line-soft: rgba(35, 31, 26, 0.06);
  --shadow: 0 1px 2px rgba(35, 31, 26, 0.05), 0 8px 24px rgba(35, 31, 26, 0.07);
  --shadow-sm: 0 1px 2px rgba(35, 31, 26, 0.06);
  --radius: 14px;
  --radius-sm: 9px;
  --serif: Georgia, "Times New Roman", "Songti SC", "SimSun", serif;
  --sans: "Segoe UI", "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB",
          "Noto Sans SC", -apple-system, "Helvetica Neue", sans-serif;
  --maxw: 1080px;
  --header-h: 72px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--sans);
  color: var(--ink);
  line-height: 1.7;
  background-color: var(--paper);
  background-image:
    radial-gradient(1100px 620px at 88% -12%, rgba(184, 69, 46, 0.055), transparent 60%),
    radial-gradient(900px 520px at -12% 18%, rgba(43, 76, 124, 0.055), transparent 55%);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main { flex: 1 0 auto; }

img, svg { display: block; max-width: 100%; }
a { color: var(--ink-blue); text-decoration: none; }
a:hover { color: var(--ink-blue-deep); }

/* Ruled "notebook paper" utility ---------------------------------------- */
.ruled {
  background-image: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent 31px,
    var(--line-soft) 31px,
    var(--line-soft) 32px
  );
}

/* Layout ----------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

/* Header ----------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(244, 239, 228, 0.88);
  backdrop-filter: saturate(120%) blur(10px);
  -webkit-backdrop-filter: saturate(120%) blur(10px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
}
.brand:hover { color: var(--ink); }

.brand-seal {
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
}

.brand-word { display: flex; flex-direction: column; line-height: 1.15; }
.brand-cn { font-family: var(--serif); font-size: 1.28rem; font-weight: 700; letter-spacing: 0.06em; }
.brand-en { font-size: 0.72rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--ink-soft); }

.site-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-link {
  position: relative;
  padding: 8px 14px;
  border-radius: 8px;
  color: var(--ink-soft);
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.18s ease, background-color 0.18s ease;
}
.nav-link:hover { color: var(--ink); background: var(--surface); }
.nav-link.is-active { color: var(--ink); }
.nav-link.is-active::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 2px;
  height: 2px;
  background: var(--seal);
  border-radius: 2px;
}

/* Language toggle */
.lang-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 10px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  cursor: pointer;
  font-family: var(--sans);
  font-size: 0.85rem;
  color: var(--ink-faint);
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.lang-toggle:hover { border-color: var(--ink-faint); box-shadow: var(--shadow-sm); }
.lang-toggle [data-lang] {
  padding: 1px 3px;
  border-radius: 5px;
  color: var(--ink-faint);
  font-weight: 500;
  transition: color 0.18s ease;
}
.lang-toggle [data-lang].is-active {
  color: #fff;
  background: var(--ink-blue);
}
.lang-slash { color: var(--line); }

/* Nav toggle (mobile) */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.22s ease, opacity 0.22s ease;
}
.nav-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.nav-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Hero ------------------------------------------------------------------- */
.hero {
  padding: 88px 0 72px;
  border-bottom: 1px solid var(--line);
  position: relative;
  overflow: hidden;
}
.hero-inner { position: relative; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.74rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
  font-weight: 600;
}
.eyebrow::before {
  content: "";
  width: 26px;
  height: 2px;
  background: var(--seal);
  border-radius: 2px;
}

.hero-title {
  font-family: var(--serif);
  font-size: clamp(2.9rem, 8vw, 5rem);
  line-height: 1.02;
  letter-spacing: -0.01em;
  margin: 22px 0 8px;
  display: flex;
  align-items: baseline;
  gap: 18px;
  flex-wrap: wrap;
}
.hero-title .cn {
  color: var(--seal-deep);
  font-size: 0.52em;
  letter-spacing: 0.05em;
}
.hero-tagline {
  font-family: var(--serif);
  font-size: clamp(1.25rem, 2.6vw, 1.65rem);
  color: var(--ink);
  margin: 0 0 18px;
}
.hero-desc {
  max-width: 58ch;
  color: var(--ink-soft);
  font-size: 1.05rem;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}

.hero-seal {
  position: absolute;
  top: -6px;
  right: 6px;
  width: 88px;
  height: 88px;
  opacity: 0.9;
  transform: rotate(6deg);
}
@media (max-width: 560px) {
  .hero-seal { width: 64px; height: 64px; right: 0; }
}

/* Buttons ---------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 10px;
  font-family: var(--sans);
  font-size: 0.98rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--ink-blue); color: #fff; }
.btn-primary:hover { background: var(--ink-blue-deep); color: #fff; box-shadow: var(--shadow); }
.btn-ghost { background: transparent; color: var(--ink-blue); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--ink-blue); background: var(--ink-blue-soft); }

/* Sections --------------------------------------------------------------- */
.section { padding: 72px 0; }
.section + .section { border-top: 1px solid var(--line); }
.section-tight { padding: 56px 0; }

.section-kicker {
  font-size: 0.74rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--seal);
  font-weight: 700;
}
.section-title {
  font-family: var(--serif);
  font-size: clamp(1.7rem, 3.6vw, 2.4rem);
  line-height: 1.15;
  margin: 10px 0 18px;
  color: var(--ink);
}
.section-lead { max-width: 62ch; color: var(--ink-soft); font-size: 1.03rem; }

/* Cards grid ------------------------------------------------------------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin-top: 34px;
}
.card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
a.card { color: var(--ink); }
a.card:hover { color: var(--ink); transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--ink-faint); }
.card h3 {
  font-family: var(--serif);
  font-size: 1.3rem;
  margin: 14px 0 8px;
}
.card p { color: var(--ink-soft); font-size: 0.96rem; }
.card-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: var(--ink-blue);
  background: var(--ink-blue-soft);
}
.card-icon.seal { color: var(--seal-deep); background: #F4E3DD; }
.card-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 16px;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--ink-blue);
}

/* Scope spotlight -------------------------------------------------------- */
.scope-panel {
  margin-top: 34px;
  background: var(--surface-warm);
  border: 1px solid var(--line);
  border-left: 4px solid var(--seal);
  border-radius: var(--radius);
  padding: 34px 36px;
  box-shadow: var(--shadow-sm);
}
.scope-label {
  font-size: 0.74rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-faint);
  font-weight: 600;
}
.scope-value {
  font-family: var(--serif);
  font-size: clamp(1.6rem, 3.4vw, 2.2rem);
  margin-top: 8px;
  color: var(--ink);
}
.scope-note { margin-top: 8px; color: var(--ink-soft); font-size: 0.95rem; }

/* Fact list (contact) ---------------------------------------------------- */
.fact-list {
  margin-top: 34px;
  display: grid;
  gap: 16px;
}
.fact {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 24px;
  box-shadow: var(--shadow-sm);
}
.fact-icon {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: var(--ink-blue);
  background: var(--ink-blue-soft);
}
.fact-label {
  font-size: 0.74rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
  font-weight: 600;
}
.fact-value { margin-top: 4px; color: var(--ink); font-size: 1.05rem; }
.fact-value.muted { color: var(--ink-soft); }

/* Privacy prose ---------------------------------------------------------- */
.prose { max-width: 72ch; }
.prose .meta {
  display: inline-block;
  background: var(--surface-warm);
  border: 1px solid var(--line);
  border-left: 3px solid var(--seal);
  border-radius: 8px;
  padding: 10px 16px;
  margin-bottom: 34px;
  color: var(--ink-soft);
  font-size: 0.95rem;
}
.prose h2 {
  font-family: var(--serif);
  font-size: 1.4rem;
  margin: 38px 0 12px;
  color: var(--ink);
}
.prose h2:first-of-type { margin-top: 0; }
.prose p { color: var(--ink-soft); margin-bottom: 14px; }
.prose ul { margin: 0 0 14px 22px; color: var(--ink-soft); }
.prose li { margin-bottom: 6px; }
.prose a { font-weight: 600; }

/* Footer ----------------------------------------------------------------- */
.site-footer {
  border-top: 1px solid var(--line);
  background: var(--paper-deep);
  padding: 44px 0;
  margin-top: 8px;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  align-items: flex-start;
  justify-content: space-between;
}
.footer-brand { display: flex; flex-direction: column; gap: 4px; }
.footer-name { font-family: var(--serif); font-size: 1.15rem; font-weight: 700; }
.footer-co { color: var(--ink-soft); font-size: 0.9rem; }
.footer-meta { text-align: right; color: var(--ink-faint); font-size: 0.85rem; }
.footer-meta .icp { color: var(--ink-soft); }
.footer-meta .copyright { margin-top: 4px; }
@media (max-width: 640px) {
  .footer-meta { text-align: left; }
}

/* Reveal animation ------------------------------------------------------- */
.reveal { opacity: 0; transform: translateY(16px); }
.js .reveal {
  animation: rise 0.7s cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
}
@keyframes rise {
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { animation: none; opacity: 1; transform: none; }
  .btn, .card, .nav-link, .lang-toggle { transition: none; }
}

/* Responsive ------------------------------------------------------------- */
@media (max-width: 768px) {
  :root { --header-h: 64px; }
  .container { padding: 0 18px; }

  .nav-toggle { display: flex; }

  .site-nav {
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 12px 18px 18px;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
    display: none;
  }
  .site-nav.is-open { display: flex; }

  .nav-link { padding: 13px 12px; font-size: 1.02rem; }
  .nav-link.is-active::after { left: 12px; right: 12px; bottom: 4px; }

  .lang-toggle { margin-left: 0; margin-top: 8px; justify-content: center; align-self: flex-start; }

  .hero { padding: 56px 0 52px; }
  .section { padding: 52px 0; }
  .scope-panel { padding: 26px 24px; }
  .fact { padding: 18px; gap: 14px; }
}
