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

/* ===== CSS Custom Properties ===== */
:root {
  /* Dark section */
  --deep-night: #050510;
  --star-color: #ffffff;

  /* Light section */
  --warm-cream: #FBF8F3;
  --soft-paper: #F5F0E8;
  --paper-edge: #EBE4D8;
  --ink-dark: #3D3428;
  --ink-light: #8B7E6E;
  --pencil: #B8A890;

  /* Accent (orb) */
  --accent: #8B5CF6;
  --accent-light: #D8B4FE;
  --accent-medium: #A78BFA;
  --accent-deep: #7C3AED;
  --accent-10: rgba(139, 92, 246, 0.10);

  /* Typography */
  --font-body: 'Zen Maru Gothic', system-ui, sans-serif;
  --font-serif: 'Noto Serif JP', serif;

  /* Spacing */
  --section-padding: 96px 24px;
  --section-padding-mobile: 64px 16px;
  --max-width: 1024px;
}

/* ===== Base ===== */
html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink-dark);
  background: var(--warm-cream);
  -webkit-font-smoothing: antialiased;
}

/* ===== Animations ===== */
@keyframes twinkle {
  0%, 100% { opacity: 0.15; }
  50% { opacity: 0.6; }
}

@keyframes breathe {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}

@keyframes ring-pulse {
  0%, 100% { opacity: 0.3; transform: translate(-50%, -50%) scale(1); }
  50% { opacity: 0.7; transform: translate(-50%, -50%) scale(1.05); }
}

@keyframes mist-drift {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(10px); }
}

@keyframes dot-glow {
  0%, 100% { box-shadow: 0 0 4px rgba(139, 92, 246, 0.3); }
  50% { box-shadow: 0 0 12px rgba(139, 92, 246, 0.6); }
}

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

/* ===== Scroll Animations ===== */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== Reduced Motion ===== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .animate-on-scroll {
    opacity: 1 !important;
    transform: none !important;
  }
}

/* ===== Navigation ===== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background 0.3s ease, color 0.3s ease;
}

.nav.scrolled {
  background: rgba(251, 248, 243, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 8px rgba(0, 0, 0, 0.04);
}

.nav-logo {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 24px;
  letter-spacing: 1px;
  text-decoration: none;
  color: #fff;
  transition: color 0.3s ease;
}

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

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-links a {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.35);
  text-decoration: none;
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: rgba(255, 255, 255, 0.8);
}

.nav.scrolled .nav-links a {
  color: var(--ink-light);
}

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

/* Language switcher */
.lang-switcher {
  position: relative;
}

.lang-current {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: transparent;
  transition: all 0.2s ease;
}

.nav.scrolled .lang-current {
  color: var(--ink-light);
  border-color: var(--paper-edge);
}

.lang-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 4px;
  background: #fff;
  border: 1px solid var(--paper-edge);
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  min-width: 120px;
}

.lang-dropdown.open {
  display: block;
}

.lang-dropdown a {
  display: block;
  padding: 8px 14px;
  font-size: 13px;
  color: var(--ink-dark);
  text-decoration: none;
  transition: background 0.15s;
}

.lang-dropdown a:hover {
  background: var(--soft-paper);
}

.lang-dropdown a.active {
  color: var(--accent);
  font-weight: 500;
}

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

.nav-hamburger span {
  width: 22px;
  height: 2px;
  background: #fff;
  border-radius: 1px;
  transition: background 0.3s;
}

.nav.scrolled .nav-hamburger span {
  background: var(--ink-dark);
}

.mobile-menu {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(251, 248, 243, 0.98);
  backdrop-filter: blur(16px);
  z-index: 49;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 32px;
}

.mobile-menu.open {
  display: flex;
}

.mobile-menu a {
  font-size: 20px;
  color: var(--ink-dark);
  text-decoration: none;
  font-weight: 500;
}

@media (max-width: 640px) {
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }
}

/* ===== Hero ===== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--deep-night);
  overflow: hidden;
  text-align: center;
  padding: 0 24px;
}

.hero-stars {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.star {
  position: absolute;
  width: 2px;
  height: 2px;
  background: var(--star-color);
  border-radius: 50%;
  animation: twinkle 3s ease-in-out infinite;
}

.orb-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 32px;
}

.orb-glow {
  position: absolute;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.2) 0%, transparent 70%);
  animation: breathe 4s ease-in-out infinite;
}

.orb {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, rgba(255, 255, 255, 0.95), #D8B4FE, #A78BFA, #7C3AED);
  box-shadow:
    0 0 25px rgba(139, 92, 246, 0.5),
    0 0 50px rgba(139, 92, 246, 0.3),
    0 0 120px rgba(139, 92, 246, 0.15);
  animation: breathe 4s ease-in-out infinite;
  position: relative;
  z-index: 3;
  transition: transform 0.15s ease-out;
}

.orb-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(139, 92, 246, 0.2);
  top: 50%;
  left: 50%;
  animation: ring-pulse 3s ease-in-out infinite;
}

.orb-ring-1 {
  width: 180px;
  height: 180px;
}

.orb-ring-2 {
  width: 240px;
  height: 240px;
  animation-delay: 0.5s;
}

.hero-title {
  font-family: var(--font-serif);
  font-size: 40px;
  font-weight: 400;
  color: #fff;
  line-height: 1.9;
  margin-bottom: 16px;
  position: relative;
  z-index: 2;
}

.hero-subtitle {
  font-size: 16px;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.4);
  line-height: 1.7;
  position: relative;
  z-index: 2;
  margin-bottom: 48px;
}

.scroll-hint {
  position: absolute;
  bottom: 32px;
  font-size: 11px;
  letter-spacing: 2px;
  color: rgba(255, 255, 255, 0.2);
  text-transform: uppercase;
  z-index: 2;
}

.scroll-hint svg {
  display: block;
  margin: 8px auto 0;
  animation: scroll-hint 1.5s ease-in-out infinite;
}

@media (max-width: 640px) {
  .hero-title { font-size: 28px; }
  .orb { width: 80px; height: 80px; }
  .orb-ring-1 { width: 120px; height: 120px; }
  .orb-ring-2 { width: 160px; height: 160px; }
  .orb-glow { width: 160px; height: 160px; }
}

/* ===== Mist Transition ===== */
.mist-transition {
  height: 200px;
  position: relative;
  background: var(--deep-night);
  overflow: hidden;
}

.mist-layer {
  position: absolute;
  inset: 0;
}

.mist-1 {
  background: linear-gradient(to bottom,
    transparent 0%,
    rgba(251, 248, 243, 0.03) 15%,
    rgba(251, 248, 243, 0.08) 30%,
    rgba(251, 248, 243, 0.18) 45%,
    rgba(251, 248, 243, 0.35) 60%,
    rgba(251, 248, 243, 0.55) 72%,
    rgba(251, 248, 243, 0.75) 83%,
    rgba(251, 248, 243, 0.9) 92%,
    #FBF8F3 100%
  );
}

.mist-2 {
  background:
    radial-gradient(ellipse at 30% 60%, rgba(216, 180, 254, 0.08) 0%, transparent 60%),
    radial-gradient(ellipse at 70% 50%, rgba(167, 139, 250, 0.06) 0%, transparent 50%);
  animation: mist-drift 8s ease-in-out infinite;
}

.mist-3 {
  background: radial-gradient(ellipse at 50% 70%, rgba(251, 248, 243, 0.15) 0%, transparent 60%);
  animation: mist-drift 12s ease-in-out infinite reverse;
}

@media (max-width: 640px) {
  .mist-transition { height: 140px; }
}

/* ===== Content Sections (shared) ===== */
.section {
  padding: var(--section-padding);
  background: var(--warm-cream);
  position: relative;
}

.section-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.section-title {
  font-family: var(--font-serif);
  font-size: 28px;
  font-weight: 400;
  color: var(--ink-dark);
  text-align: center;
  line-height: 1.9;
  margin-bottom: 8px;
}

.section-subtitle {
  font-size: 15px;
  color: var(--ink-light);
  text-align: center;
  line-height: 1.7;
  margin-bottom: 40px;
}

@media (max-width: 640px) {
  .section { padding: var(--section-padding-mobile); }
  .section-title { font-size: 22px; }
}

/* ===== Cards ===== */
.card {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.7), rgba(245, 240, 232, 0.8));
  border: 1px solid rgba(235, 228, 216, 0.6);
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 2px 8px rgba(140, 120, 80, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.card h3 {
  font-size: 18px;
  font-weight: 500;
  color: var(--ink-dark);
  margin: 0 0 8px;
}

.card p {
  font-size: 14px;
  color: var(--ink-light);
  line-height: 1.7;
  margin: 0;
}

/* ===== Parallax BG ===== */
.parallax-bg {
  position: absolute;
  inset: -20px;
  background: radial-gradient(ellipse at 50% 0%, rgba(139, 92, 246, 0.04) 0%, transparent 60%);
  z-index: 0;
  pointer-events: none;
}

/* ===== Section Divider ===== */
.section-divider {
  height: 40px;
  background: var(--warm-cream);
  position: relative;
}

.section-divider::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 60px;
  height: 1px;
  background: radial-gradient(ellipse, rgba(139, 92, 246, 0.2) 0%, transparent 80%);
}

/* ===== Timeline ===== */
.timeline {
  position: relative;
  padding-left: 32px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 8px;
  bottom: 8px;
  width: 1px;
  background: linear-gradient(to bottom, rgba(139, 92, 246, 0.4), rgba(139, 92, 246, 0.1));
}

.timeline-item {
  position: relative;
  margin-bottom: 24px;
}

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

.timeline-dot {
  position: absolute;
  left: -29px;
  top: 8px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px rgba(139, 92, 246, 0.4);
  animation: dot-glow 2s ease-in-out infinite;
}

.timeline-item:nth-child(2) .timeline-dot { animation-delay: 0.3s; }
.timeline-item:nth-child(3) .timeline-dot { animation-delay: 0.6s; }

/* ===== Growth Orbs ===== */
.growth-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 24px;
  position: relative;
  padding: 24px 0;
}

.growth-orb {
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fff, #D8B4FE, #A78BFA);
  flex-shrink: 0;
}

.growth-orb-sm {
  width: 20px;
  height: 20px;
  box-shadow: 0 0 8px rgba(139, 92, 246, 0.2);
}

.growth-orb-md {
  width: 40px;
  height: 40px;
  box-shadow: 0 0 15px rgba(139, 92, 246, 0.3);
}

.growth-orb-lg {
  width: 60px;
  height: 60px;
  background: radial-gradient(circle at 35% 35%, rgba(255, 255, 255, 0.9), #D8B4FE, #A78BFA, #7C3AED);
  box-shadow: 0 0 20px rgba(139, 92, 246, 0.5), 0 0 40px rgba(139, 92, 246, 0.2);
  animation: breathe 4s ease-in-out infinite;
}

.growth-arrow {
  font-size: 18px;
  color: var(--pencil);
}

.growth-labels {
  display: flex;
  justify-content: space-between;
  padding: 0 8px;
  margin-bottom: 24px;
}

.growth-label {
  font-size: 11px;
  color: var(--pencil);
  letter-spacing: 0.5px;
}

/* ===== Phone Mockups ===== */
.phones-row {
  display: flex;
  gap: 24px;
  justify-content: center;
  align-items: flex-start;
  padding: 16px 0;
}

.phone-wrapper {
  text-align: center;
}

.phone-frame {
  width: 200px;
  height: 400px;
  border-radius: 32px;
  border: 2px solid var(--paper-edge);
  background: var(--warm-cream);
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
  transition: transform 0.4s ease;
}

.phone-frame:nth-child(1) { transform: perspective(800px) rotateY(5deg); }
.phone-frame:nth-child(3) { transform: perspective(800px) rotateY(-5deg); }

.phone-frame:hover { transform: perspective(800px) rotateY(0deg); }

.phone-notch {
  width: 80px;
  height: 8px;
  background: var(--paper-edge);
  border-radius: 0 0 10px 10px;
  margin: 0 auto;
}

.phone-content {
  padding: 12px;
}

.phone-caption {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-dark);
  margin-top: 12px;
}

.phone-caption-sub {
  font-size: 12px;
  color: var(--ink-light);
  margin-top: 4px;
}

@media (max-width: 640px) {
  .phones-row {
    overflow-x: auto;
    justify-content: flex-start;
    padding: 16px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
  }
  .phone-wrapper {
    flex-shrink: 0;
    scroll-snap-align: center;
  }
  .phone-frame { width: 180px; height: 360px; }
}

/* ===== Testimonials ===== */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.testimonial-card {
  text-align: center;
}

.testimonial-quote {
  font-family: var(--font-serif);
  font-size: 16px;
  font-style: italic;
  color: var(--ink-dark);
  line-height: 2.0;
  margin-bottom: 12px;
}

.testimonial-author {
  font-size: 13px;
  color: var(--ink-light);
}

@media (max-width: 640px) {
  .testimonials-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

/* ===== FAQ ===== */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-item {
  border: 1px solid rgba(235, 228, 216, 0.6);
  border-radius: 12px;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.7), rgba(245, 240, 232, 0.8));
}

.faq-item summary {
  padding: 16px 20px;
  font-size: 16px;
  font-weight: 500;
  color: var(--ink-dark);
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
  content: '+';
  font-size: 20px;
  color: var(--pencil);
  transition: transform 0.2s ease;
}

.faq-item[open] summary::after {
  transform: rotate(45deg);
}

.faq-answer {
  padding: 0 20px 16px;
  font-size: 14px;
  color: var(--ink-light);
  line-height: 1.7;
}

/* ===== Footer ===== */
.footer {
  background: var(--soft-paper);
  border-top: 1px solid var(--paper-edge);
  padding: 40px 24px;
  text-align: center;
}

.footer-logo {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 20px;
  color: var(--ink-dark);
  letter-spacing: 1px;
  margin-bottom: 4px;
}

.footer-tagline {
  font-size: 13px;
  color: var(--ink-light);
  margin-bottom: 24px;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 24px;
}

.footer-links a {
  font-size: 13px;
  color: var(--ink-light);
  text-decoration: none;
  transition: color 0.2s;
}

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

.footer-copy {
  font-size: 11px;
  color: var(--pencil);
}

/* ===== Phone mock inner elements ===== */
.mock-orb {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fff, #D8B4FE, #A78BFA, #7C3AED);
  margin: 12px auto;
  box-shadow: 0 0 10px rgba(139, 92, 246, 0.3);
}

.mock-line {
  height: 4px;
  background: var(--paper-edge);
  border-radius: 2px;
  margin: 8px 12px;
}

.mock-line-short {
  width: 60%;
}

.mock-card-mini {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.7), rgba(245, 240, 232, 0.8));
  border: 1px solid rgba(235, 228, 216, 0.5);
  border-radius: 10px;
  padding: 10px;
  margin: 8px 6px;
}

.mock-card-mini-text {
  font-size: 8px;
  color: var(--ink-light);
}

.mock-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  display: inline-block;
  margin-right: 4px;
}

.mock-diary-title {
  font-size: 9px;
  color: var(--ink-dark);
  text-align: center;
  margin: 12px 0 6px;
  font-weight: 500;
}

.mock-diary-text {
  font-family: var(--font-serif);
  font-size: 7px;
  color: var(--ink-dark);
  line-height: 2.2;
  padding: 4px 10px;
}

.mock-input {
  background: var(--soft-paper);
  border: 1px solid var(--paper-edge);
  border-radius: 16px;
  padding: 6px 10px;
  margin: 8px 6px;
  font-size: 7px;
  color: var(--pencil);
}

/* Calendar mock */
.mock-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 3px;
  padding: 8px;
}

.mock-cal-cell {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 4px;
  background: var(--accent-10);
}

.mock-cal-cell.intensity-2 { background: rgba(139, 92, 246, 0.25); }
.mock-cal-cell.intensity-3 { background: rgba(139, 92, 246, 0.45); }
.mock-cal-cell.intensity-4 { background: rgba(139, 92, 246, 0.65); }
.mock-cal-cell.intensity-5 { background: rgba(139, 92, 246, 0.85); }
.mock-cal-cell.empty { background: rgba(0, 0, 0, 0.03); }

/* Focus states */
a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}
