/* ===== あやちゃんの好きなところ — style.css ===== */
/* テーマカラー: 黄緑                                */

/* ===== リセット & ベース ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html { scroll-behavior: smooth; }

/* ===== アニメーション背景 ===== */
body {
  font-family: 'Zen Maru Gothic', 'Hiragino Maru Gothic ProN', 'BIZ UDPGothic', sans-serif;
  min-height: 100vh;
  color: #3d4e2a;
  overflow-x: hidden;
  position: relative;
  background: linear-gradient(160deg, #f4fff0 0%, #fdfff8 45%, #f0fff5 100%);
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: linear-gradient(200deg, #f0fff5 0%, #f8fff0 50%, #fdfff5 100%);
  opacity: 0;
  animation: bgCrossfade 14s ease-in-out infinite alternate;
  z-index: 0;
  pointer-events: none;
}

@keyframes bgCrossfade {
  0%   { opacity: 0; }
  100% { opacity: 1; }
}

/* ===== ノイズテクスチャ ===== */
.noise-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.028;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 200px 200px;
}

/* ===== スクロール進捗バー ===== */
.progress-bar {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, #b8e860, #7ec832, #c8f060, #b8e860);
  background-size: 200% 100%;
  animation: shimmerBar 2.5s linear infinite;
  z-index: 200;
  border-radius: 0 2px 2px 0;
  pointer-events: none;
  transition: width 0.08s linear;
}

@keyframes shimmerBar {
  from { background-position: 200% 0%; }
  to   { background-position: 0%   0%; }
}

/* ===== 背景パーティクルCanvas ===== */
.bg-canvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

/* ===== ヒーロー ===== */
.hero {
  position: relative;
  z-index: 2;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.5rem;
}

.hero-inner { text-align: center; }

.hero-deco {
  font-size: 2.6rem;
  color: #7ec832;
  margin-bottom: 1.2rem;
  display: block;
  will-change: transform, opacity;
}

.hero-title {
  font-size: clamp(1.45rem, 6.2vw, 2.6rem);
  font-weight: 700;
  line-height: 1.6;
  letter-spacing: 0.03em;
  color: #4d8c1a;
  margin-bottom: 1rem;
  white-space: nowrap;
}

.hero-title .char {
  display: inline-block;
  will-change: transform, opacity;
}

.hero-sub {
  font-size: clamp(0.82rem, 3.5vw, 1rem);
  color: #7a9060;
  letter-spacing: 0.12em;
  margin-bottom: 3rem;
  will-change: transform, opacity;
}

.scroll-hint {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  color: #94b870;
  letter-spacing: 0.12em;
  will-change: transform, opacity;
}

.scroll-arrow {
  font-size: 1rem;
  color: #7ec832;
  animation: bounce 1.8s ease-in-out infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(7px); }
}

/* ===== 進捗ドット ===== */
.progress-dots {
  position: fixed;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 8px;
  opacity: 0;
  transition: opacity 0.4s;
}

.progress-dots.visible { opacity: 1; }

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(126, 200, 50, 0.25);
  transition: background 0.3s, transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.dot.active {
  background: #7ec832;
  transform: scale(1.55);
}

.dot.done { background: rgba(126, 200, 50, 0.55); }

/* ===== カードセクション ===== */
.cards-section {
  position: relative;
  z-index: 2;
  padding: 2rem 0 4rem;
}

.cards-container {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 2rem;
  padding: 0 1.4rem;
  max-width: 560px;
  margin: 0 auto;
  position: relative;
}

.card-left  { margin-right: auto; }
.card-right { margin-left: auto; }

/* ===== SVG接続パス ===== */
.path-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  overflow: visible;
  pointer-events: none;
  z-index: 0;
}

.connect-path {
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.3;
}

/* ===== カード ===== */
.card {
  max-width: 87%;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1.5px solid rgba(160, 210, 90, 0.3);
  border-radius: 22px;
  padding: 1.7rem 1.9rem 1.6rem;
  box-shadow:
    0 4px 28px rgba(126, 200, 50, 0.1),
    0 1px 6px rgba(100, 180, 40, 0.07);
  position: relative;
  overflow: hidden;
  will-change: transform, opacity;
  transform-style: preserve-3d;
  opacity: 0;
}

/* トップ グラデーションライン */
.card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3.5px;
  background: linear-gradient(90deg, #c4e870, #d8f090, #a8d860, #c4e870);
  background-size: 200% 100%;
  border-radius: 22px 22px 0 0;
  animation: shimmerLine 3s linear infinite;
  opacity: 0;
  transition: opacity 0.6s 0.3s;
}

.card.entered::before { opacity: 1; }

/* ホバー内側グロー */
.card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 22px;
  background: radial-gradient(ellipse at 50% 0%, rgba(160, 220, 80, 0.18) 0%, transparent 65%);
  opacity: 0;
  transition: opacity 0.35s;
  pointer-events: none;
}

.card:hover::after { opacity: 1; }

@keyframes shimmerLine {
  from { background-position: 200% 0%; }
  to   { background-position: 0%   0%; }
}

/* ===== カード内要素 ===== */
.card-number {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: #7ec832;
  margin-bottom: 0.5rem;
  font-variant-numeric: tabular-nums;
  min-width: 2ch;
}

/* グラデーションテキスト */
.card-title {
  font-size: clamp(1rem, 4.5vw, 1.18rem);
  font-weight: 700;
  line-height: 1.55;
  margin-bottom: 0.55rem;
  background: linear-gradient(135deg, #3d8010 0%, #7ec832 55%, #3d8010 100%);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: titleGrad 6s ease-in-out infinite alternate;
}

@keyframes titleGrad {
  from { background-position: 0%   50%; }
  to   { background-position: 100% 50%; }
}

.card-desc {
  font-size: clamp(0.78rem, 3.2vw, 0.88rem);
  color: #7a9060;
  line-height: 1.85;
}

.card-heart {
  position: absolute;
  bottom: 1rem;
  right: 1.3rem;
  font-size: 0.82rem;
  color: #7ec832;
  opacity: 0;
}

/* ===== タッチリップル ===== */
.touch-ripple {
  position: absolute;
  pointer-events: none;
  z-index: 50;
  color: #7ec832;
  user-select: none;
  will-change: transform, opacity;
}

/* ===== ハートバースト ===== */
.heart-burst {
  position: absolute;
  pointer-events: none;
  z-index: 20;
  font-size: 1.1rem;
  color: #7ec832;
  animation: burstFly 0.9s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  will-change: transform, opacity;
}

@keyframes burstFly {
  0%   { opacity: 1;   transform: translate(0, 0) scale(0.4); }
  60%  { opacity: 0.9; transform: translate(var(--tx), var(--ty)) scale(1.1); }
  100% { opacity: 0;   transform: translate(calc(var(--tx)*1.4), calc(var(--ty)*1.4)) scale(0.7); }
}

/* ===== エンディング ===== */
.ending {
  position: relative;
  z-index: 2;
  min-height: 70svh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 1.5rem 5rem;
}

.ending-inner {
  text-align: center;
  max-width: 420px;
}

.ending-deco {
  font-size: 1.4rem;
  color: #7ec832;
  letter-spacing: 0.55rem;
  margin-bottom: 1.8rem;
}

.ending-main {
  font-size: clamp(1rem, 4.5vw, 1.2rem);
  font-weight: 700;
  color: #4d8c1a;
  line-height: 1.75;
  margin-bottom: 0.85rem;
}

.ending-sub {
  font-size: clamp(0.82rem, 3.2vw, 0.95rem);
  color: #7a9060;
  line-height: 1.95;
  margin-bottom: 2.4rem;
}

.replay-btn {
  display: inline-block;
  padding: 0.78rem 2.4rem;
  border: 1.5px solid rgba(126, 200, 50, 0.45);
  border-radius: 50px;
  background: rgba(255, 255, 255, 0.7);
  color: #4d8c1a;
  font-family: inherit;
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  cursor: pointer;
  backdrop-filter: blur(4px);
  transition: background 0.25s, transform 0.25s, box-shadow 0.25s;
}

.replay-btn:hover {
  background: rgba(200, 240, 150, 0.5);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(126, 200, 50, 0.22);
}

/* ===== エンディング花火 ===== */
.firework-heart {
  position: fixed;
  pointer-events: none;
  z-index: 100;
  font-size: 1.3rem;
  color: #7ec832;
  animation: fireworkFly 1.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  will-change: transform, opacity;
}

@keyframes fireworkFly {
  0%   { opacity: 1;   transform: translate(0,0) scale(0.3); }
  50%  { opacity: 1;   transform: translate(var(--tx), var(--ty)) scale(1.2); }
  100% { opacity: 0;   transform: translate(calc(var(--tx)*1.6), calc(var(--ty)*1.6 + 30px)) scale(0.5); }
}

/* ===== PC向け ===== */
@media (min-width: 640px) {
  .cards-container { gap: 2.4rem; padding: 0 2rem; max-width: 600px; }
  .card { padding: 2rem 2.4rem 1.9rem; max-width: 84%; }
  .progress-dots { right: 20px; gap: 10px; }
  .dot { width: 8px; height: 8px; }
}

/* ===== ホームページ ===== */
.home {
  position: relative;
  z-index: 2;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.5rem;
}

.home-inner {
  text-align: center;
  width: 100%;
  max-width: 480px;
}

.home-deco {
  font-size: 2.6rem;
  color: #7ec832;
  margin-bottom: 1.2rem;
  display: block;
  will-change: transform, opacity;
}

.home-title {
  font-size: clamp(1.9rem, 8vw, 3rem);
  font-weight: 700;
  color: #4d8c1a;
  margin-bottom: 0.65rem;
  letter-spacing: 0.05em;
  will-change: transform, opacity;
}

.home-sub {
  font-size: clamp(0.82rem, 3.5vw, 1rem);
  color: #7a9060;
  letter-spacing: 0.12em;
  margin-bottom: 2.8rem;
  will-change: transform, opacity;
}

.home-cards {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.home-card {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1.5px solid rgba(160, 210, 90, 0.3);
  border-radius: 22px;
  padding: 1.4rem 1.7rem;
  text-decoration: none;
  color: inherit;
  position: relative;
  overflow: hidden;
  box-shadow:
    0 4px 28px rgba(126, 200, 50, 0.1),
    0 1px 6px rgba(100, 180, 40, 0.07);
  transition: transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.28s, background 0.25s;
  will-change: transform, opacity;
}

.home-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3.5px;
  background: linear-gradient(90deg, #c4e870, #d8f090, #a8d860, #c4e870);
  background-size: 200% 100%;
  border-radius: 22px 22px 0 0;
  animation: shimmerLine 3s linear infinite;
}

.home-card:hover {
  transform: translateY(-5px) scale(1.01);
  box-shadow: 0 14px 40px rgba(126, 200, 50, 0.22);
  background: rgba(242, 255, 225, 0.95);
}

.home-card-emoji {
  font-size: 1.9rem;
  flex-shrink: 0;
  line-height: 1;
}

.home-card-content {
  flex: 1;
  text-align: left;
}

.home-card-title {
  font-size: clamp(0.95rem, 4vw, 1.08rem);
  font-weight: 700;
  background: linear-gradient(135deg, #3d8010 0%, #7ec832 55%, #3d8010 100%);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: titleGrad 6s ease-in-out infinite alternate;
  margin-bottom: 0.22rem;
}

.home-card-desc {
  font-size: 0.78rem;
  color: #7a9060;
}

.home-card-arrow {
  font-size: 1.1rem;
  color: #7ec832;
  flex-shrink: 0;
  transition: transform 0.25s ease;
}

.home-card:hover .home-card-arrow {
  transform: translateX(5px);
}

/* ===== 戻るボタン ===== */
.back-btn {
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 100;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.48rem 1.1rem;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1.5px solid rgba(160, 210, 90, 0.35);
  border-radius: 50px;
  font-family: inherit;
  font-size: 0.78rem;
  color: #4d8c1a;
  text-decoration: none;
  letter-spacing: 0.08em;
  transition: background 0.25s, transform 0.25s, box-shadow 0.25s;
  box-shadow: 0 2px 12px rgba(126, 200, 50, 0.12);
}

.back-btn:hover {
  background: rgba(200, 240, 150, 0.65);
  transform: translateX(-3px);
  box-shadow: 0 6px 20px rgba(126, 200, 50, 0.22);
}

@media (min-width: 640px) {
  .home-inner { max-width: 520px; }
  .home-card { padding: 1.7rem 2rem; gap: 1.4rem; }
}
