/* ============================================================
   壹加托管 · 品牌官网
   底色 ivory #faf9f5 · 墨字 #141413 · 唯一强调色 clay #d97757
   标题 Noto Serif SC / 正文 Noto Sans SC
   ============================================================ */
:root {
  --ink: #141413;
  --ivory: #faf9f5;
  --mist: #e8e6dc;
  --gray: #b0aea5;
  --clay: #d97757;
  --clay-deep: #c05f3f;
  --green: #788c5d;
  --hairline: rgba(20, 20, 19, 0.12);
  --serif: 'Noto Serif SC', 'Songti SC', serif;
  --sans: 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --header-h: 72px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  background: var(--ivory);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
section { scroll-margin-top: var(--header-h); }

.container { max-width: 1160px; margin: 0 auto; padding: 0 32px; }

/* ---------- 通用按钮 ---------- */
.btn {
  display: inline-block;
  padding: 13px 30px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.06em;
  transition: transform 0.25s ease, background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}
.btn-solid { background: var(--clay); color: #fff; }
.btn-solid:hover { background: var(--clay-deep); transform: translateY(-2px); }
.btn-ghost { border: 1px solid rgba(255, 255, 255, 0.65); color: #fff; }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.14); transform: translateY(-2px); }
.btn-lg { padding: 16px 40px; font-size: 16px; }

/* ---------- 顶部导航 ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  color: #fff;
  transition: background-color 0.35s ease, color 0.35s ease, box-shadow 0.35s ease;
}
.site-header.scrolled {
  background: rgba(250, 249, 245, 0.92);
  backdrop-filter: blur(12px);
  color: var(--ink);
  box-shadow: 0 1px 0 var(--hairline);
}
.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 32px;
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 40px;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-logo {
  height: 56px;
  width: 56px;
  object-fit: contain;
  display: block;
}
.brand-logo-footer {
  height: 52px;
  width: 52px;
  padding: 6px;
  border-radius: 14px;
  background: #fff;
}
/* 透明 header 上 logo 有浅色小底板，保证深墨色字可见 */
.site-header:not(.scrolled) .brand-logo {
  padding: 6px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(8px);
}
.brand-word { display: flex; flex-direction: column; line-height: 1.25; }
.brand-word strong {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0.10em;
  color: var(--ink);
}
.brand-word small {
  font-size: 10px;
  letter-spacing: 0.32em;
  color: rgba(20, 20, 19, 0.52);
}
/* hero 透明 header 上文字反白 */
.site-header:not(.scrolled) .brand-word strong { color: #fff; text-shadow: 0 1px 6px rgba(0,0,0,0.25); }
.site-header:not(.scrolled) .brand-word small { color: rgba(255,255,255,0.72); }
/* 页脚深色背景 */
.brand-invert .brand-word strong { color: var(--ivory); }
.brand-invert .brand-word small { color: rgba(250, 249, 245, 0.5); }

.site-nav { display: flex; gap: 36px; margin-left: auto; }
.site-nav a {
  font-size: 15px;
  letter-spacing: 0.08em;
  opacity: 0.88;
  position: relative;
  padding: 6px 0;
}
.site-nav a::after {
  content: '';
  position: absolute;
  left: 0; right: 100%; bottom: 0;
  height: 2px;
  background: var(--clay);
  transition: right 0.3s ease;
}
.site-nav a:hover { opacity: 1; }
.site-nav a:hover::after { right: 0; }

.header-cta { margin-left: 8px; padding: 10px 22px; font-size: 14px; }

.nav-toggle { display: none; background: none; border: 0; cursor: pointer; width: 40px; height: 40px; position: relative; }
.nav-toggle span {
  position: absolute; left: 8px; right: 8px; height: 2px;
  background: currentColor; transition: 0.3s ease;
}
.nav-toggle span:first-child { top: 15px; }
.nav-toggle span:last-child { top: 23px; }
body.menu-open .nav-toggle span:first-child { transform: translateY(4px) rotate(45deg); }
body.menu-open .nav-toggle span:last-child { transform: translateY(-4px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  height: 100svh;
  min-height: 620px;
  display: flex;
  align-items: flex-end;
  color: #fff;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  animation: heroSettle 2.4s ease forwards;
}
@keyframes heroSettle { from { transform: scale(1.07); } to { transform: scale(1); } }
.hero-veil {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, rgba(20, 20, 19, 0.62) 0%, rgba(20, 20, 19, 0.18) 46%, rgba(20, 20, 19, 0.10) 100%),
    linear-gradient(to right, rgba(20, 20, 19, 0.42) 0%, rgba(20, 20, 19, 0) 55%);
}
.hero-content {
  position: relative;
  max-width: 1280px;
  width: 100%;
  margin: 0 auto;
  padding: 0 32px calc(72px + 24px);
}
.hero-eyebrow {
  font-size: 14px;
  letter-spacing: 0.42em;
  opacity: 0.86;
  margin-bottom: 18px;
  animation: riseIn 0.9s ease 0.15s backwards;
}
.hero-title {
  font-family: var(--serif);
  font-size: clamp(56px, 9vw, 112px);
  font-weight: 700;
  letter-spacing: 0.10em;
  line-height: 1.1;
  text-shadow: 0 4px 32px rgba(20, 20, 19, 0.35);
  animation: riseIn 0.9s ease 0.3s backwards;
}
.hero-sub {
  margin-top: 22px;
  font-size: clamp(16px, 2vw, 19px);
  letter-spacing: 0.14em;
  opacity: 0.92;
  animation: riseIn 0.9s ease 0.45s backwards;
}
.hero-actions { display: flex; gap: 16px; margin-top: 38px; animation: riseIn 0.9s ease 0.6s backwards; }
@keyframes riseIn { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }
.hero-scroll {
  position: absolute;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  font-size: 12px;
  letter-spacing: 0.3em;
  opacity: 0.6;
  animation: floatY 2.4s ease-in-out infinite;
}
@keyframes floatY { 0%, 100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, 6px); } }

/* ---------- 区块通用 ---------- */
.section { padding: 128px 0; }
.section-tint { background: var(--mist); }
.section-head { max-width: 720px; margin-bottom: 64px; }
.eyebrow {
  font-size: 13px;
  letter-spacing: 0.4em;
  color: var(--clay);
  margin-bottom: 14px;
}
.section-head h2 {
  font-family: var(--serif);
  font-size: clamp(30px, 4.4vw, 44px);
  font-weight: 600;
  letter-spacing: 0.06em;
  line-height: 1.35;
}
.section-sub { margin-top: 18px; color: rgba(20, 20, 19, 0.62); font-size: 15.5px; }

/* ---------- 服务项目 ---------- */
.service-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
}
.service-img {
  overflow: hidden;
  border-radius: 14px;
  aspect-ratio: 4 / 3;
  background: var(--mist);
}
.service-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.service:hover .service-img img { transform: scale(1.05); }
.service figcaption { padding: 18px 4px 0; }
.service h3 {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0.1em;
  display: flex;
  align-items: center;
  gap: 10px;
}
.service h3::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--clay);
  flex-shrink: 0;
}
.service figcaption p { margin-top: 4px; font-size: 13.5px; color: rgba(20, 20, 19, 0.56); }

/* ---------- 为什么选壹加 ---------- */
.stats {
  display: flex;
  flex-wrap: wrap;
  margin-bottom: 72px;
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
}
.stat {
  flex: 1 1 25%;
  min-width: 150px;
  padding: 34px 12px;
  text-align: center;
}
.stat + .stat { border-left: 1px solid var(--hairline); }
.stat b {
  font-family: var(--serif);
  font-size: clamp(34px, 4vw, 46px);
  font-weight: 600;
  color: var(--clay);
  letter-spacing: 0.02em;
}
.stat b i { font-style: normal; font-size: 0.44em; margin-left: 3px; color: var(--ink); }
.stat span { display: block; margin-top: 6px; font-size: 13px; letter-spacing: 0.22em; color: rgba(20, 20, 19, 0.56); }

.reason-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 72px;
}
.reason { padding: 36px 0; border-top: 1px solid var(--hairline); }
.reason em {
  font-family: var(--serif);
  font-style: normal;
  font-size: 15px;
  letter-spacing: 0.2em;
  color: var(--clay);
}
.reason h3 {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 0.08em;
  margin-top: 10px;
}
.reason p { margin-top: 10px; font-size: 15px; color: rgba(20, 20, 19, 0.62); }

/* ---------- 校区环境 ---------- */
.gallery { display: grid; grid-template-columns: 2fr 1fr; gap: 24px; }
.gallery figure { position: relative; }
.gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 16px;
  transition: transform 0.7s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.gallery figure { overflow: hidden; }
.gallery figure:hover img { transform: scale(1.04); }
.gallery-main img { aspect-ratio: 16 / 8.4; }
.gallery-side img { aspect-ratio: 4 / 3.9; }
.gallery figcaption {
  position: absolute;
  left: 18px;
  bottom: 16px;
  color: #fff;
  font-size: 13px;
  letter-spacing: 0.22em;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(20, 20, 19, 0.45);
  backdrop-filter: blur(6px);
}

/* ---------- 预约参观 ---------- */
.contact { background: var(--ink); color: var(--ivory); }
.contact .eyebrow { color: var(--clay); }
.contact-inner {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 64px;
  align-items: center;
}
.contact h2 {
  font-family: var(--serif);
  font-size: clamp(30px, 4vw, 44px);
  font-weight: 600;
  letter-spacing: 0.08em;
  line-height: 1.5;
}
.contact-tel {
  display: block;
  font-family: var(--serif);
  font-size: clamp(30px, 3.6vw, 42px);
  font-weight: 600;
  color: var(--clay);
  letter-spacing: 0.06em;
  transition: opacity 0.25s ease;
}
.contact-tel:hover { opacity: 0.82; }
.contact-info dl { margin: 28px 0 34px; }
.contact-info dl div {
  display: flex;
  gap: 18px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(250, 249, 245, 0.14);
}
.contact-info dt {
  flex-shrink: 0;
  width: 72px;
  font-size: 13.5px;
  letter-spacing: 0.18em;
  color: rgba(250, 249, 245, 0.52);
}
.contact-info dd { font-size: 15px; color: rgba(250, 249, 245, 0.92); }
.contact-qr {
  text-align: center;
  padding: 20px;
  border-radius: 16px;
  background: #fff;
  flex-shrink: 0;
}
.contact-qr img {
  width: 170px;
  height: auto;
  display: block;
  margin: 0 auto;
}
.contact-qr p {
  margin-top: 12px;
  font-size: 13px;
  color: var(--ink);
  letter-spacing: 0.10em;
}

/* ---------- 页脚 ---------- */
.site-footer { background: var(--ink); color: var(--ivory); border-top: 1px solid rgba(250, 249, 245, 0.12); }
.footer-inner {
  padding: 48px 32px;
  display: flex;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
}
.footer-note { font-size: 13.5px; letter-spacing: 0.2em; color: rgba(250, 249, 245, 0.6); }
.footer-copy { margin-left: auto; font-size: 12.5px; color: rgba(250, 249, 245, 0.4); }
.footer-copy a { color: rgba(250, 249, 245, 0.65); transition: color 0.25s ease; }
.footer-copy a:hover { color: var(--clay); }

/* ---------- 滚动 reveal ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.8s ease, transform 0.8s ease; }
.reveal.in { opacity: 1; transform: none; }
.reveal:nth-child(2) { transition-delay: 0.08s; }
.service-grid .reveal:nth-child(2) { transition-delay: 0.1s; }
.service-grid .reveal:nth-child(3) { transition-delay: 0.2s; }
.service-grid .reveal:nth-child(4) { transition-delay: 0.3s; }

/* ---------- 响应式 ---------- */
@media (max-width: 960px) {
  .section { padding: 88px 0; }
  .service-grid { grid-template-columns: 1fr 1fr; gap: 22px; }
  .reason-grid { grid-template-columns: 1fr; gap: 0; }
  .gallery { grid-template-columns: 1fr; }
  .gallery-side img { aspect-ratio: 16 / 9; }
  .contact-inner { grid-template-columns: 1fr; gap: 48px; }
  .stat { flex: 1 1 50%; }
  .stat:nth-child(3) { border-left: 0; }
  .stat { border-top: 1px solid var(--hairline); }
  .stats { border-bottom: 1px solid var(--hairline); }
  .stat:nth-child(-n+2) { border-top: 0; }

  .site-nav {
    position: fixed;
    inset: 0;
    background: var(--ivory);
    color: var(--ink);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 40px;
    font-size: 20px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
  }
  body.menu-open .site-nav { opacity: 1; pointer-events: auto; }
  .nav-toggle { display: block; margin-left: auto; color: currentColor; z-index: 10; }
  .header-cta { display: none; }
  .site-header { color: var(--ink); }
}
@media (max-width: 560px) {
  .container { padding: 0 22px; }
  .header-inner { padding: 0 22px; gap: 16px; }
  .hero-content { padding: 0 22px 88px; }
  .service-grid { grid-template-columns: 1fr; }
  .hero-actions { flex-direction: column; align-items: flex-start; }
  .footer-inner { flex-direction: column; align-items: flex-start; gap: 14px; }
  .footer-copy { margin-left: 0; }
  .brand-logo { height: 44px; width: 44px; }
  .brand-word strong { font-size: 17px; }
  .brand-word small { display: none; }
  .brand { gap: 8px; }
  .contact-qr img { width: 140px; }
}

/* ---------- 动效降级 ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
