/* ========================================
   saiのお寿司占星術 LP スタイル
   Design System: Elegant Editorial Magazine
   ref: DESIGN.md
   Colors: #FFFFFF bg / #e0e0e0 borders / #000000 text
   Font: 游明朝体 / Noto Serif JP
   Base: 62.5% (1rem = 10px)
======================================== */

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

:root {
  --color-bg:      #FFFFFF;
  --color-surface: #f7f7f7;
  --color-border:  #e0e0e0;
  --color-border2: #dedede;
  --color-text:    #000000;
  --color-sub:     #444444;
  --color-muted:   #888888;
  --font-sans:    "Lato", "Zen Kaku Gothic New", "Noto Sans JP", sans-serif;
  --max-width: 1100px;
  --pad-x: 48px;
}

html {
  font-size: 62.5%; /* 1rem = 10px */
  scroll-behavior: smooth;
  scroll-padding-top: 56px; /* sticky header height */
  overflow-x: hidden;
}

body {
  font-family: var(--font-sans);
  background: var(--color-bg);
  color: var(--color-text);
  font-size: 1.6rem;
  line-height: 1.75;
  letter-spacing: 0.08rem;
  overflow-x: hidden;
  opacity: 0;
  transition: opacity 0.5s ease;  
}

body.is-loaded {
  opacity: 1;
}

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

/* ========== ヘッダー ========== */
.header {
  position: sticky;
  top: 0;
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
  z-index: 100;
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 16px var(--pad-x);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-family: var(--font-sans);
  font-size: 1.6rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  color: var(--color-text);
  text-decoration: none;
  border: none;
}

.nav a {
  font-family: var(--font-sans);
  font-size: 1.1rem;
  letter-spacing: 0.15em;
  color: var(--color-text);
  text-decoration: none;
  margin-left: 32px;
  opacity: 0.65;
  transition: opacity 0.2s;
}

.nav a:hover {
  opacity: 1;
}

/* ========== ヒーロー ========== */
.hero {
  background: #0d0d0d;
  color: #fff;
  padding: 120px var(--pad-x) 100px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--color-border);
}

.hero-bg-grid {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(9, 1fr);
  grid-template-rows: repeat(4, 1fr);
  gap: 0;
  overflow: hidden;
  pointer-events: none;
}

.hero-bg-grid img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0.12;
  filter: grayscale(30%) brightness(1.4);
  padding: 4px;
}

.hero-inner {
  max-width: 700px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.hero-eyebrow {
  font-family: var(--font-sans);
  font-size: 1.2rem;
  letter-spacing: 0.25em;
  color: rgba(255,255,255,0.4);
  margin-bottom: 24px;
}

.hero-title {
  font-family: var(--font-sans);
  font-size: 4.8rem;
  font-weight: 400;
  line-height: 1.55;
  margin-bottom: 32px;
  color: #fff;
  letter-spacing: 0.1em;
}

/* タイピングアニメーション */
.module-title {
  font-family: var(--font-sans);
  font-size: 3.2rem;
  font-weight: 300;
  letter-spacing: 0.35em;
  color: rgba(255,255,255,0.35);
  height: 5.5rem;
  margin-bottom: 16px;
  transition: opacity 0.3s;
}

.hero-desc {
  font-size: 1.5rem;
  color: rgba(255,255,255,0.55);
  line-height: 1.9;
  letter-spacing: 0.06em;
  margin-bottom: 52px;
}


/* ========== ボタン ========== */
.btn-primary {
  display: inline-block;
  background: #fff;
  color: #000;
  font-family: var(--font-sans);
  font-size: 1.3rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  padding: 16px 44px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.25s, color 0.25s;
}

.btn-primary:hover {
  background: #e8e8e8;
}

/* ツールセクション内は黒地ボタン */
.tool .btn-primary {
  background: #000;
  color: #fff;
}

.tool .btn-primary:hover {
  background: #222;
}

.btn-secondary {
  display: inline-block;
  background: transparent;
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: 1.3rem;
  letter-spacing: 0.12em;
  padding: 14px 36px;
  border: 1px solid var(--color-border2);
  text-decoration: none;
  transition: background 0.25s, color 0.25s, border-color 0.25s;
}

.btn-secondary:hover {
  background: var(--color-text);
  color: #fff;
  border-color: var(--color-text);
}


/* ========== セクション共通 ========== */
.section-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 88px var(--pad-x);
}

.section-tag {
  font-family: var(--font-sans);
  font-size: 1.1rem;
  letter-spacing: 0.3em;
  color: var(--color-muted);
  margin-bottom: 12px;
}

.section-title {
  font-family: var(--font-sans);
  font-size: 2.5rem;
  font-weight: 400;
  line-height: 1.6;
  color: var(--color-text);
  margin-bottom: 16px;
}

.section-desc {
  font-size: 1.5rem;
  color: var(--color-sub);
  line-height: 1.8;
  margin-bottom: 40px;
}

.divider-line {
  height: 1px;
  background: var(--color-border);
}

/* ========== ハーフレイアウト ========== */
.half-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}

.half-layout--reverse {
  direction: rtl;
}

.half-layout--reverse > * {
  direction: ltr;
}

/* ========== 診断ツール ========== */
.tool {
  background: var(--color-surface);
}

.tool-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 380px;
  margin-top: 8px;
}

.tool-form label {
  font-family: var(--font-sans);
  font-size: 1.2rem;
  letter-spacing: 0.08em;
  color: var(--color-sub);
}

.birthdate-select-group {
  display: grid;
  grid-template-columns: 2fr 1.5fr 1.5fr;
  gap: 8px;
}

.tool-form select {
  font-family: var(--font-sans);
  font-size: 1.6rem;
  padding: 14px 18px;
  border: 1px solid var(--color-border);
  background: var(--color-bg);
  color: var(--color-text);
  outline: none;
  border-radius: 0;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23888' d='M6 8L0 2l1.4-1.4L6 5.2 10.6.6 12 2z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 18px center;
  background-size: 10px;
  transition: border-color 0.2s;
  cursor: pointer;
}

.tool-form select:focus {
  border-color: var(--color-text);
}

.tool-form select:invalid {
  color: var(--color-muted);
}


/* 診断結果 */
.tool-result {
  padding: 40px 36px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-bg);
  animation: fadeUp 0.6s ease;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.result-image {
  text-align: center;
  margin-bottom: 20px;
}

.result-chara-img {
  width: 260px;
  height: 260px;
  object-fit: contain;
  margin: 0 auto;
  filter: drop-shadow(0 8px 24px rgba(0,0,0,0.12));
  animation: revealChara 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.result-syuku {
  font-family: var(--font-sans);
  font-size: 1.6rem;
  font-weight: 400;
  color: var(--color-sub);
  text-align: center;
  margin-bottom: 20px;
  line-height: 2;
}

.result-syuku__neta {
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: 0.04em;
  vertical-align: baseline;
}

.result-trait {
  font-size: 1.5rem;
  line-height: 1.9;
  color: var(--color-sub);
  margin-bottom: 32px;
  text-align: left;
}

.result-cta {
  text-align: center;
}

/* 診断前プレースホルダー */
.tool-placeholder {
  border: 1px solid var(--color-border);
  border-radius: 8px;
  min-height: 280px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  background: var(--color-bg);
  padding: 32px 24px;
}

.placeholder-silhouettes {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 16px;
}

.placeholder-sil {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.placeholder-sil img {
  width: 80px;
  height: 80px;
  object-fit: contain;
  filter: brightness(0) opacity(0.18) blur(1px);
}

.placeholder-sil--center img {
  width: 104px;
  height: 104px;
}

.placeholder-sil span {
  font-family: var(--font-sans);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--color-border2);
  letter-spacing: 0.1em;
}

.placeholder-hint {
  font-family: var(--font-sans);
  font-size: 1.3rem;
  color: var(--color-muted);
  letter-spacing: 0.08em;
  text-align: center;
}

/* 診断結果表示時：キャラがシルエット→カラーへ */
.result-chara-img {
  animation: revealChara 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes revealChara {
  from {
    opacity: 0;
    filter: brightness(0) blur(8px);
    transform: scale(0.85);
  }
  60% {
    filter: brightness(0.4) blur(2px);
  }
  to {
    opacity: 1;
    filter: brightness(1) blur(0);
    transform: scale(1);
  }
}

/* ========== 27タイプ一覧 ========== */
.all-types-head {
  margin-bottom: 48px;
}

.all-types .section-inner {
  overflow: hidden;
}

.types-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  border-top: 1px solid var(--color-border);
  border-left: 1px solid var(--color-border);
  align-items: stretch;
  width: 100%;
  min-width: 0;
}

.type-card {
  background: var(--color-bg);
  border-right: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  padding: 28px 20px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  cursor: default;
  transition: box-shadow 0.25s, background 0.25s;
  position: relative;
  z-index: 0;
  min-width: 0;
  overflow: hidden;
}

.type-card:hover {
  z-index: 1;
  box-shadow: 0 4px 24px rgba(0,0,0,0.10);
  background: var(--color-surface);
}

.type-card {
  aspect-ratio: 1 / 1;
  justify-content: center;
}

.type-card__img {
  width: 68%;
  height: auto;
  object-fit: contain;
  display: block;
  margin-bottom: 12px;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.type-card:hover .type-card__img {
  transform: scale(1.1) translateY(-4px);
}

.type-card__neta {
  font-family: var(--font-sans);
  font-size: 1.4rem;
  font-weight: 500;
  color: var(--color-text);
  text-align: center;
}

.type-card {
  cursor: pointer;
}

@media (max-width: 1000px) {
  .types-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 700px) {
  .types-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .type-card {
    padding: 16px 8px 12px;
  }
  .type-card__neta {
    font-size: 1.1rem;
  }
}

@media (max-width: 480px) {
  .types-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .type-card {
    padding: 20px 12px 16px;
  }
  .type-card__neta {
    font-size: 1.3rem;
  }
}

/* ========== About ========== */
.about-text p {
  font-size: 1.6rem;
  line-height: 1.9;
  margin-bottom: 1.4em;
  color: var(--color-sub);
}

.about-text p:last-child {
  margin-bottom: 0;
}

.about-visual {
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.about-avatar-img {
  width: 100%;
  max-width: 420px;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: top;
}

.about-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

@media (max-width: 900px) {
  .about-visual {
    justify-content: center;
  }
  .about-avatar-img {
    max-width: 240px;
    aspect-ratio: auto;
  }
}

/* ========== メニュー ========== */
.bg {
  background: var(--color-surface);
}

.menu-head {
  margin-bottom: 40px;
}

/* ========== キャラクターパレード ========== */
.chara-parade {
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
  overflow: hidden;
  padding: 32px 0;
}

.chara-track {
  display: flex;
  width: max-content;
  animation: chara-scroll 40s linear infinite;
  gap: 0;
}

@keyframes chara-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

.chara-item {
  display: flex;
  align-items: center;
  padding: 0 12px;
  flex-shrink: 0;
}

.chara-item img {
  width: 52px;
  height: 52px;
  object-fit: contain;
  display: block;
}

/* ========== フォーチュンカード ========== */
.fortune-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  overflow: hidden;
  background: var(--color-bg);
  text-decoration: none;
  color: var(--color-text);
  transition: box-shadow 0.25s, border-color 0.25s;
  height: 100%;
}

.fortune-card:hover {
  border-color: #aaaaaa;
  box-shadow: 0 4px 20px rgba(0,0,0,0.10);
}

.fortune-card__image {
  background: var(--color-surface);
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid var(--color-border);
  overflow: hidden;
}

.fortune-card__chara {
  width: 120px;
  height: 120px;
  object-fit: contain;
  display: block;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.fortune-card:hover .fortune-card__chara {
  transform: scale(1.12) translateY(-4px);
}

.fortune-card__tag {
  font-family: var(--font-sans);
  font-size: 1.0rem;
  letter-spacing: 0.25em;
  color: var(--color-muted);
  padding: 20px 20px 0;
}

.fortune-card__title {
  font-family: var(--font-sans);
  font-size: 1.6rem;
  font-weight: 400;
  line-height: 1.5;
  padding: 8px 20px 0;
}

.fortune-card__desc {
  font-family: var(--font-sans);
  font-size: 1.3rem;
  color: var(--color-muted);
  line-height: 1.6;
  padding: 8px 20px 24px;
}

/* ========== Swiper カスタム ========== */
.menu-swiper {
  padding-bottom: 40px !important;
}

.swiper-slide {
  height: auto;
  box-sizing: border-box;
}

.swiper-slide .fortune-card {
  width: 100%;
}

.swiper-pagination-bullet {
  background: var(--color-border2);
  opacity: 1;
}

.swiper-pagination-bullet-active {
  background: var(--color-text);
}

/* ========== フッター ========== */
.footer {
  background: #000;
  color: rgba(255,255,255,0.35);
  text-align: center;
  padding: 36px 20px;
  font-family: var(--font-sans);
  font-size: 1.2rem;
  letter-spacing: 0.15em;
}

/* ========== スクロールリビール ========== */
.reveal {
  opacity: 0;
  transition: opacity 0.7s ease;
}

.reveal.is-visible {
  opacity: 1;
}

/* ========== レスポンシブ ========== */
@media (max-width: 900px) {
  :root {
    --pad-x: 32px;
  }

  .half-layout {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .half-layout--reverse {
    direction: ltr;
  }

  .hero-title {
    font-size: 3.8rem;
  }
}

@media (max-width: 600px) {
  :root {
    --pad-x: 20px;
  }

  .hero-bg-grid {
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(4, 1fr);
  }

  .header-inner {
    padding: 12px 16px;
    flex-wrap: wrap;
    gap: 8px;
  }

  .nav {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 0;
  }

  .nav a {
    margin-left: 12px;
    font-size: 1.0rem;
  }

  .nav a:first-child {
    margin-left: 0;
  }

  .hero {
    padding: 72px var(--pad-x) 64px;
  }

  .hero-title {
    font-size: 3.0rem;
  }

  .module-title {
    font-size: 2.2rem;
  }

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

  .section-inner {
    padding: 60px var(--pad-x);
  }

  .tool-result {
    padding: 28px 20px;
  }

  .tool-form {
    max-width: 100%;
  }

  .birthdate-select-group {
    grid-template-columns: 1fr 1fr 1fr;
  }

  .tool-form select {
    font-size: 1.4rem;
    padding: 12px 10px;
    padding-right: 28px;
    background-position: right 10px center;
  }
}

/* ========== モーダル ========== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
}

.modal-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  background: var(--color-bg);
  width: 420px;
  position: relative;
  border: 1px solid var(--color-border);
  transform: translateY(16px) scale(0.97);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-overlay.is-open .modal-card {
  transform: translateY(0) scale(1);
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: none;
  border: none;
  font-size: 1.3rem;
  color: var(--color-muted);
  cursor: pointer;
  line-height: 1;
  padding: 4px 6px;
  transition: color 0.2s;
  z-index: 1;
}

.modal-close:hover {
  color: var(--color-text);
}

.modal-img-wrap {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 24px;
}

.modal-img {
  width: 200px;
  height: 200px;
  object-fit: contain;
  display: block;
}

.modal-info {
  padding: 28px 32px 32px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.modal-neta {
  font-size: 2.6rem;
  font-weight: 500;
  color: var(--color-text);
  line-height: 1.3;
  margin-top: 2px;
}

.modal-divider {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: 14px 0;
}

.modal-trait {
  font-size: 1.5rem;
  line-height: 1.9;
  color: var(--color-sub);
}

.modal-cta {
  margin-top: 20px;
  width: 100%;
  text-align: center;
  background: #000;
  color: #fff;
}

.modal-cta:hover {
  background: #222;
}

@media (max-width: 400px) {
  .modal-card {
    width: 100%;
  }
}

/* ========== シェアボタン ========== */
.share-buttons-container {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--color-border);
  animation: fadeUp 0.6s ease 0.2s backwards;
}

.share-title {
  font-family: var(--font-sans);
  font-size: 1.1rem;
  letter-spacing: 0.15em;
  color: var(--color-muted);
  text-align: center;
  margin-bottom: 16px;
}

.share-buttons {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.share-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: 999px;
  border: none;
  text-decoration: none;
  font-size: 1.2rem;
  font-weight: 500;
  transition: opacity 0.2s;
}

.share-button:hover {
  opacity: 0.8;
}

.share-button svg {
  width: 13px;
  height: 13px;
}

/* X (Twitter) Button */
.share-button--x {
  color: #fff;
  background-color: #000;
}

.share-button--x svg {
  fill: #fff;
}

/* LINE Button */
.share-button--line {
  color: #fff;
  background-color: #06C755;
  border-color: #06C755;
}

.share-button--line:hover {
  opacity: 0.85;
}

.share-button--line svg {
  fill: #fff;
}
