/* Base Reset */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --color-bg: #FFFFFF;
  --color-text: #1d1d1f;
  /* Apple's dark gray */
  --color-text-light: #515155;
  --color-accent: #137ce4;
  /* Apple Blue */
  --color-placeholder: #f5f5f7;
  --font-family-base: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-family-base);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Animations (Intersection Observer Targets) */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 1s cubic-bezier(0.25, 1, 0.5, 1), transform 1s cubic-bezier(0.25, 1, 0.5, 1);
}

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

/* Typography */
h1,
h2,
h3 {
  font-weight: 600;
  letter-spacing: -0.015em;
}

/* Buttons */
.cta-button {
  display: inline-block;
  text-decoration: none;
  background-color: var(--color-text);
  color: var(--color-bg);
  border: none;
  padding: 14px 28px;
  font-size: 17px;
  font-weight: 500;
  border-radius: 980px;
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.cta-button:hover {
  opacity: 0.9;
  transform: scale(1.02);
}

.cta-button.primary {
  background-color: var(--color-accent);
}

/* Navigation */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  z-index: 1000;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.nav-content {
  max-width: 980px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-weight: 600;
  font-size: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo a {
  color: inherit;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 20px;
}

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

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
  z-index: 1001;
}

.menu-toggle .bar {
  width: 22px;
  height: 2px;
  background-color: var(--color-text);
  border-radius: 2px;
  transition: all 0.3s ease;
}

.menu-toggle.open .bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.menu-toggle.open .bar:nth-child(2) {
  opacity: 0;
}

.menu-toggle.open .bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.mobile-menu {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 998;
  display: flex;
  flex-direction: column;
  padding: 100px 20px;
  transform: translateY(-100%);
  opacity: 0;
  transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.4s;
  pointer-events: none;
}

.mobile-menu.open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.mobile-nav-link {
  font-size: 24px;
  font-weight: 600;
  color: var(--color-text);
  text-decoration: none;
  padding: 15px 0;
  border-bottom: 1px solid var(--color-placeholder);
}

.nav-link {
  text-decoration: none;
  font-size: 14px;
  color: var(--color-text);
  font-weight: 500;
  transition: color 0.2s;
}

.nav-link:hover {
  color: var(--color-accent);
}

.nav-logo-icon {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  object-fit: cover;
}

.nav-btn {
  text-decoration: none;
  font-size: 12px;
  color: var(--color-text);
  background: var(--color-placeholder);
  padding: 6px 14px;
  border-radius: 980px;
  font-weight: 500;
  transition: background 0.2s;
}

.nav-btn:hover {
  background: #e5e5ea;
}

/* Hero Section */
.hero {
  padding: 140px 20px 80px;
  text-align: center;
  max-width: 1200px;
  margin: 0 auto;
}

.hero-text .headline {
  font-size: clamp(40px, 6vw, 64px);
  line-height: 1.1;
  margin-bottom: 50px;
}

.hero-animation-container {
  position: relative;
  margin: 0 auto 50px;
  max-width: 800px;
  z-index: 1;
}

.hero-images {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  /* 下を揃える (align bottom) */
  width: 100%;
}

.hero-image-part {
  width: auto;
  /* 幅を固定せず、オリジナルの比率に従う */
  height: auto;
  max-width: 100%;
  min-width: 0;
  /* フレックスコンテナ内での縮小時に縦横比が潰れるのを防ぐ */
  transition: all 1.2s cubic-bezier(0.25, 1, 0.5, 1);
  will-change: transform;
}

.hero-animation-container.animated .part-1 {
  transform: scale(0.7) translateX(-45%);
}

.hero-animation-container.animated .part-2 {
  transform: scale(0.7) translateX(45%);
}

/* Notification Popup */
.hero-notification {
  position: absolute;
  top: 35%;
  /* Moved up from 50% */
  left: 50%;
  width: 90%;
  max-width: 350px;
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border-radius: 24px;
  padding: 16px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15), 0 1px 3px rgba(0, 0, 0, 0.05);
  transform: translate(-50%, -50%) scale(0.8) translateY(30px);
  opacity: 0;
  transition: all 1s cubic-bezier(0.25, 1, 0.5, 1);
  transition-delay: 0.3s;
  pointer-events: none;
  z-index: 10;
  text-align: left;
}

.hero-animation-container.animated .hero-notification {
  transform: translate(-50%, -50%) scale(1) translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.notification-header {
  display: flex;
  align-items: center;
  margin-bottom: 8px;
}

.notification-icon {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  margin-right: 8px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.notification-app-name {
  font-size: 13px;
  font-weight: 600;
  color: #1d1d1f;
  flex: 1;
}

.notification-time {
  font-size: 12px;
  color: #86868b;
}

.notification-body {
  padding-left: 2px;
}

.notification-title {
  font-size: 15px;
  font-weight: 600;
  color: #1d1d1f;
  margin-bottom: 2px;
}

.notification-text {
  font-size: 14px;
  color: #1d1d1f;
}

/* Features Section */
.features {
  padding: 80px 20px;
  max-width: 1000px;
  margin: 0 auto;
}

.feature-block {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 150px;
  gap: 60px;
}

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

.feature-text {
  flex: 1;
}

.feature-headline {
  font-size: clamp(32px, 4vw, 48px);
  line-height: 1.1;
  margin-bottom: 20px;
}

.feature-desc {
  font-size: 20px;
  color: var(--color-text-light);
  line-height: 1.4;
}

.feature-links {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.feature-link {
  font-size: 16px;
  color: var(--color-accent);
  text-decoration: none;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  transition: opacity 0.2s;
}

.feature-link:hover {
  opacity: 0.8;
  text-decoration: underline;
}

.feature-visual {
  flex: 1;
  display: flex;
  justify-content: center;
}

/* Accessibility */
.accessibility {
  background-color: #fafafa;
  padding: 120px 20px;
  text-align: center;
}

.acc-content {
  max-width: 800px;
  margin: 0 auto;
}

.acc-headline {
  font-size: clamp(28px, 4vw, 40px);
  margin-bottom: 20px;
}

.acc-desc {
  font-size: 18px;
  color: var(--color-text-light);
  margin-bottom: 60px;
}

.acc-visual {
  max-width: 800px;
  margin: 0 auto;
}

/* Developer Story */
.developer-story {
  padding: 120px 20px;
  text-align: center;
}

.story-content {
  max-width: 600px;
  margin: 0 auto;
}

.story-headline {
  font-size: clamp(32px, 5vw, 56px);
  margin-bottom: 30px;
}

.story-desc {
  font-size: 19px;
  color: var(--color-text-light);
  margin-bottom: 50px;
}

.developer-name {
  display: block;
  margin-top: 20px;
  font-size: 15px;
  color: var(--color-text);
  font-weight: 500;
}

/* Footer */
.footer {
  background-color: #f5f5f7;
  padding: 40px 20px;
  font-size: 12px;
  color: var(--color-text-light);
}

.footer-content {
  max-width: 980px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.footer-links {
  list-style: none;
  display: flex;
  gap: 20px;
  margin-bottom: 20px;
}

.footer-links a {
  color: var(--color-text);
  text-decoration: none;
  transition: color 0.2s;
}

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

/* Placeholders */
.placeholder-img {
  background-color: var(--color-placeholder);
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: 20px;
  color: var(--color-text-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

img.placeholder-img {
  object-fit: cover;
  width: 100%;
}

.aspect-landscape {
  aspect-ratio: 16 / 9;
}

.aspect-iphone {
  aspect-ratio: 9 / 19.5;
  width: 100%;
  max-width: 300px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  border-radius: 40px;
  /* iPhone modern corner radius */
  border: 8px solid #000;
  /* Subtle bezel simulation */
}

.aspect-watch {
  aspect-ratio: 4 / 5;
  width: 100%;
  max-width: 200px;
  border-radius: 40px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  border: 10px solid #1a1a1a;
}

.aspect-iphone-landscape {
  aspect-ratio: 19.5 / 9;
  width: 100%;
  border-radius: 40px;
  border: 8px solid #000;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* Media Queries */
@media (max-width: 768px) {
  .feature-block {
    flex-direction: column;
    text-align: center;
    gap: 40px;
    margin-bottom: 100px;
  }

  .feature-block.row-reverse {
    flex-direction: column;
  }
}

/* Blog Index */
.blog-index-page {
  padding: 140px 20px 80px;
  max-width: 1000px;
  margin: 0 auto;
}

.blog-header {
  text-align: center;
  margin-bottom: 60px;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 30px;
}

.blog-card {
  display: block;
  text-decoration: none;
  background: var(--color-bg);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1), box-shadow 0.3s ease;
  color: var(--color-text);
}

.blog-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.blog-card-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  background-size: cover;
  background-position: center;
  background-color: var(--color-placeholder);
}

.blog-card-content {
  padding: 20px;
}

.blog-card-date {
  font-size: 13px;
  color: var(--color-text-light);
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
}

.blog-card-title {
  font-size: 18px;
  line-height: 1.4;
  font-weight: 600;
  margin: 0;
}

/* Article Page */
.article-page {
  padding-top: 80px;
  min-height: 100vh;
}

.article-hero {
  width: 100%;
  max-width: 760px; /* Changed from 1200px to perfectly align with content */
  margin: 0 auto 10px;
  padding: 20px;
}

.article-hero-image {
  width: 100%;
  aspect-ratio: 2 / 1;
  border-radius: 20px;
  background-size: cover;
  background-position: center;
  background-color: var(--color-placeholder);
}

.article-container {
  max-width: 720px;
  margin: 0 auto;
  padding: 40px 20px 80px;
}

.article-header {
  margin-bottom: 40px;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.article-date {
  color: var(--color-text-light);
  font-size: 15px;
  font-weight: 500;
}

.article-category {
  background-color: var(--color-placeholder);
  color: var(--color-text);
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  font-weight: 600;
}

.article-title {
  font-size: clamp(32px, 5vw, 48px);
  line-height: 1.25;
  letter-spacing: -0.02em;
}

/* Article Content Formatting (MicroCMS rich editor output) */
.article-content {
  font-size: 18px;
  line-height: 1.8;
  color: var(--color-text);
}

.article-content h2 {
  font-size: 28px;
  margin-top: 60px;
  margin-bottom: 24px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--color-placeholder);
}

.article-content h3 {
  font-size: 22px;
  margin-top: 40px;
  margin-bottom: 20px;
}

.article-content p {
  margin-bottom: 24px;
}

.article-content img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  margin: 30px 0;
}

.article-content ul,
.article-content ol {
  margin-bottom: 24px;
  padding-left: 24px;
}

.article-content li {
  margin-bottom: 10px;
}

.article-content a {
  color: var(--color-accent);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.article-content a:hover {
  opacity: 0.8;
}

/* カスタムダウンロードボタン（クラス指定用） */
.article-content a.download-btn {
  display: inline-block;
  background-color: var(--color-text);
  color: var(--color-bg);
  padding: 14px 28px;
  font-size: 17px;
  font-weight: 500;
  border-radius: 980px;
  text-decoration: none;
  text-align: center;
  margin: 30px 0;
  transition: transform 0.2s ease, opacity 0.2s ease;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
  word-break: keep-all;
}

/* App Storeへのリンクを自動的にボタン化（URL直貼り対策） */
.article-content a[href*="apps.apple.com"] {
  display: inline-block;
  background-color: var(--color-text);
  color: var(--color-bg);
  padding: 14px 28px;
  font-size: 0; /* 元のURLテキスト・長い文字列を隠す */
  font-weight: 500;
  border-radius: 980px;
  text-decoration: none;
  text-align: center;
  margin: 30px 0;
  transition: transform 0.2s ease, opacity 0.2s ease;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
  vertical-align: middle;
}

/* 隠したURLテキストの代わりに、疑似要素で綺麗なボタン名を表示する */
.article-content a[href*="apps.apple.com"]::before {
  content: "App Storeでダウンロード";
  font-size: 17px; /* ここで文字サイズを復活させる */
}

.article-content a.download-btn:hover,
.article-content a[href*="apps.apple.com"]:hover {
  opacity: 0.9;
  transform: scale(1.02);
  text-decoration: none;
}

.article-footer {
  margin-top: 80px;
  padding-top: 40px;
  border-top: 1px solid var(--color-placeholder);
  text-align: center;
}

.back-to-blog {
  display: inline-block;
  color: var(--color-text);
  font-weight: 600;
  text-decoration: none;
  font-size: 16px;
  background: var(--color-placeholder);
  padding: 12px 24px;
  border-radius: 999px;
  transition: background 0.2s;
}

.back-to-blog:hover {
  background: #e5e5ea;
}

@media (max-width: 768px) {
  .article-hero {
    padding: 15px 15px 0;
  }

  .article-hero-image {
    aspect-ratio: 16 / 9;
    border-radius: 16px;
  }

  .article-content {
    font-size: 16px;
  }
}

/* Updates Section (Top Page) */
.updates {
  padding: 80px 20px;
  max-width: 800px;
  margin: 0 auto;
}

.updates-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--color-placeholder);
  padding-bottom: 16px;
}

.updates-headline {
  font-size: clamp(24px, 4vw, 32px);
  margin: 0;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.view-all-link {
  font-size: 15px;
  color: var(--color-accent);
  text-decoration: none;
  font-weight: 500;
  transition: opacity 0.2s;
}

.view-all-link:hover {
  opacity: 0.8;
  text-decoration: underline;
}

.update-item {
  display: flex;
  gap: 20px;
  padding: 24px 0;
  border-bottom: 1px solid var(--color-placeholder);
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s, opacity 0.2s;
  align-items: center;
}

.update-item:last-child {
  border-bottom: none;
}

.update-item:hover {
  transform: translateX(4px);
  opacity: 0.8;
}

.update-date {
  font-size: 14px;
  color: var(--color-text-light);
  min-width: 90px;
  font-weight: 500;
}

.update-tag {
  font-size: 12px;
  background: var(--color-placeholder);
  padding: 4px 10px;
  border-radius: 999px;
  margin-right: 12px;
  font-weight: 600;
  color: var(--color-text);
  white-space: nowrap;
}

.update-title {
  font-size: 16px;
  font-weight: 500;
  margin: 0;
  flex: 1;
  line-height: 1.4;
}

/* Q&A Section */
.qa {
  padding: 80px 20px;
  max-width: 800px;
  margin: 0 auto;
}

.qa-content {
  width: 100%;
}

.qa-headline {
  font-size: clamp(28px, 4vw, 40px);
  margin-bottom: 40px;
  text-align: center;
}

.qa-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.qa-item {
  border-bottom: 1px solid var(--color-placeholder);
}

.qa-question {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: none;
  border: none;
  padding: 20px 0;
  font-size: 18px;
  font-weight: 500;
  color: var(--color-text);
  cursor: pointer;
  text-align: left;
  line-height: 1.4;
  transition: color 0.2s;
}

.qa-question:hover {
  color: var(--color-accent);
}

.qa-icon {
  transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1);
  color: var(--color-text-light);
}

.qa-item.active .qa-icon {
  transform: rotate(180deg);
}

.qa-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.3s cubic-bezier(0.25, 1, 0.5, 1);
  opacity: 0;
}

.qa-item.active .qa-answer {
  opacity: 1;
}

.qa-answer p {
  padding-bottom: 24px;
  font-size: 16px;
  color: var(--color-text-light);
  line-height: 1.6;
}

.qa-answer ul,
.qa-answer ol {
  padding-left: 28px;
  padding-bottom: 24px;
  font-size: 16px;
  color: var(--color-text-light);
  line-height: 1.6;
}

.qa-answer li {
  margin-bottom: 8px;
}

@media (max-width: 600px) {
  .update-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 20px 0;
  }

  .update-date {
    min-width: auto;
  }

  /* Global Responsive Adjustments for Smartphones */
  .nav-content {
    padding: 10px 15px;
  }

  .logo {
    font-size: 15px;
  }

  .logo a {
    gap: 6px;
  }

  .nav-logo-icon {
    width: 20px;
    height: 20px;
  }

  .nav-desktop-links {
    display: none;
  }

  .nav-actions {
    gap: 12px;
  }

  .menu-toggle {
    display: flex;
  }

  .nav-link {
    font-size: 12px;
  }

  .nav-btn {
    padding: 6px 12px;
    font-size: 11px;
  }

  .hero {
    padding: 100px 15px 50px;
  }

  .hero-text .headline {
    font-size: clamp(32px, 8vw, 44px);
    margin-bottom: 30px;
  }

  .hero-animation-container.animated .part-1 {
    transform: scale(0.65) translate(-45%, 80px);
  }

  .hero-animation-container.animated .part-2 {
    transform: scale(0.65) translate(45%, 80px);
  }

  .feature-headline,
  .acc-headline,
  .story-headline,
  .updates-headline,
  .qa-headline {
    font-size: clamp(26px, 7vw, 32px);
  }

  .feature-desc,
  .acc-desc,
  .story-desc {
    font-size: 16px;
  }

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

  .blog-index-page {
    padding: 100px 15px 50px;
  }

  .blog-grid {
    grid-template-columns: 1fr;
  }

  .article-title {
    font-size: clamp(24px, 7vw, 32px);
  }

  .article-page {
    padding-top: 60px;
  }

  .qa-question {
    font-size: 16px;
    padding: 16px 0;
  }

  .qa-answer p,
  .qa-answer ul,
  .qa-answer ol {
    font-size: 15px;
    padding-bottom: 20px;
  }
}