@import url('https://fonts.googleapis.com/css2?family=Zen+Maru+Gothic:wght@400;500;700&family=Caveat:wght@500;700&display=swap');

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

:root {
  /* Pacific Dawn カラーパレット */
  --ocean-deep: #0a1628;
  --ocean-mid: #132744;
  --ocean-surface: #1e3a5f;
  --wave-foam: #e8f4f8;
  --sand-light: #f5ebe0;
  --sand-warm: #d5c4a1;
  --sunrise-orange: #f4a261;
  --sunrise-coral: #e76f51;
  --sunrise-gold: #e9c46a;
  --sky-soft: #a8d5e5;

  /* タイポグラフィ */
  --font-main: "Zen Maru Gothic", "Hiragino Kaku Gothic ProN", sans-serif;
  --font-accent: "Caveat", cursive;

  /* スペーシング */
  --slide-padding: 80px;
}

html {
  scroll-behavior: smooth;
}

/* =====================================
   ローディング画面
===================================== */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--ocean-deep);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

.loading-overlay.hidden {
  opacity: 0;
  visibility: hidden;
}

.loading-content {
  text-align: center;
}

.loading-spinner {
  width: 50px;
  height: 50px;
  border: 3px solid rgba(168, 213, 229, 0.2);
  border-top-color: var(--sunrise-orange);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 1.5rem;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.loading-text {
  font-family: var(--font-accent);
  font-size: 1.2rem;
  color: var(--sky-soft);
  letter-spacing: 0.05em;
}

body {
  font-family: var(--font-main);
  background: var(--ocean-deep);
  color: var(--wave-foam);
  font-weight: 400;
  line-height: 1.7;
}

/* =====================================
   スライドコンテナ
===================================== */
.slides-container {
  height: 100vh;
  overflow-y: scroll;
  scroll-snap-type: y mandatory;
}

.slide {
  height: 100vh;
  scroll-snap-align: start;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--slide-padding);
  position: relative;
  overflow: hidden;
}

/* 波の背景パターン */
.slide::before {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 200px;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 320'%3E%3Cpath fill='%231e3a5f' fill-opacity='0.3' d='M0,160L48,170.7C96,181,192,203,288,186.7C384,171,480,117,576,117.3C672,117,768,171,864,186.7C960,203,1056,181,1152,154.7C1248,128,1344,96,1392,80L1440,64L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z'%3E%3C/path%3E%3C/svg%3E") no-repeat bottom;
  background-size: cover;
  opacity: 0.5;
  pointer-events: none;
  z-index: 0;
}

/* 背景グラデーションバリエーション */
.slide:nth-child(3n+1) {
  background: linear-gradient(160deg, var(--ocean-deep) 0%, var(--ocean-mid) 50%, var(--ocean-surface) 100%);
}

.slide:nth-child(3n+2) {
  background: linear-gradient(160deg, var(--ocean-mid) 0%, var(--ocean-surface) 60%, #1a4a6e 100%);
}

.slide:nth-child(3n) {
  background: linear-gradient(160deg, #0d1f35 0%, var(--ocean-mid) 50%, var(--ocean-surface) 100%);
}

.slide-content {
  max-width: 1000px;
  width: 100%;
  text-align: center;
  position: relative;
  z-index: 1;
}

/* =====================================
   タイポグラフィ
===================================== */
h1 {
  font-size: 4rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: var(--wave-foam);
  letter-spacing: 0.02em;
}

h2 {
  font-size: 2.8rem;
  font-weight: 700;
  margin-bottom: 2rem;
  color: var(--wave-foam);
  letter-spacing: 0.01em;
}

h3 {
  font-size: 1.6rem;
  font-weight: 500;
  color: var(--sky-soft);
  margin-bottom: 1rem;
}

p {
  font-size: 1.6rem;
  line-height: 2;
  color: rgba(232, 244, 248, 0.9);
}

/* =====================================
   アクセントスタイル
===================================== */
.accent {
  color: var(--sunrise-orange);
  font-weight: 700;
}

.accent-coral {
  color: var(--sunrise-coral);
}

.accent-gold {
  color: var(--sunrise-gold);
}

.handwritten {
  font-family: var(--font-accent);
  font-size: 1.2em;
  color: var(--sunrise-gold);
}

/* =====================================
   タイトルスライド専用
===================================== */
.slide-title {
  background:
    radial-gradient(ellipse at 50% 120%, rgba(244, 162, 97, 0.15) 0%, transparent 60%),
    linear-gradient(180deg, var(--ocean-deep) 0%, var(--ocean-mid) 100%);
}

.slide-title::before {
  height: 300px;
  opacity: 0.7;
}

.slide-title .logo {
  font-family: var(--font-accent);
  font-size: 5rem;
  color: var(--sunrise-orange);
  margin-bottom: 0.5rem;
  letter-spacing: 0.05em;
}

.slide-title .vol {
  font-size: 1.4rem;
  color: var(--sand-warm);
  letter-spacing: 0.3em;
  text-transform: uppercase;
  margin-bottom: 3rem;
}

.slide-title .info {
  font-size: 1.2rem;
  color: rgba(232, 244, 248, 0.6);
  margin-top: 2rem;
}

.slide-title .info span {
  display: inline-block;
  margin: 0 1rem;
}

/* =====================================
   サブタイトル・テーマスライド
===================================== */
.subtitle {
  font-size: 1.4rem;
  color: var(--sky-soft);
  margin-bottom: 0.5rem;
  letter-spacing: 0.1em;
}

.theme-text {
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--wave-foam);
  margin: 2rem 0;
  padding: 1.5rem 2rem;
  background: rgba(244, 162, 97, 0.1);
  border-left: 4px solid var(--sunrise-orange);
  display: inline-block;
}

.quote {
  font-size: 1.3rem;
  color: var(--sand-warm);
  font-style: italic;
  margin-top: 1.5rem;
}

.quote::before {
  content: "— ";
}

/* =====================================
   リスト
===================================== */
ul, ol {
  text-align: left;
  display: inline-block;
  font-size: 1.5rem;
  line-height: 2.2;
  color: rgba(232, 244, 248, 0.9);
  list-style: none;
}

ul li {
  position: relative;
  padding-left: 2rem;
  margin-bottom: 0.8rem;
}

ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.9em;
  width: 8px;
  height: 8px;
  background: var(--sunrise-orange);
  border-radius: 50%;
}

ol {
  counter-reset: step;
}

ol li {
  position: relative;
  padding-left: 3rem;
  margin-bottom: 1rem;
  counter-increment: step;
}

ol li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0.2em;
  width: 2rem;
  height: 2rem;
  background: var(--sunrise-orange);
  color: var(--ocean-deep);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 700;
}

/* =====================================
   問題・解決スライド
===================================== */
.problem-label,
.solution-label {
  font-size: 1rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
  display: inline-block;
  padding: 0.5rem 1.5rem;
  border-radius: 2rem;
}

.problem-label {
  background: rgba(231, 111, 81, 0.2);
  color: var(--sunrise-coral);
  border: 1px solid rgba(231, 111, 81, 0.4);
}

.solution-label {
  background: rgba(168, 213, 229, 0.2);
  color: var(--sky-soft);
  border: 1px solid rgba(168, 213, 229, 0.4);
}

/* =====================================
   フロー図
===================================== */
.flow {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  font-size: 1.3rem;
  margin: 2rem 0;
  padding: 2rem;
  background: rgba(30, 58, 95, 0.5);
  border-radius: 1rem;
}

.flow-item {
  background: var(--ocean-mid);
  padding: 0.8rem 1.2rem;
  border-radius: 0.5rem;
  border: 1px solid rgba(168, 213, 229, 0.3);
}

.flow-arrow {
  color: var(--sunrise-orange);
  font-size: 1.5rem;
}

.delivery-icon {
  font-size: 1.6rem;
  background: transparent;
  border: none;
}

/* =====================================
   画像プレースホルダー
===================================== */
.image-placeholder {
  background:
    linear-gradient(135deg, rgba(30, 58, 95, 0.8) 0%, rgba(19, 39, 68, 0.8) 100%);
  border: 2px dashed rgba(168, 213, 229, 0.4);
  border-radius: 1rem;
  padding: 4rem 2rem;
  margin: 2rem auto;
  max-width: 600px;
  color: var(--sky-soft);
  font-size: 1.1rem;
}

.image-placeholder::before {
  content: "📷";
  display: block;
  font-size: 2rem;
  margin-bottom: 1rem;
}

/* =====================================
   画像
===================================== */
.slide-content img {
  display: block;
  max-width: 100%;
  max-height: 40vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 0.8rem;
  margin: 1.5rem auto 0;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

/* 横長画像用 */
.slide-content img.wide {
  max-height: 35vh;
  max-width: 90%;
}

/* 縦長画像用（スマホスクショなど） */
.slide-content img.tall {
  max-height: 50vh;
  max-width: 280px;
}

/* 複数画像を横並び（狭い画面では縦並び） */
.image-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: center;
  align-items: center;
  margin-top: 1.5rem;
}

.image-row img {
  margin-top: 0;
  max-height: 45vh;
  max-width: calc(50% - 0.75rem);
}

@media (max-width: 600px) {
  .image-row img {
    max-width: 100%;
  }
}

/* =====================================
   ポイント・まとめボックス
===================================== */
.point-box {
  background: linear-gradient(135deg, rgba(244, 162, 97, 0.15) 0%, rgba(233, 196, 106, 0.1) 100%);
  border: 1px solid rgba(244, 162, 97, 0.3);
  border-radius: 1rem;
  padding: 2rem 2.5rem;
  margin: 2rem 0;
  text-align: left;
}

.point-box h3 {
  color: var(--sunrise-orange);
  margin-bottom: 1rem;
  font-size: 1.4rem;
}

.summary-box {
  background: rgba(10, 22, 40, 0.6);
  border-left: 4px solid var(--sunrise-gold);
  padding: 2rem 2.5rem;
  margin: 2rem 0;
  text-align: left;
}

/* =====================================
   比較レイアウト
===================================== */
.compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin: 2rem 0;
  text-align: left;
}

.compare-item {
  padding: 1.5rem;
  border-radius: 0.8rem;
}

.compare-before {
  background: rgba(100, 100, 100, 0.2);
  border: 1px solid rgba(150, 150, 150, 0.3);
}

.compare-after {
  background: rgba(168, 213, 229, 0.1);
  border: 1px solid rgba(168, 213, 229, 0.3);
}

.compare-label {
  font-size: 0.9rem;
  letter-spacing: 0.1em;
  margin-bottom: 0.8rem;
  opacity: 0.7;
}

/* =====================================
   ライブデモスライド
===================================== */
.demo-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  justify-content: center;
  margin: 2rem 0;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.demo-option {
  background: rgba(30, 58, 95, 0.6);
  border: 2px solid rgba(168, 213, 229, 0.3);
  border-radius: 0.8rem;
  padding: 1rem 1.5rem;
  font-size: 1.2rem;
  transition: all 0.3s ease;
}

.demo-option:hover {
  border-color: var(--sunrise-orange);
  transform: translateY(-2px);
}

/* =====================================
   ステップリスト
===================================== */
.steps {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin: 2rem 0;
}

.step {
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
  text-align: left;
  padding: 1.5rem;
  background: rgba(30, 58, 95, 0.4);
  border-radius: 0.8rem;
}

.step-num {
  flex-shrink: 0;
  width: 3rem;
  height: 3rem;
  background: linear-gradient(135deg, var(--sunrise-orange), var(--sunrise-coral));
  color: var(--ocean-deep);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  font-weight: 700;
}

.step-content {
  flex: 1;
}

.step-content h4 {
  font-size: 1.3rem;
  color: var(--wave-foam);
  margin-bottom: 0.3rem;
}

.step-content p {
  font-size: 1.1rem;
  color: rgba(232, 244, 248, 0.7);
}

/* =====================================
   エンディングスライド
===================================== */
.slide-ending {
  background:
    radial-gradient(ellipse at 50% 0%, rgba(244, 162, 97, 0.2) 0%, transparent 50%),
    linear-gradient(180deg, var(--ocean-mid) 0%, var(--ocean-deep) 100%);
}

.slide-ending h2 {
  font-size: 3rem;
  background: linear-gradient(135deg, var(--sunrise-orange), var(--sunrise-gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* =====================================
   ページインジケーター
===================================== */
.page-indicator {
  position: fixed;
  bottom: 30px;
  right: 40px;
  font-size: 1rem;
  color: rgba(232, 244, 248, 0.5);
  background: rgba(10, 22, 40, 0.7);
  backdrop-filter: blur(10px);
  padding: 0.6rem 1.2rem;
  border-radius: 2rem;
  border: 1px solid rgba(168, 213, 229, 0.2);
  z-index: 1000;
}

.current-page {
  font-weight: 700;
  color: var(--sunrise-orange);
}

/* =====================================
   フッターリンク
===================================== */
.footer-link {
  position: fixed;
  bottom: 30px;
  left: 40px;
  font-family: var(--font-accent);
  font-size: 1rem;
  color: rgba(168, 213, 229, 0.35);
  text-decoration: none;
  letter-spacing: 0.02em;
  z-index: 1000;
  transition: all 0.3s ease;
}

.footer-link:hover {
  color: var(--sky-soft);
  transform: translateY(-2px);
}

.link-wave {
  display: inline-block;
  margin-right: 0.15rem;
  transition: transform 0.3s ease;
}

.footer-link:hover .link-wave {
  transform: translateX(-2px) rotate(-5deg);
}

/* アプリリンク（スライド内） */
.app-link {
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.app-link:hover {
  opacity: 0.8;
}

.app-link .accent {
  border-bottom: 1px dashed var(--sunrise-orange);
}

/* =====================================
   スライドナビゲーション
===================================== */
.slide-nav {
  position: fixed;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: rgba(10, 22, 40, 0.85);
  backdrop-filter: blur(10px);
  padding: 10px 6px;
  border-radius: 1.5rem;
  border: 1px solid rgba(168, 213, 229, 0.2);
  z-index: 1000;
  max-height: 80vh;
  overflow-y: auto;
  scrollbar-width: none;
}

.slide-nav::-webkit-scrollbar {
  display: none;
}

.nav-btn {
  width: 26px;
  height: 26px;
  border: none;
  border-radius: 50%;
  background: rgba(168, 213, 229, 0.15);
  color: rgba(232, 244, 248, 0.6);
  font-size: 0.7rem;
  font-family: var(--font-main);
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.nav-btn:hover {
  background: rgba(168, 213, 229, 0.3);
  color: var(--wave-foam);
}

.nav-btn.active {
  background: var(--sunrise-orange);
  color: var(--ocean-deep);
  font-weight: 700;
}


/* =====================================
   コード（念のため）
===================================== */
code {
  background: rgba(10, 22, 40, 0.6);
  padding: 0.2rem 0.6rem;
  border-radius: 0.3rem;
  font-family: "SF Mono", "Monaco", "Menlo", monospace;
  font-size: 0.9em;
  color: var(--sunrise-gold);
}

kbd {
  background: linear-gradient(180deg, #3a3a3a 0%, #2a2a2a 100%);
  border: 1px solid #4a4a4a;
  border-radius: 0.3rem;
  padding: 0.2rem 0.5rem;
  font-family: "SF Mono", "Monaco", "Menlo", monospace;
  font-size: 0.85em;
  box-shadow: 0 2px 0 #1a1a1a;
}

/* =====================================
   画像モーダル（拡大表示）
===================================== */
[data-zoomable] {
  cursor: zoom-in;
}

.image-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  cursor: zoom-out;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.image-modal-overlay.visible {
  opacity: 1;
}

.image-modal-overlay img {
  max-width: 92vw;
  max-height: 92vh;
  object-fit: contain;
  border-radius: 0.5rem;
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.5);
}

/* =====================================
   アニメーション
===================================== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.slide-content > * {
  animation: fadeInUp 0.6s ease-out both;
}

.slide-content > *:nth-child(1) { animation-delay: 0.1s; }
.slide-content > *:nth-child(2) { animation-delay: 0.2s; }
.slide-content > *:nth-child(3) { animation-delay: 0.3s; }
.slide-content > *:nth-child(4) { animation-delay: 0.4s; }
.slide-content > *:nth-child(5) { animation-delay: 0.5s; }
.slide-content > *:nth-child(6) { animation-delay: 0.6s; }

/* =====================================
   レスポンシブ
===================================== */
@media (max-width: 768px) {
  :root {
    --slide-padding: 40px;
  }

  h1 {
    font-size: 2.5rem;
  }

  h2 {
    font-size: 2rem;
  }

  p {
    font-size: 1.2rem;
  }

  ul, ol {
    font-size: 1.2rem;
  }

  .slide-title .logo {
    font-size: 3.5rem;
  }

  .flow {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.3rem 0.5rem;
    padding: 1rem;
    font-size: 1rem;
  }

  .flow-item {
    padding: 0.4rem 0.6rem;
    font-size: 0.85rem;
  }

  .flow-arrow {
    font-size: 1rem;
  }

  .compare {
    grid-template-columns: 1fr;
    gap: 1rem;
    margin: 1rem 0;
  }

  .compare-item {
    padding: 1rem;
  }

  .compare-item p {
    font-size: 1.1rem;
    line-height: 1.6;
  }

  .quote {
    font-size: 0.9rem;
    margin-top: 0.8rem;
  }

  .demo-options {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
    margin: 1rem 0;
  }

  .demo-option {
    padding: 0.5rem 0.8rem;
    font-size: 0.9rem;
  }

  .page-indicator {
    bottom: 20px;
    right: 20px;
    font-size: 0.9rem;
  }

  .slide-nav {
    display: none;
  }
}
