/* ========================================
   VARIABLES
======================================== */
:root {
  --g-dark:   #4a7c59;
  --g-mid:    #6b9e78;
  --g-light:  #a8d5b5;
  --g-pale:   #e8f5ec;
  --p-deep:   #d96585;
  --p-mid:    #f0a0b8;
  --p-light:  #fce4ec;
  --p-pale:   #fff5f8;
  --white:    #ffffff;
  --dark:     #2c2c2c;
  --mid:      #666666;
  --faint:    #999999;
  --serif-jp: 'Noto Serif JP', serif;
  --serif-en: 'Cormorant Garamond', serif;
  --ease:     cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========================================
   RESET & BASE
======================================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--serif-jp);
  color: var(--dark);
  background: var(--white);
  overflow-x: hidden;
  max-width: 430px;
  margin: 0 auto;
}

img { display: block; }

/* ========================================
   SCROLL PROGRESS BAR
======================================== */
.progress-bar {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--g-mid), var(--p-mid));
  z-index: 9999;
  transition: width 0.08s linear;
}

/* ========================================
   SECTION COMMON
======================================== */
.section { position: relative; overflow: hidden; }

.section-inner { padding: 64px 24px; }

.sec-label {
  font-family: var(--serif-en);
  font-size: 11px;
  letter-spacing: 0.35em;
  color: var(--g-mid);
  text-transform: uppercase;
  margin-bottom: 6px;
}

.sec-title {
  font-size: 24px;
  font-weight: 300;
  letter-spacing: 0.06em;
  color: var(--dark);
  margin-bottom: 40px;
}

/* ========================================
   HERO — SLIDESHOW
======================================== */
.hero {
  height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* --- スライドショー本体 --- */
.slideshow {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1.4s ease;
}

.slide.active { opacity: 1; }

.slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  will-change: transform;
}

/* Ken Burns: スライドが active になると開始 */
.slide.active[data-kb="1"] img { animation: kb1 7s ease-out forwards; }
.slide.active[data-kb="2"] img { animation: kb2 7s ease-out forwards; }
.slide.active[data-kb="3"] img { animation: kb3 7s ease-out forwards; }
.slide.active[data-kb="4"] img { animation: kb4 7s ease-out forwards; }

@keyframes kb1 {
  0%   { transform: scale(1)    translate(0,    0); }
  100% { transform: scale(1.12) translate(-2%, -2%); }
}
@keyframes kb2 {
  0%   { transform: scale(1.08) translate(2%,  1%); }
  100% { transform: scale(1)    translate(0,   0); }
}
@keyframes kb3 {
  0%   { transform: scale(1)    translate(-1%, 0); }
  100% { transform: scale(1.1)  translate(2%, -1%); }
}
@keyframes kb4 {
  0%   { transform: scale(1.05) translate(0, -2%); }
  100% { transform: scale(1)    translate(0,  1%); }
}

.slide-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    160deg,
    rgba(40,70,50,0.3) 0%,
    rgba(0,0,0,0.42) 55%,
    rgba(0,0,0,0.25) 100%
  );
}

/* --- テキストコンテンツ --- */
.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  color: var(--white);
  padding: 0 24px;
}

.hero-en {
  font-family: var(--serif-en);
  font-size: 11px;
  letter-spacing: 0.45em;
  margin-bottom: 24px;
  opacity: 0;
}

.hero-names {
  font-size: 34px;
  font-weight: 300;
  letter-spacing: 0.08em;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin-bottom: 20px;
  opacity: 0;
}

.hero-amp {
  font-family: var(--serif-en);
  font-style: italic;
  font-size: 26px;
  color: var(--p-light);
}

.hero-label {
  font-size: 13px;
  letter-spacing: 0.25em;
  margin-bottom: 6px;
  opacity: 0;
}

.hero-date {
  font-family: var(--serif-en);
  font-size: 14px;
  letter-spacing: 0.2em;
  color: rgba(255,255,255,0.75);
  opacity: 0;
}

/* --- スライドカウンター（右下） --- */
.slide-counter {
  position: absolute;
  bottom: 80px;
  right: 24px;
  z-index: 3;
  color: rgba(255,255,255,0.8);
  font-family: var(--serif-en);
  font-size: 13px;
  letter-spacing: 0.15em;
  animation: hintAppear 1s 2.4s both;
}

.slide-sep { margin: 0 2px; opacity: 0.5; }

/* --- ドット（下中央） --- */
.slide-dots {
  position: absolute;
  bottom: 72px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 3;
  animation: hintAppear 1s 2.4s both;
}

.slide-dot-item {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: rgba(255,255,255,0.4);
  transition: background 0.4s, transform 0.4s;
  cursor: pointer;
}

.slide-dot-item.active {
  background: white;
  transform: scale(1.4);
}

/* --- Hero アニメーション --- */
.anim-fade { animation: fadeUp 1.1s var(--ease) forwards; }
.delay-1 { animation-delay: 0.4s; }
.delay-2 { animation-delay: 0.9s; }
.delay-3 { animation-delay: 1.4s; }
.delay-4 { animation-delay: 1.8s; }

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

/* --- スクロールヒント --- */
.scroll-hint {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  z-index: 2;
  animation: hintAppear 1s 2.4s both;
}

@keyframes hintAppear {
  from { opacity: 0; } to { opacity: 1; }
}

.scroll-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: white;
  animation: dotBounce 2s infinite;
}

.scroll-line {
  width: 1px; height: 36px;
  background: linear-gradient(180deg, white, transparent);
  animation: lineGrow 2s infinite;
}

@keyframes dotBounce {
  0%,100% { opacity:1; transform:translateY(0); }
  50%      { opacity:.4; transform:translateY(5px); }
}
@keyframes lineGrow {
  0%   { transform:scaleY(0); transform-origin:top; }
  49%  { transform:scaleY(1); transform-origin:top; }
  50%  { transform:scaleY(1); transform-origin:bottom; }
  100% { transform:scaleY(0); transform-origin:bottom; }
}

/* ========================================
   GREETING
======================================== */
.greeting { background: var(--p-pale); }

.greeting-body {
  text-align: center;
  line-height: 2.4;
  color: var(--dark);
}

.g-line {
  display: block;
  font-size: 15px;
  font-weight: 300;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}

.g-sign {
  display: block;
  font-size: 19px;
  color: var(--g-dark);
  letter-spacing: 0.15em;
  margin-top: 28px;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}

.g-line.visible,
.g-sign.visible { opacity: 1; transform: translateY(0); }

.flower-row {
  margin-top: 40px;
  text-align: center;
  font-size: 18px;
  letter-spacing: 8px;
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%,100% { transform: translateY(0); }
  50%      { transform: translateY(-6px); }
}

/* ========================================
   EVENT
======================================== */
.event { background: var(--white); }

.event-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 28px;
}

.event-card {
  background: linear-gradient(135deg, var(--g-pale), var(--p-pale));
  border-radius: 18px;
  padding: 28px 20px;
  text-align: center;
  border-left: 4px solid var(--g-light);
  opacity: 0;
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}

.event-card:nth-child(2) {
  border-left: none;
  border-right: 4px solid var(--p-mid);
}

.event-card.visible { opacity: 1; transform: translateX(0) !important; }

.event-icon { font-size: 30px; margin-bottom: 10px; }

.event-card-label {
  font-family: var(--serif-en);
  font-size: 10px;
  letter-spacing: 0.35em;
  color: var(--faint);
  margin-bottom: 8px;
}

.event-card-main {
  font-size: 17px;
  font-weight: 400;
  color: var(--dark);
  margin-bottom: 4px;
}

.event-card-sub { font-size: 14px; color: var(--mid); }

.map-wrap {
  border-radius: 18px;
  overflow: hidden;
  height: 180px;
  background: var(--g-pale);
  display: flex;
  align-items: center;
  justify-content: center;
}

.map-placeholder {
  text-align: center;
  color: var(--mid);
  font-size: 13px;
  line-height: 2;
}
.map-placeholder span { font-size: 28px; display: block; margin-bottom: 6px; }

/* ========================================
   COUPLE
======================================== */
.couple {
  background: linear-gradient(160deg, var(--g-pale) 0%, var(--p-pale) 100%);
}

.profile-card {
  background: white;
  border-radius: 24px;
  padding: 36px 24px;
  margin-bottom: 16px;
  box-shadow: 0 8px 36px rgba(74,124,89,0.12);
  opacity: 0;
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.profile-card.visible { opacity: 1; transform: translateX(0) !important; }

.profile-avatar {
  width: 100px; height: 100px;
  border-radius: 50%;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--serif-en);
  font-size: 42px;
  font-style: italic;
  color: white;
  border: 3px solid white;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.profile-avatar.green {
  background: linear-gradient(135deg, var(--g-mid), var(--g-dark));
}
.profile-avatar.pink {
  background: linear-gradient(135deg, var(--p-mid), var(--p-deep));
}

.profile-name-en {
  font-family: var(--serif-en);
  font-size: 12px;
  letter-spacing: 0.22em;
  color: var(--faint);
  text-align: center;
  margin-bottom: 4px;
}

.profile-name-jp {
  font-size: 22px;
  font-weight: 400;
  text-align: center;
  margin-bottom: 24px;
}

.profile-rows {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-bottom: 20px;
}

.profile-row {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--g-pale);
}

.pr-label {
  font-size: 11px;
  color: var(--faint);
  letter-spacing: 0.05em;
  min-width: 76px;
  flex-shrink: 0;
}

.pr-val { font-size: 14px; color: var(--dark); }

.profile-msg {
  background: var(--p-pale);
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 13px;
  color: var(--mid);
  line-height: 1.8;
  text-align: center;
  font-style: italic;
}

.couple-heart {
  text-align: center;
  padding: 8px 0;
}

.heart-icon {
  font-size: 28px;
  color: var(--p-deep);
  display: inline-block;
  animation: heartbeat 1.6s ease-in-out infinite;
}

@keyframes heartbeat {
  0%,100% { transform: scale(1); }
  14%     { transform: scale(1.25); }
  28%     { transform: scale(1.1); }
  42%     { transform: scale(1.22); }
}

/* ========================================
   STORY / TIMELINE
======================================== */
.story { background: var(--white); }

.timeline {
  position: relative;
  padding-left: 44px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 14px; top: 8px; bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, var(--g-light), var(--p-light), var(--g-light));
}

.tl-item {
  position: relative;
  margin-bottom: 36px;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}

.tl-item.visible { opacity: 1; transform: translateY(0); }

.tl-dot {
  position: absolute;
  left: -38px; top: 4px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--g-mid);
  border: 3px solid white;
  box-shadow: 0 0 0 2px var(--g-light);
}

.tl-dot--last {
  background: var(--p-deep);
  box-shadow: 0 0 0 2px var(--p-light);
}

.tl-date {
  font-family: var(--serif-en);
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--p-deep);
  margin-bottom: 4px;
}

.tl-box h3 {
  font-size: 16px;
  font-weight: 400;
  color: var(--dark);
  margin-bottom: 4px;
}

.tl-box p {
  font-size: 14px;
  color: var(--mid);
  line-height: 1.7;
}

.tl-box--highlight {
  background: linear-gradient(135deg, var(--g-pale), var(--p-pale));
  border-radius: 12px;
  padding: 16px;
  margin-top: 4px;
}

/* ========================================
   FAMILY
======================================== */
.family { background: var(--g-pale); }

.family-group { margin-bottom: 48px; }

.family-group-hd {
  font-size: 19px;
  font-weight: 400;
  color: var(--g-dark);
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--g-light);
  display: flex;
  align-items: center;
  gap: 8px;
}

.family-cards {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.fam-card {
  background: white;
  border-radius: 16px;
  padding: 18px 20px;
  border-left: 4px solid var(--g-light);
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
}

.fam-card.visible { opacity: 1; transform: translateY(0); }

.fam-card--pet {
  border-left-color: var(--p-mid);
  background: linear-gradient(135deg, white, var(--p-pale));
}

.fam-role {
  font-size: 10px;
  letter-spacing: 0.25em;
  color: var(--faint);
  margin-bottom: 4px;
}

.fam-name {
  font-size: 18px;
  font-weight: 400;
  color: var(--dark);
  margin-bottom: 2px;
}

.fam-breed { font-size: 12px; color: var(--faint); margin-bottom: 4px; }

.fam-msg {
  font-size: 13px;
  color: var(--mid);
  font-style: italic;
  line-height: 1.7;
}

.family-divider {
  height: 2px;
  margin: 0 0 48px;
  background: linear-gradient(90deg, var(--g-light), var(--p-light), var(--g-light));
  border-radius: 1px;
}

/* ========================================
   SCHEDULE
======================================== */
.schedule { background: var(--p-pale); }

.sch-list {
  position: relative;
  padding-left: 80px;
}

.sch-list::before {
  content: '';
  position: absolute;
  left: 50px; top: 6px; bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, var(--p-light), var(--g-light));
}

.sch-item {
  position: relative;
  margin-bottom: 32px;
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}

.sch-item.visible { opacity: 1; transform: translateY(0); }

.sch-time {
  position: absolute;
  left: -78px; top: 1px;
  font-family: var(--serif-en);
  font-size: 13px;
  color: var(--p-deep);
  width: 56px;
  text-align: right;
}

.sch-dot {
  position: absolute;
  left: -17px; top: 6px;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--p-mid);
  border: 3px solid white;
  box-shadow: 0 0 0 2px var(--p-light);
}

.sch-dot--last { background: var(--g-mid); box-shadow: 0 0 0 2px var(--g-light); }

.sch-title { font-size: 16px; font-weight: 400; margin-bottom: 4px; }
.sch-desc  { font-size: 13px; color: var(--mid); line-height: 1.7; }

/* ========================================
   MENU
======================================== */
.menu-sec { background: var(--white); }

.menu-list { display: flex; flex-direction: column; }

.menu-item {
  padding: 20px 0;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}

.menu-item.visible { opacity: 1; transform: translateY(0); }

.menu-course {
  font-family: var(--serif-en);
  font-size: 10px;
  letter-spacing: 0.35em;
  color: var(--g-mid);
  text-transform: uppercase;
  margin-bottom: 6px;
}

.menu-name  { font-size: 18px; font-weight: 400; margin-bottom: 4px; }
.menu-desc  { font-size: 13px; color: var(--faint); }

.menu-rule {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--g-pale), transparent);
}

/* ========================================
   FUTURE
======================================== */
.future {
  background: linear-gradient(160deg, #3d6b4d 0%, #2a4e38 100%);
  position: relative;
  overflow: hidden;
}

#petalCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.future .section-inner { position: relative; z-index: 1; }

.future .sec-label { color: var(--g-light); }
.future .sec-title  { color: var(--white); }

.future-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-bottom: 48px;
}

.future-item {
  display: flex;
  align-items: center;
  gap: 20px;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}

.future-item.visible { opacity: 1; transform: translateY(0); }

.future-icon-wrap {
  width: 56px; height: 56px;
  border-radius: 18px;
  background: rgba(255,255,255,0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  flex-shrink: 0;
  backdrop-filter: blur(4px);
}

.future-when {
  font-size: 12px;
  color: var(--g-light);
  letter-spacing: 0.08em;
  margin-bottom: 4px;
}

.future-event {
  font-size: 22px;
  font-weight: 300;
  color: var(--white);
  letter-spacing: 0.05em;
}

.future-closing {
  text-align: center;
  color: rgba(255,255,255,0.75);
  font-size: 15px;
  line-height: 2.4;
  border-top: 1px solid rgba(255,255,255,0.15);
  padding-top: 40px;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.future-closing.visible { opacity: 1; transform: translateY(0); }

.future-sign {
  color: var(--p-light);
  font-size: 19px;
  margin-top: 12px;
  letter-spacing: 0.12em;
}

/* ========================================
   FOOTER
======================================== */
.footer {
  background: #1c3825;
  padding: 36px 24px;
  text-align: center;
}

.footer-names {
  font-family: var(--serif-en);
  font-size: 22px;
  font-style: italic;
  color: var(--g-light);
  letter-spacing: 0.12em;
  margin-bottom: 8px;
}

.footer-year {
  font-family: var(--serif-en);
  font-size: 12px;
  letter-spacing: 0.35em;
  color: rgba(255,255,255,0.3);
}

/* ========================================
   GENERIC ANIMATION STATES
======================================== */
.js-anim[data-anim="fade-up"] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.65s var(--ease), transform 0.65s var(--ease);
}

.js-anim[data-anim="slide-left"] {
  opacity: 0;
  transform: translateX(-32px);
  transition: opacity 0.65s var(--ease), transform 0.65s var(--ease);
}

.js-anim[data-anim="slide-right"] {
  opacity: 0;
  transform: translateX(32px);
  transition: opacity 0.65s var(--ease), transform 0.65s var(--ease);
}

.js-anim.visible {
  opacity: 1;
  transform: translate(0, 0);
}
