/* ============================================================
   Japan Kart Osaka — 共通スタイル
   全ページがこのファイルを読み込みます。
   色やフォントを変えたいときは、いちばん上の :root だけ触れば
   サイト全体に反映されます。
   ============================================================ */

:root {
  --brand:      #E2231A;   /* ロゴの赤。ボタンとアクセント */
  --brand-dark: #B81C15;   /* ボタンを押したとき／ホバー時 */
  --ink:        #16181D;   /* 見出しの文字色 */
  --body:       #4A4F58;   /* 本文の文字色 */
  --muted:      #8A9099;   /* 補足や注釈 */
  --line:       #E4E6EA;   /* 区切り線 */
  --bg:         #FFFFFF;   /* 背景 */
  --bg-soft:    #F7F8F9;   /* 薄いグレーの背景 */
  --warn-bg:    #FFF8DB;   /* 注意書きの背景 */
  --warn-line:  #E8B400;   /* 注意書きの縦線 */

  --wrap: 1120px;          /* コンテンツの最大幅 */
  --radius: 10px;

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue",
          Arial, "Noto Sans JP", sans-serif;
}

/* ---------- リセット ---------- */

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.7;
  color: var(--body);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--brand); }

h1, h2, h3, h4 {
  color: var(--ink);
  line-height: 1.25;
  margin: 0 0 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(34px, 5.5vw, 60px); }
h2 { font-size: clamp(26px, 3.4vw, 38px); }
h3 { font-size: clamp(19px, 2vw, 22px); }

p { margin: 0 0 18px; }
p:last-child { margin-bottom: 0; }

/* ---------- レイアウト ---------- */

/* 画面幅に応じて自動で伸縮する。左右には必ず余白を確保する */
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 24px;
}

.section { padding: 88px 0; }
.section--soft { background: var(--bg-soft); }
.section--tight { padding: 56px 0; }

.narrow { max-width: 720px; }
.center { text-align: center; }
.center .narrow { margin-left: auto; margin-right: auto; }

.lead {
  font-size: 19px;
  color: var(--body);
}

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

/* ---------- ボタン ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 17px 34px;
  border: 2px solid transparent;
  border-radius: var(--radius);
  font-size: 17px;
  font-weight: 700;
  font-family: inherit;
  text-decoration: none;
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}

.btn--primary { background: var(--brand); color: #fff; }
.btn--primary:hover { background: var(--brand-dark); }

.btn--ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}
.btn--ghost:hover { background: var(--ink); color: #fff; }

.btn--onDark { background: #fff; color: var(--brand); }
.btn--onDark:hover { background: #F0F0F0; }

.btn--wide { width: 100%; }

/* ---------- ヘッダー ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,.96);
  backdrop-filter: saturate(160%) blur(8px);
  border-bottom: 1px solid var(--line);
}

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

.site-header__logo img { height: 46px; width: auto; }
.site-header__logo {
  font-weight: 800;
  font-size: 20px;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.02em;
}

/* 並び順：ロゴ → メニュー → 言語切替。
   HTMLの順序とは別に、order で見た目の順番を決めている。 */
.site-header__logo  { order: 1; }
.nav                { order: 2; margin-left: auto; }
.site-header__right { order: 3; }

.site-header__right {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-left: 18px;
}

/* ---------- 言語切替 ---------- */

.langWrap { position: relative; }

.langBtn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  color: var(--ink);
}
.langBtn:hover { border-color: var(--ink); }
.langBtn .caret { width: 10px; height: 6px; opacity: .55; }

/* 国旗。画像ではなくSVGなので、拡大しても粗くならない */
.flag {
  display: block;
  width: 26px;
  height: 17px;
  border-radius: 2px;
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(0,0,0,.12);
  flex: 0 0 auto;
}
.flag svg { display: block; width: 100%; height: 100%; }

.langMenu {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 176px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 12px 32px rgba(0,0,0,.13);
  padding: 6px;
  z-index: 120;
}
.langWrap.is-open .langMenu { display: block; }

.langOpt {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 10px;
  background: none;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
  font-family: inherit;
  font-size: 15px;
  color: var(--ink);
  text-align: left;
}
.langOpt:hover { background: var(--bg-soft); }
.langOpt.is-current { font-weight: 700; background: var(--bg-soft); }

.nav { display: flex; align-items: center; gap: 28px; }

.nav a {
  color: var(--ink);
  text-decoration: none;
  font-size: 15px;
  font-weight: 600;
}
.nav a:hover { color: var(--brand); }

.nav .btn { padding: 11px 22px; font-size: 15px; }

/* ハンバーガー（狭い画面でのみ表示） */
.nav-toggle {
  display: none;
  background: none;
  border: 0;
  padding: 8px;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--ink);
  margin: 5px 0;
  transition: transform .2s, opacity .2s;
}

/* ---------- ヒーロー ---------- */

.hero {
  position: relative;
  min-height: 76vh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: #111;
}

/* 画面が横長になるほど、写真の上下が切り取られる。
   高さを増やして、カートが欠けないようにする。 */
@media (min-aspect-ratio: 16/10) {
  .hero { min-height: 86vh; }
}
@media (min-aspect-ratio: 2/1) {
  .hero { min-height: 94vh; }
}

.hero__media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* 中央より少し下を基準にする。
     カートが下半分にあるため、真ん中基準だと足回りが切れる。 */
  object-position: center 54%;
}

/* 文字を読みやすくするための覆い。
   覆いは最小限にとどめ、読みやすさは文字側の影で確保する。
   写真を暗くせずに済むため、こちらのほうが写真が生きる。 */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg,
    rgba(0,0,0,.46) 0%,
    rgba(0,0,0,.20) 46%,
    rgba(0,0,0,.02) 78%,
    rgba(0,0,0,0) 100%);
}

.hero__content {
  position: relative;
  z-index: 1;
  padding: 0 0 72px;
  color: #fff;
}
/* 覆いを薄くしている分、文字自体に影を付けて読みやすさを確保する */
.hero__content h1 {
  color: #fff;
  margin-bottom: 12px;
  text-shadow: 0 2px 28px rgba(0,0,0,.55), 0 1px 4px rgba(0,0,0,.35);
}
.hero__content p {
  font-size: clamp(17px, 2vw, 21px);
  color: #fff;
  margin-bottom: 30px;
  max-width: 520px;
  text-shadow: 0 1px 18px rgba(0,0,0,.65), 0 1px 3px rgba(0,0,0,.4);
}

/* ---------- 下層ページの見出し ---------- */

.page-head {
  padding: 60px 0 44px;
  border-bottom: 1px solid var(--line);
}
.page-head .lead { margin-top: 4px; }

/* 本文が長いページ用。読みやすい幅に制限する */
.doc { max-width: 760px; }
.doc h2 { margin-top: 52px; }
.doc h2:first-child { margin-top: 0; }
.doc h3 { margin-top: 34px; }
.doc ol, .doc ul { padding-left: 22px; margin: 0 0 18px; }
.doc li { margin-bottom: 12px; }
.doc hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 44px 0;
}

/* 書類の3点セットなどを並べる小さなカード */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 20px;
}
.chip {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 100px;
  padding: 7px 16px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}

/* ---------- カード・グリッド ---------- */

.grid { display: grid; gap: 28px; }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }

/* 画像とテキストを横に並べる。画面が狭くなると自動で縦になる */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
}

.media {
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-soft);
}
/* height は auto にすること。
   100% にすると、親の高さが画像で決まる構造では高さの計算が循環し、
   画像が表示されなくなる。 */
.media img { width: 100%; height: auto; display: block; }

/* ---------- 注意書き ---------- */

.notice {
  background: var(--warn-bg);
  border-left: 5px solid var(--warn-line);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 26px 30px;
}
.notice h3 { margin-bottom: 10px; }
.notice p { color: #5C4A00; }

/* ---------- ステップ（当日の流れ） ---------- */

.steps { max-width: 760px; }

.step {
  position: relative;
  display: flex;
  gap: 22px;
  padding-bottom: 30px;
}
.step:last-child { padding-bottom: 0; }

/* バッジの下に伸びる縦線。最後の項目には出さない */
.step:not(:last-child)::before {
  content: "";
  position: absolute;
  left: 24px;
  top: 54px;
  bottom: 4px;
  width: 2px;
  background: var(--line);
}

.step__badge {
  flex: 0 0 50px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 700;
  z-index: 1;
}

.step__body { padding-top: 3px; }
.step__body h3 { margin-bottom: 6px; }
.step__body p { font-size: 16px; }

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

.faq { max-width: 800px; }

.faq details {
  border-bottom: 1px solid var(--line);
  padding: 4px 0;
}

.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 20px 40px 20px 0;
  font-weight: 700;
  color: var(--ink);
  font-size: 17px;
  position: relative;
}
.faq summary::-webkit-details-marker { display: none; }

/* 開閉を示す＋記号。開くと×印に回転する */
.faq summary::after {
  content: "";
  position: absolute;
  right: 8px;
  top: 50%;
  width: 13px;
  height: 13px;
  margin-top: -7px;
  background:
    linear-gradient(var(--brand),var(--brand)) center/100% 2px no-repeat,
    linear-gradient(var(--brand),var(--brand)) center/2px 100% no-repeat;
  transition: transform .2s;
}
.faq details[open] summary::after { transform: rotate(45deg); }

.faq details > p {
  padding: 0 0 22px;
  font-size: 16px;
  margin: 0;
}

/* ---------- 予約フォームの枠 ---------- */

.embed {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
}
.embed iframe {
  width: 100%;
  border: 0;
  display: block;
}

/* ---------- 締めのセクション ---------- */

.cta {
  background: var(--brand);
  color: #fff;
  text-align: center;
  padding: 76px 0;
}
.cta h2 { color: #fff; }
.cta p { color: rgba(255,255,255,.92); margin-bottom: 28px; }

/* ---------- フッター ---------- */

.site-footer {
  background: var(--bg-soft);
  border-top: 1px solid var(--line);
  padding: 56px 0 32px;
  font-size: 15px;
}

.site-footer h4 {
  font-size: 13px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 14px;
}

.site-footer a { color: var(--body); text-decoration: none; }
.site-footer a:hover { color: var(--brand); }

.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 9px; }

.site-footer__bottom {
  margin-top: 40px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

/* ============================================================
   画面が狭いとき（タブレット以下）
   ============================================================ */

@media (max-width: 900px) {
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
  .split { grid-template-columns: 1fr; gap: 32px; }
  .section { padding: 64px 0; }

  /* メニューを隠し、ハンバーガーに切り替える */
  .nav-toggle { display: block; }
  .site-header__right { margin-left: auto; padding-left: 0; }

  .nav {
    display: none;
    position: absolute;
    top: 74px;
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 12px 24px 24px;
  }
  .nav.is-open { display: flex; }
  .nav a {
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
    font-size: 16px;
  }
  .nav .btn {
    margin-top: 16px;
    border-bottom: 0;
    padding: 15px 22px;
    font-size: 16px;
  }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  .wrap { padding: 0 18px; }
  .section { padding: 52px 0; }
  .grid--2, .grid--3 { grid-template-columns: 1fr; }
  .hero { min-height: 70vh; }
  .hero__content { padding-bottom: 48px; }

  /* 縦画面では文字が写真の下に重なるため、覆いを下向きに戻す */
  .hero::after {
    background: linear-gradient(180deg,
      rgba(0,0,0,.04) 0%,
      rgba(0,0,0,.18) 50%,
      rgba(0,0,0,.58) 100%);
  }
  .card { padding: 22px; }
  .notice { padding: 22px; }
  .btn { width: 100%; }
  .step { gap: 16px; }
  .step__badge { flex: 0 0 42px; width: 42px; height: 42px; font-size: 17px; }
  .step:not(:last-child)::before { left: 20px; top: 46px; }
}
