/* Gymlin 品牌覆盖样式。除本文件的令牌定义外，页面与组件只引用 CSS 变量。 */

:root {
  /* 金黄 100 */
  --gold-110: #FFFBEF;
  --gold-120: #FDEECC;
  --gold-130: #FBDB80;
  --gold-140: #F7B600;
  --gold-150: #C69200;
  --gold-160: #7C5B00;

  /* 绿色 200 */
  --green-210: #F0F8F4;
  --green-220: #CCE8DA;
  --green-230: #80C5A2;
  --green-240: #008A45;
  --green-250: #006E37;
  --green-260: #004523;

  /* 灰色 300 */
  --gray-310: #F6F7F7;
  --gray-320: #E1E3E6;
  --gray-330: #B5B9C0;
  --gray-340: #6B7280;
  --gray-350: #565B66;
  --gray-360: #202226;

  --white: #FFFFFF;

  --font-display: "Anton", "Archivo", "Microsoft YaHei", "PingFang SC", sans-serif;
  --font-body: "Archivo", "Microsoft YaHei", "PingFang SC", "Noto Sans SC", sans-serif;
  --font-arabic: "Tajawal", "Archivo", "Microsoft YaHei", sans-serif;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --header-height: 76px;
}

html {
  scroll-padding-top: calc(var(--header-height) + 16px);
}

body {
  margin: 0;
  background: var(--gray-310);
  color: var(--gray-360);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

html[dir="rtl"] body {
  font-family: var(--font-arabic);
}

h1, h2, h3 {
  color: inherit;
  line-height: 1.15;
}

a {
  color: var(--green-250);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

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

:focus-visible {
  outline: 3px solid var(--green-250);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

.skip-link {
  position: absolute;
  inset-inline-start: 16px;
  top: -60px;
  z-index: 2000;
  padding: 10px 18px;
  background: var(--white);
  color: var(--gray-360);
  border-radius: var(--radius-sm);
  box-shadow: 0 6px 20px rgba(32, 34, 38, 0.2);
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 12px;
}

/* ---------- 顶栏 ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 1030;
  background: var(--white);
  border-bottom: 1px solid var(--gray-320);
}

.site-header .navbar {
  min-height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.navbar-brand {
  display: inline-flex;
  align-items: center;
  padding: 0;
  margin: 0;
}

.navbar-brand img {
  display: block;
  width: 132px;
  height: auto;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--gray-350);
  font-weight: 500;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.nav-links a:hover {
  color: var(--gray-360);
  border-bottom-color: var(--green-240);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-lang {
  min-height: 44px;
  padding: 8px 14px;
  color: var(--gray-350);
  background: var(--white);
  border: 1px solid var(--gray-320);
  border-radius: var(--radius-sm);
  font-weight: 500;
}

.btn-lang:hover {
  color: var(--gray-360);
  background: var(--gray-310);
  border-color: var(--gray-330);
}

.navbar-toggler {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 46px;
  height: 46px;
  padding: 10px;
  background: var(--white);
  border: 1px solid var(--gray-320);
  border-radius: var(--radius-sm);
}

.toggler-bar {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--gray-360);
  border-radius: 2px;
}

/* ---------- 按钮 ---------- */

.btn {
  --bs-btn-focus-box-shadow: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 22px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  border-width: 1px;
  transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.btn-lg {
  min-height: 52px;
  padding: 13px 28px;
  font-size: 1.0625rem;
}

.btn-gold {
  background: var(--gold-140);
  border-color: var(--gold-140);
  color: var(--gray-360);
}

.btn-gold:hover {
  background: var(--gold-130);
  border-color: var(--gold-130);
  color: var(--gray-360);
}

.btn-gold:active {
  background: var(--gold-150);
  border-color: var(--gold-150);
  color: var(--gray-360);
}

.btn-outline-green {
  background: var(--white);
  border-color: var(--green-240);
  color: var(--green-250);
}

.btn-outline-green:hover {
  background: var(--green-210);
  border-color: var(--green-240);
  color: var(--green-250);
}

.btn-outline-green:active {
  background: var(--green-220);
  border-color: var(--green-220);
  color: var(--green-260);
}

.btn-store {
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
  min-width: 190px;
  min-height: 58px;
  padding: 9px 18px;
  background: var(--gray-320);
  border-color: var(--gray-320);
  color: var(--gray-340);
  cursor: not-allowed;
  text-align: start;
}

.btn-store:disabled {
  opacity: 1;
}

a.btn-store {
  background: var(--green-250);
  border-color: var(--green-250);
  color: var(--white);
  cursor: pointer;
  text-decoration: none;
}

a.btn-store:hover,
a.btn-store:focus-visible {
  background: var(--green-260);
  border-color: var(--green-260);
  color: var(--white);
}

.btn-store.is-current {
  box-shadow: 0 0 0 3px var(--gold-130);
}

.store-name {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.3;
}

.store-note {
  font-size: 0.75rem;
  font-weight: 400;
  line-height: 1.3;
}

/* ---------- 通用区块 ---------- */

.section {
  padding: 88px 0;
}

.section-heading {
  max-width: 720px;
  margin-bottom: 44px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--gold-160);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.section-title {
  position: relative;
  margin: 0 0 16px;
  padding-inline-start: 16px;
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 3vw, 2.75rem);
  font-weight: 400;
  letter-spacing: 0.01em;
}

.section-title::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 0.12em;
  bottom: 0.12em;
  width: 4px;
  background: var(--gold-140);
  border-radius: 2px;
}

.section-lead {
  margin: 0;
  color: var(--gray-350);
  font-size: 1.0625rem;
}

.section-note {
  margin: 32px 0 0;
  color: var(--gray-340);
  font-size: 0.875rem;
}

/* ---------- Hero ---------- */

.hero {
  background: var(--gray-360);
  color: var(--white);
  padding: 76px 0 84px;
}

.hero .eyebrow {
  color: var(--gold-140);
}

.hero-title {
  margin: 0 0 20px;
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5.2vw, 4.25rem);
  font-weight: 400;
  letter-spacing: 0.01em;
  color: var(--white);
}

.hero-subtitle {
  max-width: 34em;
  margin: 0 0 32px;
  color: var(--gray-320);
  font-size: 1.125rem;
}

.hero-media {
  display: block;
}

.hero-img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
}

/* ---------- 功能卡片 ---------- */

.section-ems {
  background: var(--white);
}

.feature-card {
  height: 100%;
  padding: 30px 26px;
  background: var(--gray-310);
  border: 1px solid var(--gray-320);
  border-radius: var(--radius-md);
}

.feature-number,
.value-number {
  display: inline-block;
  margin-bottom: 14px;
  color: var(--green-250);
  font-family: var(--font-display);
  font-size: 1.5rem;
  letter-spacing: 0.06em;
}

.feature-title,
.value-title {
  margin: 0 0 10px;
  font-size: 1.1875rem;
  font-weight: 700;
}

.feature-text,
.value-text {
  margin: 0;
  color: var(--gray-350);
}

/* ---------- 会员价值 ---------- */

.value-card {
  height: 100%;
  padding: 30px 26px;
  background: var(--white);
  border: 1px solid var(--gray-320);
  border-radius: var(--radius-md);
}

.value-number {
  color: var(--gold-160);
}

/* ---------- 训练旅程 ---------- */

.section-journey {
  background: var(--white);
}

.journey-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.journey-step {
  position: relative;
  padding: 28px 24px;
  background: var(--gray-310);
  border-inline-start: 4px solid var(--green-240);
  border-radius: var(--radius-md);
}

.journey-number {
  display: block;
  margin-bottom: 10px;
  color: var(--green-250);
  font-family: var(--font-display);
  font-size: 1.375rem;
  letter-spacing: 0.08em;
}

.journey-title {
  margin: 0 0 8px;
  font-size: 1.125rem;
  font-weight: 700;
}

.journey-text {
  margin: 0;
  color: var(--gray-350);
  font-size: 0.9375rem;
}

/* ---------- 下载页 ---------- */

.download-hero {
  padding: 96px 0;
  background: var(--gray-360);
  color: var(--white);
}

.download-hero .eyebrow {
  color: var(--gold-140);
}

.download-hero-title {
  margin: 0 0 20px;
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5vw, 3.75rem);
  font-weight: 400;
  color: var(--white);
}

.download-hero-subtitle {
  max-width: 40em;
  margin: 0 0 32px;
  color: var(--gray-320);
  font-size: 1.125rem;
}

.download-hero-img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
}

.download-info {
  background: var(--white);
}

.download-how {
  margin-top: 56px;
  padding: 28px 30px;
  background: var(--green-210);
  border-inline-start: 4px solid var(--green-240);
  border-radius: var(--radius-md);
}

.download-how-title {
  margin: 0 0 8px;
  font-size: 1.25rem;
  font-weight: 700;
}

.download-how-text {
  margin: 0;
  color: var(--gray-350);
}

.store-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.download-note {
  margin: 16px 0 0;
  color: var(--gray-330);
  font-size: 0.8125rem;
}

/* ---------- FAQ ---------- */

.section-faq {
  padding-bottom: 104px;
}

.faq-accordion {
  max-width: 880px;
  border-top: 1px solid var(--gray-320);
}

.faq-accordion .accordion-item {
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--gray-320);
}

.faq-accordion .accordion-button {
  padding: 22px 4px;
  background: transparent;
  color: var(--gray-360);
  font-size: 1.0625rem;
  font-weight: 600;
  box-shadow: none;
}

.faq-accordion .accordion-button:not(.collapsed) {
  color: var(--green-250);
  background: transparent;
}

.faq-accordion .accordion-button::after {
  background-size: 1rem;
}

.faq-accordion .accordion-button:focus-visible {
  outline: 3px solid var(--green-250);
  outline-offset: 2px;
}

.faq-accordion .accordion-body {
  padding: 0 4px 24px;
  color: var(--gray-350);
}

/* ---------- 页脚 ---------- */

.site-footer {
  padding: 72px 0 40px;
  background: var(--white);
  border-top: 1px solid var(--gray-320);
}

.footer-brand img {
  display: block;
  width: 132px;
  height: auto;
}

.footer-slogan {
  max-width: 22em;
  margin: 18px 0 0;
  color: var(--gray-350);
}

.footer-heading {
  margin: 0 0 16px;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gray-340);
}

.footer-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-list li + li {
  margin-top: 10px;
}

.footer-list a {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  color: var(--gray-350);
  text-decoration: none;
}

.footer-list a:hover,
.footer-list a.active {
  color: var(--green-250);
  text-decoration: underline;
}

.footer-copy {
  margin: 48px 0 0;
  padding-top: 24px;
  border-top: 1px solid var(--gray-320);
  color: var(--gray-340);
  font-size: 0.875rem;
}

.footer-icp {
  margin: 8px 0 0;
  color: var(--gray-340);
  font-size: 0.875rem;
}

.footer-icp a {
  color: var(--gray-340);
  text-decoration: none;
}

.footer-icp a:hover {
  color: var(--gray-350);
  text-decoration: underline;
}

/* ---------- 移动端菜单 ---------- */

.offcanvas {
  background: var(--white);
  color: var(--gray-360);
}

.offcanvas-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--gray-320);
}

.offcanvas-body {
  display: flex;
  flex-direction: column;
  padding: 12px 24px 28px;
}

.mobile-nav {
  margin: 0;
  padding: 0;
  list-style: none;
}

.mobile-nav a {
  display: flex;
  align-items: center;
  min-height: 52px;
  border-bottom: 1px solid var(--gray-320);
  color: var(--gray-360);
  font-size: 1.0625rem;
  font-weight: 500;
  text-decoration: none;
}

.mobile-nav-footer {
  margin-top: auto;
  padding-top: 28px;
}

.mobile-nav-label {
  margin: 0 0 8px;
  color: var(--gray-340);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.mobile-langs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0 0 20px;
  padding: 0;
  list-style: none;
}

.mobile-langs a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid var(--gray-320);
  border-radius: var(--radius-sm);
  color: var(--gray-350);
  text-decoration: none;
}

.mobile-langs a.active {
  background: var(--green-210);
  border-color: var(--green-230);
  color: var(--green-260);
  font-weight: 600;
}

/* ---------- 文章页 ---------- */

.article-page {
  padding: 48px 0 96px;
  background: var(--gray-310);
}

.article-container {
  max-width: 860px;
}

.article-breadcrumb {
  margin-bottom: 28px;
  font-size: 0.875rem;
}

.article-breadcrumb a {
  color: var(--gray-350);
}

.article-title {
  margin: 0 0 32px;
  padding-inline-start: 18px;
  border-inline-start: 4px solid var(--gold-140);
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 3.4vw, 2.875rem);
  font-weight: 400;
}

.article-fallback {
  margin: 0 0 28px;
  padding: 14px 18px;
  background: var(--gold-110);
  border: 1px solid var(--gold-120);
  border-radius: var(--radius-sm);
  color: var(--gold-160);
  font-size: 0.9375rem;
}

.article-body {
  color: var(--gray-360);
}

.article-body h2 {
  margin: 2.2em 0 0.6em;
  font-size: 1.5rem;
  font-weight: 700;
}

.article-body h3 {
  margin: 1.8em 0 0.5em;
  font-size: 1.1875rem;
  font-weight: 700;
}

.article-body h2:first-child,
.article-body h3:first-child {
  margin-top: 0;
}

.article-body p {
  margin: 0 0 1.1em;
}

.article-body ul,
.article-body ol {
  margin: 0 0 1.2em;
  padding-inline-start: 1.4em;
}

.article-body li {
  margin-bottom: 0.45em;
}

.article-body a {
  color: var(--green-250);
}

.article-body img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
}

.article-body blockquote {
  margin: 0 0 1.2em;
  padding: 12px 18px;
  border-inline-start: 4px solid var(--green-240);
  background: var(--green-210);
  color: var(--gray-350);
}

.article-body table {
  display: block;
  max-width: 100%;
  margin: 0 0 1.4em;
  overflow-x: auto;
  border-collapse: collapse;
}

.article-body th,
.article-body td {
  padding: 10px 14px;
  border: 1px solid var(--gray-320);
  text-align: start;
  vertical-align: top;
}

.article-body th {
  background: var(--gray-310);
  font-weight: 700;
}

.article-body code {
  padding: 2px 6px;
  background: var(--gray-310);
  border-radius: 4px;
  font-size: 0.9em;
}

/* ---------- 错误页 ---------- */

.error-page {
  padding: 120px 0 140px;
  background: var(--gray-310);
}

.error-container {
  max-width: 640px;
  text-align: center;
}

.error-code {
  margin: 0 0 8px;
  color: var(--gold-160);
  font-family: var(--font-display);
  font-size: clamp(3rem, 8vw, 5rem);
  letter-spacing: 0.06em;
}

.error-title {
  margin: 0 0 16px;
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.4vw, 2.5rem);
  font-weight: 400;
}

.error-text {
  margin: 0 0 32px;
  color: var(--gray-350);
}

/* ---------- 响应式 ---------- */

@media (max-width: 991.98px) {
  .hero {
    padding: 56px 0 64px;
  }

  .journey-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .section {
    padding: 64px 0;
  }
}

@media (max-width: 575.98px) {
  .journey-list {
    grid-template-columns: 1fr;
  }

  .section-title {
    font-size: 1.75rem;
  }

  .btn-store {
    width: 100%;
  }

  .store-buttons {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
