/* ============================================
   KaruMac LP — Design System (App完全流用)
   ============================================ */

:root {
  --purple: #7C5CFC;
  --purple-light: #9B85FD;
  --purple-deep: #5B3FD9;
  --white: #FFFFFF;
  --off-white: #F5F0EB;
  --text-dark: #333333;
  --green: #2ECC71;
  --orange: #F39C12;
  --red: #E74C3C;
  --pink: #FF6B9D;
  --dark-navy: #1A1A2E;

  font-family: -apple-system, BlinkMacSystemFont, 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', sans-serif;
  line-height: 1.5;
  font-weight: 400;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  overflow-x: hidden;
  color: var(--text-dark);
  background: var(--white);
}

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ============================================
   Animations (App流用)
   ============================================ */

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

.floating {
  animation: float 2.5s ease-in-out infinite;
}

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

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

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================
   Navigation
   ============================================ */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 16px 0;
  transition: background 0.3s ease, box-shadow 0.3s ease, padding 0.3s ease;
}

.nav.scrolled {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.08);
  padding: 10px 0;
}

.nav-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--white);
  text-decoration: none;
  transition: color 0.3s ease;
}

.nav.scrolled .nav-logo {
  color: var(--purple);
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 32px;
  align-items: center;
}

.nav-links a {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.3s ease;
}

.nav.scrolled .nav-links a {
  color: var(--text-dark);
}

.nav-links a:hover {
  opacity: 0.7;
}

.nav-cta {
  background: rgba(255, 255, 255, 0.2);
  padding: 8px 20px !important;
  border-radius: 14px;
  transition: background 0.3s ease, color 0.3s ease !important;
}

.nav.scrolled .nav-cta {
  background: var(--purple) !important;
  color: var(--white) !important;
}

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--white);
  transition: background 0.3s ease, transform 0.3s ease;
}

.nav.scrolled .nav-toggle span {
  background: var(--text-dark);
}

/* ============================================
   Buttons (App流用)
   ============================================ */

.btn {
  display: inline-block;
  padding: 14px 36px;
  border-radius: 14px;
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: transform 0.15s ease, opacity 0.2s ease;
}

.btn:hover {
  opacity: 0.9;
}

.btn:active {
  transform: scale(0.97);
}

.btn-hero {
  background: var(--white);
  color: var(--purple);
  font-size: 1.1rem;
  padding: 16px 44px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.btn-primary {
  background: var(--purple);
  color: var(--white);
}

.btn-outline {
  background: transparent;
  color: var(--purple);
  border: 2px solid var(--purple);
}

.btn-disabled {
  opacity: 0.5;
  pointer-events: none;
  cursor: default;
}

/* ============================================
   Hero Section
   ============================================ */

.hero {
  min-height: 100vh;
  background: var(--purple);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 24px 40px;
  position: relative;
}

.hero-content {
  animation: fadeInUp 0.8s ease forwards;
}

.hero-character {
  width: 200px;
  height: auto;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.15));
  margin-bottom: 24px;
}

.hero-title {
  font-size: clamp(2.2rem, 6vw, 3.5rem);
  font-weight: 800;
  color: var(--white);
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}

.hero-subtitle {
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 32px;
}

.hero-note {
  margin-top: 12px;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.6);
}

.scroll-indicator {
  position: absolute;
  bottom: 32px;
  color: rgba(255, 255, 255, 0.5);
  animation: bounce 1.5s ease-in-out infinite;
}

/* ============================================
   Problems Section
   ============================================ */

.problems {
  background: var(--white);
  padding: 100px 0;
  text-align: center;
}

.section-badge {
  display: inline-block;
  background: var(--purple);
  color: var(--white);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 6px 20px;
  border-radius: 20px;
  margin-bottom: 48px;
}

.problems-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 48px;
}

.problem-card {
  background: var(--off-white);
  border-radius: 20px;
  padding: 40px 24px;
  transition: transform 0.2s ease;
}

.problem-card:hover {
  transform: translateY(-4px);
}

.problem-emoji {
  font-size: 2.5rem;
  display: block;
  margin-bottom: 16px;
}

.problem-card p {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--text-dark);
}

.problems-answer {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--purple);
}

/* ============================================
   Features Section
   ============================================ */

.features {
  background: var(--purple);
  padding: 100px 0;
  color: var(--white);
}

.section-title {
  text-align: center;
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  font-weight: 800;
  margin-bottom: 64px;
  color: var(--white);
}

.section-title.dark {
  color: var(--text-dark);
}

.section-subtitle {
  text-align: center;
  font-size: 1rem;
  margin-top: -48px;
  margin-bottom: 56px;
  opacity: 0.7;
}

.section-subtitle.dark {
  color: var(--text-dark);
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 60px;
  margin-bottom: 80px;
}

.feature-item:last-child {
  margin-bottom: 0;
}

.feature-item.reverse {
  flex-direction: row-reverse;
}

.feature-screenshot {
  flex: 0 0 280px;
}

.phone-frame {
  background: var(--dark-navy);
  border-radius: 24px;
  padding: 8px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
}

.phone-frame img {
  width: 100%;
  height: auto;
  border-radius: 18px;
  display: block;
}

.feature-text {
  flex: 1;
}

.feature-label {
  display: inline-block;
  background: rgba(255, 255, 255, 0.2);
  color: var(--white);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 4px 14px;
  border-radius: 20px;
  margin-bottom: 12px;
}

.feature-text h3 {
  font-size: clamp(1.3rem, 3vw, 1.8rem);
  font-weight: 800;
  margin-bottom: 12px;
  line-height: 1.4;
}

.feature-text p {
  font-size: 0.95rem;
  line-height: 1.8;
  opacity: 0.85;
}

/* ============================================
   Character Section
   ============================================ */

.character {
  background: var(--off-white);
  padding: 100px 0;
}

.character-card {
  text-align: center;
  max-width: 480px;
  margin: 0 auto;
}

.character-img {
  width: 180px;
  height: auto;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.12));
  margin-bottom: 20px;
}

.character-name {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--text-dark);
  margin-bottom: 8px;
}

.character-subtitle {
  font-size: 0.95rem;
  color: var(--text-dark);
  opacity: 0.7;
  margin-bottom: 20px;
}

.character-tags {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-bottom: 28px;
}

.tag {
  background: var(--purple);
  color: var(--white);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 5px 14px;
  border-radius: 20px;
}

.character-bubble {
  background: var(--white);
  border-radius: 20px;
  padding: 20px 28px;
  position: relative;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.06);
  display: inline-block;
}

.character-bubble::before {
  content: '';
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-bottom: 10px solid var(--white);
}

.character-bubble p {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-dark);
}

/* ============================================
   Pricing Section
   ============================================ */

.pricing {
  background: var(--white);
  padding: 100px 0;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  align-items: start;
}

.pricing-card {
  background: var(--white);
  border: 2px solid #eee;
  border-radius: 20px;
  padding: 40px 28px;
  text-align: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
}

.pricing-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.pricing-card.recommended {
  border-color: var(--purple);
  transform: scale(1.04);
  box-shadow: 0 8px 32px rgba(124, 92, 252, 0.2);
}

.pricing-card.recommended:hover {
  transform: scale(1.04) translateY(-4px);
}

.pricing-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--pink);
  color: var(--white);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 16px;
  border-radius: 20px;
}

.pricing-plan {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 8px;
}

.pricing-price {
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--purple);
  margin-bottom: 4px;
}

.pricing-price span {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-dark);
  opacity: 0.6;
}

.pricing-desc {
  font-size: 0.85rem;
  color: var(--text-dark);
  opacity: 0.6;
  margin-bottom: 24px;
}

.pricing-features {
  list-style: none;
  text-align: left;
  margin-bottom: 28px;
}

.pricing-features li {
  font-size: 0.9rem;
  padding: 8px 0;
  border-bottom: 1px solid #f0f0f0;
  color: var(--text-dark);
}

.pricing-features li::before {
  content: '✓ ';
  color: var(--green);
  font-weight: 700;
}

.pricing-card .btn {
  width: 100%;
  text-align: center;
}

/* ============================================
   CTA Section
   ============================================ */

.cta {
  background: linear-gradient(135deg, var(--purple), var(--purple-deep));
  padding: 100px 0;
  text-align: center;
  color: var(--white);
}

.cta-character {
  width: 160px;
  height: auto;
  filter: drop-shadow(0 4px 16px rgba(0, 0, 0, 0.2));
  margin-bottom: 24px;
}

.cta-title {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  margin-bottom: 8px;
}

.cta-en {
  font-size: 1rem;
  opacity: 0.7;
  margin-bottom: 32px;
  font-style: italic;
}

.cta-note {
  margin-top: 16px;
  font-size: 0.8rem;
  opacity: 0.6;
}

.cta-joke {
  margin-top: 24px;
  font-size: 0.85rem;
  opacity: 0.7;
  line-height: 1.7;
}

/* ============================================
   Legal Pages (Privacy / Terms)
   ============================================ */

.legal {
  background: var(--white);
  padding: 120px 0 80px;
  color: var(--text-dark);
}

.legal h1 {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 8px;
}

.legal-date {
  font-size: 0.85rem;
  opacity: 0.5;
  margin-bottom: 40px;
}

.legal h2 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-top: 36px;
  margin-bottom: 12px;
  color: var(--purple);
}

.legal h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-top: 20px;
  margin-bottom: 8px;
}

.legal p {
  font-size: 0.95rem;
  line-height: 1.8;
  margin-bottom: 12px;
}

.legal ul {
  margin-bottom: 12px;
  padding-left: 24px;
}

.legal li {
  font-size: 0.95rem;
  line-height: 1.8;
  margin-bottom: 4px;
}

.legal a {
  color: var(--purple);
  text-decoration: none;
}

.legal a:hover {
  text-decoration: underline;
}

/* ============================================
   Footer
   ============================================ */

.footer {
  background: var(--dark-navy);
  padding: 48px 0 32px;
  color: rgba(255, 255, 255, 0.6);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.footer-logo {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--white);
}

.footer-links {
  list-style: none;
  display: flex;
  gap: 24px;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.5);
  text-decoration: none;
  font-size: 0.8rem;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: var(--white);
}

.footer-copy {
  font-size: 0.75rem;
  text-align: center;
  opacity: 0.5;
}

.footer-made {
  font-size: 0.7rem;
  text-align: center;
  opacity: 0.3;
  margin-top: 8px;
}

/* ============================================
   Responsive
   ============================================ */

@media (max-width: 768px) {
  /* Nav */
  .nav-toggle {
    display: flex;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    flex-direction: column;
    gap: 0;
    padding: 8px 0;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    display: block;
    padding: 14px 24px;
    color: var(--text-dark) !important;
  }

  .nav-cta {
    margin: 8px 24px;
    text-align: center;
    background: var(--purple) !important;
    color: var(--white) !important;
  }

  /* Hero */
  .hero {
    min-height: 100svh;
    padding: 100px 24px 60px;
  }

  .hero-character {
    width: 160px;
  }

  /* Problems */
  .problems {
    padding: 72px 0;
  }

  .problems-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .problem-card {
    padding: 28px 20px;
  }

  /* Features */
  .features {
    padding: 72px 0;
  }

  .section-title {
    margin-bottom: 48px;
  }

  .feature-item,
  .feature-item.reverse {
    flex-direction: column;
    gap: 32px;
    margin-bottom: 56px;
  }

  .feature-screenshot {
    flex: none;
    width: 100%;
    max-width: 280px;
    margin: 0 auto;
  }

  .feature-text {
    text-align: center;
  }

  /* Character */
  .character {
    padding: 72px 0;
  }

  .character-img {
    width: 140px;
  }

  /* Pricing */
  .pricing {
    padding: 72px 0;
  }

  .pricing-grid {
    grid-template-columns: 1fr;
    gap: 20px;
    max-width: 400px;
    margin: 0 auto;
  }

  .pricing-card.recommended {
    order: -1;
    transform: none;
  }

  .pricing-card.recommended:hover {
    transform: translateY(-4px);
  }

  /* CTA */
  .cta {
    padding: 72px 0;
  }

  .cta-character {
    width: 120px;
  }

  /* Footer */
  .footer-inner {
    flex-direction: column;
    gap: 20px;
    text-align: center;
  }

  .footer-links {
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 2rem;
  }

  .btn-hero {
    padding: 14px 32px;
    font-size: 1rem;
  }

  .problems-answer {
    font-size: 1.1rem;
  }

  .pricing-price {
    font-size: 2rem;
  }
}
