/* ==========================================================
   スターライト！なぎまちゃん - 公開準備中ページ
   ========================================================== */

:root {
  --pink-main: #ff6fa5;
  --pink-deep: #e84393;
  --gold: #ffd76a;
  --purple-deep: #2b1f4a;
  --white: #fffaf5;
}

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

html, body {
  width: 100%;
  height: 100%;
  overflow-x: hidden;
}

body {
  font-family: 'Zen Maru Gothic', sans-serif;
  background: #0d0620;
  color: var(--white);
}

/* ---------- ヒーローセクション（ファーストビュー） ---------- */

.hero {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 560px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 背景スライドショー：10秒ごとにふわっとクロスフェード */
.slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background-position: center center;
  background-size: cover;
  background-repeat: no-repeat;
  opacity: 0;
  transition: opacity 2.2s ease-in-out;
  z-index: 1;
}

.slide.active {
  opacity: 1;
}

/* 見やすさ確保のグラデーションオーバーレイ */
.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(
    180deg,
    rgba(13, 6, 32, 0.55) 0%,
    rgba(13, 6, 32, 0.15) 30%,
    rgba(13, 6, 32, 0.25) 60%,
    rgba(30, 10, 45, 0.75) 100%
  );
  pointer-events: none;
}

/* ---------- Three.js 星空キャンバス ---------- */
.starfield-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 3;
  pointer-events: none;
  mix-blend-mode: screen;
}

/* ---------- 画像の右クリック保存防止用（背景・ロゴ共通） ---------- */
.slide,
.brand-logo {
  -webkit-user-select: none;
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: auto;
}

/* ---------- ロゴクリックで飛行する乗り物レイヤー（画面最下段） ---------- */
.flyby-layer {
  position: absolute;
  inset: 0;
  z-index: 7;
  pointer-events: none;
  overflow: hidden;
}

.flyby-item {
  position: absolute;
  bottom: 4%;
  left: -28%;
  --flyby-base-width: clamp(140px, 20vw, 260px);
  /* 乗り物ごとの拡大率（JS側で --flyby-scale を個別指定。未指定時は等倍） */
  width: calc(var(--flyby-base-width) * var(--flyby-scale, 1));
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.45));
  animation:
    flybyMove linear forwards,
    flybyBob 2.6s ease-in-out infinite;
  user-select: none;
  -webkit-user-drag: none;
}

@keyframes flybyMove {
  0%   { left: -28%; }
  100% { left: 118%; }
}

@keyframes flybyBob {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-14px); }
}

/* ---------- メインコンテンツ ---------- */

.hero-content {
  position: relative;
  z-index: 6;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px 20px;
  width: 100%;
  max-width: 760px;
}

.content-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 36px 32px 30px;
  border-radius: 28px;
  background: linear-gradient(
    160deg,
    rgba(43, 20, 70, 0.42) 0%,
    rgba(20, 10, 40, 0.32) 100%
  );
  border: 1px solid rgba(255, 215, 106, 0.28);
  box-shadow:
    0 8px 40px rgba(0, 0, 0, 0.35),
    inset 0 0 40px rgba(255, 111, 165, 0.08);
  backdrop-filter: blur(2px);
}

.footer-credit {
  margin-top: 22px;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: rgba(255, 250, 245, 0.55);
}

/* ロゴ：左上角に24pxの余白を残して固定配置（クリナカブズボタン） */
.brand-logo-btn {
  position: absolute;
  top: 24px;
  left: 24px;
  z-index: 5;
  width: min(38vw, 260px);
  max-width: 260px;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.brand-logo-btn:focus-visible .brand-logo {
  outline: 2px solid rgba(255, 215, 106, 0.8);
  outline-offset: 4px;
  border-radius: 12px;
}

.brand-logo {
  display: block;
  width: 100%;
  filter: drop-shadow(0 6px 18px rgba(0, 0, 0, 0.45));
  animation: floatLogo 4s ease-in-out infinite;
  transition: transform 0.2s ease, filter 0.2s ease;
}

.brand-logo-btn:hover .brand-logo {
  transform: scale(1.05);
  filter: drop-shadow(0 6px 22px rgba(255, 215, 106, 0.55));
}

.brand-logo-btn:active .brand-logo {
  transform: scale(0.97);
}

@keyframes floatLogo {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-8px); }
}

/* ---------- 日付・現在時刻ウィジェット ---------- */
.clock-widget {
  position: absolute;
  top: 22px;
  right: 22px;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  padding: 10px 18px;
  border-radius: 16px;
  background: linear-gradient(160deg, rgba(43, 20, 70, 0.5) 0%, rgba(13, 6, 32, 0.4) 100%);
  border: 1px solid rgba(255, 215, 106, 0.35);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35), inset 0 0 16px rgba(255, 111, 165, 0.08);
  backdrop-filter: blur(3px);
  font-family: 'Zen Maru Gothic', sans-serif;
  pointer-events: none;
  animation: clockGlow 4s ease-in-out infinite;
}

@keyframes clockGlow {
  0%, 100% { box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35), inset 0 0 16px rgba(255, 111, 165, 0.08); }
  50%      { box-shadow: 0 4px 24px rgba(255, 215, 106, 0.28), inset 0 0 20px rgba(255, 111, 165, 0.16); }
}

.clock-date {
  display: inline-block;
  font-size: clamp(1.32rem, 2.8vw, 1.6rem);
  letter-spacing: 0.06em;
  /* letter-spacingは最後の文字の後ろにも余白を作るため、その分を打ち消して
     「）」の右端が実際の右端に来るように調整する */
  margin-right: -0.06em;
  color: #ffe9f2;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.clock-time {
  display: inline-block;
  font-family: 'Mochiy Pop One', sans-serif;
  font-size: clamp(2rem, 4.8vw, 2.6rem);
  letter-spacing: 0.04em;
  /* 同上：末尾の余白を打ち消し、日付の「）」の右端と正確に揃える */
  margin-right: -0.04em;
  color: var(--gold);
  text-shadow: 0 0 10px rgba(255, 215, 106, 0.6), 0 2px 8px rgba(0, 0, 0, 0.5);
}

.clock-sec {
  font-size: 0.72em;
  opacity: 0.75;
  margin-left: 1px;
}

.eyebrow {
  font-family: 'Caveat', cursive;
  font-size: clamp(1.3rem, 2.6vw, 1.9rem);
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 0.12em;
  margin-top: 6px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.main-message {
  font-family: 'Mochiy Pop One', 'Zen Maru Gothic', sans-serif;
  font-size: clamp(1.7rem, 5.2vw, 3.1rem);
  line-height: 1.35;
  margin-top: 10px;
  color: var(--white);
  text-shadow:
    0 0 12px rgba(255, 111, 165, 0.7),
    0 4px 14px rgba(0, 0, 0, 0.55);
  letter-spacing: 0.02em;
}

.dots {
  display: inline-block;
  animation: blinkDots 1.6s steps(1) infinite;
}

@keyframes blinkDots {
  0%, 60%  { opacity: 1; }
  80%      { opacity: 0.2; }
  100%     { opacity: 1; }
}

.sub-message {
  font-family: 'Zen Maru Gothic', sans-serif;
  font-weight: 500;
  font-size: clamp(0.95rem, 2.4vw, 1.3rem);
  margin-top: 16px;
  color: #ffe9f2;
  text-shadow: 0 3px 10px rgba(0, 0, 0, 0.55);
}

.heart {
  color: var(--pink-main);
  margin-left: 2px;
}

.badge {
  margin-top: 28px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 24px;
  border-radius: 999px;
  background: rgba(20, 8, 38, 0.55);
  border: 1px solid rgba(255, 215, 106, 0.55);
  backdrop-filter: blur(4px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}

.badge:hover,
.badge:focus-visible {
  transform: translateY(-2px) scale(1.03);
  background: rgba(232, 67, 147, 0.35);
  box-shadow: 0 6px 24px rgba(255, 111, 165, 0.45);
}

.badge:active {
  transform: translateY(0) scale(0.98);
}

.badge-star {
  color: var(--gold);
  font-size: 1rem;
}

.badge-x-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #ffffff;
  color: #0d0620;
  flex-shrink: 0;
}

.badge-text {
  font-family: 'Mochiy Pop One', sans-serif;
  font-size: clamp(0.75rem, 1.8vw, 1rem);
  letter-spacing: 0.06em;
  color: var(--white);
}

/* ---------- レスポンシブ調整 ---------- */

@media (max-width: 768px) {
  .hero {
    height: 100vh;
    min-height: 100vh;
  }
  .brand-logo-btn {
    top: 16px;
    left: 16px;
    width: min(42vw, 190px);
  }
  .hero-content {
    padding: 16px 18px;
  }
  .main-message {
    font-size: clamp(1.5rem, 6.8vw, 2.2rem);
  }
  .clock-widget {
    top: 14px;
    right: 14px;
    padding: 8px 14px;
    border-radius: 12px;
  }
  .flyby-item {
    --flyby-base-width: clamp(100px, 30vw, 180px);
  }
}

@media (max-width: 420px) {
  .brand-logo-btn {
    top: 14px;
    left: 14px;
    width: 40vw;
  }
  .badge {
    padding: 8px 16px;
  }
  .clock-widget {
    top: 10px;
    right: 10px;
    padding: 6px 12px;
  }
  .clock-date {
    font-size: 1.16rem;
  }
  .clock-time {
    font-size: 1.76rem;
  }
  .flyby-item {
    --flyby-base-width: clamp(84px, 34vw, 150px);
  }
}

@media (max-width: 480px) {
  .content-panel {
    padding: 26px 20px 22px;
    border-radius: 22px;
  }
}

@media (min-width: 1600px) {
  .brand-logo-btn {
    width: 300px;
  }
  .main-message {
    font-size: 3.4rem;
  }
}

/* 横向き・低高さ端末（スマホ横画面など）の調整 */
@media (max-height: 480px) and (orientation: landscape) {
  .brand-logo-btn { top: 12px; left: 12px; width: 140px; }
  .main-message { font-size: 1.6rem; margin-top: 4px; }
  .sub-message { margin-top: 8px; }
  .badge { margin-top: 14px; }
  .clock-widget { top: 10px; right: 10px; padding: 5px 12px; }
  .clock-date { font-size: 1.1rem; }
  .clock-time { font-size: 1.6rem; }
  .flyby-item { --flyby-base-width: 110px; }
}
