/* KIWI TRAIL JOURNEYS — ふたつの島をめぐる旅（架空の会社・架空の企画）
 * 値は NZ-promotion.pen の変数（north-lava ほか）とフレーム「1. 二つの島の旅 A」「— Mobile 390」「— States」から。 */

/* フォントは自前で配信（fonts/README.md）。見出しのセリフ体は、デザインの Shippori Mincho / Playfair Display の代わりに
 * 手元にある Noto Serif JP を使っている（fonts/README.md の「デザインとの違い」参照）。 */
@font-face {
  font-family: "KTJ Sans";
  src: url("fonts/NotoSansJP-wght300-700-page.woff2") format("woff2");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "KTJ Serif";
  src: url("fonts/NotoSerifJP-wght500-700-page.woff2") format("woff2");
  font-weight: 500 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --north-lava: #E8743B;
  --north-lava-deep: #B4552A;  /* 小さな文字用の濃いオレンジ（デザインのヒーローのグラデーションの色。白地で 4.7:1） */
  --north-moss: #3F7D4E;
  --south-glacier: #6FB7D9;
  --south-lake: #1F5F7A;
  --south-bg: #EEF5F8;
  --bg: #FAFAF7;
  --ink: #1B1F23;
  --ink-muted: #5A6168;
  --ink-soft: #C9CDD1;          /* 濃い地の上の補助文字 */
  --line: #E3E3DD;
  --film: #16191C;
  --bar-off: #3A4046;           /* モデルコースの光る前の線 */

  --font-heading: "Shippori Mincho", "KTJ Serif", "Hiragino Mincho ProN", "Yu Mincho", serif;
  --font-latin: "Playfair Display", "KTJ Serif", Georgia, "Times New Roman", serif;
  --font-body: "KTJ Sans", "Noto Sans JP", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", Meiryo, sans-serif;

  --space-section: 120px;
  --space-page: 96px;
  --space-lg: 48px;
  --space-md: 24px;
  --radius: 4px;
  --ease-out: cubic-bezier(.16, 1, .3, 1);

  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, video { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3, p, ul, ol, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }

.container { width: min(1248px, calc(100% - 40px)); margin-inline: auto; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.icon--lg { width: 24px; height: 24px; }
.br-sp { display: none; }

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 50;
  padding: 8px 16px; border-radius: var(--radius); background: var(--bg); color: var(--ink); font-weight: 700;
}
.skip-link:focus { top: 16px; }

:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

/* ---------- ボタン（States: 通常は白、ホバー／フォーカスで溶岩のオレンジ、矢印が右へ 8px） ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 20px 36px; border-radius: var(--radius);
  background: var(--bg); color: var(--ink);
  border: 1px solid var(--ink);
  font-weight: 700; font-size: 16px; line-height: 23px; text-decoration: none;
  transition: background-color .4s ease-out;
}
.btn__arrow { transition: transform .4s ease-out; }
.btn:hover, .btn:focus-visible { background: var(--north-lava); }
.btn:hover .btn__arrow, .btn:focus-visible .btn__arrow { transform: translateX(8px); }
.btn:focus-visible { outline: 2px solid var(--bg); outline-offset: 3px; box-shadow: 0 0 0 5px var(--ink); }
.btn--large { padding: 22px 48px; font-size: 17px; line-height: 25px; }

/* ---------- ヒーロー ---------- */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: 820px; padding: 40px 0 80px;
  display: flex; flex-direction: column;
  color: #FFFFFF;
  background: linear-gradient(90deg, #B4552A 0%, #2F5E3B 48%, #174A60 52%, #3E86A8 100%); /* 画像が読めないときの地（デザインの仮置き） */
}
.hero__media { position: absolute; inset: 0; z-index: -2; overflow: hidden; }
.hero__img {
  width: 100%; height: 100%; object-fit: cover; object-position: center 60%;
  transform-origin: 60% 50%;
  animation: hero-zoom 20s var(--ease-out) both;
}
@keyframes hero-zoom { from { transform: scale(1); } to { transform: scale(1.08); } }
/* 白い文字を読めるように、写真の左と下を濃い色で沈める */
.hero__shade {
  position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(90deg, rgba(27,31,35,.78) 0%, rgba(27,31,35,.55) 45%, rgba(27,31,35,.12) 75%, rgba(27,31,35,0) 100%),
    linear-gradient(180deg, rgba(27,31,35,.55) 0%, rgba(27,31,35,0) 22%, rgba(27,31,35,0) 55%, rgba(27,31,35,.6) 100%);
}

.nav { display: flex; align-items: center; justify-content: space-between; gap: 24px; position: relative; z-index: 5; }
.nav__logo {
  font-family: var(--font-heading); font-weight: 700; font-size: 20px; letter-spacing: 3px;
  text-decoration: none; white-space: nowrap; line-height: 29px;
}
.nav__links { display: flex; gap: 40px; }
.nav__link {
  position: relative; font-size: 14px; line-height: 20px; text-decoration: none; padding: 2px 0;
}
.nav__link::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 1px; background: currentColor;
  transform: scaleX(0); transform-origin: left; transition: transform .4s ease-out;
}
.nav__link:hover::after { transform: scaleX(1); }
.nav__link:focus-visible, .nav__logo:focus-visible { outline-color: #FFFFFF; border-radius: 2px; }
.nav__toggle {
  display: none; align-items: center; justify-content: center;
  width: 44px; height: 44px; margin: -10px -10px -10px 0; padding: 0;
  background: none; border: 0; color: #FFFFFF; cursor: pointer; border-radius: var(--radius);
}
.nav__toggle:focus-visible { outline-color: #FFFFFF; }
.nav__toggle-close { display: none; }
.nav__toggle[aria-expanded="true"] .nav__toggle-open { display: none; }
.nav__toggle[aria-expanded="true"] .nav__toggle-close { display: block; }

.hero__copy { margin-top: auto; display: flex; flex-direction: column; gap: 28px; align-items: flex-start; }
.hero__titles { display: flex; flex-direction: column; gap: 28px; }
.hero__eyebrow { font-weight: 500; font-size: 13px; line-height: 19px; letter-spacing: 4px; }
.hero__title { font-family: var(--font-heading); font-weight: 700; font-size: 96px; line-height: 1.15; letter-spacing: .02em; }
.hero__title-en { font-family: var(--font-latin); font-style: italic; font-weight: 500; font-size: 40px; line-height: 1.3; }
.hero__sub { font-size: 22px; line-height: 1.5; }
.hero .btn { border-color: transparent; }

/* 企画名のフェードイン（JS が動いたときだけ、隠してから出す）。0.9秒、下から 8px。続く2つは 0.2秒ずつ遅らせる */
.js .fade-in { opacity: 0; transform: translateY(8px); transition: opacity .9s ease-out, transform .9s ease-out; }
.js .fade-in--2 { transition-delay: .2s; }
.js .fade-in--3 { transition-delay: .4s; }
.js .is-loaded .fade-in { opacity: 1; transform: none; }

/* ---------- セクション共通 ---------- */
.section { padding: var(--space-section) 0; }
.section-head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 48px; flex-wrap: wrap;
  margin-bottom: var(--space-lg);
}
.section-head__titles { display: flex; flex-direction: column; gap: 12px; }
.eyebrow { font-weight: 700; font-size: 13px; line-height: 19px; letter-spacing: 4px; color: var(--ink); }
.eyebrow--north { color: var(--north-lava-deep); }
.eyebrow--south { color: var(--south-lake); }
.eyebrow--glacier { color: var(--south-glacier); }
.section-title { font-family: var(--font-heading); font-weight: 700; font-size: 56px; line-height: 1.45; letter-spacing: .02em; }
.section-title--inverse { color: var(--bg); }
.section-lead { max-width: 460px; font-size: 16px; line-height: 1.9; color: var(--ink-muted); }

/* 見出しは下から少し浮いて現れる */
.js .rise { opacity: 0; transform: translateY(16px); transition: opacity .7s ease-out, transform .7s ease-out; }
.js .rise.is-visible { opacity: 1; transform: none; }

/* ---------- カード（北島・南島） ---------- */
.cards { display: grid; gap: var(--space-md); }
.cards--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cards--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.card { display: flex; flex-direction: column; gap: 16px; }
.card__photo {
  position: relative; overflow: hidden; border-radius: var(--radius);
  aspect-ratio: 400 / 420; background: #D9DCD6;
  transition: box-shadow .6s ease-out;
}
.cards--4 .card__photo { aspect-ratio: 294 / 340; }
.card__photo::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  border: 2px solid var(--ink); opacity: 0; transition: opacity .6s ease-out; pointer-events: none;
}
.card__photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease-out; }
.card__index { font-weight: 700; font-size: 12px; line-height: 17px; letter-spacing: 2px; }
.card__index--north { color: var(--north-lava-deep); }
.card__index--south { color: var(--south-lake); }
.card__title { font-family: var(--font-heading); font-weight: 700; font-size: 28px; line-height: 1.45; }
.card__title span {
  background-image: linear-gradient(var(--ink), var(--ink));
  background-repeat: no-repeat; background-position: 0 100%; background-size: 0% 2px;
  padding-bottom: 4px; transition: background-size .6s ease-out;
}
.card__desc { font-size: 15px; line-height: 1.8; color: var(--ink-muted); }

/* ホバー（States）: 写真が枠の中で 1.04倍、影と枠線、タイトルの下線。0.6秒 ease-out */
@media (hover: hover) {
  .card:hover .card__photo { box-shadow: 0 14px 36px rgba(27, 31, 35, .25); }
  .card:hover .card__photo::after { opacity: 1; }
  .card:hover .card__photo img { transform: scale(1.04); }
  .card:hover .card__title span { background-size: 100% 2px; }
}

.island--south { background: var(--south-bg); }

/* カードのすべり込み（北島は左から、南島は右から 40px。0.7秒、1枚ごとに 0.12秒遅らせる） */
.js .slide { opacity: 0; transition: opacity .7s ease-out, transform .7s ease-out; }
.js .slide--left { transform: translateX(-40px); }
.js .slide--right { transform: translateX(40px); }
.js .slide.is-visible { opacity: 1; transform: none; }
.js .cards .slide:nth-child(2) { transition-delay: .12s; }
.js .cards .slide:nth-child(3) { transition-delay: .24s; }
.js .cards .slide:nth-child(4) { transition-delay: .36s; }

/* ---------- 比較表 ---------- */
.compare__table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.compare__label { width: 240px; text-align: left; vertical-align: middle; font-weight: 700; font-size: 14px; color: var(--ink-muted); padding: 28px 0; }
.compare__cell { text-align: left; vertical-align: middle; padding: 28px 24px 28px 0; font-weight: 400; font-size: 17px; line-height: 1.7; }
.compare__row { border-bottom: 1px solid var(--line); }
.compare__row--head { border-bottom: 2px solid var(--ink); }
.compare__row--head .compare__cell { padding-top: 20px; padding-bottom: 20px; font-family: var(--font-heading); font-weight: 700; font-size: 26px; line-height: 38px; }
.compare__row--head .compare__label { padding: 20px 0; }
.compare__row--head .compare__cell--north { color: var(--north-lava-deep); }
.compare__row--head .compare__cell--south { color: var(--south-lake); }
.swatch { display: inline-block; width: 14px; height: 14px; border-radius: 50%; margin-right: 14px; vertical-align: 1px; }
.swatch--north { background: var(--north-lava); }
.swatch--south { background: var(--south-glacier); }

/* 表が画面に入ったら、北島の列は左から・南島の列は右から同時に 24px（0.7秒）。行ごとに 0.1秒遅らせる。項目名は動かさない */
.js .compare__cell { opacity: 0; transition: opacity .7s ease-out, transform .7s ease-out; }
.js .compare__cell--north { transform: translateX(-24px); }
.js .compare__cell--south { transform: translateX(24px); }
.js .compare__table.is-visible .compare__cell { opacity: 1; transform: none; }
.js .compare__table tbody .compare__row:nth-child(1) .compare__cell { transition-delay: .1s; }
.js .compare__table tbody .compare__row:nth-child(2) .compare__cell { transition-delay: .2s; }
.js .compare__table tbody .compare__row:nth-child(3) .compare__cell { transition-delay: .3s; }

/* ---------- モデルコース ---------- */
.course { background: var(--ink); color: var(--bg); }
.course__head { display: flex; flex-direction: column; gap: 12px; margin-bottom: var(--space-lg); }
.course__note { font-size: 16px; line-height: 1.5; color: var(--ink-soft); }
.timeline { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 16px; }
.day { display: flex; flex-direction: column; gap: 14px; }
.day__bar { display: block; height: 4px; background: var(--north-lava); transition: background-color .5s ease-out; }
.day--south .day__bar { background: var(--south-glacier); }
.day__island { font-weight: 700; font-size: 12px; line-height: 16px; letter-spacing: 3px; color: var(--north-lava); }
.day--south .day__island { color: var(--south-glacier); }
.day__num { font-family: var(--font-latin); font-weight: 700; font-size: 30px; line-height: 40px; transition: opacity .5s ease-out; }
.day__title { font-weight: 700; font-size: 17px; line-height: 25px; }
.day__desc { font-size: 14px; line-height: 1.7; color: var(--ink-soft); line-break: strict; word-break: auto-phrase; text-wrap: pretty; }
/* スクロールに合わせて Day 1→7 の順に光る（JS が動いたときだけ、光る前の状態を作る） */
.js .day:not(.is-lit) .day__bar { background: var(--bar-off); }
.js .day:not(.is-lit) .day__num { opacity: .5; }

/* ---------- 動画 ---------- */
.film__figure { display: flex; flex-direction: column; gap: 16px; }
.film__frame {
  position: relative; overflow: hidden; border-radius: var(--radius);
  background: var(--film); aspect-ratio: 16 / 9;
}
.film__video { width: 100%; height: 100%; object-fit: contain; background: var(--film); }
.film__play {
  position: absolute; left: 50%; top: 50%; width: 96px; height: 96px; margin: -48px 0 0 -48px;
  display: flex; align-items: center; justify-content: center;
  z-index: 1; border-radius: 50%; border: 2px solid var(--ink); background: var(--bg); color: var(--ink); cursor: pointer;
  box-shadow: 0 6px 24px rgba(0, 0, 0, .35);
  transition: background-color .4s ease-out;
}
.film__play:hover { background: #E3E3DD; }
.film__play:focus-visible { outline: 3px solid #FFFFFF; outline-offset: 3px; }
.film__play-icon { width: 36px; height: 36px; margin-left: 5px; fill: currentColor; stroke: none; }
.film__caption { font-size: 15px; color: var(--ink-muted); }

/* ---------- 申込 ---------- */
.apply { background: var(--ink); color: #FFFFFF; }
.apply__inner { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 32px; }
.apply__title { font-family: var(--font-heading); font-weight: 700; font-size: 52px; line-height: 1.45; }
.apply__sub { font-size: 17px; line-height: 1.8; }
.apply .btn { border-color: var(--bg); }
.apply__note { font-size: 14px; color: var(--ink-soft); padding: 4px 8px; border-radius: var(--radius); }
.apply__note:focus { outline: 2px solid var(--ink-soft); outline-offset: 2px; }

/* ---------- フッター ---------- */
.footer { background: var(--ink); color: var(--bg); padding: 40px 0; border-top: 1px solid #2C3238; }
.footer__inner { display: grid; grid-template-columns: 1fr auto; gap: 8px 24px; align-items: center; }
.footer__logo { font-family: var(--font-heading); font-weight: 700; font-size: 16px; letter-spacing: 3px; }
.footer__copy { font-size: 13px; color: var(--ink-soft); }
.footer__disclaimer { grid-column: 1 / -1; font-size: 13px; color: var(--ink-soft); }

/* ---------- 幅ごとの調整 ---------- */
@media (max-width: 1100px) {
  .hero__title { font-size: clamp(44px, 8vw, 96px); }
  .cards--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .timeline { grid-template-columns: repeat(4, minmax(0, 1fr)); row-gap: 40px; }
  .section-title { font-size: clamp(32px, 5vw, 56px); }
}

@media (max-width: 720px) {
  .br-sp { display: inline; }
  .section { padding: 72px 0; }

  /* ナビ: ☰ で開く（0.4秒のフェード） */
  .nav { flex-wrap: wrap; }
  .nav__logo { font-size: 16px; line-height: 23px; }
  .js .nav__toggle { display: inline-flex; }
  .js .nav__links {
    position: absolute; top: calc(100% + 12px); left: 0; right: 0;
    flex-direction: column; gap: 0; padding: 8px 0;
    background: rgba(27, 31, 35, .94); border-radius: var(--radius);
    opacity: 0; visibility: hidden; transition: opacity .4s ease-out, visibility 0s linear .4s;
  }
  .js .nav__links.is-open { opacity: 1; visibility: visible; transition: opacity .4s ease-out, visibility 0s; }
  .js .nav__link { display: block; padding: 12px 20px; font-size: 15px; }
  .js .nav__link::after { display: none; }
  .nav__links { flex-wrap: wrap; gap: 8px 20px; }   /* JS が無いときは折り返して並べる */

  .hero { min-height: 720px; padding: 24px 0 48px; }
  .hero__copy { gap: 20px; }
  .hero__titles { gap: 20px; }
  .hero__eyebrow { font-size: 12px; line-height: 17px; letter-spacing: 1px; }
  .hero__title { font-size: 44px; line-height: 1.25; }
  .hero__title-en { font-size: 28px; }
  .hero__sub { font-size: 17px; line-height: 1.7; }
  .hero__shade {
    background: linear-gradient(180deg, rgba(27,31,35,.5) 0%, rgba(27,31,35,.15) 25%, rgba(27,31,35,.45) 50%, rgba(27,31,35,.82) 100%);
  }

  .section-head { flex-direction: column; align-items: flex-start; gap: 16px; margin-bottom: 32px; }
  .eyebrow { font-size: 12px; letter-spacing: 2px; }
  .section-title { font-size: 32px; line-height: 1.35; }
  .section-lead { max-width: none; font-size: 15px; line-height: 1.8; }

  .cards--3, .cards--4 { grid-template-columns: 1fr; gap: 40px; }
  .card__photo, .cards--4 .card__photo { aspect-ratio: 350 / 220; }
  .js .slide--left { transform: translateX(-24px); }
  .js .slide--right { transform: translateX(24px); }
  .js .slide { transition-duration: .6s; }
  .js .cards .slide:nth-child(n) { transition-delay: 0s; }

  /* 比較表: 項目名の下に「北島｜南島」の2列 */
  .compare__table, .compare__table tbody, .compare__table thead { display: block; }
  .compare__row { display: grid; grid-template-columns: 1fr 1fr; column-gap: 12px; padding: 20px 0; }
  .compare__row--head { padding: 14px 0; }
  .compare__label { grid-column: 1 / -1; width: auto; padding: 0 0 10px; font-size: 13px; }
  .compare__row--head .compare__label { display: none; }
  .compare__cell { padding: 0; font-size: 15px; }
  .compare__row--head .compare__cell { padding: 0; font-size: 18px; line-height: 26px; }
  .swatch { margin-right: 8px; }
  .js .compare__cell { transition-duration: .6s; }
  .js .compare__cell--north { transform: translateX(-16px); }
  .js .compare__cell--south { transform: translateX(16px); }
  .js .compare__row.is-visible .compare__cell { opacity: 1; transform: none; }
  .js .compare__table tbody .compare__row:nth-child(n) .compare__cell { transition-delay: 0s; }

  .course__note { font-size: 15px; line-height: 1.8; }
  .timeline { grid-template-columns: 1fr; gap: 24px; }
  .day { gap: 8px; }
  .day__num { font-size: 24px; line-height: 32px; }

  .film__play { width: 56px; height: 56px; margin: -28px 0 0 -28px; }
  .film__play-icon { width: 22px; height: 22px; margin-left: 3px; }
  .film__caption { font-size: 13px; }

  .apply__title { font-size: 28px; line-height: 1.4; }
  .apply__sub { font-size: 15px; text-align: left; }
  .btn--large { padding: 20px 36px; }

  .footer { padding: 32px 0; }
  .footer__inner { grid-template-columns: 1fr; }
  .footer__logo { font-size: 16px; }
}

/* ---------- 動きを減らす設定: すべての動きを止め、最初から完成した表示にする ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .hero__img { transform: none; }
  .js .fade-in, .js .rise, .js .slide, .js .compare__cell { opacity: 1; transform: none; }
  .js .day:not(.is-lit) .day__bar { background: var(--north-lava); }
  .js .day--south:not(.is-lit) .day__bar { background: var(--south-glacier); }
  .js .day:not(.is-lit) .day__num { opacity: 1; }
  /* ホバーは拡大と影なし。枠線と下線だけ（States の注記） */
  .card:hover .card__photo { box-shadow: none; }
  .card:hover .card__photo img { transform: none; }
  .btn:hover .btn__arrow, .btn:focus-visible .btn__arrow { transform: none; }
}

/* ---------- 404（public/404.html） ---------- */
.notfound { min-height: 100vh; display: flex; flex-direction: column; background: var(--ink); color: var(--bg); }
.notfound__main { flex: 1; display: flex; align-items: center; padding: 96px 0; }
.notfound__inner { display: flex; flex-direction: column; align-items: flex-start; gap: 24px; }
.notfound__title { font-family: var(--font-heading); font-weight: 700; font-size: 48px; line-height: 1.4; }
.notfound__text { font-size: 16px; line-height: 1.9; color: var(--ink-soft); }
.notfound .btn { border-color: var(--bg); }
@media (max-width: 720px) {
  .notfound__main { padding: 72px 0; }
  .notfound__title { font-size: 30px; }
  .notfound__text { font-size: 15px; }
}
