/* =========================================
   琥珀 奏 紹介ページ スタイル
   スマホを基準に作り（モバイルファースト）、
   広い画面では最後の @media で少し調整します
   ========================================= */


/* ===== 色やサイズの設定（変数） ===== */
/* :root に書いた「--名前」は、ページ全体で var(--名前) として使い回せる */
:root {
  --indigo: #0f1a33;          /* 深い藍（背景） */
  --indigo-light: #18264a;    /* 少し明るい藍（カード） */
  --amber: #e8b56a;           /* 琥珀色（アクセント・ボタン） */
  --amber-soft: #f6dcae;      /* やわらかい光 */
  --gold-line: rgba(232, 181, 106, 0.45); /* 細い金の線 */
  --washi: #f3ecdf;           /* 和紙色（本文の文字） */
  --washi-dim: #c9c1b3;       /* 少し控えめな文字 */

  --font-heading: "Shippori Mincho", "Hiragino Mincho ProN", "Yu Mincho", serif;
  --font-body: "Noto Serif JP", "Hiragino Mincho ProN", "Yu Mincho", serif;
}


/* ===== 全体の基本 ===== */
/* 余白や枠線を含めて幅を計算する（レイアウトが崩れにくくなる） */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  background-color: var(--indigo);
  /* 和紙の質感：SVGのノイズ（細かいざらつき）をうっすら重ねる */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='0.06'/%3E%3C/svg%3E");
  color: var(--washi);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 2;              /* 行の間を広くして、ゆっくり読めるように */
  letter-spacing: 0.05em;      /* 文字と文字の間を少しだけ空ける */
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--amber);
}


/* ===== ① トップ（ヒーロー） ===== */
.hero {
  position: relative;          /* 中の要素を、この箱を基準に配置するため */
  height: 100vh;               /* 古いブラウザ用 */
  height: 100svh;              /* 画面の高さいっぱい（アドレスバーでずれない単位） */
  min-height: 560px;
  overflow: hidden;
}

/* 背景画像を画面いっぱいに広げる */
.hero-bg {
  position: absolute;
  inset: 0;                    /* 上下左右すべて 0 = 箱いっぱい */
  width: 100%;
  height: 100%;
  object-fit: cover;           /* 縦横比を保ったまま、すき間なく敷きつめる */
  object-position: center 60%; /* 月が見える位置を中心にする */
}

/* 画面の下を藍色にぼかして、次のセクションへなめらかにつなぐ */
.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 40%;
  background: linear-gradient(to bottom, transparent, var(--indigo));
}

/* 縦書きの名前のまとまり（夜空の上の方に置く） */
.hero-title {
  position: absolute;
  top: 6svh;
  left: 18%;                   /* 月にかからないよう、少し左に置く */
  z-index: 1;                  /* グラデーションより手前に出す */
  display: flex;
  align-items: flex-start;
  writing-mode: vertical-rl;   /* 縦書き（右から左へ行が進む） */
  font-family: var(--font-heading);
  animation: fade-in 2s ease-out both;
}

.hero-label {
  margin: 0;
  font-size: 0.75rem;
  letter-spacing: 0.3em;
  color: var(--amber-soft);
  opacity: 0.85;
}

.hero-name {
  margin: 0 0.6rem;
  /* clamp(最小, 基本, 最大)：画面の高さに合わせて文字の大きさが変わる */
  font-size: clamp(1.7rem, 4.6svh, 2.4rem);
  font-weight: 700;
  letter-spacing: 0.25em;
  line-height: 1.2;
  color: var(--washi);
  /* 文字のまわりに琥珀色の淡い光 */
  text-shadow: 0 0 18px rgba(232, 181, 106, 0.55);
}

.hero-kana {
  margin: 0;
  padding-top: 0.4rem;
  font-size: 0.8rem;
  letter-spacing: 0.35em;
  color: var(--amber-soft);
}

/* 画面の下に置くメッセージ */
.hero-bottom {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 5svh;
  z-index: 1;
  padding: 0 20px;
  text-align: center;
  animation: fade-in 2s ease-out 0.6s both; /* 0.6秒おくれて現れる */
}

.hero-message {
  margin: 0 0 1rem;
  font-family: var(--font-heading);
  font-size: 1.05rem;
  line-height: 2;
  text-shadow: 0 1px 8px rgba(15, 26, 51, 0.9); /* 背景の上でも読みやすく */
}

.scroll-cue {
  display: inline-block;
  color: var(--amber);
  font-size: 1.1rem;
  animation: float 2.4s ease-in-out infinite;
}


/* ===== セクション共通 ===== */
.section {
  max-width: 640px;            /* 広い画面でも読みやすい幅にとどめる */
  margin: 0 auto;              /* 左右の真ん中に置く */
  padding: 56px 20px;
}

.section p {
  margin: 0 0 1.2em;
}

.section-center {
  text-align: center;
}

.section-title {
  margin: 0 0 1.6rem;
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  color: var(--amber-soft);
}

/* 見出しの前の小さな月や星のマーク */
.mark {
  margin-right: 0.5em;
  color: var(--amber);
  font-size: 0.9em;
}


/* ===== 青海波の区切り線 ===== */
/* 半円の輪を重ねて、青海波（せいがいは）の模様を作っている */
.seigaiha {
  height: 32px;
  max-width: 640px;
  margin: 0 auto;
  --ring: radial-gradient(circle at 50% 100%,
      var(--indigo) 0 3px, var(--gold-line) 3px 4px,
      var(--indigo) 4px 7px, var(--gold-line) 7px 8px,
      var(--indigo) 8px 11px, var(--gold-line) 11px 12px,
      var(--indigo) 12px 15px, var(--gold-line) 15px 16px,
      transparent 16px);
  /* 同じ模様を2枚、半分ずらして重ねると、うろこ状になる */
  background-image: var(--ring), var(--ring);
  background-size: 32px 16px;
  background-position: 0 0, 16px 8px;
  /* 左右の端をふわっと消す */
  -webkit-mask-image: linear-gradient(to right, transparent, #000 30%, #000 70%, transparent);
  mask-image: linear-gradient(to right, transparent, #000 30%, #000 70%, transparent);
  opacity: 0.7;
}


/* ===== ③ お守りの画像 ===== */
.omamori-list {
  list-style: none;            /* リストの「・」を消す */
  margin: 32px 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;  /* スマホでは1列（縦に並ぶ） */
  gap: 8px;
  justify-items: center;       /* 画像を真ん中にそろえる */
}

.omamori-item {
  width: 100%;
  max-width: 240px;
  aspect-ratio: 4 / 5;         /* 元の画像と同じ縦横比の箱 */
  overflow: hidden;            /* 拡大してはみ出した部分を隠す */
}

.omamori-item img {
  width: 100%;
  height: 100%;
  /* 元の画像はまわりの余白が大きいので、お守りの部分を中心に拡大する */
  transform: scale(2.2);
  transform-origin: 50% 47%;   /* 拡大の中心（お守りがある位置） */
  /* お守りのまわりに、琥珀色のやわらかい光 */
  filter: drop-shadow(0 0 6px rgba(232, 181, 106, 0.35));
}


/* ===== ④ こんな夜に読んでください ===== */
.night-list {
  list-style: none;            /* リストの「・」を消す */
  margin: 0;
  padding: 0;
  display: grid;               /* グリッド：カードをマス目に並べる */
  grid-template-columns: 1fr;  /* スマホでは1列 */
  gap: 16px;
}

.night-card {
  position: relative;
  padding: 22px 20px 18px 44px;
  background: var(--indigo-light);
  border: 1px solid var(--gold-line);
  border-radius: 6px;
}

/* カード左上の小さな星 */
.night-card::before {
  content: "✦";
  position: absolute;
  top: 22px;
  left: 18px;
  color: var(--amber);
  font-size: 0.85rem;
  line-height: 1.6;
}

.night-card h3 {
  margin: 0 0 0.4rem;
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 500;
  line-height: 1.6;
  color: var(--amber-soft);
}

.night-card p {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.9;
  color: var(--washi-dim);
}


/* ===== ⑤ Instagram ボタン ===== */
.button {
  display: inline-block;
  min-height: 48px;            /* 指で押しやすい高さ */
  margin-top: 0.5rem;
  padding: 12px 32px;
  background: var(--amber);
  color: var(--indigo);
  font-family: var(--font-heading);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-decoration: none;       /* リンクの下線を消す */
  border-radius: 999px;        /* 大きな値で両端をまるく */
  box-shadow: 0 0 24px rgba(232, 181, 106, 0.35);
  transition: background 0.3s;
}

/* マウスを乗せたとき・キーボードで選んだときの見た目 */
.button:hover,
.button:focus-visible {
  background: var(--amber-soft);
}

.account {
  margin-top: 1rem;
  font-size: 0.85rem;
  color: var(--washi-dim);
}


/* ===== ⑥ 本のお知らせ ===== */
/* 和綴じ本風の表紙 */
.book {
  position: relative;
  width: 140px;
  height: 196px;
  margin: 8px auto 28px;
  background: linear-gradient(135deg, #1d2d57, #0c1530);
  border: 1px solid var(--gold-line);
  border-radius: 2px 6px 6px 2px;
  box-shadow: 6px 8px 20px rgba(0, 0, 0, 0.45);
}

/* 右側の綴じ糸（点線で表現） */
.book::before {
  content: "";
  position: absolute;
  top: 12px;
  bottom: 12px;
  right: 12px;
  border-right: 2px dotted var(--amber);
  opacity: 0.7;
}

/* 題字を貼る短冊（和紙色の細長い紙） */
.book-title {
  position: absolute;
  top: 16px;
  left: 18px;
  padding: 10px 5px;
  writing-mode: vertical-rl;
  background: var(--washi);
  color: #3a2a14;
  font-family: var(--font-heading);
  font-size: 0.8rem;
  line-height: 1.6;
  letter-spacing: 0.15em;
  text-align: left;
}

/* 「発売予定」のラベル */
.badge {
  display: inline-block;
  padding: 2px 14px;
  border: 1px solid var(--amber);
  border-radius: 999px;
  color: var(--amber);
  font-size: 0.85rem;
}

.book-name {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  color: var(--amber-soft);
}


/* ===== ⑦ フッター ===== */
.footer {
  padding: 24px 20px 40px;
  text-align: center;
  font-size: 0.85rem;
  color: var(--washi-dim);
}

.footer p {
  margin: 0.4rem 0;
}

.footer .seigaiha {
  margin-bottom: 20px;
}


/* ===== アニメーション ===== */
/* ふわっと現れる */
@keyframes fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ゆっくり上下にゆれる */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(6px); }
}

/* 「動きを減らす」設定の人には、アニメーションを止める */
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}


/* ===== 少し広い画面（幅520px以上）での調整 ===== */
@media (min-width: 520px) {
  /* カードを2列 × 2段に並べる */
  .night-list {
    grid-template-columns: 1fr 1fr;
  }

  .section-title {
    font-size: 1.5rem;
  }
}


/* ===== 縦書きの中の数字（縦中横） ===== */
/* 「12」などを、縦書きの中で横向きに1文字分としておさめる */
.tcy {
  -webkit-text-combine: horizontal; /* 古いSafari用 */
  text-combine-upright: all;
}


/* ===== PC（幅768px以上）での調整 ===== */
@media (min-width: 768px) {
  /* お守りの画像を横に3つ並べる */
  .omamori-list {
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
  }
}
