/* FAMILyS 官网样式（复刻自 GoDaddy 版 familys.ai，2026-11-08）
   颜色、字体、间距都集中在下面的 :root 里，改这里即可全站生效。 */

@font-face {
  font-family: "Raleway";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/assets/fonts/raleway-latin-700-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Raleway";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/assets/fonts/raleway-latin-ext-700-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --font-heading: "Raleway", arial, sans-serif;
  --font-body: Helvetica, arial, sans-serif;

  --c-ink: #1b1b1b;          /* 标题、深色按钮 */
  --c-text: #5e5e5e;         /* 正文 */
  --c-label: #595959;        /* 小标题（WHAT IS FAMILYS 等）、页脚 */
  --c-nav: #919191;          /* 侧边栏未选中 */
  --c-accent: #866e8f;       /* 侧边栏选中、链接 */
  --c-accent-light: #a983b5; /* 「历史」左侧竖线、PDF 页码 */
  --c-field: #f6f6f6;        /* 输入框、PDF 底色 */
  --c-line: #e2e2e2;

  --sidebar-w: 320px;
  --gutter: 24px;
  --section-pad: 72px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: #fff;
  color: var(--c-text);
  font-family: var(--font-body);
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: var(--c-accent); text-decoration: none; }
h1, h2, h3, h4, p { margin: 0; }

/* ---------- 侧边栏（桌面）/ 顶栏（手机） ---------- */
.sidebar {
  position: fixed; inset: 0 auto 0 0; z-index: 20;
  width: var(--sidebar-w);
  background: #fff;
  box-shadow: rgba(0, 0, 0, .2) 0 0 4px 0;
  padding: 105px 48px 0;
}
.logo {
  font-family: var(--font-heading);
  font-size: 19px; font-weight: 700; line-height: 22.8px; letter-spacing: 1.5px;
  color: var(--c-ink);
  display: inline-block;
}
.sidebar .logo { margin-bottom: 100px; }
.side-nav { list-style: none; margin: 0; padding: 0; }
.side-nav li { line-height: 45px; }
.side-nav a { font-size: 16px; letter-spacing: 1px; color: var(--c-nav); }
.side-nav a:hover { color: var(--c-accent); }
.side-nav a[aria-current="page"] { color: var(--c-accent); font-weight: 700; }

.topbar { display: none; }
.drawer, .drawer-mask { display: none; }

main { margin-left: var(--sidebar-w); }

.container { max-width: 1328px; margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- 通用排版 ---------- */
.section { padding: var(--section-pad) 0; }
.section-heading {
  font-size: 14px; font-weight: 700; line-height: 28px; letter-spacing: 3px;
  text-transform: uppercase; color: var(--c-label); text-align: center;
  margin-bottom: 40px;
}
.content-heading {
  font-family: var(--font-heading);
  font-size: 19px; font-weight: 700; line-height: 23.75px; letter-spacing: 1.5px;
  color: var(--c-ink); text-align: center;
  margin-bottom: 24px;
}
.body-text p { font-size: 16px; line-height: 24px; color: var(--c-text); text-align: center; }

/* 按钮 */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 56px; padding: 8px 32px;
  border: 2px solid currentColor; background: transparent;
  font-family: var(--font-body); font-size: 12px; font-weight: 700;
  letter-spacing: 3px; text-transform: uppercase; color: var(--c-ink);
  cursor: pointer;
}
.btn-light { color: #fff; }
.btn:hover { opacity: .8; }
.link-more {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 12px; font-weight: 700; letter-spacing: 3px; text-transform: uppercase;
  color: var(--c-ink); min-height: 40px;
}
.link-more svg { width: 18px; height: 18px; }

/* ---------- 首页大图 ---------- */
.hero {
  position: relative; min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  text-align: center; color: #fff;
  background:
    linear-gradient(rgba(99, 99, 99, .25), rgba(99, 99, 99, .25)),
    url("/assets/img/hero.jpg") center / cover no-repeat,
    #161616;
  padding: 40px var(--gutter);
}
.hero h1 {
  font-family: var(--font-heading);
  font-size: 54px; font-weight: 700; line-height: 64.8px; letter-spacing: 1.5px;
  white-space: pre-line; margin-bottom: 24px;
}
.hero p { font-size: 22px; line-height: 33px; letter-spacing: 1px; max-width: 643px; margin: 0 auto 40px; }

/* ---------- WHAT IS FAMILYS：图文交替 ---------- */
.features { display: grid; row-gap: 48px; }
.feature { display: grid; grid-template-columns: 1fr 1fr; column-gap: 48px; align-items: center; }
.feature img { width: 100%; height: auto; aspect-ratio: 2 / 1; object-fit: cover; }
.feature .text { padding: 0 24px; }
.feature.reverse img { order: 2; }

/* ---------- 我们的原则：三栏 ---------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); column-gap: 48px; }

/* ---------- 历史 ---------- */
.featured { max-width: 747px; margin: 0 auto; padding: 0 var(--gutter); }
.featured h2 {
  font-family: var(--font-heading);
  font-size: 28px; font-weight: 700; line-height: 35px; letter-spacing: 1.5px;
  color: var(--c-ink); margin-bottom: 24px;
}
.featured-text {
  border-left: 5px solid var(--c-accent-light);
  padding: 4px 0 4px 24px; margin-bottom: 24px;
}
.featured-text p { font-size: 22px; line-height: 33px; letter-spacing: 1px; color: var(--c-text); }
.featured-text p + p { margin-top: 33px; }

/* ---------- 订阅 ---------- */
.section-subscribe { padding: 76px 0; }
.subscribe { display: flex; align-items: center; gap: 24px; }
.subscribe h3 {
  font-family: var(--font-heading);
  font-size: 28px; font-weight: 700; line-height: 35px; letter-spacing: 1.5px; color: var(--c-ink);
}
.field { position: relative; flex: 1; }
.field input {
  width: 100%; height: 56px; border: 0; border-radius: 0; background: var(--c-field);
  padding: 23px 16px 7px; font: 16px var(--font-body); color: var(--c-ink); outline: none;
}
.field label {
  position: absolute; left: 16px; top: 18px; font-size: 16px; color: #474747;
  pointer-events: none; transition: all .15s;
}
.field input:focus + label, .field input:not(:placeholder-shown) + label { top: 6px; font-size: 12px; }
.form-note { font-size: 14px; color: var(--c-text); margin-top: 12px; text-align: center; }
.form-note:empty { display: none; }

/* ---------- 页脚 ---------- */
.footer { padding: 56px 0; }
.footer p {
  font-size: 12px; line-height: 18px; letter-spacing: 3px; text-transform: uppercase;
  color: var(--c-label); text-align: center;
}

/* ---------- 我们的成员：图片轮播 ---------- */
.carousel { position: relative; }
.carousel-viewport { position: relative; overflow: hidden; height: var(--slide-h, 600px); }
.carousel-track { display: flex; gap: 5px; height: 100%; transition: transform .45s ease; }
.carousel-track img { height: 100%; width: auto; max-width: none; flex: none; }
.carousel-btn {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
  width: 36px; height: 44px; padding: 8px 4px; border: 0; cursor: pointer;
  background: rgba(22, 22, 22, .25); color: #fff;
}
.carousel-btn svg { width: 28px; height: 28px; display: block; }
.carousel-btn.prev { left: 0; }
.carousel-btn.next { right: 0; }
.thumbs { list-style: none; display: flex; gap: 10px; margin: 16px 0 4px; padding: 0; }
.thumbs button { display: block; padding: 0; border: 0; background: none; cursor: pointer; }
.thumbs img { width: 70px; height: 70px; object-fit: cover; opacity: .9; }
.thumbs button[aria-current="true"] img { outline: 2px solid var(--c-accent); outline-offset: -2px; opacity: 1; }

/* ---------- FAMILyS协议：PDF 阅读器 ---------- */
.pdf-block { text-align: center; }
.pdf-download { display: inline-flex; align-items: center; gap: 2px; font-size: 16px; color: var(--c-accent); margin-bottom: 56px; }
.pdf-download svg, .pdf-pager svg { width: 1em; height: 1em; }
.pdf-frame {
  width: 100%; max-width: 715px; margin: 0 auto; padding: 4px; background: var(--c-field);
}
.pdf-frame a { display: block; position: relative; }
.pdf-frame canvas { display: block; width: 100%; height: auto; background: #fff; }
.pdf-frame .loading { padding: 40% 0; color: var(--c-text); font-size: 14px; }
.pdf-pager { display: flex; justify-content: center; align-items: center; gap: 16px; margin-top: 32px; font-size: 16px; }
.pdf-pager .num { color: var(--c-accent-light); }
.pdf-pager .pipe { width: 1px; height: 16px; background: var(--c-line); }
.pdf-pager button {
  display: inline-flex; align-items: center; gap: 2px; border: 0; background: none; padding: 0;
  font: 16px var(--font-body); color: var(--c-accent); cursor: pointer;
}
.pdf-pager button[hidden] { display: none; }

/* ---------- 手机 / 平板（< 1024px）：顶栏 + 抽屉菜单 ---------- */
@media (max-width: 1023px) {
  :root { --section-pad: 40px; }
  .section-subscribe { padding: 40px 0; }
  .sidebar { display: none; }
  main { margin-left: 0; }
  .topbar {
    display: flex; align-items: center; position: relative;
    height: 72px; padding: 0 var(--gutter); background: #fff;
  }
  .topbar .logo { position: absolute; left: 0; right: 0; text-align: center; pointer-events: none; }
  .topbar .logo a { pointer-events: auto; color: inherit; }
  .menu-btn { position: relative; z-index: 1; width: 40px; height: 40px; padding: 6px; border: 0; background: none; color: var(--c-ink); cursor: pointer; }
  .menu-btn svg { width: 28px; height: 28px; display: block; }

  .drawer {
    display: block; position: fixed; z-index: 40; top: 0; bottom: 0; left: 0;
    width: calc(100% - 48px); max-width: 360px; background: #fff;
    box-shadow: rgba(0, 0, 0, .2) 0 0 4px 0;
    transform: translateX(-105%); transition: transform .3s ease; overflow-y: auto;
    padding-top: 72px;
  }
  .drawer.open { transform: none; }
  .drawer .close { position: absolute; top: 16px; right: 16px; width: 40px; height: 40px; padding: 6px; border: 0; background: none; color: var(--c-text); cursor: pointer; }
  .drawer .close svg { width: 28px; height: 28px; display: block; }
  .drawer ul { list-style: none; margin: 0; padding: 0; }
  .drawer a { display: block; padding: 24px; font-size: 16px; line-height: 30px; letter-spacing: 1px; color: var(--c-nav); border-bottom: 1px solid var(--c-line); }
  .drawer a[aria-current="page"] { color: var(--c-accent); font-weight: 700; }
  .drawer-mask.open { display: block; position: fixed; inset: 0; z-index: 30; background: rgba(0, 0, 0, .3); }

  .hero { min-height: 0; padding: 42px var(--gutter) 41px; }
  .hero h1 { font-size: 35px; line-height: 42px; }
  .section-heading { line-height: 19.6px; }

  .feature, .feature.reverse { grid-template-columns: 1fr; row-gap: 23px; }
  .feature.reverse img { order: 0; }
  .feature .text { padding: 0; }
  .feature .content-heading { margin-bottom: 16px; }
  .features { margin-bottom: 24px; }
  .cards { grid-template-columns: 1fr; row-gap: 48px; }

  .featured { padding: 0 var(--gutter); }
  .featured-text { border-left: 0; padding: 4px 0; }
  .featured h2, .subscribe h3 { font-size: 25px; line-height: 31.25px; }
  .subscribe { flex-direction: column; align-items: stretch; gap: 17px; }
  .subscribe .btn { margin-top: 6px; }
  .subscribe h3 { text-align: center; }
  .subscribe .btn { width: 100%; }
  .footer { padding: 40px 0; }
  .footer p { padding: 0 var(--gutter); }
}
