/* インタラクション・レスポンシブ — 表示アニメーション・ビューポート別の調整 */

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.d1 {
  transition-delay: 0.1s;
}
.d2 {
  transition-delay: 0.2s;
}
.d3 {
  transition-delay: 0.3s;
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .reveal.visible {
    transform: none;
  }
  .d1,
  .d2,
  .d3 {
    transition-delay: 0s;
  }
  .nav-toggle-line {
    transition: none;
  }
}

/* タブレット: 理由カード 2 列 */
@media (max-width: 1100px) and (min-width: 769px) {
  .reasons-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* スマートフォン */
@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }

  nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 0 16px;
    background: rgba(245, 245, 246, 0.98);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.08);
  }

  nav a {
    padding: 14px 20px;
    min-height: 44px;
    display: flex;
    align-items: center;
    letter-spacing: 0.12em;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
  }

  nav a:first-of-type {
    border-top: none;
  }

  .nav-cta {
    margin: 8px 16px 0;
    justify-content: center;
    text-align: center;
    border-radius: 24px;
    border-top: none !important;
  }

  header.is-nav-open nav {
    display: flex;
  }

  header {
    padding: 0 20px;
    padding-left: max(20px, env(safe-area-inset-left));
    padding-right: max(20px, env(safe-area-inset-right));
  }

  main {
    padding-top: 8px;
  }

  .hero-lead img {
    max-height: min(42vh, 380px);
    object-position: center center;
  }

  .hero-tail img {
    max-height: min(36vh, 320px);
    object-position: center center;
  }

  .hero {
    grid-template-columns: 1fr;
  }
  .hero-line {
    display: none;
  }
  .hero-left {
    padding: 32px 16px 52px;
    justify-content: flex-start;
  }
  .hero-btns {
    margin-top: 40px;
  }
  .hero-right {
    height: 38vh;
    min-height: 200px;
  }
  .hero-btns {
    flex-direction: row;
    gap: 10px;
  }
  .hero-btns .btn-dark,
  .hero-btns .btn-outline {
    min-width: 0;
    max-width: none;
  }
  .btn-dark,
  .btn-outline {
    width: auto;
    flex: 1;
    padding: 16px 10px;
    font-size: var(--fs-sm);
    letter-spacing: 0.05em;
    min-width: 0;
    white-space: nowrap;
  }
  section {
    padding: 72px 16px;
    padding-left: max(16px, env(safe-area-inset-left));
    padding-right: max(16px, env(safe-area-inset-right));
  }
  .reasons-grid {
    grid-template-columns: 1fr;
  }

  /* Flow 모바일 최적화 */
  .flow-steps::before {
    left: 22px;
    background: linear-gradient(to bottom, rgba(240,235,227,0.5), transparent);
  }
  .flow-step {
    gap: 16px;
  }
  .flow-num {
    width: 44px;
    height: 44px;
    font-size: 1rem;
    box-shadow: none;
  }
  .flow-free {
    font-size: 0.6rem;
    padding: 2px 10px;
  }

  .ibj-numbers {
    flex-direction: row;
    gap: 8px;
  }
  .ibj-num-item {
    min-width: 0;
    flex: 1;
    padding: 20px 8px;
  }
  .ibj-num {
    font-size: 1.8rem;
    color: var(--dusty-rose);
  }
  .ibj-num-unit {
    color: var(--dusty-rose);
  }
  .ibj-num-label {
    font-size: var(--fs-2xs);
  }
  .ibj-desc {
    text-align: left;
  }
  .contact-info {
    gap: 28px;
    flex-direction: column;
    align-items: center;
  }
  footer {
    padding: 36px 28px;
    padding-left: max(28px, env(safe-area-inset-left));
    padding-right: max(28px, env(safe-area-inset-right));
  }

  .faq-q {
    padding: 18px 16px;
    align-items: center;
  }


}

/* 좁은 화면 (Galaxy Z Fold 커버 등): 버튼 1열 fallback */
@media (max-width: 360px) {
  .hero-btns {
    flex-direction: column;
  }
  .btn-dark,
  .btn-outline {
    white-space: normal;
  }
}

@keyframes floatPetal {
  0% { transform: translateY(110vh) rotate(0deg); opacity: 0; }
  10% { opacity: 0.3; }
  90% { opacity: 0.3; }
  100% { transform: translateY(-10vh) rotate(720deg); opacity: 0; }
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 0.4; }
  50% { transform: scale(1.05); opacity: 0.55; }
}
