:root {
  --primary-gradient: linear-gradient(135deg, #6366f1 0%, #a855f7 50%, #ec4899 100%);
  --primary-color: #6366f1;
  --secondary-color: #ec4899;
  --accent-color: #f59e0b;
  --text-primary: #111827;
  --text-secondary: #4b5563;
  --text-muted: #9ca3af;
  --bg-body: #f9fafb;
  --bg-white: #ffffff;
  --glass-bg: rgba(255, 255, 255, 0.7);
  --glass-border: rgba(255, 255, 255, 0.3);
  
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  
  --radius-md: 12px;
  --radius-lg: 24px;
  --radius-full: 9999px;
  
  --container-width: 1100px;
  --transition-smooth: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: "SF Pro JP", "SF Pro Text", "Noto Sans JP", -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-body);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition-smooth);
}

.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 24px;
}

.text-gradient {
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

/* ヘッダー */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 1000;
  border-bottom: 1px solid var(--glass-border);
  transition: transform 0.3s ease, background 0.3s ease;
}

header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 80px;
}

.logo-text {
  font-size: 1.5rem;
  font-weight: 900;
  letter-spacing: -0.04em;
  background: linear-gradient(135deg, #6366f1, #a855f7, #ec4899, #6366f1);
  background-size: 300% 300%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gradientMove 8s ease infinite;
}

@keyframes gradientMove {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

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

.nav-links a {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.nav-links a:hover {
  color: var(--primary-color);
}

.header-cta {
  background: var(--text-primary);
  color: white !important;
  padding: 10px 24px;
  border-radius: var(--radius-full);
  font-size: 0.9rem !important;
  box-shadow: var(--shadow-md);
}

.header-cta:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  background: #000;
}

.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-primary);
  cursor: pointer;
}

/* ヒーローセクション */
.hero {
  position: relative;
  padding: 180px 0 120px;
  background: var(--bg-white);
  text-align: center;
  overflow: hidden;
}

.hero-bg-gradient {
  position: absolute;
  top: -30%;
  right: -20%;
  width: 80%;
  height: 100%;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.12) 0%, rgba(236, 72, 153, 0.08) 40%, rgba(59, 130, 246, 0.05) 70%, transparent 100%);
  z-index: 0;
  filter: blur(80px);
  animation: pulseGradient 10s ease infinite alternate;
}

@keyframes pulseGradient {
  0% { transform: scale(1); opacity: 0.8; }
  100% { transform: scale(1.1); opacity: 1; }
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 850px;
  margin: 0 auto;
}

.hero-tag {
  display: inline-block;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(236, 72, 153, 0.1) 100%);
  color: var(--primary-color);
  padding: 8px 20px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 32px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.hero h1 {
  font-size: 4rem;
  font-weight: 900;
  line-height: 1.15;
  margin-bottom: 28px;
  letter-spacing: -0.04em;
  color: var(--text-primary);
}

.hero h1 .text-gradient {
  background: linear-gradient(135deg, #6366f1, #a855f7, #ec4899, #6366f1);
  background-size: 300% 300%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gradientMove 8s ease infinite;
}

.hero p {
  font-size: 1.25rem;
  color: var(--text-secondary);
  margin-bottom: 48px;
  line-height: 1.8;
}

.store-btn {
  display: inline-block;
  transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.store-btn:hover {
  transform: scale(1.05);
}

.store-btn img {
  height: 60px;
}

/* 機能セクション（Bento Grid） */
.features {
  padding: 100px 0;
  background: var(--bg-body);
}

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

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  max-width: var(--container-width);
  margin: 0 auto;
}

.feature-card {
  background: var(--bg-white);
  border-radius: 24px;
  padding: 40px 32px;
  box-shadow: var(--shadow-md);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border: 1px solid rgba(255, 255, 255, 0.5);
  position: relative;
  overflow: hidden;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.feature-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-xl);
}

/* 最初の2つは大きく表示 (2カラム分) */
.card-large {
  grid-column: span 3;
}

@media (min-width: 768px) {
  .card-large {
    grid-column: span 3; /* タブレット以上では一旦3列全部使うか調整 */
  }
}

@media (min-width: 1024px) {
  .features-grid {
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: auto auto;
  }
  
  /* レイアウト調整: 
     Row 1: Large(2/3) + Small(1/3) -> Scan + Photo
     Row 2: Large(2/3) + Small(1/3) -> Create + Logo
     Row 3: Center or Flow -> History
     
     もっとシンプルに:
     Row 1: Scan(Large 1.5) | Create(Large 1.5)
     Row 2: Photo | Logo | History
  */
  
  .card-large {
    grid-column: span 1; /* リセット */
  }
  
  /* 上段2つを強調 */
  .features-grid .feature-card:nth-child(1),
  .features-grid .feature-card:nth-child(2) {
    grid-column: span 2; /* 2つで3列を埋めるのは難しいので、構成を変える */
  }
  
  /* 
     3列レイアウト案
     [ Scan (span 2) ] [ Photo ]
     [ Create (span 2)] [ Logo ]
     [ History (span 3) ] -> 下段に配置
  */
}

/* シンプルで確実なグリッド構成 (PC)
   [ Scan (span 1.5 -> 50%) ] [ Create (span 1.5 -> 50%) ] 
   [ Photo ] [ Logo ] [ History ]
*/
@media (min-width: 900px) {
  .features-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .card-large {
    grid-column: span 3; /* スマホ・タブレットは縦積み */
  }
  
  /* PC配置 */
  .features-grid .feature-card:nth-child(1) { grid-column: span 2; } /* Scan */
  .features-grid .feature-card:nth-child(2) { grid-column: span 1; } /* Create? No, Photo is 3rd in HTML... wait HTML order: Scan, Create, Photo, Logo, History */
  
  /* HTML順序: 1.Scan(Large), 2.Create(Large), 3.Photo, 4.Logo, 5.History 
     これを配置する
  */
  
  /* Row 1 */
  .features-grid .feature-card:nth-child(1) { grid-column: span 2; } /* Scan */
  .features-grid .feature-card:nth-child(3) { grid-column: span 1; } /* Photo */
  
  /* Row 2 */
  .features-grid .feature-card:nth-child(2) { grid-column: span 2; order: 4; } /* Create -> 右に持っていきたいが... order使う */
  .features-grid .feature-card:nth-child(4) { grid-column: span 1; order: 3; } /* Logo */
  
  /* Row 3 */
  .features-grid .feature-card:nth-child(5) { grid-column: span 3; order: 5; display: flex; flex-direction: row; align-items: center; justify-content: center; gap: 20px;} /* History */
}

.feature-icon-wrapper {
  width: 72px;
  height: 72px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  transition: transform 0.3s ease;
}

.feature-card:hover .feature-icon-wrapper {
  transform: scale(1.1) rotate(5deg);
}

.feature-icon {
  font-size: 2rem;
  color: white;
}

.bg-scan-gradient { background: linear-gradient(135deg, #3b82f6, #2dd4bf); box-shadow: 0 10px 20px -5px rgba(59, 130, 246, 0.4); }
.bg-create-gradient { background: linear-gradient(135deg, #f59e0b, #ef4444); box-shadow: 0 10px 20px -5px rgba(245, 158, 11, 0.4); }
.bg-photo-gradient { background: linear-gradient(135deg, #8b5cf6, #d946ef); box-shadow: 0 10px 20px -5px rgba(139, 92, 246, 0.4); }
.bg-logo-gradient { background: linear-gradient(135deg, #10b981, #3b82f6); box-shadow: 0 10px 20px -5px rgba(16, 185, 129, 0.4); }
.bg-history-gradient { background: linear-gradient(135deg, #6366f1, #a855f7); box-shadow: 0 10px 20px -5px rgba(99, 102, 241, 0.4); }

.feature-card h3 {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}

.feature-card p {
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.6;
}

/* レスポンシブ修正 */
@media (max-width: 900px) {
  .features-grid {
    grid-template-columns: 1fr;
  }
  .card-large, .features-grid .feature-card {
    grid-column: span 1 !important;
  }
  .features-grid .feature-card:nth-child(5) {
    flex-direction: column;
  }
}

/* おすすめ/ユースケース */
.usage-section {
  padding: 120px 0;
  background: var(--bg-white);
  text-align: center;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

.section-subtitle {
  color: var(--text-secondary);
  font-size: 1.2rem;
  max-width: 600px;
  margin: 0 auto 64px;
}

.usage-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 32px;
}

.usage-card {
  padding: 48px 32px;
  background: var(--bg-body);
  border-radius: var(--radius-lg);
  transition: var(--transition-smooth);
  border: 1px solid transparent;
}

.usage-card:hover {
  transform: translateY(-10px);
  background: var(--bg-white);
  box-shadow: var(--shadow-xl);
  border-color: rgba(99, 102, 241, 0.1);
}

.usage-emoji {
  font-size: 3rem;
  margin-bottom: 24px;
}

.usage-card h4 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 16px;
}

.usage-card p {
  color: var(--text-secondary);
}

/* アプリ情報 */
.info-section {
  padding: 100px 0;
  background: var(--bg-body);
}

.info-table-wrapper {
  max-width: 600px;
  margin: 0 auto;
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.info-table {
  width: 100%;
  border-collapse: collapse;
}

.info-table th, .info-table td {
  padding: 24px 32px;
  text-align: left;
  border-bottom: 1px solid #f3f4f6;
}

.info-table tr:last-child th, .info-table tr:last-child td {
  border-bottom: none;
}

.info-table th {
  background: #f9fafb;
  width: 30%;
  font-weight: 700;
  color: var(--text-secondary);
}

/* CTA */
.cta-section {
  position: relative;
  padding: 140px 0;
  background: #0f172a;
  color: white;
  text-align: center;
  overflow: hidden;
}

.cta-gradient-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 20% 30%, rgba(99, 102, 241, 0.15) 0%, transparent 50%),
              radial-gradient(circle at 80% 70%, rgba(236, 72, 153, 0.15) 0%, transparent 50%);
}

.cta-content {
  position: relative;
  z-index: 1;
}

.cta-content h2 {
  font-size: 3.5rem;
  font-weight: 900;
  margin-bottom: 24px;
  line-height: 1.2;
}

.cta-content p {
  color: #94a3b8;
  font-size: 1.5rem;
  margin-bottom: 48px;
}

/* フッター */
footer {
  background: var(--bg-white);
  padding: 80px 0 40px;
  border-top: 1px solid #f3f4f6;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 60px;
}

.footer-logo {
  font-weight: 900;
  font-size: 1.5rem;
  margin-bottom: 12px;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.footer-info p {
  color: var(--text-muted);
}

.footer-links {
  text-align: right;
}

.footer-contact-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}

.footer-links a {
  font-weight: 600;
  color: var(--text-secondary);
}

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

.copyright {
  text-align: center;
  padding-top: 40px;
  border-top: 1px solid #f3f4f6;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* アニメーション */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: all 1s cubic-bezier(0.2, 0.8, 0.2, 1);
}

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

/* レスポンシブ */
@media (max-width: 1024px) {
  .hero h1 { font-size: 3.5rem; }
  .feature-container { gap: 60px; }
}

@media (max-width: 900px) {
  .feature-container {
    grid-template-columns: 1fr;
    text-align: center;
    direction: ltr !important;
  }
  
  .feature-image {
    order: -1;
    max-width: 500px;
    margin: 0 auto;
  }
  
  .hero h1 { font-size: 3rem; }
  .cta-content h2 { font-size: 2.5rem; }
}

@media (max-width: 768px) {
  header .container { height: 70px; }
  
  .nav-links {
    display: none;
    position: absolute;
    top: 70px;
    left: 0;
    width: 100%;
    background: white;
    flex-direction: column;
    padding: 40px 0;
    gap: 1.5rem;
    box-shadow: var(--shadow-xl);
  }

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

  .mobile-menu-toggle {
    display: block;
  }
  
  .hero { padding: 140px 0 80px; }
  .hero h1 { font-size: 2.5rem; }
  .hero p { font-size: 1.1rem; }
  
  .footer-content {
    flex-direction: column;
    gap: 40px;
    align-items: center;
    text-align: center;
  }
}