/* ============================================================
 * base.css — リセット・タイポグラフィ・アクセシビリティ基盤
 * 原則 Claude 管理。Codex はここを変更しないこと
 * （フォーカスリング・.sr-only・reduced-motion・横スクロール防止を含む）。
 * ============================================================ */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 0.5rem);
  -webkit-text-size-adjust: 100%;
  background: var(--c-cream);
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: var(--lh-body);
  color: var(--text);
  background: var(--c-cream);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip; /* 装飾のはみ出しによる横スクロールを防ぐ（clip はスクロールコンテナ化しない） */
}

@supports not (overflow-x: clip) {
  body {
    overflow-x: hidden;
  }
}

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

h1,
h2,
h3,
h4,
p,
ul,
ol,
dl,
dd,
figure {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

/* ---- レイアウト基本 ---- */
.container {
  width: min(100% - var(--gutter) * 2, var(--container));
  margin-inline: auto;
}

/* ---- アクセシビリティ ---- */
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

.skip-link {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1000;
  padding: var(--space-3) var(--space-4);
  background: var(--c-bordeaux);
  color: var(--c-cream);
  font-weight: 500;
  transform: translateY(-120%);
  transition: transform var(--dur-fast);
}

.skip-link:focus {
  transform: translateY(0);
}

.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.pc-only {
  display: none;
}

@media (min-width: 48em) {
  .pc-only {
    display: inline;
  }
}

/* ---- 共通テキストスタイル ---- */
.section-title {
  font-family: var(--font-mincho);
  font-weight: 500;
  font-size: var(--fs-xl);
  line-height: var(--lh-tight);
  letter-spacing: 0.08em;
  color: var(--heading);
}

.section-lead {
  margin-top: var(--space-4);
  max-width: 40em;
  color: var(--text-muted);
}

.note {
  margin-top: var(--space-4);
  font-size: var(--fs-sm);
  color: var(--text-muted);
}

/* 注意書き：本文と同じ文字サイズで読みやすく（要件 §3-3） */
.notice {
  margin-top: var(--space-6);
  padding: var(--space-4) var(--space-5);
  font-size: var(--fs-base);
  line-height: 1.8;
  color: var(--text);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
  background: var(--surface);
}

/* ---- ボタン・リンク ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.75rem 1.75rem;
  border-radius: 999px;
  font-weight: 500;
  font-size: var(--fs-base);
  letter-spacing: 0.04em;
  border: 1px solid transparent;
  transition: transform var(--dur-fast) var(--ease), background-color var(--dur-fast), color var(--dur-fast);
}

.btn:hover {
  text-decoration: none;
  transform: translateY(-2px);
}

.btn--day {
  background: var(--c-bordeaux);
  color: var(--c-cream);
  box-shadow: 0 6px 18px rgba(123, 23, 48, 0.25);
}

.btn--night {
  background: var(--c-wine);
  color: var(--c-gold-light);
  border-color: rgba(232, 197, 125, 0.5);
  box-shadow: 0 6px 18px rgba(42, 12, 20, 0.25);
}

.badge {
  display: inline-block;
  padding: 0.2em 0.9em;
  border-radius: 999px;
  font-weight: 500;
  font-size: var(--fs-sm);
  letter-spacing: 0.06em;
}

.badge--free {
  background: var(--c-bordeaux);
  color: var(--c-cream);
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-weight: 500;
  color: var(--accent);
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.15em;
}

.link-arrow::after {
  content: "→";
  transition: transform var(--dur-fast) var(--ease);
}

.link-arrow:hover {
  text-decoration: none;
  border-bottom-color: currentColor;
}

.link-arrow:hover::after {
  transform: translateX(4px);
}

/* ---- 動きを減らす設定（要件 §7-4）----
 * すべての transition / animation を停止し、スクロール挙動も標準に戻す。
 * 情報の表示・非表示には一切影響しない。
 */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
