/* Appleのサイトと同じ見た目を作る汎用クラス。値は tokens.css の --ap-* だけを使う。
   実測の出どころと使い方はスキル apple-design(Claude Playground/.claude/skills/apple-design)。 */

/* ===== 文字 ===== */
.ap-page-title, .ap-page-title-sub, .ap-section-title, .ap-section-title-desc,
.ap-section-small-title, .ap-section-big-desc, .ap-section-small-desc, .ap-small-item-title,
.ap-body, .ap-body-bold, .ap-card-body, .ap-card-body-bold, .ap-grid-title, .ap-stats, .ap-stats-sub,
.ap-hint, .ap-hero, .ap-intro, .ap-tout {
  margin: 0;
  font-family: var(--font-sans, -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif);
  font-weight: 600;
}
.ap-page-title { font-size: var(--ap-page-title); line-height: var(--ap-page-title-lh); letter-spacing: var(--ap-page-title-ls); }
.ap-page-title-sub, .ap-section-title-desc, .ap-grid-title { font-size: var(--ap-eyebrow); line-height: var(--ap-eyebrow-lh); letter-spacing: var(--ap-eyebrow-ls); }
.ap-section-title { font-size: var(--ap-section-title); line-height: var(--ap-section-title-lh); letter-spacing: var(--ap-section-title-ls); }
.ap-section-small-title, .ap-section-big-desc { font-size: var(--ap-headline); line-height: var(--ap-headline-lh); letter-spacing: var(--ap-headline-ls); }
.ap-section-small-desc, .ap-small-item-title { font-size: var(--ap-label); line-height: var(--ap-label-lh); letter-spacing: var(--ap-label-ls); }
.ap-body, .ap-body-bold { font-size: var(--ap-body); line-height: var(--ap-body-lh); letter-spacing: var(--ap-body-ls); }
.ap-card-body, .ap-card-body-bold { font-size: var(--ap-card-body); line-height: var(--ap-card-body-lh); letter-spacing: var(--ap-card-body-ls); }
.ap-body, .ap-card-body, .ap-hint { font-weight: 400; }
.ap-stats { font-size: var(--ap-stats); line-height: var(--ap-stats-lh); letter-spacing: var(--ap-stats-ls); }
.ap-stats-sub { font-size: var(--ap-stats-sub); line-height: var(--ap-stats-sub-lh); }
.ap-hint { font-size: var(--ap-hint); line-height: var(--ap-hint-lh); letter-spacing: var(--ap-hint-ls); }
.ap-hero { font-size: var(--ap-hero); line-height: var(--ap-hero-lh); letter-spacing: var(--ap-hero-ls); font-weight: 700; }
.ap-intro { font-size: var(--ap-intro); line-height: var(--ap-intro-lh); letter-spacing: var(--ap-intro-ls); }
.ap-tout { font-size: var(--ap-tout); line-height: var(--ap-tout-lh); letter-spacing: var(--ap-tout-ls); }
.ap-muted { color: var(--ap-label-2); }

/* ===== 枠 ===== */
.ap-section { padding-block: var(--ap-section-y); background: var(--ap-fill-1); color: var(--ap-label-1); }
.ap-section--alt { background: var(--ap-fill-2); }
.ap-section--dark { background: var(--ap-dark-1); color: var(--ap-dark-label-1); }
.ap-section--no-top { padding-top: 0; }
.ap-section--no-bottom { padding-bottom: 0; }
.ap-wide { width: var(--ap-wide); margin-inline: auto; }
.ap-text { width: var(--ap-text); margin-inline: auto; }
.ap-section-header { margin-bottom: var(--ap-header-gap); }
.ap-section-header > * + * { margin-top: 24px; }
.ap-center { text-align: center; }

/* ===== 面 ===== */
.ap-card { position: relative; overflow: hidden; border-radius: var(--ap-radius-card); background: var(--ap-fill-2); }
.ap-card--white { background: var(--ap-fill-1); }
.ap-card--dark { background: var(--ap-dark-2); color: var(--ap-dark-label-1); }
.ap-card > img, .ap-card > video { display: block; width: 100%; height: 100%; object-fit: cover; }

/* ===== リンクとボタン ===== */
.ap-link { color: var(--ap-link); text-decoration: none; }
.ap-link:hover { text-decoration: underline; }
.ap-section--dark .ap-link, .ap-card--dark .ap-link { color: var(--ap-dark-link); }
.ap-btn {
  display: inline-block;
  padding: var(--ap-btn-pad);
  border-radius: var(--ap-radius-pill);
  background: var(--ap-cta);
  color: #fff;
  font-family: var(--font-sans, -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif);
  font-size: var(--ap-btn-size);
  font-weight: 400;
  line-height: var(--ap-btn-lh);
  text-align: center;
  text-decoration: none;
}
.ap-btn:hover { background: var(--ap-cta-hover); color: #fff; }
.ap-btn--outline { background: transparent; box-shadow: inset 0 0 0 1px var(--ap-link); color: var(--ap-link); }
.ap-btn--outline:hover { background: var(--ap-cta-hover); box-shadow: none; }

/* ===== カルーセル =====
   画面の端まで流れ、先頭は .ap-wide の左端にそろう。動きは motion/components.ts の initApGallery */
.ap-gallery { --ap-gallery-edge: calc((100vw - var(--ap-wide)) / 2); position: relative; }
.ap-gallery-track {
  display: flex;
  gap: var(--ap-gallery-gap);
  margin: 0;
  padding: 0 var(--ap-gallery-edge) 2px;
  overflow-x: auto;
  scroll-padding-inline: var(--ap-gallery-edge);
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  list-style: none;
}
.ap-gallery-track::-webkit-scrollbar { display: none; }
.ap-gallery-item { flex: none; scroll-snap-align: start; }
.ap-gallery-item--full { width: var(--ap-gallery-full-w); height: var(--ap-gallery-full-h); }
.ap-gallery-item--tile { width: var(--ap-tile-w); height: var(--ap-tile-h); }
.ap-gallery-item--tile-wide { width: var(--ap-tile-wide-w); height: var(--ap-tile-h); }
.ap-gallery-item--small { width: var(--ap-small-w); height: var(--ap-small-h); }
.ap-gallery-item > .ap-card { width: 100%; height: 100%; }
.ap-gallery-foot { display: flex; align-items: center; justify-content: flex-end; gap: 18px; width: var(--ap-wide); margin: 24px auto 0; }
.ap-paddles { display: flex; gap: 18px; }
.ap-paddle {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: var(--ap-radius-paddle);
  background: var(--ap-paddle);
  color: var(--ap-paddle-icon);
  cursor: pointer;
  transition: background 0.1s linear, color 0.1s linear, opacity 0.1s linear;
}
.ap-paddle:disabled { opacity: 0.42; cursor: default; }
.ap-paddle svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ap-dots { display: flex; gap: 16px; margin: 0 auto 0 0; padding: 0; list-style: none; }
.ap-dot { display: block; width: 8px; height: 8px; padding: 0; border: 0; border-radius: var(--ap-radius-dot); background: var(--ap-dot); opacity: 0.5; cursor: pointer; transition: background-color 0.25s linear, opacity 0.25s linear; }
.ap-dot[aria-current="true"] { opacity: 1; }

/* ===== 出現の動き =====
   下から30px。JSなしでは常に表示するため、w-mod-js のときだけ隠す。 */
.w-mod-js .ap-reveal { opacity: 0; transform: translateY(30px); }
.w-mod-js .ap-reveal.is-in { opacity: 1; transform: none; transition: transform var(--ap-reveal-move), opacity var(--ap-reveal-fade); }
@media (prefers-reduced-motion: reduce) {
  .w-mod-js .ap-reveal { opacity: 1; transform: none; transition: none; }
}
