/* 平头路书官网 · 品牌设计系统（唯一事实源）
   两页共用：index.html / download.html
   风格：明亮米白底、大留白、18px 圆角卡片、轻阴影、绿为主金点缀 */

:root {
  --bg: #F5F0E7;        /* 页面米白底（对齐 App） */
  --bg-card: #FBF7EF;   /* 卡片底 */
  --green: #2F5841;     /* 品牌深绿（对齐 App） */
  --green-deep: #24473E;
  --gold: #BA9052;      /* 品牌金（对齐 App） */
  --text: #2E332B;
  --text-2: #797063;
  --border: #E2DACC;
  --radius: 18px;
  --shadow: 0 10px 30px rgba(17, 25, 22, .08);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC',
    'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--green);
  text-decoration: none;
  transition: color .2s ease;
}

a:hover {
  color: var(--green-deep);
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 22px;
}

@media (min-width: 768px) {
  .container {
    padding: 0 32px;
  }
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 13px 30px;
  border-radius: 12px;
  border: 1.5px solid transparent;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease, color .2s ease, border-color .2s ease;
  cursor: pointer;
}

.btn--primary {
  background: var(--green);
  color: #fff;
  box-shadow: 0 12px 24px rgba(47, 88, 65, .22);
}

.btn--primary:hover {
  background: var(--green-deep);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 16px 30px rgba(47, 88, 65, .28);
}

.btn--outline {
  background: transparent;
  color: var(--green);
  border-color: var(--border);
}

.btn--outline:hover {
  color: var(--green-deep);
  border-color: var(--green);
  background: rgba(47, 88, 65, .04);
}

/* 绿色区块内的按钮（反色） */
.btn--on-green {
  background: #fff;
  color: var(--green);
  box-shadow: 0 12px 26px rgba(17, 25, 22, .18);
}

.btn--on-green:hover {
  background: #fff;
  color: var(--green-deep);
  transform: translateY(-2px);
}

.btn--ghost-green {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, .5);
}

.btn--ghost-green:hover {
  color: #fff;
  border-color: #fff;
  background: rgba(255, 255, 255, .12);
}

.btn--disabled {
  background: #e8e2d6;
  color: #a29b8f;
  cursor: not-allowed;
  box-shadow: none;
}

.btn--disabled:hover {
  background: #e8e2d6;
  color: #a29b8f;
  transform: none;
  box-shadow: none;
}

/* ---------- 顶栏 ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 1000;
  background: rgba(245, 240, 231, .88);
  border-bottom: 1px solid var(--border);
  backdrop-filter: saturate(160%) blur(12px);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  height: 62px;
}

.site-header__brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--green);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: .5px;
  white-space: nowrap;
}

.site-header__brand:hover {
  color: var(--green);
}

.site-header__logo {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  object-fit: cover;
}

.site-nav {
  display: none;
  align-items: center;
  gap: 30px;
}

@media (min-width: 768px) {
  .site-nav {
    display: flex;
  }
}

.site-nav a {
  color: var(--text-2);
  font-size: 15px;
  font-weight: 500;
}

.site-nav a:hover,
.site-nav a.is-active {
  color: var(--green);
}

.site-header__cta {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 18px;
  border-radius: 10px;
  background: var(--green);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}

.site-header__cta:hover {
  background: var(--green-deep);
  color: #fff;
}

@media (max-width: 767px) {
  .site-header__cta {
    padding: 7px 14px;
    font-size: 13px;
  }
}

/* ---------- Hero ---------- */
.hero {
  padding: 104px 0 56px;
  background: var(--bg);
}

@media (min-width: 768px) {
  .hero {
    padding: 128px 0 72px;
  }
}

.hero__inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 44px;
  align-items: center;
}

@media (min-width: 1080px) {
  .hero__inner {
    grid-template-columns: minmax(0, 1fr) minmax(420px, 0.92fr);
    gap: 56px;
  }
}

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(186, 144, 82, .12);
  color: var(--gold);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .3px;
}

.hero__title {
  color: var(--text);
  font-size: 38px;
  line-height: 1.16;
  font-weight: 800;
  letter-spacing: .5px;
  margin-bottom: 18px;
}

@media (min-width: 768px) {
  .hero__title {
    font-size: 56px;
  }
}

.hero__title em {
  font-style: normal;
  color: var(--green);
}

.hero__subtitle {
  max-width: 560px;
  color: var(--text-2);
  font-size: 17px;
  line-height: 1.75;
  margin-bottom: 30px;
}

@media (min-width: 768px) {
  .hero__subtitle {
    font-size: 18px;
  }
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}

@media (max-width: 520px) {
  .hero__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero__actions .btn {
    width: 100%;
  }
}

.hero__note {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin-top: 22px;
  color: var(--text-2);
  font-size: 13px;
}

.hero__note span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
}

.hero__note span::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--gold);
}

/* 手机截图叠放展示 */
.hero__visual {
  position: relative;
  height: 420px;
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (min-width: 768px) {
  .hero__visual {
    height: 540px;
  }
}

.phone {
  position: absolute;
  width: 40%;
  max-width: 230px;
  aspect-ratio: 760 / 1651;
  border-radius: 26px;
  overflow: hidden;
  background: #fff;
  border: 6px solid #fff;
  box-shadow: 0 22px 46px rgba(17, 25, 22, .2);
}

.phone img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.phone--main {
  z-index: 3;
  transform: translateY(-4px);
}

.phone--left {
  z-index: 2;
  left: 6%;
  transform: translateX(-6%) rotate(-6deg);
}

@media (min-width: 400px) {
  .phone--left {
    left: 10%;
    transform: translateX(-14%) rotate(-6deg);
  }
}

.phone--right {
  z-index: 1;
  right: 6%;
  transform: translateX(6%) rotate(6deg);
}

@media (min-width: 400px) {
  .phone--right {
    right: 10%;
    transform: translateX(14%) rotate(6deg);
  }
}

/* ---------- 通用区块标题 ---------- */
.section {
  padding: 64px 0;
}

@media (min-width: 768px) {
  .section {
    padding: 88px 0;
  }
}

.section--card-bg {
  background: var(--bg-card);
}

.section__head {
  max-width: 640px;
  margin-bottom: 40px;
}

.section__kicker {
  display: block;
  margin-bottom: 10px;
  color: var(--gold);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .4px;
}

.section__title {
  color: var(--text);
  font-size: 28px;
  line-height: 1.28;
  font-weight: 800;
  letter-spacing: .3px;
}

@media (min-width: 768px) {
  .section__title {
    font-size: 36px;
  }
}

.section__desc {
  margin-top: 14px;
  color: var(--text-2);
  font-size: 16px;
  line-height: 1.7;
}

/* ---------- 三大能力卡 ---------- */
.feature-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
}

@media (min-width: 768px) {
  .feature-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.feature-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform .2s ease, box-shadow .2s ease;
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 40px rgba(17, 25, 22, .12);
}

.feature-card__media {
  aspect-ratio: 4 / 3;
  background: #efe7d8;
  overflow: hidden;
}

.feature-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

.feature-card__body {
  padding: 22px 24px 26px;
}

.feature-card__title {
  color: var(--text);
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 10px;
}

.feature-card__text {
  color: var(--text-2);
  font-size: 15px;
  line-height: 1.7;
}

/* ---------- 线路氛围区 ---------- */
.gallery__rail {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

@media (max-width: 900px) {
  .gallery__rail {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding-bottom: 12px;
    scroll-snap-type: x mandatory;
  }
}

.gallery-card {
  min-width: 0;
}

@media (max-width: 900px) {
  .gallery-card {
    flex: 0 0 72%;
    scroll-snap-align: start;
  }
}

.gallery-card__frame {
  aspect-ratio: 760 / 1651;
  border-radius: var(--radius);
  overflow: hidden;
  background: #efe7d8;
  box-shadow: var(--shadow);
}

.gallery-card__frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-card__title {
  margin-top: 14px;
  color: var(--text);
  font-size: 16px;
  font-weight: 700;
}

.gallery-card__text {
  margin-top: 4px;
  color: var(--text-2);
  font-size: 14px;
  line-height: 1.6;
}

.gallery__note {
  margin-top: 24px;
  color: var(--text-2);
  font-size: 13px;
  line-height: 1.7;
}

/* ---------- 底部下载 CTA（绿底白字） ---------- */
.download-cta {
  padding: 64px 0;
}

@media (min-width: 768px) {
  .download-cta {
    padding: 88px 0;
  }
}

.download-cta__box {
  padding: 44px 28px;
  border-radius: 24px;
  background: linear-gradient(135deg, var(--green) 0%, var(--green-deep) 100%);
  color: #fff;
  text-align: center;
}

@media (min-width: 768px) {
  .download-cta__box {
    padding: 60px 48px;
  }
}

.download-cta__title {
  font-size: 28px;
  line-height: 1.28;
  font-weight: 800;
  margin-bottom: 14px;
}

@media (min-width: 768px) {
  .download-cta__title {
    font-size: 34px;
  }
}

.download-cta__desc {
  max-width: 560px;
  margin: 0 auto 28px;
  color: rgba(255, 255, 255, .82);
  font-size: 16px;
  line-height: 1.7;
}

.download-cta__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
}

@media (max-width: 520px) {
  .download-cta__actions {
    flex-direction: column;
  }

  .download-cta__actions .btn {
    width: 100%;
  }
}

.download-cta__hint {
  margin-top: 20px;
  color: rgba(255, 255, 255, .74);
  font-size: 13px;
  line-height: 1.7;
}

.download-cta__hint a {
  color: #fff;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.download-cta__hint a:hover {
  color: #fff;
}

/* ---------- Footer ---------- */
.site-footer {
  padding: 44px 0 28px;
  background: var(--bg-card);
  border-top: 1px solid var(--border);
}

.site-footer__content {
  display: flex;
  flex-direction: column;
  gap: 20px;
  text-align: center;
}

@media (min-width: 768px) {
  .site-footer__content {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    text-align: left;
  }
}

.site-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
}

@media (min-width: 768px) {
  .site-footer__links {
    justify-content: flex-start;
  }
}

.site-footer__links a {
  color: var(--text-2);
  font-size: 14px;
}

.site-footer__links a:hover {
  color: var(--green);
}

.site-footer__beian {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: var(--text-2);
}

@media (min-width: 768px) {
  .site-footer__beian {
    justify-content: flex-end;
  }
}

.site-footer__beian a {
  color: var(--text-2);
}

.site-footer__beian a:hover {
  color: var(--green);
}

.site-footer__copyright {
  margin-top: 22px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 12px;
  color: var(--text-2);
}

/* ========== download.html 专属 ========== */

/* 平台卡片 */
.platform-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

@media (min-width: 768px) {
  .platform-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.platform-card {
  display: flex;
  flex-direction: column;
  min-height: 288px;
  padding: 26px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.platform-card--available {
  border-color: rgba(47, 88, 65, .3);
}

.platform-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.platform-card__label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 10px;
  background: rgba(47, 88, 65, .08);
  color: var(--green);
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
}

.platform-card__status {
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(47, 88, 65, .12);
  color: var(--green);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.platform-card__status--muted {
  background: #e8e2d6;
  color: var(--text-2);
}

.platform-card__title {
  color: var(--text);
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 8px;
}

.platform-card__meta {
  color: var(--text-2);
  font-size: 14px;
  margin-bottom: 14px;
}

.platform-card__desc {
  color: var(--text-2);
  font-size: 14px;
  line-height: 1.7;
  margin-bottom: 22px;
}

.platform-card__action {
  margin-top: auto;
}

.platform-card__action .btn {
  width: 100%;
}

.backup-link {
  display: inline-flex;
  justify-content: center;
  width: 100%;
  margin-top: 12px;
  color: var(--green);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.5;
}

.backup-link:hover {
  color: var(--green-deep);
}

/* 三步安装 */
.steps-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

@media (min-width: 768px) {
  .steps-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.step-card {
  padding: 26px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.step-card__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  margin-bottom: 16px;
}

.step-card__title {
  color: var(--text);
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
}

.step-card__text {
  color: var(--text-2);
  font-size: 14px;
  line-height: 1.7;
}

/* 运营主体 */
.company-box {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  padding: 28px 26px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

@media (min-width: 768px) {
  .company-box {
    grid-template-columns: 1fr 2fr;
    align-items: center;
  }
}

.company-box__title {
  color: var(--text);
  font-size: 22px;
  font-weight: 700;
}

.company-box__info {
  display: grid;
  gap: 6px;
  color: var(--text-2);
  font-size: 14px;
  line-height: 1.7;
}

.company-box__info a {
  word-break: break-all;
}

/* ---------- 下载引导弹窗（逻辑保留，样式对齐品牌） ---------- */
.download-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 22px;
  background: rgba(20, 24, 23, .5);
  z-index: 1400;
}

.download-modal.is-visible {
  display: flex;
}

.download-modal__panel {
  width: min(100%, 500px);
  background: #fff;
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: 0 24px 60px rgba(17, 25, 22, .24);
}

.download-modal__title {
  color: var(--text);
  font-size: 22px;
  line-height: 1.35;
  margin-bottom: 12px;
}

.download-modal__text {
  color: var(--text-2);
  font-size: 15px;
  line-height: 1.8;
  margin-bottom: 18px;
}

.download-modal__url {
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--green);
  font-size: 14px;
  line-height: 1.6;
  word-break: break-all;
  margin-bottom: 18px;
}

.download-modal__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.download-modal__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 22px;
  border-radius: 12px;
  border: 1.5px solid transparent;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.download-modal__button--primary {
  background: var(--green);
  color: #fff;
}

.download-modal__button--primary:hover {
  background: var(--green-deep);
}

.download-modal__button--secondary {
  background: #fff;
  color: var(--green);
  border-color: var(--border);
}

@media (max-width: 767px) {
  .download-modal__panel {
    padding: 22px;
  }

  .download-modal__title {
    font-size: 20px;
  }

  .download-modal__actions {
    flex-direction: column;
  }

  .download-modal__button {
    width: 100%;
  }
}
