@charset "UTF-8";

/* ============================================================
   星くずストーンワールド ティザー専用CSS
   - page-teaser.php からのみ <link> で直接読み込む（wp_head() を使わないため
     child.css / 親テーマ style.css 等の enqueue パイプラインには一切乗らない）
   - functions.php の子CSS自動読み込み（/css/ 配下 glob）の対象外にするため、
     あえて /css/ ではなくこの /teaser-assets/ に置いている
   - 現状はスケルトンのみ。デザインは後日作り込み
============================================================ */

/* ============================================================
   00. Reset（ティザー専用・標準的なモダンリセット）
   - page-teaser.php は完全独立テンプレートで child.css / destyle.css を
     読み込まないため、このファイル自身がリセットを持つ
============================================================ */

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

* {
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  -moz-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-size: inherit;
  font-weight: inherit;
  line-height: 1.3;
}

p,
h1,
h2,
h3,
h4,
h5,
h6 {
  overflow-wrap: break-word;
}

ul,
ol {
  list-style: none;
}

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

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

input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
}

button {
  cursor: pointer;
}

@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ============================================================
   01. Base
============================================================ */

.ssw-teaser {
  position: relative;
  margin: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
  color: #ffffff;
  font-family: 'Noto Sans JP', 'Hiragino Kaku Gothic Pro', 'Meiryo', sans-serif;
  text-align: center;
}

.ssw-teaser__main {
  position: relative;
  z-index: 1;
  font-size: clamp(16px, 1.4vw, 24px);
  padding: 15vh 8% 8%;
  font-weight: bold;
  overflow: hidden;
}

/* ------------------------------------------------------------
   月（装飾）
   - ページ上部中央に配置。ほとんどを画面外（上）へ出し、下端だけ見せる
   - 外側 .ssw-teaser__moon = 位置決め（幅100% / 最大1000px、上へのはみ出し量は translate の Y%）
   - 内側 img = ゆっくり右回転（時計回り、速さは animation の秒数）
   - prefers-reduced-motion 時は回転を止める
------------------------------------------------------------ */
.ssw-teaser__moon {
  position: absolute;
  top: 0;
  left: 50%;
  z-index: 0;
  width: 100%;
  max-width: 1000px;
  /* Y の値を 0 に近づけるほど月が下に降りてくる（見える面積が増える） */
  transform: translate(-50%, -82%);
  pointer-events: none;
  user-select: none;
  opacity: 0.6;
  overflow: hidden;
}

.ssw-teaser__moon img {
  display: block;
  width: 100%;
  height: auto;
  animation: ssw-moon-spin 120s linear infinite;
}

@keyframes ssw-moon-spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

/* prefers-reduced-motion 時の回転停止は 00. Reset の共通ルールでカバー */

/* ------------------------------------------------------------
   星のきらめき
   - JS（teaser.js）が .ssw-stars に <i> を生成し、1粒ごとに
     --s（大きさ）/ --g（グロー）/ --o（明るさ）/ --d（周期）/ --delay（位相）を付与
   - .is-static は点滅なし
   - prefers-reduced-motion 時は 00. Reset の共通ルールで点滅停止
     （静止後は --o の明るさで表示されるので消えはしない）
------------------------------------------------------------ */
.ssw-stars {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.ssw-stars i {
  position: absolute;
  width: var(--s, 2px);
  height: var(--s, 2px);
  border-radius: 50%;
  background: #ffffff;
  opacity: var(--o, 0.7);
  box-shadow: 0 0 var(--g, 4px) rgba(255, 255, 255, 0.85);
  animation: ssw-twinkle var(--d, 4s) ease-in-out var(--delay, 0s) infinite;
}

/* きらめきの瞬間だけ現れる十字フレア（コントラストを強く／わかりやすく） */
.ssw-stars i::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: calc(var(--s, 2px) * 7);
  height: calc(var(--s, 2px) * 7);
  transform: translate(-50%, -50%) scale(0);
  opacity: 0;
  background:
    linear-gradient(0deg, transparent 44%, rgba(255, 255, 255, 0.95) 50%, transparent 56%),
    linear-gradient(90deg, transparent 44%, rgba(255, 255, 255, 0.95) 50%, transparent 56%);
  animation: ssw-flare var(--d, 4s) ease-in-out var(--delay, 0s) infinite;
}

.ssw-stars i.is-static {
  animation: none;
  opacity: var(--o, 0.7);
}

.ssw-stars i.is-static::after {
  display: none;
}

/* 通常はほぼ消灯 → 一瞬だけ光る（点いている時間を短く＝控えめ・間隔を長く感じさせる） */
@keyframes ssw-twinkle {

  0%,
  44%,
  56%,
  100% {
    opacity: calc(var(--o, 0.7) * 0.12);
    transform: scale(0.5);
    box-shadow: 0 0 calc(var(--g, 4px) * 0.35) rgba(255, 255, 255, 0.35);
  }

  50% {
    opacity: 1;
    transform: scale(1.35);
    box-shadow:
      0 0 var(--g, 4px) rgba(255, 255, 255, 0.9),
      0 0 calc(var(--g, 4px) * 2.4) rgba(190, 215, 255, 0.6);
  }
}

@keyframes ssw-flare {

  0%,
  45%,
  55%,
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0) rotate(0deg);
  }

  50% {
    opacity: 0.8;
    transform: translate(-50%, -50%) scale(1) rotate(45deg);
  }
}

/* ------------------------------------------------------------
   ロケット（装飾）
   - 約8秒周期。うち約5秒（0〜62.5%）かけて画面右下 → 左上を横切る
   - 残り約3秒（62.5〜100%）は画面外で待機（次の周回まで見えない）
   - 画像自体が左上向きなので回転は不要
   - 周期は animation の 8s、横切る時間は 62.5% の位置、大きさは width で調整
------------------------------------------------------------ */
.ssw-rocket {
  position: fixed;
  right: -15vmax;
  bottom: -15vmax;
  z-index: 2;
  width: clamp(64px, 5vw, 140px);
  height: auto;
  pointer-events: none;
  user-select: none;
  will-change: transform, opacity;
  /* 画面外で待機 → 周回開始 */
  transform: translate(0, 0);
  opacity: 0;
  animation: ssw-rocket-fly 8s linear infinite;
}

@keyframes ssw-rocket-fly {

  /* 0〜62.5% ＝ 約5秒。右下 → 左上へ 45度で横切る（画像の向きと一致） */
  0% {
    transform: translate(0, 0);
    opacity: 1;
  }

  62.5% {
    transform: translate(-125vmax, -125vmax);
    opacity: 1;
  }

  /* 62.5〜100% ＝ 約3秒。画面外で非表示のまま待機 */
  62.6%,
  100% {
    transform: translate(-125vmax, -125vmax);
    opacity: 0;
  }
}

.ssw-teaser__title {
  margin: 0 auto 3em;
  width: 80%;
  max-width: 400px;
  min-width: 200px;
}

a.ssw-teaser__line-btn {
  display: block;
  color: #ffffff;
  background: #02a400;
  text-decoration: none;
  line-height: 3em;
  font-weight: 900;
  font-size: 1.2em;
  border-radius: 10px;
  margin: 1em auto 0;
  max-width: 20em;
  text-align: center;
  padding: 0 1em;
  position: relative;
}

.ssw-teaser__line-btn:hover {
  opacity: 0.7;
}

/* ------------------------------------------------------------
   カウントダウン
   - JS未実行時は "--" のプレースホルダが見えるだけ（崩れない）
   - 目標到達後は JS が .is-done を付与し時計を隠す
------------------------------------------------------------ */
.ssw-teaser__countdown {
  margin: 0 0 2em;
}

.ssw-teaser__countdown-label {
  margin: 0 auto 0.5em;
  font-size: 1.3em;
  font-family: "Zalando Sans", "Noto Sans JP", sans-serif;
  font-weight: bold;
  color: #edcc45;
}

.ssw-teaser__countdown-clock {
  display: flex;
  justify-content: center;
  gap: 1em;
}

.ssw-teaser__countdown-clock[hidden] {
  display: none;
}

.ssw-teaser__countdown-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 3.2em;
}

.ssw-teaser__countdown-unit b {
  font-size: 2.5em;
  font-weight: 700;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
  font-family: "Zalando Sans", sans-serif;
}

.ssw-teaser__countdown-unit i {
  margin-top: 0.2em;
  font-size: 0.8em;
  font-style: normal;
  font-weight: bold;
}

.ssw-teaser__countdown-done {
  margin: 0;
  font-size: 1.3em;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.ssw-teaser__countdown-done[hidden] {
  display: none;
}

@media (max-width: 480px) {
  .ssw-teaser__countdown-clock {
    gap: 0.4em;
  }

  .ssw-teaser__countdown-unit {
    min-width: 0;
    flex: 1;
  }

  .ssw-teaser__countdown-unit b {
    font-size: 1.7em;
  }
}

p.ssw-copy {
  text-align: center;
  width: 30%;
  max-width: 500px;
  min-width: 250px;
  margin: 0 auto 2em;
}

.ssw-main {
  width: 100%;
  max-width: 800px;
  margin: 0 auto 2em;
}

.ssw-reserved h3 {
  font-size: 1.6em;
  font-weight: 900;
  margin: 0 auto 0.5em;
}

.ssw-reserved h3 span {
  color: #edcc45;
}

.ssw-access address {
  font-style: normal;
  font-size: 0.9em;
}

.ssw-access {
  margin: 1.5em auto 0;
}

p.copyright {
  font-size: 0.7em;
  margin: 3em auto 0;
}

.ssw-teaser::before {
  width: 100%;
  height: 100%;
  position: fixed;
  content: '';
  top: 0;
  left: 0;
  opacity: 0.5;
  background-image: url(/wp-content/themes/tcd-w-child/img/ssw-bg.jpg);
  background-size: cover;
  background-position: center;
}

.ssw-access address::before {
  font-family: 'Material Icons';
  content: '\e0c8';
  display: block;
  color: #edcc45;
  font-size: 1.65em;
  line-height: 1;
}

.ssw-info {
  margin: 2em auto 0;
  font-size: 0.8em;
  color: #c9c9c9;
}

.ssw-info h4 {
  font-size: 0.8em;
  margin: 0 auto 1em;
}

p.tel span {
  margin-right: 0.5em;
}