/* =============================================================================
   少年有花官网 · 品牌主题文件（theme.css）
   =============================================================================
   ★★★ 这是全站唯一需要改的「样式文件」，改完刷新即可生效，无需重新编译。★★★

   【可自定义位置 A】品牌配色 —— 只改下面 :root 里的 10 个变量即可全站换色。
      变量值是 "R G B" 三个数字（空格分隔），不是 #hex，请勿加 # 号。
   【可自定义位置 B】圆角 / 阴影 / 动效时长
   【可自定义位置 C】按钮、卡片、表单等组件样式
   ============================================================================= */

:root {
  /* ---------- A. 品牌配色 ---------- */
  --c-ink: 10 12 15;          /* 深空黑：深色背景、主标题 */
  --c-ink-2: 22 26 33;        /* 深邃灰：深色区块次层 */
  --c-graphite: 42 47 54;     /* 高级灰：正文主色 */
  --c-slate: 106 114 124;     /* 次级灰：副标题、说明文字 */
  --c-muted: 148 155 165;     /* 弱化灰：标签、页脚小字 */
  --c-line: 228 231 236;      /* 描边色：分割线、边框 */
  --c-mist: 246 247 249;      /* 浅底灰：浅色区块背景 */
  --c-accent: 62 106 181;     /* 低饱和科技蓝：点缀、链接、高亮 */
  --c-accent-deep: 42 76 133; /* 深蓝：hover 态 */
  --c-accent-soft: 238 243 251;/* 浅蓝底：标签、浅色强调区 */

  /* ---------- B. 形态与动效 ---------- */
  --radius-card: 14px;        /* 卡片 / 图片圆角 */
  --radius-field: 10px;       /* 输入框圆角 */
  --dur: .55s;                /* 动效时长 */
  --ease: cubic-bezier(.22, 1, .36, 1);

  /* ---------- 字体栈 ---------- */
  /* 思源黑体(Noto Sans SC) > Inter > 系统字体，禁止付费字体 */
  --font-sans: 'Inter', 'Noto Sans SC', system-ui, -apple-system, 'Segoe UI',
               Roboto, 'Helvetica Neue', Arial, sans-serif;

  /* ---------- 布局 ---------- */
  --nav-h: 72px;              /* 顶部导航高度 */
}

/* =============================================================================
   基础排版类
   ============================================================================= */
.shell {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: 20px;
}
@media (min-width: 768px) { .shell { padding-inline: 32px; } }
@media (min-width: 1280px) { .shell { padding-inline: 40px; } }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: rgb(var(--c-accent));
}
.eyebrow::before {
  content: '';
  width: 22px;
  height: 1px;
  background: rgb(var(--c-accent));
  opacity: .7;
}
.eyebrow--light { color: rgb(255 255 255 / .72); }
.eyebrow--light::before { background: rgb(255 255 255 / .5); }

.hairline { height: 1px; background: rgb(var(--c-line)); border: 0; }
.hairline--light { background: rgb(255 255 255 / .12); }

/* 深色区块的细网格纹理（高级质感，可删） */
.grid-texture {
  background-image:
    linear-gradient(to right, rgb(255 255 255 / .045) 1px, transparent 1px),
    linear-gradient(to bottom, rgb(255 255 255 / .045) 1px, transparent 1px);
  background-size: 64px 64px;
}

/* =============================================================================
   按钮
   ============================================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 48px;
  padding-inline: 26px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: .01em;
  white-space: nowrap;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background-color var(--dur) var(--ease),
              color var(--dur) var(--ease),
              border-color var(--dur) var(--ease),
              transform .35s var(--ease),
              box-shadow var(--dur) var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

/* 主按钮：深空黑 */
.btn-primary {
  background: rgb(var(--c-ink));
  color: #fff;
  box-shadow: 0 8px 24px -12px rgb(var(--c-ink) / .55);
}
.btn-primary:hover { background: rgb(var(--c-ink-2)); }

/* 浅色背景上的描边按钮 */
.btn-outline {
  background: transparent;
  color: rgb(var(--c-ink));
  border-color: rgb(var(--c-line));
}
.btn-outline:hover {
  border-color: rgb(var(--c-ink));
  background: rgb(var(--c-mist));
}

/* 深色背景上的按钮 */
.btn-light {
  background: #fff;
  color: rgb(var(--c-ink));
}
.btn-light:hover { background: rgb(255 255 255 / .88); }

.btn-ghost-light {
  background: transparent;
  color: #fff;
  border-color: rgb(255 255 255 / .22);
}
.btn-ghost-light:hover { background: rgb(255 255 255 / .08); border-color: rgb(255 255 255 / .4); }

.btn-sm { height: 40px; padding-inline: 18px; font-size: 14px; }

/* 文字链 + 箭头微动 */
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 500;
  color: rgb(var(--c-accent));
  transition: gap .35s var(--ease);
}
.link-arrow:hover { gap: 14px; }
.link-arrow svg { transition: transform .35s var(--ease); }

/* =============================================================================
   卡片 / 悬浮微动
   ============================================================================= */
.card {
  background: #fff;
  border: 1px solid rgb(var(--c-line));
  border-radius: var(--radius-card);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease),
              border-color var(--dur) var(--ease);
}
.card-hover:hover {
  transform: translateY(-6px);
  box-shadow: 0 2px 4px rgb(10 12 15 / .04), 0 24px 48px -20px rgb(10 12 15 / .18);
  border-color: transparent;
}

.card-dark {
  background: rgb(var(--c-ink-2));
  border: 1px solid rgb(255 255 255 / .08);
  border-radius: var(--radius-card);
  transition: transform var(--dur) var(--ease), border-color var(--dur) var(--ease),
              background-color var(--dur) var(--ease);
}
.card-dark:hover {
  transform: translateY(-6px);
  border-color: rgb(var(--c-accent) / .5);
  background: rgb(var(--c-ink));
}

/* 图片缩放容器（案例卡片用） */
.zoom-media { overflow: hidden; border-radius: var(--radius-card); }
.zoom-media img,
.zoom-media .zoom-el {
  transition: transform 1.1s var(--ease), filter 1.1s var(--ease);
  will-change: transform;
}
.group:hover .zoom-media img,
.group:hover .zoom-media .zoom-el { transform: scale(1.06); }

/* =============================================================================
   顶部导航（磨砂玻璃）
   ============================================================================= */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  transition: background-color .4s var(--ease), box-shadow .4s var(--ease),
              border-color .4s var(--ease);
  border-bottom: 1px solid transparent;
}
.nav--solid {
  background: rgb(255 255 255 / .78);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom-color: rgb(var(--c-line));
  box-shadow: 0 1px 2px rgb(10 12 15 / .03);
}
.nav--dark { color: #fff; }
.nav-link {
  position: relative;
  font-size: 15px;
  font-weight: 450;
  padding-block: 6px;
  color: rgb(var(--c-graphite));
  transition: color .3s var(--ease);
}
.nav-link::after {
  content: '';
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 1px;
  background: rgb(var(--c-accent));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .45s var(--ease);
}
.nav-link:hover { color: rgb(var(--c-accent)); }
.nav-link:hover::after,
.nav-link[aria-current='page']::after { transform: scaleX(1); }
.nav-link[aria-current='page'] { color: rgb(var(--c-ink)); font-weight: 500; }

.nav--dark .brand-text { color: #fff; }
.nav--dark #menuBtn { color: #fff; }
.nav--solid #menuBtn { color: rgb(var(--c-ink)); }

/* 页面顶部留白（避开固定导航） */
.pt-nav { padding-top: calc(var(--nav-h) + 3.5rem); }
@media (min-width: 768px) { .pt-nav { padding-top: calc(var(--nav-h) + 6.5rem); } }
.pt-nav-lg { padding-top: calc(var(--nav-h) + 4rem); }
@media (min-width: 768px) { .pt-nav-lg { padding-top: calc(var(--nav-h) + 7rem); } }
.nav--dark .nav-link:hover { color: #fff; }
.nav--dark .nav-link::after { background: #fff; }
.nav--dark .nav-link[aria-current='page'] { color: #fff; }

/* =============================================================================
   滚动渐入
   ============================================================================= */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .8s var(--ease), transform .8s var(--ease);
  transition-delay: var(--d, 0ms);
  will-change: opacity, transform;
}
.reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  html { scroll-behavior: auto; }
}

/* =============================================================================
   表单
   ============================================================================= */
.field-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: rgb(var(--c-graphite));
  margin-bottom: 8px;
  letter-spacing: .02em;
}
.field-label .req { color: rgb(var(--c-accent)); margin-left: 2px; }

.field {
  width: 100%;
  height: 50px;
  padding-inline: 16px;
  border: 1px solid rgb(var(--c-line));
  border-radius: var(--radius-field);
  background: #fff;
  font-size: 15px;
  color: rgb(var(--c-ink));
  transition: border-color .3s var(--ease), box-shadow .3s var(--ease), background-color .3s var(--ease);
}
.field::placeholder { color: rgb(var(--c-muted)); }
.field:hover { border-color: rgb(var(--c-muted)); }
.field:focus {
  outline: none;
  border-color: rgb(var(--c-accent));
  box-shadow: 0 0 0 4px rgb(var(--c-accent) / .1);
}
textarea.field { height: auto; min-height: 132px; padding-block: 14px; resize: vertical; line-height: 1.7; }

.field.is-error { border-color: #C0504D; box-shadow: 0 0 0 4px rgb(192 80 77 / .08); }
.field-error {
  display: none;
  margin-top: 6px;
  font-size: 12.5px;
  color: #C0504D;
}
.field-error.is-show { display: block; }

/* =============================================================================
   弹窗（提交成功提示）
   ============================================================================= */
.modal-mask {
  position: fixed; inset: 0; z-index: 100;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  background: rgb(10 12 15 / .55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .35s var(--ease), visibility .35s var(--ease);
}
.modal-mask.is-open { opacity: 1; visibility: visible; }
.modal-panel {
  width: 100%;
  max-width: 420px;
  background: #fff;
  border-radius: 18px;
  padding: 40px 32px 32px;
  text-align: center;
  box-shadow: 0 40px 80px -32px rgb(0 0 0 / .4);
  transform: translateY(16px) scale(.97);
  transition: transform .45s var(--ease);
}
.modal-mask.is-open .modal-panel { transform: none; }
.modal-icon {
  width: 56px; height: 56px; margin: 0 auto 20px;
  border-radius: 999px;
  display: grid; place-items: center;
  background: rgb(var(--c-accent-soft));
  color: rgb(var(--c-accent));
}

/* =============================================================================
   其它小组件
   ============================================================================= */
.chip {
  display: inline-flex;
  align-items: center;
  height: 30px;
  padding-inline: 14px;
  border-radius: 999px;
  background: rgb(var(--c-mist));
  border: 1px solid rgb(var(--c-line));
  font-size: 13px;
  color: rgb(var(--c-slate));
  transition: background-color .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease);
}
.chip--active, .chip:hover {
  background: rgb(var(--c-ink));
  border-color: rgb(var(--c-ink));
  color: #fff;
}

.tick-row { display: flex; gap: 10px; align-items: flex-start; }
.tick {
  flex: none;
  margin-top: 3px;
  width: 18px; height: 18px;
  border-radius: 999px;
  display: grid; place-items: center;
  background: rgb(var(--c-accent-soft));
  color: rgb(var(--c-accent));
}
.tick--light { background: rgb(255 255 255 / .1); color: #fff; }
