/* ============================================================
   日月空天 · 站点样式
   设计：墨 / 纸 / 朱砂，几何与排版支撑质感
   ============================================================ */

/* ---------- 字体 ---------- */
@font-face {
  font-family: "RY Serif";
  src: url("/assets/fonts/serif-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "RY Serif";
  src: url("/assets/fonts/serif-600.woff2") format("woff2");
  font-weight: 600 700;
  font-style: normal;
  font-display: swap;
}

/* ---------- 变量 ---------- */
:root {
  --ink: #0c0c0d;
  --ink-2: #17171a;
  --paper: #faf9f5;
  --paper-2: #f2f0ea;
  --muted: #6d6c67;
  --muted-dark: rgba(250, 249, 245, 0.62);
  --rule: rgba(12, 12, 13, 0.13);
  --rule-dark: rgba(250, 249, 245, 0.16);
  --accent: #c8452b;
  --accent-2: #e2552f;

  --serif: "RY Serif", "Noto Serif SC", "Songti SC", "Source Han Serif SC", "STSong", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", Inter, sans-serif;

  --shell: 1180px;
  --pad: clamp(20px, 5vw, 64px);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* ---------- 基础 ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; }

::selection {
  background: var(--accent);
  color: #fff;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--pad);
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 999;
  padding: 10px 18px;
  background: var(--ink);
  color: var(--paper);
  transition: top 0.2s;
}
.skip-link:focus { top: 12px; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 30px;
  border: 1px solid transparent;
  border-radius: 2px;
  font-size: 0.9375rem;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background 0.28s var(--ease), color 0.28s var(--ease),
    border-color 0.28s var(--ease), transform 0.28s var(--ease);
}
.btn:active { transform: translateY(1px); }

.btn-solid {
  background: var(--ink);
  color: var(--paper);
}
.btn-solid:hover {
  background: var(--accent);
  color: #fff;
}

.hero .btn-solid {
  background: #faf9f5;
  color: var(--ink);
}
.hero .btn-solid:hover {
  background: var(--accent);
  color: #fff;
}

.btn-line {
  border-color: rgba(250, 249, 245, 0.32);
  color: #faf9f5;
}
.btn-line:hover {
  border-color: #faf9f5;
  background: rgba(250, 249, 245, 0.07);
}

.btn-ghost {
  padding: 10px 20px;
  font-size: 0.875rem;
  border-color: rgba(250, 249, 245, 0.3);
  color: #faf9f5;
}
.btn-ghost:hover {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

/* ============================================================
   页头
   ============================================================ */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  color: #faf9f5;
  transition: background 0.4s var(--ease), color 0.4s var(--ease),
    border-color 0.4s var(--ease), backdrop-filter 0.4s var(--ease);
  border-bottom: 1px solid transparent;
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 32px;
  height: 78px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.brand-mark {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
}
.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}
.brand-text strong {
  font-family: var(--serif);
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: 0.14em;
}
.brand-text em {
  font-style: normal;
  font-size: 0.5625rem;
  letter-spacing: 0.22em;
  opacity: 0.55;
  margin-top: 4px;
}

.nav {
  display: flex;
  gap: 34px;
  margin-left: auto;
}
.nav a {
  position: relative;
  font-size: 0.9375rem;
  letter-spacing: 0.06em;
  opacity: 0.78;
  transition: opacity 0.25s;
}
.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 0;
  height: 1px;
  background: currentColor;
  transition: width 0.3s var(--ease);
}
.nav a:hover { opacity: 1; }
.nav a:hover::after { width: 100%; }

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  margin-left: auto;
  padding: 0;
  background: none;
  border: 0;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 1px;
  margin: 5px auto;
  background: currentColor;
  transition: transform 0.3s var(--ease), opacity 0.3s;
}

/* 滚动后 */
.site-header.is-solid {
  background: rgba(250, 249, 245, 0.86);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  backdrop-filter: saturate(180%) blur(14px);
  color: var(--ink);
  border-bottom-color: var(--rule);
}
.site-header.is-solid .btn-ghost {
  border-color: rgba(12, 12, 13, 0.22);
  color: var(--ink);
}
.site-header.is-solid .btn-ghost:hover {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

/* ============================================================
   首屏
   ============================================================ */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: 140px 0 110px;
  background: var(--ink);
  color: #faf9f5;
  overflow: hidden;
  isolation: isolate;
}

.hero::before {
  /* 细微噪点，避免大面积纯色显得平 */
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='0.045'/%3E%3C/svg%3E");
}

.hero-inner {
  position: relative;
  z-index: 3;
}

.eyebrow {
  font-size: 0.75rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--muted-dark);
  margin-bottom: 30px;
}

.hero-title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(2.9rem, 7.4vw, 6rem);
  line-height: 1.12;
  letter-spacing: 0.005em;
  margin-bottom: 34px;
}

.lede {
  max-width: 34em;
  font-size: clamp(0.9375rem, 1.2vw, 1.0625rem);
  line-height: 1.95;
  color: var(--muted-dark);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 44px;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin-top: 64px;
  font-size: 0.8125rem;
  letter-spacing: 0.14em;
  color: var(--muted-dark);
}
.hero-meta li {
  padding-right: 20px;
  margin-right: 20px;
  border-right: 1px solid var(--rule-dark);
}
.hero-meta li:last-child {
  border-right: 0;
  margin-right: 0;
}

/* —— 日月 —— */
.hero-orb {
  position: absolute;
  top: 50%;
  right: calc(var(--pad) * -0.4);
  translate: 0 -50%;
  z-index: 0;
  width: min(46vw, 560px);
  aspect-ratio: 1;
  pointer-events: none;
}

.orb {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  overflow: hidden;
  translate: 0 0;
  will-change: transform;
  box-shadow: 0 0 120px -20px rgba(226, 85, 47, 0.35);
}
.orb::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    #ff9a5f 0%,
    #ef6a3c 26%,
    #c8452b 47.6%,
    #2a1a16 48.2%,
    #131417 62%,
    #0c0c0d 100%
  );
}
.orb-moon {
  position: absolute;
  left: 50%;
  top: 74%;
  width: 26%;
  aspect-ratio: 1;
  translate: -50% -50%;
  border-radius: 50%;
  background: radial-gradient(circle at 34% 30%, #f6f3ea 0%, #d5d8d9 38%, #9aa0a8 70%, #6a7079 100%);
  box-shadow: 0 0 70px 6px rgba(190, 205, 230, 0.13);
}
.orb-glow {
  position: absolute;
  inset: -28%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(239, 106, 60, 0.22) 0%, transparent 62%);
  filter: blur(24px);
}

.horizon {
  position: absolute;
  left: -50vw;
  right: -30vw;
  top: 48%;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    transparent 42%,
    rgba(250, 249, 245, 0.05) 50%,
    rgba(250, 249, 245, 0.3) 63%,
    rgba(250, 249, 245, 0.12) 86%,
    transparent 100%
  );
}

.scroll-cue {
  position: absolute;
  bottom: 34px;
  left: var(--pad);
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.6875rem;
  letter-spacing: 0.24em;
  color: rgba(250, 249, 245, 0.42);
  z-index: 3;
}
.scroll-cue span {
  width: 1px;
  height: 34px;
  background: linear-gradient(to bottom, transparent, rgba(250, 249, 245, 0.5));
  animation: cue 2.6s var(--ease) infinite;
}
@keyframes cue {
  0%, 100% { transform: scaleY(0.35); opacity: 0.4; }
  50% { transform: scaleY(1); opacity: 1; }
}

/* ============================================================
   通用区块
   ============================================================ */
.section {
  padding-block: clamp(64px, 8.2vw, 124px);
  scroll-margin-top: 78px;
}

.section-head {
  display: flex;
  align-items: baseline;
  gap: 22px;
  flex-wrap: wrap;
  padding-bottom: 24px;
  margin-bottom: clamp(30px, 3.6vw, 52px);
  border-bottom: 1px solid var(--rule);
}

.section-no {
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.section-title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(1.75rem, 3.6vw, 2.75rem);
  letter-spacing: 0.04em;
  line-height: 1.25;
}

.section-desc {
  margin-left: auto;
  font-size: 0.875rem;
  color: var(--muted);
  letter-spacing: 0.04em;
}

/* ============================================================
   关于
   ============================================================ */
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: clamp(32px, 6vw, 96px);
  align-items: start;
}

.about-lead .big {
  font-family: var(--serif);
  font-size: clamp(1.375rem, 2.5vw, 2rem);
  line-height: 1.6;
  letter-spacing: 0.02em;
}

.about-body p + p { margin-top: 1.15em; }
.about-body p {
  color: #33322e;
  font-size: 0.9688rem;
  line-height: 2;
}

.facts {
  margin-top: 46px;
  border-top: 1px solid var(--rule);
}
.facts > div {
  display: flex;
  gap: 24px;
  padding: 14px 0;
  border-bottom: 1px solid var(--rule);
  font-size: 0.875rem;
}
.facts dt {
  width: 84px;
  flex-shrink: 0;
  color: var(--muted);
  letter-spacing: 0.08em;
}
.facts dd { color: var(--ink); }

/* ============================================================
   服务
   ============================================================ */
.service-list { border-top: 0; }

.service {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) 148px;
  gap: 28px;
  align-items: start;
  padding: 36px 0;
  border-bottom: 1px solid var(--rule);
  transition: background 0.4s var(--ease), padding 0.4s var(--ease);
}
.service:hover {
  background: linear-gradient(90deg, rgba(200, 69, 43, 0.045), transparent 70%);
}

.service-no {
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  padding-top: 12px;
  transition: color 0.3s;
}
.service:hover .service-no { color: var(--accent); }

.service-main h3 {
  font-family: var(--serif);
  font-size: clamp(1.25rem, 2vw, 1.5rem);
  font-weight: 600;
  letter-spacing: 0.06em;
  margin-bottom: 12px;
}
.service-main p {
  color: var(--muted);
  font-size: 0.9375rem;
  line-height: 1.95;
  max-width: 46em;
}

.service-tag {
  justify-self: end;
  padding-top: 10px;
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  color: var(--muted);
  white-space: nowrap;
}

/* ============================================================
   流程
   ============================================================ */
.process-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.process-list li {
  padding: 34px 28px 34px 0;
  border-right: 1px solid var(--rule);
}
.process-list li + li { padding-left: 28px; }
.process-list li:last-child { border-right: 0; }

.step-no {
  display: block;
  font-size: 0.6875rem;
  letter-spacing: 0.2em;
  color: var(--accent);
  margin-bottom: 18px;
}
.process-list h3 {
  font-family: var(--serif);
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  margin-bottom: 12px;
}
.process-list p {
  font-size: 0.875rem;
  line-height: 1.95;
  color: var(--muted);
}

/* ============================================================
   联系
   ============================================================ */
.section-contact { background: var(--paper-2); }

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(40px, 7vw, 110px);
}

.contact-info dl > div {
  padding: 22px 0;
  border-bottom: 1px solid var(--rule);
}
.contact-info dl > div:first-child { padding-top: 0; }
.contact-info dt {
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  color: var(--muted);
  margin-bottom: 10px;
}
.contact-info dd {
  font-family: var(--serif);
  font-size: clamp(1.0625rem, 1.7vw, 1.25rem);
  letter-spacing: 0.03em;
  line-height: 1.7;
}
.contact-info dd a {
  position: relative;
  transition: color 0.25s;
}
.contact-info dd a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -3px;
  width: 100%;
  height: 1px;
  background: currentColor;
  opacity: 0.25;
  transition: opacity 0.25s, background 0.25s;
}
.contact-info dd a:hover { color: var(--accent); }
.contact-info dd a:hover::after { opacity: 1; background: var(--accent); }

.contact-note {
  margin-top: 26px;
  font-size: 0.8125rem;
  color: var(--muted);
  letter-spacing: 0.04em;
}

/* 表单 */
.contact-form { display: grid; gap: 26px; }

.field { display: grid; gap: 10px; }
.field label {
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  color: var(--muted);
}
.field input,
.field textarea {
  width: 100%;
  padding: 12px 2px;
  background: transparent;
  border: 0;
  border-bottom: 1px solid rgba(12, 12, 13, 0.22);
  border-radius: 0;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.7;
  transition: border-color 0.3s;
}
.field textarea { resize: vertical; min-height: 118px; }
.field input::placeholder,
.field textarea::placeholder { color: rgba(12, 12, 13, 0.32); }
.field input:focus,
.field textarea:focus {
  outline: none;
  border-bottom-color: var(--accent);
}
.field.is-invalid input,
.field.is-invalid textarea { border-bottom-color: var(--accent); }

.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.btn-submit { justify-self: start; min-width: 168px; margin-top: 6px; }
.btn-submit[disabled] { opacity: 0.55; cursor: progress; }

.form-status {
  min-height: 1.5em;
  font-size: 0.875rem;
  letter-spacing: 0.02em;
}
.form-status.is-ok { color: #2f6b45; }
.form-status.is-err { color: var(--accent); }

.form-fine {
  font-size: 0.75rem;
  line-height: 1.8;
  color: var(--muted);
  max-width: 34em;
}

/* ============================================================
   页脚
   ============================================================ */
.site-footer {
  background: var(--ink);
  color: rgba(250, 249, 245, 0.6);
  padding-block: 56px;
  font-size: 0.8125rem;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 24px 40px;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: rgba(250, 249, 245, 0.82);
}
.footer-brand .brand-mark { width: 26px; height: 26px; }
.footer-brand p {
  font-family: var(--serif);
  letter-spacing: 0.1em;
  font-size: 0.875rem;
}
.footer-nav {
  display: flex;
  gap: 26px;
  margin-left: auto;
  letter-spacing: 0.08em;
}
.footer-nav a { transition: color 0.25s; }
.footer-nav a:hover { color: #faf9f5; }
.footer-copy {
  width: 100%;
  padding-top: 24px;
  border-top: 1px solid var(--rule-dark);
  letter-spacing: 0.06em;
  font-size: 0.75rem;
  color: rgba(250, 249, 245, 0.38);
}

/* ============================================================
   入场动效
   ============================================================ */
[data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}
[data-reveal].is-in {
  opacity: 1;
  transform: none;
}
[data-delay="1"] { transition-delay: 0.08s; }
[data-delay="2"] { transition-delay: 0.16s; }
[data-delay="3"] { transition-delay: 0.24s; }
[data-delay="4"] { transition-delay: 0.32s; }

/* ============================================================
   响应式
   ============================================================ */
@media (max-width: 1024px) {
  .about-grid,
  .contact-grid { grid-template-columns: 1fr; }
  .about-lead .big br { display: none; }
  .process-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .process-list li:nth-child(2) { border-right: 0; }
  .process-list li:nth-child(n + 3) { border-top: 1px solid var(--rule); }
  .process-list li:nth-child(odd) { padding-left: 0; }
  .process-list li:nth-child(even) { padding-left: 28px; }
}

@media (max-width: 860px) {
  .header-inner { height: 66px; gap: 16px; }
  .header-cta { display: none; }
  .nav-toggle { display: block; }

  .nav {
    position: fixed;
    inset: 66px 0 auto 0;
    flex-direction: column;
    gap: 0;
    margin: 0;
    padding: 8px var(--pad) 28px;
    background: var(--paper);
    border-bottom: 1px solid var(--rule);
    color: var(--ink);
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s var(--ease), transform 0.3s var(--ease),
      visibility 0.3s;
  }
  .nav a {
    padding: 16px 0;
    border-bottom: 1px solid var(--rule);
    font-family: var(--serif);
    font-size: 1.125rem;
    letter-spacing: 0.1em;
    opacity: 1;
  }
  .nav a::after { display: none; }

  .nav-open .nav {
    transform: none;
    opacity: 1;
    visibility: visible;
  }
  .nav-open .nav-toggle span:first-child { transform: translateY(3px) rotate(45deg); }
  .nav-open .nav-toggle span:last-child { transform: translateY(-3px) rotate(-45deg); }
  .nav-open .site-header {
    background: var(--paper);
    color: var(--ink);
    border-bottom-color: var(--rule);
  }

  .hero { padding: 118px 0 96px; min-height: 92svh; }
  /* 小屏不摆「日月」实体，避免压住正文，只留一层暖光 */
  .hero-orb { display: none; }
  .hero::after {
    content: "";
    position: absolute;
    top: -24vw;
    right: -34vw;
    z-index: 0;
    width: 92vw;
    height: 92vw;
    border-radius: 50%;
    pointer-events: none;
    background: radial-gradient(
      circle at 50% 50%,
      rgba(239, 106, 60, 0.4) 0%,
      rgba(200, 69, 43, 0.16) 44%,
      transparent 68%
    );
    filter: blur(16px);
  }
  .lede br.br-wide { display: none; }

  .service {
    grid-template-columns: 46px minmax(0, 1fr);
    gap: 16px;
    padding: 28px 0;
  }
  .service-tag {
    display: none;
  }
  .fact dd, .facts dt { font-size: 0.8125rem; }

  .section-head {
    gap: 14px;
    padding-bottom: 22px;
    margin-bottom: 36px;
  }
  .section-desc {
    margin-left: 0;
    width: 100%;
    padding-top: 4px;
  }

  .footer-nav { margin-left: 0; }
  .footer-copy { margin-top: 8px; }
}

@media (max-width: 560px) {
  .process-list { grid-template-columns: 1fr; }
  .process-list li,
  .process-list li + li {
    border-right: 0;
    border-top: 1px solid var(--rule);
    padding: 24px 0;
  }
  .process-list li:first-child { border-top: 0; }
  .hero-meta { margin-top: 44px; }
  .hero-meta li { padding-right: 14px; margin-right: 14px; }
  .scroll-cue { display: none; }
}

/* ---------- 动效降级 ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  [data-reveal] { opacity: 1; transform: none; }
  .scroll-cue span { animation: none; }
}
