/* =========================================================
   Muscle Ranch 馬場｜設計預覽版樣式
   規格：docs/design/2026-11-11-website-html-design.md 第 6 節
   ========================================================= */

:root {
  /* 品牌色（企劃第七節）＋推導色（風格建議二） */
  --mr-burgundy: #800020;
  --mr-burgundy-deep: #5C0017;
  --mr-beige: #DCD2C6;
  --mr-cream: #F4EFE9;
  --mr-ink: #191919;
  --mr-charcoal: #232120;
  --mr-muted-on-dark: #A39A90;
  --mr-muted-on-light: #6B6560;

  --line-on-light: rgba(25, 25, 25, .18);
  --line-on-dark: rgba(220, 210, 198, .18);

  --font-serif: "Noto Serif TC", "Songti TC", "PMingLiU", serif;
  --font-sans: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", system-ui, sans-serif;
  --font-en: "Archivo", "Noto Sans TC", "Helvetica Neue", Arial, sans-serif;

  --container: 1200px;
  --gutter: clamp(20px, 4vw, 40px);
  --section-pad: clamp(72px, 10vw, 140px);
  --header-h: 88px;
  --ease: cubic-bezier(.22, 1, .36, 1);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16.5px;
  line-height: 1.8;
  letter-spacing: .02em;
  color: var(--mr-ink);
  background: var(--mr-cream);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--mr-burgundy); outline-offset: 3px; }
.on-dark :focus-visible, .site-header :focus-visible, .site-footer :focus-visible { outline-color: var(--mr-beige); }

.skip-link {
  position: absolute; left: 16px; top: -100px; z-index: 100;
  padding: 10px 16px; background: var(--mr-beige); color: var(--mr-ink);
}
.skip-link:focus { top: 16px; }

.container { width: 100%; max-width: calc(var(--container) + var(--gutter) * 2); margin-inline: auto; padding-inline: var(--gutter); }
.container--narrow { max-width: calc(760px + var(--gutter) * 2); }

/* ---------- Typography ---------- */
.eyebrow {
  display: block;
  margin-bottom: 16px;
  font-family: var(--font-en);
  font-weight: 600;
  font-size: 12.5px;
  line-height: 1.4;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--eyebrow, var(--mr-burgundy));
}
.display {
  font-family: var(--font-serif);
  font-weight: 900;
  font-size: clamp(2.25rem, 1.4rem + 3.2vw, 4rem);
  line-height: 1.25;
  letter-spacing: .02em;
}
.h2 {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: clamp(1.75rem, 1.2rem + 1.8vw, 2.75rem);
  line-height: 1.35;
  letter-spacing: .02em;
}
.h3 {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: clamp(1.25rem, 1.1rem + .5vw, 1.5rem);
  line-height: 1.45;
}
.lead { font-size: clamp(1.05rem, 1rem + .3vw, 1.2rem); line-height: 1.9; }
.prose > * + * { margin-top: 1.1em; }
.en-display {
  font-family: var(--font-en);
  font-weight: 800;
  letter-spacing: -.02em;
  line-height: 1.05;
}
.text-muted { color: var(--mr-muted-on-light); }

/* ---------- Sections ---------- */
.section { padding-block: var(--section-pad); }
.section--cream { background: var(--mr-cream); color: var(--mr-ink); }
.section--beige { background: var(--mr-beige); color: var(--mr-ink); }
.section--ink { background: var(--mr-ink); color: var(--mr-beige); --eyebrow: var(--mr-muted-on-dark); }
.section--ink .text-muted { color: var(--mr-muted-on-dark); }
.section--burgundy { background: var(--mr-burgundy); color: var(--mr-beige); --eyebrow: var(--mr-beige); }

.section-head { max-width: 760px; margin-bottom: clamp(40px, 5vw, 64px); }
.section-head--center { margin-inline: auto; text-align: center; }
.section-head .h2 + p { margin-top: 20px; }

/* ---------- Buttons & links ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55em;
  min-height: 48px;
  padding: 13px 28px;
  border: 1px solid transparent;
  border-radius: 2px;
  font: 500 15px/1.2 var(--font-sans);
  letter-spacing: .08em;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease);
}
.btn .icon { width: 18px; height: 18px; flex: none; }
.btn--sm { min-height: 44px; padding: 10px 20px; font-size: 14px; }
.btn--primary { background: var(--mr-burgundy); color: var(--mr-beige); }
.btn--primary:hover { background: var(--mr-burgundy-deep); }
.on-dark .btn--primary, .site-header .btn--primary, .mobile-bar .btn--primary, .line-float {
  border-color: rgba(220, 210, 198, .35);
}
.on-dark .btn--primary:hover, .site-header .btn--primary:hover { background: var(--mr-beige); color: var(--mr-ink); }
.btn--ghost { background: transparent; border-color: currentColor; }
.btn--ghost:hover { background: var(--mr-ink); color: var(--mr-beige); border-color: var(--mr-ink); }
.on-dark .btn--ghost:hover { background: var(--mr-beige); color: var(--mr-ink); border-color: var(--mr-beige); }
.btn--light { background: var(--mr-beige); color: var(--mr-ink); }
.btn--light:hover { background: var(--mr-cream); }

.btn-group { display: flex; flex-wrap: wrap; gap: 12px; }
.btn-group--center { justify-content: center; }

.link-arrow {
  display: inline-flex; align-items: center; gap: .4em;
  font-weight: 500;
  text-decoration: none;
  color: var(--link, var(--mr-burgundy));
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
  transition: background-size .4s var(--ease);
}
.link-arrow span { transition: transform .4s var(--ease); }
.link-arrow:hover { background-size: 100% 1px; }
.link-arrow:hover span { transform: translateX(4px); }
.section--ink .link-arrow, .section--burgundy .link-arrow { --link: var(--mr-beige); }

.tag {
  display: inline-block;
  padding: 2px 10px;
  border: 1px solid currentColor;
  border-radius: 2px;
  font-size: 12px;
  line-height: 1.6;
  letter-spacing: .1em;
  vertical-align: middle;
}

/* ---------- 佔位與示意標記（設計文件 6.1） ---------- */
.todo {
  display: inline-block;
  padding: .05em .55em;
  border: 1px dashed currentColor;
  border-color: color-mix(in srgb, currentColor 50%, transparent);
  border-radius: 2px;
  font-size: .875em;
  line-height: 1.6;
  letter-spacing: .04em;
}
.todo::before { content: "⚑ "; }

.ref-figure { position: relative; overflow: hidden; background: var(--mr-charcoal); }
.ref-figure img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.ref-badge {
  position: absolute; right: 10px; bottom: 10px; z-index: 2;
  padding: 3px 8px;
  border-radius: 2px;
  background: rgba(25, 25, 25, .8);
  color: var(--mr-beige);
  font-size: 12px;
  line-height: 1.5;
  letter-spacing: .04em;
  pointer-events: none;
}
.ratio-4x3 { aspect-ratio: 4 / 3; }
.ratio-4x5 { aspect-ratio: 4 / 5; }
.ratio-16x9 { aspect-ratio: 16 / 9; }
.ratio-21x9 { aspect-ratio: 21 / 9; }
.hover-zoom:hover img, .hover-zoom:focus-within img { transform: scale(1.04); }

.icon { display: inline-block; width: 1em; height: 1em; fill: currentColor; }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto; z-index: 50;
  color: var(--mr-beige);
  background: linear-gradient(to bottom, rgba(25, 25, 25, .6), rgba(25, 25, 25, 0));
  transition: background-color .4s var(--ease);
}
.site-header.is-scrolled {
  background: rgba(25, 25, 25, .92);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.site-header__inner {
  position: relative; z-index: 70;
  display: flex; align-items: center; gap: 32px;
  height: var(--header-h);
  transition: height .4s var(--ease);
}
.site-header.is-scrolled .site-header__inner { height: 64px; }
.brand { display: flex; align-items: baseline; gap: 10px; text-decoration: none; white-space: nowrap; }
.brand__en { font-family: var(--font-en); font-weight: 800; font-size: 18px; letter-spacing: .08em; }
.brand__zh { font-family: var(--font-serif); font-weight: 700; font-size: 15px; letter-spacing: .2em; }
.site-nav { display: flex; gap: clamp(14px, 1.8vw, 28px); margin-left: auto; }
.site-nav a {
  position: relative;
  padding-block: 8px;
  font-size: 15px; font-weight: 500; letter-spacing: .06em;
  text-decoration: none;
}
.site-nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 2px; height: 1px;
  background: currentColor;
  transform: scaleX(0); transform-origin: left;
  transition: transform .4s var(--ease);
}
.site-nav a:hover::after, .site-nav a[aria-current="page"]::after { transform: scaleX(1); }

.nav-toggle {
  display: none;
  position: relative;
  width: 44px; height: 44px;
  margin-left: auto; margin-right: -10px;
  border: 0; background: transparent; cursor: pointer;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  position: absolute; left: 11px; width: 22px; height: 1.5px;
  background: currentColor;
  transition: transform .3s var(--ease), opacity .3s;
}
.nav-toggle span { top: 50%; }
.nav-toggle span::before, .nav-toggle span::after { content: ""; left: 0; }
.nav-toggle span::before { transform: translateY(-7px); }
.nav-toggle span::after { transform: translateY(7px); }
.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { transform: rotate(45deg); background: var(--mr-beige); }
.nav-toggle[aria-expanded="true"] span::after { transform: rotate(-45deg); background: var(--mr-beige); }

.mobile-menu {
  position: fixed; inset: 0; z-index: 60;
  display: flex; flex-direction: column;
  padding: 96px var(--gutter) calc(32px + env(safe-area-inset-bottom));
  overflow-y: auto;
  background: var(--mr-ink);
  color: var(--mr-beige);
}
.mobile-menu[hidden] { display: none; }
.mobile-menu nav a {
  display: flex; align-items: center;
  min-height: 56px;
  border-bottom: 1px solid var(--line-on-dark);
  font-family: var(--font-serif); font-weight: 700; font-size: 22px;
  text-decoration: none;
}
.mobile-menu nav a[aria-current="page"] { color: var(--mr-muted-on-dark); }
.mobile-menu__foot { margin-top: auto; padding-top: 32px; font-size: 14px; color: var(--mr-muted-on-dark); }
.mobile-menu__foot p + p { margin-top: 6px; }
.mobile-menu__foot .btn { width: 100%; margin-top: 20px; }
body.menu-open { overflow: hidden; }

@media (max-width: 1080px) {
  .site-nav, .site-header__cta { display: none; }
  .nav-toggle { display: inline-block; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  display: flex; align-items: flex-end;
  min-height: min(100svh, 880px);
  color: var(--mr-beige);
  --eyebrow: var(--mr-beige);
  overflow: hidden;
}
.hero--page { min-height: clamp(380px, 52svh, 560px); }
.hero__media { position: absolute; inset: 0; z-index: 0; }
.hero__media img { animation: hero-zoom 1.6s var(--ease) both; }
.hero__media::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(25, 25, 25, .88) 0%, rgba(25, 25, 25, .45) 55%, rgba(25, 25, 25, .55) 100%);
}
.hero__media .ref-badge { z-index: 3; top: calc(var(--header-h) + 12px); bottom: auto; right: var(--gutter); }
.hero__content {
  position: relative; z-index: 1;
  padding-block: calc(var(--header-h) + 40px) clamp(56px, 8vw, 112px);
  animation: fade-up 1s .2s var(--ease) both;
}
.hero__sub { max-width: 640px; margin-top: 24px; }
.hero__sub p + p { margin-top: 10px; }
.hero--home .hero__sub p:first-child { font-family: var(--font-serif); font-weight: 700; font-size: clamp(1.1rem, 1rem + .5vw, 1.35rem); }
.hero .btn-group { margin-top: 36px; }
.hero--page .display { font-size: clamp(2.25rem, 1.6rem + 2.4vw, 3.5rem); }
.hero--page .hero__sub { font-family: var(--font-serif); font-weight: 700; font-size: clamp(1.1rem, 1rem + .5vw, 1.4rem); }

@keyframes hero-zoom { from { transform: scale(1.06); } to { transform: none; } }
@keyframes fade-up { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }

/* ---------- Layout helpers ---------- */
.split, .split--media {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 6fr);
  gap: clamp(32px, 6vw, 96px);
  align-items: start;
}
.split--media { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; }
.split--reverse > :first-child { order: 2; }
.grid-2, .grid-3, .grid-4 { display: grid; gap: clamp(24px, 3vw, 32px); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

@media (max-width: 960px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .split, .split--media, .grid-2, .grid-3 { grid-template-columns: minmax(0, 1fr); }
  .split--reverse > :first-child { order: 0; }
}
@media (max-width: 560px) {
  .grid-4 { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- 服務卡 ---------- */
.service-card { display: flex; flex-direction: column; gap: 18px; }
.service-card__num { font-family: var(--font-en); font-weight: 800; font-size: 14px; letter-spacing: .16em; color: var(--mr-muted-on-dark); }
.service-card .h3 { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.service-card p { color: var(--mr-beige); }
.service-card .link-arrow { margin-top: auto; align-self: flex-start; }

/* ---------- 理念四點 ---------- */
.philosophy-media { margin-bottom: clamp(40px, 5vw, 64px); }
.pillar { padding-top: 20px; border-top: 2px solid var(--mr-ink); }
.pillar__num { font-family: var(--font-en); font-weight: 800; font-size: 14px; letter-spacing: .16em; color: var(--mr-burgundy); }
.pillar .h3 { margin-top: 8px; }
.pillar p { margin-top: 12px; }

/* ---------- 分店卡 ---------- */
.location-card { display: flex; flex-direction: column; background: var(--mr-beige); }
.location-card__body { display: flex; flex-direction: column; gap: 18px; flex: 1; padding: clamp(24px, 3vw, 36px); }
.location-card__body .eyebrow { margin-bottom: 4px; }
.location-card .btn-group { margin-top: auto; padding-top: 8px; }
.info-list { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 20px; }
.info-list dt { font-weight: 700; font-size: 14.5px; white-space: nowrap; }
.info-list dd { font-size: 15.5px; }

.notice {
  padding: 14px 18px;
  border-left: 3px solid var(--mr-burgundy);
  background: rgba(128, 0, 32, .07);
  font-size: 15px;
}

/* ---------- 品牌語句 ---------- */
.manifesto {
  font-family: var(--font-serif);
  font-weight: 900;
  font-size: clamp(1.75rem, 1.1rem + 2.6vw, 3.25rem);
  line-height: 1.45;
  text-align: center;
}
.manifesto em { font-style: normal; color: var(--mr-burgundy); }

/* ---------- 訓練服務頁 ---------- */
.service-row { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 6vw, 96px); align-items: center; }
.service-row + .service-row { margin-top: clamp(64px, 8vw, 120px); }
.service-row--reverse > :first-child { order: 2; }
.service-row__media { max-width: 440px; width: 100%; }
.service-row--reverse .service-row__media { justify-self: end; }
.service-row__num { font-family: var(--font-en); font-weight: 800; font-size: clamp(3rem, 2rem + 3vw, 5rem); line-height: 1; color: var(--mr-burgundy); }
.service-row .h2 { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 12px; }
.service-row p { margin-top: 20px; }
@media (max-width: 860px) {
  .service-row { grid-template-columns: minmax(0, 1fr); }
  .service-row--reverse > :first-child { order: 0; }
  .service-row--reverse .service-row__media { justify-self: start; }
}

.step { padding-top: 24px; border-top: 1px solid var(--line-on-light); }
.step__num { font-family: var(--font-en); font-weight: 800; font-size: clamp(2.5rem, 2rem + 2vw, 3.5rem); line-height: 1; color: var(--mr-burgundy); }
.step .h3 { margin-top: 16px; }
.step p { margin-top: 12px; }

/* ---------- 教練卡 ---------- */
.coach-card { display: flex; flex-direction: column; gap: 18px; }
.coach-card__photo {
  display: grid; place-items: center;
  aspect-ratio: 4 / 5;
  border: 1px dashed rgba(25, 25, 25, .35);
  color: var(--mr-muted-on-light);
  font-size: 14px;
  letter-spacing: .1em;
}
.field-list li {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding-block: 10px;
  border-bottom: 1px solid var(--line-on-light);
  font-size: 14.5px;
}
.field-list li > span:first-child { font-weight: 500; }
.todo-banner { margin-bottom: 40px; }

/* ---------- FAQ ---------- */
.faq-list { border-top: 1px solid var(--line-on-light); }
.faq-item { border-bottom: 1px solid var(--line-on-light); }
.faq-item summary {
  display: flex; justify-content: space-between; align-items: center; gap: 24px;
  min-height: 72px;
  padding-block: 20px;
  cursor: pointer;
  list-style: none;
  font-family: var(--font-serif); font-weight: 700;
  font-size: clamp(1.05rem, 1rem + .4vw, 1.25rem);
  line-height: 1.5;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  flex: none;
  font-family: var(--font-en); font-weight: 400; font-size: 28px; line-height: 1;
  color: var(--mr-burgundy);
  transition: transform .3s var(--ease);
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item__a { padding-bottom: 24px; animation: fade-in .3s var(--ease); }
@keyframes fade-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

/* ---------- CTA 色帶 ---------- */
.cta-band { text-align: center; }
.cta-band__title { font-size: clamp(2.5rem, 1.6rem + 3.5vw, 4.5rem); }
.cta-band .h2 { margin-top: 20px; }
.cta-band p { margin-top: 16px; }
.cta-band .btn-group { margin-top: 36px; }
.cta-band__id { font-family: var(--font-en); font-weight: 600; letter-spacing: .08em; }
.line-id { font-family: var(--font-en); font-weight: 800; font-size: clamp(2rem, 1.4rem + 2.4vw, 3.25rem); letter-spacing: .02em; }

/* ---------- Footer ---------- */
.site-footer { padding-block: 72px 32px; background: var(--mr-ink); color: var(--mr-beige); font-size: 14.5px; }
.site-footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1.6fr 1fr; gap: 40px; }
.site-footer h2 { margin-bottom: 14px; font-family: var(--font-en); font-weight: 600; font-size: 12.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--mr-muted-on-dark); }
.site-footer .brand { margin-bottom: 14px; }
.site-footer__tagline { font-family: var(--font-en); font-weight: 600; letter-spacing: .12em; color: var(--mr-muted-on-dark); }
.site-footer ul li + li { margin-top: 6px; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { text-decoration: underline; text-underline-offset: 4px; }
.site-footer address { font-style: normal; }
.site-footer address + address { margin-top: 14px; }
.site-footer__bottom {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px;
  margin-top: 56px; padding-top: 24px;
  border-top: 1px solid var(--line-on-dark);
  font-size: 13px; color: var(--mr-muted-on-dark);
}
@media (max-width: 960px) { .site-footer__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .site-footer__grid { grid-template-columns: minmax(0, 1fr); } }

/* ---------- LINE 入口 ---------- */
.line-float { position: fixed; right: 24px; bottom: 24px; z-index: 40; box-shadow: 0 10px 30px rgba(0, 0, 0, .3); }
.mobile-bar { display: none; }
@media (max-width: 860px) {
  .line-float { display: none; }
  .mobile-bar {
    display: block;
    position: fixed; inset: auto 0 0; z-index: 40;
    padding: 8px var(--gutter) calc(8px + env(safe-area-inset-bottom));
    background: var(--mr-ink);
  }
  .mobile-bar .btn { width: 100%; }
  body { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
  /* 首屏扣掉底部固定列的高度，避免 Hero 按鈕被擋住 */
  .hero--home { min-height: calc(100svh - 64px - env(safe-area-inset-bottom)); }
}

/* ---------- 捲動進場 ---------- */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s var(--ease), transform .6s var(--ease); transition-delay: var(--d, 0ms); }
.js .reveal.is-visible { opacity: 1; transform: none; }

/* ---------- 減少動態 ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0s !important;
    animation-delay: 0s !important;
    transition-duration: 0s !important;
    transition-delay: 0s !important;
  }
  .js .reveal { opacity: 1; transform: none; }
}
