/* =========================================================
   12星座の星花占い — style.css
   Palette: Gold #C49B4A / Gold-light #E0BF7A / Ivory #FAF6EC
            Navy #1A2238 / Navy-deep #101626 / Red #A32A2D
   Type: 見出し = Noto Serif JP / 本文 = Noto Sans JP
   ========================================================= */

:root{
  --gold: #c49b4a;
  --gold-light: #e0bf7a;
  --gold-pale: #f3e3c2;
  --rose: #d98a97;
  --rose-light: #eeb4bd;
  --rose-deep: #b96575;
  --rose-pale: #f8e4e7;
  --violet: #7a5a9e;
  --violet-deep: #4a3468;
  --violet-light: #b79bd6;
  --glow-pink: #ff9fb0;
  --ivory: #faf6ec;
  --ivory-deep: #f1ead9;
  --navy: #1a2238;
  --navy-deep: #101626;
  --red: #a32a2d;
  --white: #ffffff;
  --ink: #2b2620;
  --ink-soft: #5b5548;

  --font-serif: "Noto Serif JP", serif;
  --font-sans: "Noto Sans JP", sans-serif;

  --lp-width: 480px;
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 10px;
  --shadow-soft: 0 10px 30px rgba(16,22,38,0.12);
}

*{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }
body{
  margin:0;
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--navy-deep);
  -webkit-font-smoothing: antialiased;
}
img{ max-width:100%; display:block; }
a{ color: inherit; }
ul{ margin:0; padding:0; list-style:none; }
button{ font-family: inherit; cursor:pointer; }
:focus-visible{ outline: 2px solid var(--gold-light); outline-offset: 3px; }

/* ---------- page shell (centers mobile-width LP on desktop) ---------- */
.page{
  max-width: var(--lp-width);
  margin: 0 auto;
  background: var(--ivory);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}
@media (min-width: 640px){
  body{ padding: 32px 0; }
  .page{ border-radius: 28px; overflow: hidden; }
}

/* ---------- shared section rhythm ---------- */
.section{
  position: relative;
  padding: 64px 24px 56px;
}
.section__eyebrow{
  font-family: var(--font-serif);
  font-size: 12px;
  letter-spacing: 0.28em;
  color: var(--violet);
  text-align: center;
  margin: 0 0 10px;
}
.section__eyebrow::before, .section__eyebrow::after{
  content: "✦";
  color: var(--rose-deep);
  font-size: 9px;
  margin: 0 8px;
  vertical-align: middle;
}
.section__title{
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 24px;
  line-height: 1.6;
  text-align: center;
  color: var(--navy);
  margin: 0 0 16px;
}
.section__title--sm{ font-size: 20px; }
.section__lead{
  text-align: center;
  font-size: 14.5px;
  line-height: 1.9;
  color: var(--ink-soft);
  max-width: 34em;
  margin: 0 auto 36px;
}

/* =========================================================
   1. ファーストビュー
   ========================================================= */
.visually-hidden{
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

.masthead{ display: none; } /* ロゴは新しい背景画像に統合済み */

.hero{
  position: relative;
  line-height: 0; /* 画像下の余白隙間を防ぐ */
  background: var(--navy-deep);
}
.hero__img{
  width: 100%;
  height: auto;
  display: block;
}
.hero__cta-overlay{
  position: absolute;
  left: 50%;
  top: 90%;
  transform: translate(-50%, -50%);
  width: 68%;
  max-width: 380px;
  display: block;
  transition: transform .18s ease, filter .18s ease;
}
.hero__cta-overlay img{ width: 100%; display: block; }
.hero__cta-overlay:hover{ filter: brightness(1.06); }
.hero__cta-overlay:active{ transform: translate(-50%, -50%) scale(0.97); }

/* ---------- CTA buttons ---------- */
.cta{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  max-width: 340px;
  padding: 18px 28px;
  border-radius: 999px;
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.04em;
  text-decoration: none;
  border: none;
  transition: transform .18s ease, box-shadow .18s ease;
}
.cta:active{ transform: scale(0.98); }

.cta__arrow{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px; height: 24px;
  border-radius: 999px;
  background: rgba(255,255,255,0.55);
  font-size: 16px;
  line-height: 1;
  flex: none;
}

.cta--primary{
  background: linear-gradient(135deg, var(--rose-light), var(--rose-deep));
  color: var(--navy-deep);
  box-shadow: 0 14px 30px rgba(185,101,117,0.42);
  position: relative;
}
.cta--primary::before{
  content:"";
  position:absolute; inset:-2px;
  border-radius: inherit;
  border: 1px solid rgba(255,255,255,0.6);
  pointer-events:none;
}
.cta--primary:hover{ box-shadow: 0 18px 36px rgba(185,101,117,0.52); }

.cta--line{
  width: 100%;
  max-width: 360px;
  margin: 30px auto 0;
  padding: 17px 24px;
  background: #06c755;
  color: var(--white);
  box-shadow: 0 12px 26px rgba(6,199,116,0.32);
  border: 2px solid var(--gold-light);
  font-size: 15.5px;
}
.cta--line:hover{ box-shadow: 0 16px 32px rgba(6,199,116,0.4); }
.cta--line:disabled{ opacity: 0.6; box-shadow: none; }
.cta--line__icon{ width: 22px; height: 22px; flex: none; }

/* 上品な光沢（動きのない、静かなハイライト） */
.cta--primary{ overflow: hidden; }
.cta--primary::after{
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 52%;
  background: linear-gradient(180deg, rgba(255,255,255,0.45), transparent);
  pointer-events: none;
}

/* =========================================================
   Washi background wrap (sections 2〜18)
   ========================================================= */
.washi-wrap{
  position: relative;
  background: var(--ivory);
}
.washi-bg{
  position: absolute;
  inset: 0;
  background-size: cover;
  background-repeat: repeat-y;
  opacity: 0.9;
  z-index: 0;
}
.washi-wrap > .section{ z-index: 1; }

/* section divider flourish（花紋章、ローズの光） */
.section::before{
  content: "❀";
  display: block;
  text-align: center;
  font-size: 18px;
  color: var(--rose-deep);
  margin: 0 auto 16px;
  text-shadow: 0 0 16px rgba(217,138,151,0.45);
}

/* =========================================================
   2. 誕生月の花を選択するエリア
   ========================================================= */
.flower-grid{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.flower-btn{
  background: var(--white);
  border: 1px solid var(--ivory-deep);
  border-radius: var(--radius-md);
  padding: 8px 6px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  box-shadow: 0 4px 14px rgba(26,34,56,0.06);
  transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.flower-btn img{
  width: 100%;
  aspect-ratio: 1/1;
  border-radius: 999px;
  object-fit: cover;
  margin-bottom: 2px;
  border: 2px solid var(--gold-light);
  display: block;
}
.flower-btn__imgwrap{ position: relative; width: 100%; display: block; }
.flower-btn__check{
  position: absolute;
  top: -2px; right: -2px;
  width: 22px; height: 22px;
  border-radius: 999px;
  background: var(--rose-deep);
  color: var(--white);
  font-size: 12px;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  opacity: 0;
  transform: scale(0.6);
  transition: opacity .18s ease, transform .18s ease;
  box-shadow: 0 3px 8px rgba(0,0,0,0.2);
}
.flower-btn.is-selected .flower-btn__check{ opacity: 1; transform: scale(1); }
.flower-btn__name{
  font-size: 11.5px;
  color: var(--navy);
  line-height: 1.3;
  text-align: center;
}
.flower-btn:hover{ transform: translateY(-3px); box-shadow: 0 10px 22px rgba(26,34,56,0.12); }
.flower-btn.is-selected{
  border-color: var(--rose-deep);
  box-shadow: 0 0 0 2px var(--rose-deep), 0 10px 24px rgba(185,101,117,0.32);
  background: linear-gradient(180deg, var(--rose-pale), var(--white));
  animation: selectedGlow 2.2s ease-in-out infinite;
}
@keyframes selectedGlow{
  0%, 100%{ box-shadow: 0 0 0 2px var(--rose-deep), 0 10px 24px rgba(185,101,117,0.32); }
  50%{ box-shadow: 0 0 0 3px var(--rose-deep), 0 12px 30px rgba(185,101,117,0.5); }
}
.flower-btn.is-selected .flower-btn__name{ font-weight: 700; }

/* ---------- 選択した花の大きな画像を表示するリビール ---------- */
.flower-reveal{
  margin-top: 28px;
  text-align: center;
  background: linear-gradient(180deg, var(--white), var(--rose-pale));
  border: 1px solid var(--ivory-deep);
  border-radius: var(--radius-lg);
  padding: 26px 22px 28px;
  box-shadow: 0 14px 30px rgba(26,34,56,0.10);
}
.flower-reveal--replay{ animation: revealIn .55s cubic-bezier(.2,.8,.2,1); }
@keyframes revealIn{
  from{ opacity: 0; transform: translateY(10px) scale(0.98); }
  to{ opacity: 1; transform: translateY(0) scale(1); }
}
.flower-reveal__img{
  width: min(280px, 72%);
  aspect-ratio: 1/1;
  border-radius: 999px;
  object-fit: cover;
  margin: 0 auto 16px;
  border: 3px solid var(--rose-deep);
  box-shadow: 0 10px 26px rgba(185,101,117,0.3);
}
.flower-reveal__name{
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 20px;
  color: var(--navy);
  margin: 0 0 8px;
}
.flower-reveal__lang{
  font-size: 13px;
  color: var(--ink-soft);
  margin: 0 0 20px;
}
.flower-reveal__continue{ margin: 0 auto; max-width: 300px; padding: 15px 24px; font-size: 14.5px; }

@media (prefers-reduced-motion: reduce){
  .flower-reveal{ animation: none; }
  .flower-btn.is-selected{ animation: none; }
}

/* =========================================================
   8. 口コミ・期待感エリア
   ========================================================= */
.reviews{ padding-top: 48px; padding-bottom: 40px; }
.review-grid{
  display: grid;
  gap: 14px;
}
.review-card{
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: var(--white);
  border: 1px solid var(--ivory-deep);
  border-radius: var(--radius-md);
  padding: 18px 18px;
  box-shadow: 0 6px 18px rgba(26,34,56,0.05);
  text-align: left;
}
.review-card__avatar{
  flex: none;
  width: 40px; height: 40px;
  border-radius: 999px;
  display:flex; align-items:center; justify-content:center;
  font-family: var(--font-serif);
  font-size: 14px;
  font-weight: 700;
  color: var(--white);
}
.review-card__avatar--rose{ background: linear-gradient(135deg, #a32a2d, #d97a72); }
.review-card__avatar--gold{ background: linear-gradient(135deg, var(--gold), var(--gold-light)); }
.review-card__avatar--navy{ background: linear-gradient(135deg, var(--navy), #3a4670); }
.review-card__body{ flex: 1; min-width: 0; }
.review-card__quote{
  margin: 0 0 8px;
  font-size: 13.5px;
  line-height: 1.8;
  color: var(--ink);
}
.review-card__persona{
  margin: 0;
  font-size: 11.5px;
  color: var(--gold);
  font-family: var(--font-serif);
  letter-spacing: 0.04em;
}

/* =========================================================
   9. 鑑定説明エリア
   ========================================================= */
.explain{
  background: linear-gradient(160deg, var(--navy) 0%, var(--violet-deep) 100%);
  background-image:
    radial-gradient(1.5px 1.5px at 12% 22%, rgba(255,255,255,0.5), transparent),
    radial-gradient(1.5px 1.5px at 85% 18%, rgba(255,255,255,0.4), transparent),
    radial-gradient(1.5px 1.5px at 70% 70%, rgba(255,255,255,0.35), transparent),
    radial-gradient(1.5px 1.5px at 25% 80%, rgba(255,255,255,0.4), transparent),
    linear-gradient(160deg, var(--navy) 0%, var(--violet-deep) 100%);
  color: var(--ivory);
  border-radius: 0;
}
.explain .section__eyebrow{ color: var(--rose-light); }
.explain .section__eyebrow::before, .explain .section__eyebrow::after{ color: var(--rose-light); }
.explain .section__title{ color: var(--ivory); }
.explain__body p{
  font-size: 14.5px;
  line-height: 2;
  color: rgba(250,246,236,0.85);
  text-align: center;
  max-width: 32em;
  margin: 0 auto 16px;
}
.explain__highlight{
  font-family: var(--font-serif);
  color: var(--rose-light) !important;
  font-weight: 700;
  font-size: 15px !important;
}

/* =========================================================
   10. 入力フォーム
   ========================================================= */
.form-section{ padding-top: 56px; position: relative; }
.form-section::after{
  content: "";
  position: absolute;
  top: 14px; left: 8px;
  width: 64px; height: 64px;
  background-image: url("assets/corner_ornament.png");
  background-size: contain;
  background-repeat: no-repeat;
  opacity: 0.85;
  pointer-events: none;
}
.fortune-form{ display: flex; flex-direction: column; gap: 26px; }

.field__label{
  display: block;
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 14.5px;
  color: var(--navy);
  margin-bottom: 10px;
}
.req{
  display: inline-block;
  margin-left: 8px;
  font-family: var(--font-sans);
  font-size: 10.5px;
  font-weight: 700;
  color: var(--white);
  background: var(--red);
  border-radius: 4px;
  padding: 2px 6px;
  vertical-align: middle;
}
.field__hint{ margin: 8px 2px 0; font-size: 12px; color: var(--ink-soft); }

.input, .select{
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--ivory-deep);
  background: var(--white);
  border-radius: var(--radius-sm);
  font-size: 16px; /* 16px未満だとiOS Safariが自動ズームしてしまうため固定 */
  color: var(--ink);
  font-family: var(--font-sans);
}
.input:focus, .select:focus{ border-color: var(--gold); box-shadow: 0 0 0 3px rgba(196,155,74,0.15); }

.select{
  appearance: none;
  -webkit-appearance: none;
  padding-right: 38px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none'><path d='M5 7.5L10 12.5L15 7.5' stroke='%23C49B4A' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 16px;
}

.date-group{
  display: grid;
  grid-template-columns: 1.15fr 1fr 1fr;
  gap: 8px;
}
.date-col{ display: flex; flex-direction: column; gap: 6px; }
.date-col__label{
  font-size: 11px;
  color: var(--ink-soft);
  text-align: center;
  letter-spacing: 0.08em;
}
.date-col .select{ padding-left: 10px; padding-right: 30px; text-align: center; text-align-last: center; }

.radio-group{ display: flex; gap: 10px; flex-wrap: wrap; }
.radio-pill{
  position: relative;
  flex: 1 1 auto;
  min-width: 92px;
}
.radio-pill input{
  position: absolute;
  opacity: 0;
  inset: 0;
  width: 100%; height: 100%;
  margin:0;
  cursor: pointer;
}
.radio-pill span{
  display: block;
  text-align: center;
  padding: 13px 10px;
  border: 1px solid var(--ivory-deep);
  border-radius: 999px;
  font-size: 13.5px;
  background: var(--white);
  color: var(--ink);
  transition: all .15s ease;
}
.radio-pill input:checked + span{
  background: var(--navy);
  border-color: var(--navy);
  color: var(--gold-light);
  font-weight: 700;
}
.radio-pill input:focus-visible + span{ outline: 2px solid var(--gold); outline-offset: 2px; }

.field__flower-display{
  display: flex;
  align-items: center;
  gap: 14px;
  border: 1px dashed var(--gold);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  background: var(--gold-pale);
  min-height: 64px;
}
.field__flower-display img{ width: 48px; height: 48px; border-radius: 999px; object-fit: cover; }
.field__flower-placeholder{ font-size: 13px; color: var(--ink-soft); }
.field__flower-display .flower-name{ font-family: var(--font-serif); font-weight: 700; color: var(--navy); }
.field__flower-display .flower-lang{ display:block; font-size: 12px; color: var(--ink-soft); margin-top: 2px; }

.field__zodiac-display{
  border-radius: var(--radius-md);
  border: 1px solid var(--ivory-deep);
  background: var(--white);
  padding: 14px 16px;
  font-size: 14px;
  color: var(--ink-soft);
  text-align: center;
}
.field__zodiac-display.is-active{
  color: var(--navy);
  font-weight: 700;
  font-family: var(--font-serif);
  border-color: var(--gold);
  background: var(--gold-pale);
}

.preview{
  background: linear-gradient(160deg, var(--navy) 0%, var(--violet-deep) 130%);
  color: var(--ivory);
  border-radius: var(--radius-lg);
  padding: 24px 22px;
  position: relative;
  overflow: hidden;
}
.preview::after{
  content:"";
  position: absolute; inset: 0;
  border: 1px solid rgba(238,180,189,0.4);
  border-radius: inherit;
  pointer-events: none;
}
.preview__eyebrow{
  font-family: var(--font-serif);
  font-size: 11px;
  letter-spacing: 0.24em;
  color: var(--rose-light);
  margin: 0 0 12px;
}
.preview__text{
  font-size: 14.5px;
  line-height: 2;
  margin: 0 0 14px;
  white-space: pre-line;
}
.preview__more{
  font-size: 12.5px;
  color: var(--rose-pale);
  margin: 0;
  border-top: 1px solid rgba(238,180,189,0.3);
  padding-top: 12px;
}

.form-error{
  background: #fbeceb;
  border: 1px solid var(--red);
  color: var(--red);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 13px;
  text-align: center;
}

.form-note{
  text-align: center;
  font-size: 12px;
  color: var(--ink-soft);
  margin: 14px 0 0;
}

/* =========================================================
   18. 個人情報・注意書き
   ========================================================= */
.legal{ padding-top: 40px; }
.legal__list li{
  font-size: 11.5px;
  line-height: 1.9;
  color: var(--ink-soft);
  margin-bottom: 10px;
  padding-left: 1.1em;
  position: relative;
}
.legal__list li::before{
  content: "・";
  position: absolute; left: 0;
}
.legal__list a{ color: var(--gold); text-decoration: underline; }
.footer-copy{
  text-align: center;
  font-size: 11px;
  color: var(--ink-soft);
  opacity: .7;
  margin: 28px 0 0;
}

/* =========================================================
   loading overlay
   ========================================================= */
.loading-overlay{
  position: fixed;
  inset: 0;
  background: rgba(16,22,38,0.82);
  z-index: 999;
}
.loading-overlay[hidden]{ display: none; }
.loading-overlay:not([hidden]){ display: flex; align-items: center; justify-content: center; }
.loading-overlay__inner{ text-align: center; color: var(--ivory); }
.loading-overlay__inner p{ margin-top: 16px; font-size: 13px; letter-spacing: 0.05em; }
.loading-spinner{
  width: 40px; height: 40px;
  border-radius: 999px;
  border: 3px solid rgba(224,191,122,0.25);
  border-top-color: var(--gold-light);
  margin: 0 auto;
  animation: spin 0.9s linear infinite;
}
@keyframes spin{ to{ transform: rotate(360deg); } }

/* =========================================================
   scroll reveal（控えめなフェード＋わずかな上昇）
   ========================================================= */
.reveal{
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .7s ease, transform .7s ease;
}
.reveal.is-visible{ opacity: 1; transform: translateY(0); }

/* =========================================================
   motion preference
   ========================================================= */
@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior: auto; }
  .loading-spinner, .cta--primary::after{ animation: none; }
  .reveal{ opacity: 1; transform: none; transition: none; }
}
