/* Social Events — Conference Tour (2026-09-28)
 *
 * 日南海岸を巡る午後のツアーを、スクロールで旅するように見せる。
 * 仕掛けは 1 つ: 固定した経路図の線が、読み進めた地点まで伸び、背景の色が
 * その場所の色に移る（鵜戸神宮の朱・サンメッセの芝・青島の青緑・懇親会の夕暮れ）。
 * 動きを減らす設定の人には、動きを止めて最初からすべて見せる。
 */

/* style.css は html と body の両方に overflow-x: hidden を付けていて、body が
   スクロールの枠になり position: sticky（経路図）が効かない。このページだけ clip に
   替える（はみ出しを隠す効果は同じで、スクロールの枠を作らない）。 */
html:has(.tour),
body:has(.tour) {
  overflow-x: clip;
}

.tour {
  --tour-ink: #13243a;
  --tour-ink-2: #3b4d63;
  --tour-sea: #0f5d8c;
  --tour-sand: #f4efe6;
  --tour-shrine: #c2412d;
  --tour-grass: #4d7a3a;
  --tour-lagoon: #17847e;
  --tour-dusk: #1c2345;
  --tour-gold: #e7b75f;
  --tour-bg: #eef3f7;
  --tour-accent: var(--tour-sea);
  --font-time: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  background: var(--tour-bg);
  color: var(--tour-ink);
  transition: background-color 0.9s ease, --tour-accent 0.9s ease;
  overflow-x: clip;
}

/* ---------- Hero ---------- */
.tour-hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  align-items: end;
  overflow: hidden;
  color: #fff;
  isolation: isolate;
}
.tour-hero__media {
  position: absolute;
  inset: 0;
  z-index: -2;
  transform-origin: 50% 60%;
  will-change: transform;
}
.tour-hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.tour-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(10, 25, 45, 0.55) 0%, rgba(10, 25, 45, 0.05) 35%, rgba(10, 25, 45, 0.75) 100%);
}
.tour-hero__inner {
  width: min(1100px, 100%);
  margin: 0 auto;
  padding: 0 1.5rem 12vh;
}
.tour-eyebrow {
  font-family: var(--font-time);
  font-size: 0.85rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.9;
  margin: 0 0 1rem;
}
.tour-hero h1 {
  font-size: clamp(2.6rem, 7vw, 5.6rem);
  line-height: 1.02;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 1.25rem;
  max-width: 14ch;
  overflow-wrap: anywhere;
}
.tour-hero__lead {
  font-size: clamp(1.05rem, 1.6vw, 1.3rem);
  line-height: 1.6;
  max-width: 38ch;
  margin: 0;
  opacity: 0.95;
}
.tour-hero__facts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.5rem;
  margin: 2rem 0 0;
  padding: 0;
  list-style: none;
  font-family: var(--font-time);
  font-size: 0.9rem;
}
.tour-hero__facts li { display: flex; gap: 0.5rem; align-items: baseline; }
.tour-hero__facts span { opacity: 0.7; }
.tour-scroll {
  position: absolute;
  left: 50%;
  bottom: 2.2rem;
  transform: translateX(-50%);
  width: 1px;
  height: 56px;
  background: rgba(255, 255, 255, 0.35);
  overflow: hidden;
}
.tour-scroll::after {
  content: '';
  position: absolute;
  left: 0;
  top: -40%;
  width: 1px;
  height: 40%;
  background: #fff;
  animation: tour-drip 2.2s ease-in-out infinite;
}
@keyframes tour-drip { to { top: 100%; } }

/* ---------- Intro: three destinations ---------- */
.tour-intro {
  width: min(1100px, 100%);
  margin: 0 auto;
  padding: 7rem 1.5rem 4rem;
}
.tour-intro h2 {
  font-size: clamp(1.9rem, 4vw, 3rem);
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin: 0 0 1rem;
  max-width: 20ch;
}
.tour-intro p {
  font-size: 1.1rem;
  line-height: 1.7;
  color: var(--tour-ink-2);
  max-width: 60ch;
  margin: 0;
}
.tour-trio {
  list-style: none;
  padding: 0;
  margin: 3rem 0 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}
.tour-trio a {
  display: block;
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: 14px;
  overflow: hidden;
  color: #fff;
  text-decoration: none;
  isolation: isolate;
}
.tour-trio img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
  transition: transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.tour-trio a::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 40%, rgba(0, 0, 0, 0.7) 100%);
}
.tour-trio a:hover img,
.tour-trio a:focus-visible img { transform: scale(1.06); }
.tour-trio a:focus-visible { outline: 3px solid var(--tour-accent); outline-offset: 3px; }
.tour-trio__label {
  position: absolute;
  left: 1.1rem;
  right: 1.1rem;
  bottom: 1rem;
}
.tour-trio__label small {
  display: block;
  font-family: var(--font-time);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  opacity: 0.85;
  margin-bottom: 0.3rem;
}
.tour-trio__label strong { font-size: 1.25rem; line-height: 1.2; }

/* ---------- Journey: sticky map + stops ---------- */
.tour-journey {
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: 2rem 1.5rem 6rem;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 3rem;
  align-items: start;
}
.tour-map {
  position: sticky;
  top: 110px;
  height: calc(100svh - 140px);
  max-height: 760px;
  display: flex;
  flex-direction: column;
}
.tour-map__title {
  font-family: var(--font-time);
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--tour-ink-2);
  margin: 0 0 0.75rem;
}
.tour-map svg {
  /* 図の縦横比（360:720）に枠を合わせる。余白に地図の背景（海の色）が出ると、
     西側にも海があるように見えるため。 */
  flex: 1;
  min-height: 0;
  height: 100%;
  width: auto;
  max-width: 100%;
  aspect-ratio: 1 / 2;
  align-self: center;
  border-radius: 16px;
  background: #cfe4ef;
  box-shadow: 0 10px 40px rgba(19, 36, 58, 0.12);
}
.tour-map__title,
.tour-map__note { text-align: center; }
.tour-map__now {
  display: none;
  margin: 0;
  font-family: var(--font-time);
}
.tour-map__now-time {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--tour-accent);
  transition: color 0.9s ease;
}
.tour-map__now-place {
  display: block;
  font-family: Inter, system-ui, sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.25;
  color: var(--tour-ink);
  margin-top: 0.2rem;
}
.tour-map__note {
  font-size: 0.8rem;
  color: var(--tour-ink-2);
  margin: 0.6rem 0 0;
}
.map-land { fill: #f3efe3; }
.map-river { fill: none; stroke: #9cc9de; stroke-width: 3; stroke-linecap: round; }
.map-island { fill: #b9d8a8; stroke: #8fb97d; stroke-width: 1; }
.map-sea-label {
  font-family: var(--font-time);
  font-size: 11px;
  letter-spacing: 0.2em;
  fill: #5f8aa3;
}
.map-leg {
  fill: none;
  stroke: var(--tour-accent);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: var(--len, 1000);
  stroke-dashoffset: var(--len, 1000);
  transition: stroke-dashoffset 1.2s cubic-bezier(0.6, 0, 0.2, 1), stroke 0.9s ease;
}
.map-leg.is-drawn { stroke-dashoffset: 0; }
.map-leg--ghost {
  stroke: rgba(19, 36, 58, 0.18);
  stroke-dasharray: 2 7;
  stroke-dashoffset: 0;
  stroke-width: 2.5;
  transition: none;
}
.map-stop circle {
  fill: #fff;
  stroke: var(--tour-ink-2);
  stroke-width: 2.5;
  transition: fill 0.5s ease, stroke 0.5s ease, r 0.5s ease;
}
.map-stop text {
  font: 600 13px Inter, system-ui, sans-serif;
  fill: var(--tour-ink-2);
  transition: fill 0.5s ease;
}
.map-stop.is-past circle { fill: var(--tour-ink-2); }
.map-stop.is-current circle { fill: var(--tour-accent); stroke: var(--tour-accent); r: 9; }
.map-stop.is-current text { fill: var(--tour-ink); }
.map-stop.is-current .map-pulse {
  fill: none;
  stroke: var(--tour-accent);
  stroke-width: 2;
  animation: tour-pulse 1.8s ease-out infinite;
  transform-box: fill-box;
  transform-origin: center;
}
.map-pulse { fill: none; stroke: none; }
@keyframes tour-pulse {
  from { transform: scale(1); opacity: 0.9; }
  to { transform: scale(3); opacity: 0; }
}

.tour-stops {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: none;
}
.tour-stop {
  position: relative;
  scroll-margin-top: 130px;
  padding: 0 0 0 2.25rem;
  margin: 0 0 22vh;
}
.tour-stop:last-child { margin-bottom: 8vh; }
.tour-stop::before {
  content: '';
  position: absolute;
  left: 0.45rem;
  top: 0.55rem;
  bottom: -22vh;
  width: 2px;
  background: linear-gradient(180deg, var(--tour-accent), rgba(19, 36, 58, 0.12));
}
.tour-stop:last-child::before { display: none; }
.tour-stop::after {
  content: '';
  position: absolute;
  left: 0;
  top: 0.2rem;
  width: 1.1rem;
  height: 1.1rem;
  border-radius: 50%;
  background: var(--tour-bg);
  border: 3px solid var(--tour-accent);
  transition: background-color 0.5s ease;
}
.tour-stop.is-current::after { background: var(--tour-accent); }
.tour-time {
  font-family: var(--font-time);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--tour-accent);
  margin: 0 0 0.35rem;
  transition: color 0.9s ease;
}
.tour-stop h3 {
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 0.35rem;
}
.tour-stop h3 .tour-verb {
  display: block;
  font-size: 0.55em;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--tour-ink-2);
  margin-bottom: 0.2rem;
}
.tour-stop__sub {
  font-size: 1.05rem;
  color: var(--tour-ink-2);
  margin: 0 0 1.25rem;
}
.tour-photo {
  margin: 1.25rem 0 1.25rem;
  border-radius: 14px;
  overflow: hidden;
  aspect-ratio: 3 / 2;
  background: rgba(19, 36, 58, 0.08);
  clip-path: inset(0 0 100% 0 round 14px);
  transition: clip-path 1.1s cubic-bezier(0.6, 0, 0.2, 1);
}
.tour-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: scale(1.12);
  transition: transform 1.6s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.tour-stop.is-seen .tour-photo { clip-path: inset(0 0 0 0 round 14px); }
.tour-stop.is-seen .tour-photo img { transform: scale(1); }
.tour-photo--pair {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: 0.6rem;
  aspect-ratio: auto;
  background: none;
  overflow: visible;
}
.tour-photo--pair picture {
  display: block;
  border-radius: 14px;
  overflow: hidden;
  aspect-ratio: 4 / 3;
}
.tour-points {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.7rem;
}
.tour-points li {
  position: relative;
  padding-left: 1.4rem;
  line-height: 1.6;
  color: var(--tour-ink-2);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.tour-points li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 0.55rem;
  height: 2px;
  background: var(--tour-accent);
}
.tour-stop.is-seen .tour-points li { opacity: 1; transform: none; }
.tour-stop.is-seen .tour-points li:nth-child(2) { transition-delay: 0.12s; }
.tour-stop.is-seen .tour-points li:nth-child(3) { transition-delay: 0.24s; }
.tour-term {
  font-style: normal;
  font-weight: 600;
  color: var(--tour-ink);
}

/* ---------- Finale: banquet ---------- */
.tour-finale {
  position: relative;
  color: #fff;
  background:
    radial-gradient(120% 80% at 80% 0%, rgba(231, 183, 95, 0.35) 0%, rgba(231, 183, 95, 0) 55%),
    linear-gradient(180deg, #243264 0%, var(--tour-dusk) 70%);
  padding: 8rem 1.5rem 7rem;
  overflow: hidden;
}
.tour-finale__inner {
  width: min(1000px, 100%);
  margin: 0 auto;
}
.tour-finale .tour-time { color: var(--tour-gold); }
.tour-finale h2 {
  font-size: clamp(2rem, 5vw, 3.6rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0 0 1rem;
  max-width: 18ch;
}
.tour-finale p {
  font-size: 1.1rem;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.85);
  max-width: 56ch;
  margin: 0 0 1.5rem;
}
.tour-finale a.tour-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1.4rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}
.tour-finale a.tour-link:hover,
.tour-finale a.tour-link:focus-visible {
  background: rgba(255, 255, 255, 0.12);
  border-color: #fff;
}
.tour-finale a.tour-link:focus-visible { outline: 2px solid var(--tour-gold); outline-offset: 3px; }
.tour-stars {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.55;
  background-image:
    radial-gradient(1.5px 1.5px at 12% 22%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 28% 12%, #fff 50%, transparent 51%),
    radial-gradient(1.2px 1.2px at 46% 30%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 64% 16%, #fff 50%, transparent 51%),
    radial-gradient(1.6px 1.6px at 82% 34%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 90% 10%, #fff 50%, transparent 51%);
}
.tour-notes {
  margin: 3.5rem 0 0;
  padding: 1.25rem 0 0;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.78);
}
.tour-notes p { font-size: 0.95rem; margin: 0; }
.tour-hashtag {
  font-family: var(--font-time);
  color: var(--tour-gold);
  font-weight: 600;
}

/* ---------- Reveal ---------- */
.tour-reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.9s ease, transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.tour-reveal.is-seen { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .tour-journey {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.5rem;
  }
  /* スマホ: 地図は上に細く固定し、文字は地図の外（いまの地点）に出す。 */
  .tour-map {
    top: 72px;
    height: 26svh;
    min-height: 170px;
    z-index: 2;
    background: var(--tour-bg);
    padding: 0.25rem 0 0.6rem;
    transition: background-color 0.9s ease;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr);
    align-items: center;
    gap: 1rem;
    border-bottom: 1px solid rgba(19, 36, 58, 0.1);
  }
  .tour-map svg { height: 100%; align-self: stretch; box-shadow: none; }
  .tour-map__title,
  .tour-map__note,
  .map-stop text,
  .map-sea-label { display: none; }
  .tour-map__now { display: block; }
  .tour-stop { scroll-margin-top: calc(72px + 26svh + 1.5rem); }
  .tour-stop { margin-bottom: 14vh; }
  .tour-stop::before { bottom: -14vh; }
  .tour-trio { grid-template-columns: minmax(0, 1fr); }
  .tour-trio a { aspect-ratio: 16 / 10; }
  .tour-notes { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 480px) {
  .tour-hero__inner { padding-bottom: 14vh; }
  .tour-photo--pair { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- Reduced motion: no movement, everything visible ---------- */
@media (prefers-reduced-motion: reduce) {
  .tour, .tour * { transition: none !important; animation: none !important; }
  .tour-hero__media { transform: none !important; }
  .tour-reveal, .tour-points li { opacity: 1; transform: none; }
  .tour-photo { clip-path: none; }
  .tour-photo img { transform: none; }
  .map-leg { stroke-dashoffset: 0; }
  .tour-scroll { display: none; }
}
