/* WVDB 2026 — landing page styles */

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  width: 100%; height: 100%;
  background: #0e0e10;
  color: #f4f1ec;
  font-family: -apple-system, "Helvetica Neue", "Hiragino Sans", "Yu Gothic", sans-serif;
  font-weight: 300;
  line-height: 1.6;
  letter-spacing: 0.02em;
  overflow-x: hidden;
}

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

/* ----- 背景 Ken Burns ----- */
.bg-stage {
  position: fixed; inset: 0; z-index: 0;
  overflow: hidden;
  background: #000;
}
.bg-image {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0;
  transform: scale(1.05);
  will-change: opacity, transform;
  animation: kenburns 60s linear forwards;
}
@keyframes kenburns {
  0%   { opacity: 0;    transform: scale(1.00) translate(0, 0); }
  8%   { opacity: 1; }
  85%  { opacity: 1; }
  100% { opacity: 0;    transform: scale(1.18) translate(-2%, 1.5%); }
}
.overlay {
  position: fixed; inset: 0; z-index: 1;
  background:
    linear-gradient(180deg,
      rgba(0,0,0,0.65) 0%,
      rgba(0,0,0,0.35) 35%,
      rgba(0,0,0,0.55) 70%,
      rgba(0,0,0,0.85) 100%);
}

/* ----- コンテンツ ----- */
.content {
  position: relative; z-index: 2;
  min-height: 100vh;
  display: flex; flex-direction: column;
  justify-content: center; align-items: center;
  text-align: center;
  padding: 3rem 1.5rem 6rem;
}
.title {
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 200;
  letter-spacing: 0.18em;
  margin-bottom: 0.4rem;
  text-shadow: 0 1px 16px rgba(0,0,0,0.6);
}
.title.small { font-size: clamp(2rem, 4vw, 3rem); }
.subtitle {
  font-size: clamp(1.05rem, 2vw, 1.4rem);
  font-weight: 200;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #e8d8b0;
  margin-bottom: 1.6rem;
  text-shadow: 0 1px 12px rgba(0,0,0,0.6);
}
.affiliation {
  font-size: 0.95rem;
  font-weight: 300;
  color: #d8d3c8;
  max-width: 38rem;
  margin: 0 auto 0.4rem;
  text-shadow: 0 1px 8px rgba(0,0,0,0.6);
}
.affiliation.small { font-size: 0.85rem; margin-bottom: 1.5rem; }
.affiliation-en {
  font-size: 0.78rem;
  color: #b8b1a3;
  letter-spacing: 0.04em;
}
.version {
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  color: #a89c84;
  text-transform: uppercase;
  margin-top: 0.4rem;
  margin-bottom: 3rem;
}

/* ----- ボタン ----- */
.buttons {
  display: flex; gap: 1.4rem;
  flex-wrap: wrap; justify-content: center;
  margin-bottom: 2.2rem;
}
.btn {
  display: inline-flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 1rem 2.2rem;
  min-width: 14rem;
  background: rgba(244,241,236, 0.08);
  border: 1px solid rgba(244,241,236, 0.4);
  border-radius: 4px;
  color: #f4f1ec;
  transition: background 0.25s, border-color 0.25s, transform 0.15s;
  cursor: pointer;
  text-decoration: none;
}
.btn:hover {
  background: rgba(244,241,236, 0.18);
  border-color: rgba(244,241,236, 0.85);
  transform: translateY(-1px);
}
.btn-label {
  font-size: 1rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.btn-sub {
  font-size: 0.72rem;
  margin-top: 0.3rem;
  letter-spacing: 0.04em;
  color: #c4bdac;
}
.btn-guest .btn-sub { color: #b8b09e; }

.hint {
  font-size: 0.82rem;
  color: #b6ad97;
  max-width: 30rem;
  line-height: 1.7;
  text-shadow: 0 1px 8px rgba(0,0,0,0.5);
}
.hint a { color: #e8d8b0; text-decoration: underline; }
.hint-en {
  display: inline-block;
  margin-top: 0.4rem;
  font-size: 0.78rem;
  color: #9e957f;
  font-style: italic;
}

/* ----- フッター ----- */
.footer {
  position: fixed; bottom: 0; left: 0; right: 0;
  z-index: 2;
  display: flex; justify-content: space-between;
  padding: 0.7rem 1.5rem;
  font-size: 0.7rem;
  color: #807763;
  background: linear-gradient(0deg, rgba(0,0,0,0.8), transparent);
}
.footer-grant {
  text-align: right;
}

/* ----- 背景写真キャプション（右下：集落名・国名・調査年） ----- */
.bg-caption {
  position: fixed;
  right: 1.6rem;
  bottom: 3.2rem;            /* デスクトップの固定フッターの上に乗せる */
  z-index: 2;
  max-width: 70vw;
  text-align: right;
  font-size: 1.6rem;
  font-weight: 300;
  letter-spacing: 0.06em;
  color: #c4bdac;
  text-shadow: 0 1px 10px rgba(0,0,0,0.85), 0 0 3px rgba(0,0,0,0.7);
  opacity: 0;
  transition: opacity 0.7s ease;
  pointer-events: none;
}
.bg-caption.show { opacity: 0.82; }
.bg-caption-name { color: #ece3cf; }

/* ----- スライドショー リロードボタン（左下） ----- */
.reload-btn {
  position: fixed;
  left: 1.6rem;
  bottom: 3.0rem;            /* 左下クレジットの上 */
  z-index: 3;
  width: 2.6rem;
  height: 2.6rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #d8d3c8;
  background: rgba(20, 18, 16, 0.32);
  border: 1px solid rgba(244, 241, 236, 0.35);
  border-radius: 50%;
  cursor: pointer;
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  transition: background 0.25s, border-color 0.25s, color 0.25s, transform 0.15s;
}
.reload-btn:hover {
  background: rgba(244, 241, 236, 0.16);
  border-color: rgba(244, 241, 236, 0.85);
  color: #fff;
}
.reload-btn:active { transform: scale(0.94); }
.reload-btn svg { display: block; }
.reload-btn.spinning svg { animation: reload-spin 0.6s ease; }
@keyframes reload-spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

/* ----- 同意ページ ----- */
.consent-body {
  background:
    linear-gradient(180deg, #1a1813 0%, #0e0e10 100%);
  color: #f4f1ec;
  overflow: auto;
}
.consent-content {
  padding-top: 4rem; padding-bottom: 8rem;
}
.consent-card {
  background: rgba(244,241,236, 0.06);
  border: 1px solid rgba(244,241,236, 0.18);
  border-radius: 6px;
  padding: 1.8rem 2rem;
  max-width: 42rem;
  text-align: left;
  font-size: 0.94rem;
  line-height: 1.85;
}
.consent-card h2 {
  font-size: 1.15rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  color: #e8d8b0;
  margin-bottom: 1rem;
}
.consent-card p { margin-bottom: 0.8rem; }
.consent-card .en {
  display: block;
  font-size: 0.82rem;
  color: #b6ad97;
  margin-top: 0.2rem;
  line-height: 1.6;
}
.notice-list {
  list-style: none;
  padding: 0;
  margin: 1.2rem 0 0;
}
.notice-list li {
  padding: 0.6rem 0 0.6rem 1.2rem;
  border-left: 2px solid rgba(232, 216, 176, 0.5);
  margin-bottom: 1rem;
}

.agree {
  max-width: 42rem; margin: 2rem auto 0;
  text-align: center;
}
.agree label {
  display: block;
  padding: 0.6rem 0;
  font-size: 0.92rem;
  cursor: pointer;
}
.agree label .en {
  font-size: 0.78rem; color: #b6ad97;
}
.agree input[type="checkbox"] {
  margin-right: 0.5rem;
  transform: scale(1.2);
  vertical-align: middle;
}
.consent-buttons {
  display: flex; gap: 1rem; justify-content: center;
  margin-top: 1.4rem;
}
.btn-go {
  background: #b08d4a;
  border-color: #c8a45a;
  color: #fff;
}
.btn-go:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  transform: none;
}
.btn-back {
  background: transparent;
  border-color: rgba(244,241,236, 0.3);
}

/* ----- スマホ表示の崩れ対策 ----- */
@media (max-width: 640px) {
  /* height:100% 固定だと静的フッターが折り返し位置に収まらずスクロールで
     到達できない。コンテンツ高に合わせて伸ばす（背景は position:fixed なので不変） */
  html, body { height: auto; min-height: 100%; }

  /* 固定フッターがボタン/カードに被り、2カラムが重なる問題を解消。
     スマホでは通常フローに置き、縦積み・中央寄せにする */
  .footer {
    position: static;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.25rem;
    padding: 1rem 1.5rem calc(1rem + env(safe-area-inset-bottom));
    background: rgba(0, 0, 0, 0.55);
  }
  .footer-grant { text-align: center; }

  /* 固定フッター前提の下余白を縮小（フッターが下に積まれるため） */
  .content { padding-bottom: 2.5rem; }
  .consent-content { padding-bottom: 2.5rem; }

  /* キャプションは端に寄せる */
  .bg-caption {
    right: 1rem;
    bottom: 1rem;
    font-size: 1.4rem;
    max-width: 85vw;
  }
  /* リロードボタンも端に寄せて少し小さく */
  .reload-btn {
    left: 1rem;
    bottom: 1rem;
    width: 2.3rem;
    height: 2.3rem;
  }
}
