/* ==========================================================
   青峰国学 官网 · 宣纸 / 墨 / 朱砂
   ========================================================== */
:root {
  --paper: #f5efe3;
  --paper-deep: #ece3d2;
  --paper-card: #fbf8f1;
  --ink: #1f1b16;
  --ink-soft: #4a423a;
  --ink-muted: #8a7f70;
  --cinnabar: #a3322a;
  --cinnabar-deep: #7e231d;
  --jade: #3f6b52;
  --gold: #b08a4a;
  --line: rgba(31, 27, 22, 0.12);
  --line-strong: rgba(31, 27, 22, 0.22);
  --serif: 'Noto Serif SC', 'Songti SC', 'STSong', serif;
  --brush: 'Noto Serif SC', 'Songti SC', 'STSong', serif;
  --header-h: 72px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }

body {
  margin: 0;
  font-family: var(--serif);
  color: var(--ink);
  background-color: var(--paper);
  background-image:
    radial-gradient(rgba(120, 90, 50, 0.05) 1px, transparent 1px),
    radial-gradient(rgba(120, 90, 50, 0.035) 1px, transparent 1px);
  background-size: 22px 22px, 37px 37px;
  background-position: 0 0, 11px 17px;
  line-height: 1.85;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin: 0; }

.container {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 0.9rem;
  letter-spacing: 0.3em;
  color: var(--cinnabar);
  margin-bottom: 16px;
}

.kicker span {
  width: 32px;
  height: 1px;
  background: currentColor;
}

/* ---------------- 顶部 ---------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(245, 239, 227, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.site-header.is-scrolled {
  border-bottom-color: var(--line);
  box-shadow: 0 6px 24px rgba(60, 40, 20, 0.06);
}

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

.logo {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
}

.logo .logo-char {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 5px;
  background: #a3322a;
  color: #fbeee0;
  font-family: 'Noto Serif SC', 'Songti SC', 'STSong', serif;
  font-size: 20px;
  font-weight: 600;
  line-height: 1;
  box-shadow: 0 4px 10px rgba(163, 50, 42, 0.2);
  transition: transform 0.2s ease;
}

/* 印章内框 */
.logo .logo-char::before {
  content: "";
  position: absolute;
  inset: 3px;
  border: 1px solid rgba(251, 238, 224, 0.45);
  border-radius: 3px;
  pointer-events: none;
}

.logo:hover .logo-char { transform: translateY(-2px); }

.nav-actions {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-btn {
  font-size: 1rem;
  color: var(--ink);
  white-space: nowrap;
  transition: color 0.2s ease;
}

.nav-btn:hover { color: var(--cinnabar); }

/* ---------------- 公司介绍 ---------------- */
.intro {
  position: relative;
  padding: 80px 0 110px;
  overflow: hidden;
}

.intro::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 200px;
  background:
    radial-gradient(ellipse 40% 90% at 15% 100%, rgba(31, 27, 22, 0.07), transparent 70%),
    radial-gradient(ellipse 35% 70% at 48% 100%, rgba(31, 27, 22, 0.05), transparent 70%),
    radial-gradient(ellipse 45% 100% at 85% 100%, rgba(31, 27, 22, 0.06), transparent 70%);
  pointer-events: none;
}

.intro-inner {
  position: relative;
  z-index: 1;
}

.intro-copy { max-width: 100%; }

.intro h1 {
  font-family: var(--brush), var(--serif);
  font-weight: 600;
  font-size: clamp(1.9rem, 3.6vw, 2.8rem);
  line-height: 1.5;
  letter-spacing: 0.04em;
  margin-bottom: 32px;
}

.intro-text {
  max-width: 100%;
  padding-top: 26px;
  border-top: 1px solid var(--line-strong);
}

.intro-text p {
  font-size: 0.95rem;
  line-height: 2;
  letter-spacing: 0.01em;
  color: var(--ink-soft);
  text-align: justify;
  text-indent: 2em;
}

.intro-text p + p { margin-top: 12px; }

.quote {
  margin: 30px 0 0;
  font-size: 0.9rem;
  padding-left: 18px;
  border-left: 2px solid var(--gold);
  color: var(--ink-muted);
}

.quote cite {
  display: block;
  font-style: normal;
  font-size: 0.85rem;
}

/* ---------------- 产品列表 ---------------- */
.products {
  padding: 100px 0 110px;
  background: var(--paper-deep);
  border-top: 1px solid var(--line);
}

.section-head { margin-bottom: 44px; }

.section-head .kicker { margin-bottom: 0; }
.kicker-dark { color: var(--cinnabar); font-size: 1.05rem; letter-spacing: 0.2em; }

.section-head h2 {
  font-size: clamp(1.8rem, 3.4vw, 2.5rem);
  font-weight: 700;
  letter-spacing: 0.1em;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}

.product-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 30px 26px 26px;
  background: var(--paper-card);
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

/* 古籍版框内线 */
.product-card::before {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px solid var(--line);
  border-radius: 2px;
  pointer-events: none;
  transition: border-color 0.3s ease;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 40px rgba(60, 40, 20, 0.1);
  border-color: rgba(163, 50, 42, 0.3);
}

.product-card:hover::before { border-color: rgba(163, 50, 42, 0.22); }

.product-top {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

.product-top h3 {
  position: relative;
  padding-left: 14px;
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.product-top h3::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.3em;
  bottom: 0.3em;
  width: 3px;
  background: var(--cinnabar);
}

.status {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  white-space: nowrap;
}

.status::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.status-online { color: var(--jade); background: rgba(63, 107, 82, 0.1); }
.status-dev { color: var(--gold); background: rgba(176, 138, 74, 0.12); }

.product-card p {
  position: relative;
  flex: 1;
  font-size: 0.95rem;
  color: var(--ink-soft);
  margin-bottom: 24px;
}

.detail-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 42px;
  border: 1px solid var(--cinnabar);
  border-radius: 2px;
  color: var(--cinnabar);
  font-size: 0.92rem;
  letter-spacing: 0.2em;
  transition: background 0.2s ease, color 0.2s ease;
}

.detail-btn::after {
  content: "→";
  letter-spacing: 0;
  transition: transform 0.2s ease;
}

.detail-btn:hover { background: var(--cinnabar); color: #fbeee0; }
.detail-btn:hover::after { transform: translateX(3px); }

.coming-soon-toast {
  position: fixed;
  left: 50%;
  bottom: calc(26px + env(safe-area-inset-bottom));
  transform: translate(-50%, 16px);
  opacity: 0;
  width: fit-content;
  max-width: min(88vw, 360px);
  padding: 12px 18px;
  border-radius: 999px;
  background: rgba(31, 27, 22, 0.9);
  color: #f9f5ee;
  font-size: 0.86rem;
  letter-spacing: 0.08em;
  line-height: 1.5;
  text-align: center;
  white-space: normal;
  word-break: break-word;
  box-shadow: 0 12px 30px rgba(31, 27, 22, 0.18);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 120;
}

.coming-soon-toast.visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (max-width: 480px) {
  .coming-soon-toast {
    bottom: calc(18px + env(safe-area-inset-bottom));
    max-width: min(90vw, 300px);
    padding: 10px 14px;
    font-size: 0.75rem;
    letter-spacing: 0.04em;
    border-radius: 999px;
  }
}

/* ---------------- 公司简介 ---------------- */
.company {
  padding: 90px 0 100px;
  border-top: 1px solid var(--line);
}

.company .section-head { margin-bottom: 32px; }

.company-text p {
  font-size: 0.98rem;
  line-height: 2.1;
  color: var(--ink-soft);
  text-align: justify;
  text-indent: 2em;
}

.company-text p + p { margin-top: 14px; }

/* ---------------- 底部：商务合作 ---------------- */
.site-footer {
  background: var(--ink);
  color: #efe6d6;
  padding: 56px 0 0;
}

.footer-main {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 40px;
  align-items: start;
  padding-bottom: 40px;
}

.kicker.light { color: #d9a86a; letter-spacing: 0.12em; margin-bottom: 10px; }

.footer-intro h2 {
  font-size: clamp(1.4rem, 2.6vw, 1.8rem);
  letter-spacing: 0.02em;
  margin-bottom: 6px;
}

.footer-intro p { color: rgba(239, 230, 214, 0.65); font-size: 0.92rem; line-height: 1.7; }

.contact-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid rgba(239, 230, 214, 0.18);
}

.contact-list li {
  display: grid;
  grid-template-columns: 48px 1fr;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(239, 230, 214, 0.12);
}

.contact-list .label {
  color: #d9a86a;
  letter-spacing: 0.04em;
  font-size: 0.88rem;
}

.contact-list .value {
  font-size: 0.95rem;
  line-height: 1.6;
  word-break: break-all;
}

.contact-list .link {
  justify-self: start;
  position: relative;
  transition: color 0.2s ease;
}

.contact-list .link::after {
  content: " →";
  color: #d9a86a;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.contact-list .link:hover { color: #f3c98e; }
.contact-list .link:hover::after { opacity: 1; }

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding: 14px 0 20px;
  border-top: 1px solid rgba(239, 230, 214, 0.12);
  font-size: 0.85rem;
  color: rgba(239, 230, 214, 0.5);
}

.footer-brand {
  font-family: var(--brush);
  font-size: 1.15rem;
  letter-spacing: 0.04em;
  color: #efe6d6;
}

/* ---------------- 入场动画 ---------------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------------- 响应式 ---------------- */
@media (max-width: 1080px) {
  .product-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 860px) {
  .intro { padding: 40px 0 80px; }
  .footer-main { grid-template-columns: 1fr; gap: 20px; }
}

@media (max-width: 560px) {
  :root { --header-h: 64px; }
  .container { width: calc(100% - 32px); }
  .logo { gap: 4px; }
  .logo .logo-char { width: 32px; height: 32px; font-size: 16px; }
  .nav-actions { gap: 18px; }
  .nav-btn { font-size: 0.92rem; }
  .products { padding: 72px 0 80px; }
  .company { padding: 64px 0 72px; }
  .product-grid { grid-template-columns: 1fr; }
  .site-footer { padding-top: 40px; }
  .footer-main { padding-bottom: 28px; }
  .contact-list li { grid-template-columns: 44px 1fr; gap: 8px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: 2px; }
}
