/* =========================================================
   ALGO App LP — Shared Stylesheet
   9-Section Landing Page Template
   Design OS v2: Fibonacci Spacing / Golden Ratio 1.6
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@300;400;500;600;700&display=swap');

/* ── 01. Custom Properties ─────────────────────────────── */
:root {
  /* Base palette (Design OS v2) */
  --white:    #FFFFFF;
  --gray-100: #F5F5F5;
  --gray-300: #D4D4D4;
  --gray-600: #6B6B6B;
  --gray-900: #1A1A1A;

  /* Accent — override per app */
  --accent: #6B6B6B;

  /* Fibonacci spacing */
  --sp-xs:  8px;
  --sp-sm:  13px;
  --sp-md:  21px;
  --sp-lg:  34px;
  --sp-xl:  55px;
  --sp-2xl: 89px;
  --sp-3xl: 144px;

  /* Typography */
  --font: 'Noto Sans JP', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --fs-xs:   10px;
  --fs-sm:   13px;
  --fs-body: 16px;
  --fs-lg:   20px;
  --fs-h3:   26px;
  --fs-h2:   clamp(26px, 5vw, 42px);
  --fs-hero: clamp(30px, 6vw, 48px);

  /* Layout */
  --max-w: 960px;
  --radius: 8px;
}

/* ── 02. Reset & Base ──────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-font-smoothing: antialiased; scroll-behavior: smooth; }
body {
  font-family: var(--font);
  font-size: var(--fs-body);
  color: var(--gray-900);
  background: var(--white);
  line-height: 1.6;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

/* ── 03. Shared Section Styles ─────────────────────────── */
.lp-section {
  padding: var(--sp-2xl) var(--sp-md);
}
.lp-section--alt {
  background: var(--gray-100);
}
.lp-inner {
  max-width: var(--max-w);
  margin: 0 auto;
}
.lp-section-title {
  font-size: var(--fs-h2);
  font-weight: 700;
  text-align: center;
  margin-bottom: var(--sp-xl);
  line-height: 1.4;
}
.lp-section-title::after {
  content: '';
  display: block;
  width: 34px;
  height: 3px;
  background: var(--accent);
  margin: var(--sp-sm) auto 0;
  border-radius: 2px;
}

/* ── 04. Section 1: Hero ───────────────────────────────── */
.lp-hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--sp-xl) var(--sp-md);
  background: var(--gray-900);
  color: var(--white);
  position: relative;
  overflow: hidden;
}
.lp-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--accent) 0%, transparent 60%);
  opacity: 0.15;
}
.lp-hero-inner {
  max-width: var(--max-w);
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-xl);
  position: relative;
  z-index: 1;
}
.lp-hero-text {
  text-align: center;
  max-width: 600px;
}
.lp-hero-icon {
  font-size: 55px;
  margin-bottom: var(--sp-sm);
  display: block;
}
.lp-hero-name {
  font-size: var(--fs-lg);
  font-weight: 400;
  letter-spacing: 0.1em;
  color: var(--gray-300);
  margin-bottom: var(--sp-sm);
}
.lp-hero-catch {
  font-size: var(--fs-hero);
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: var(--sp-md);
}
.lp-hero-sub {
  font-size: var(--fs-body);
  color: var(--gray-300);
  line-height: 1.8;
  margin-bottom: var(--sp-lg);
}

/* App Store Badge / Pending Badge */
.lp-store-badge {
  display: inline-block;
  height: 44px;
}
.lp-store-badge img {
  height: 44px;
  width: auto;
}
.lp-badge-pending {
  display: inline-block;
  padding: var(--sp-xs) var(--sp-md);
  border: 1px solid var(--gray-300);
  border-radius: 34px;
  font-size: var(--fs-sm);
  color: var(--gray-300);
  letter-spacing: 0.05em;
}

/* Device Mockup (CSS-only) */
.lp-device {
  width: 240px;
  flex-shrink: 0;
}
.lp-device-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 9 / 19.5;
  border: 3px solid var(--gray-300);
  border-radius: 34px;
  background: var(--white);
  overflow: hidden;
}
.lp-device-frame::before {
  content: '';
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 22px;
  background: var(--gray-900);
  border-radius: 13px;
  z-index: 2;
}
.lp-device-frame::after {
  content: '';
  position: absolute;
  bottom: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 4px;
  background: var(--gray-300);
  border-radius: 2px;
}
.lp-device-screen {
  position: absolute;
  inset: 0;
  padding: 40px var(--sp-sm) var(--sp-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--gray-900);
  font-size: var(--fs-sm);
  text-align: center;
  line-height: 1.5;
}
.lp-device-screen .screen-label {
  font-size: var(--fs-xs);
  color: var(--gray-600);
  margin-bottom: var(--sp-xs);
}
.lp-device-screen .screen-icon {
  font-size: 34px;
  margin-bottom: var(--sp-xs);
}

/* ── 05. Section 2: 3つの特徴 ─────────────────────────── */
.lp-features-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-lg);
}
.lp-feature-card {
  text-align: center;
  padding: var(--sp-lg);
}
.lp-feature-num {
  font-size: 42px;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
  margin-bottom: var(--sp-sm);
}
.lp-feature-title {
  font-size: var(--fs-lg);
  font-weight: 600;
  margin-bottom: var(--sp-sm);
}
.lp-feature-desc {
  font-size: var(--fs-body);
  color: var(--gray-600);
  line-height: 1.8;
}

/* ── 06. Section 3: スクリーンショットギャラリー ──────── */
.lp-gallery-scroll {
  display: flex;
  gap: var(--sp-md);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding-bottom: var(--sp-sm);
}
.lp-gallery-scroll::-webkit-scrollbar { height: 4px; }
.lp-gallery-scroll::-webkit-scrollbar-track { background: var(--gray-100); }
.lp-gallery-scroll::-webkit-scrollbar-thumb { background: var(--gray-300); border-radius: 2px; }

.lp-gallery-item {
  flex: 0 0 200px;
  scroll-snap-align: start;
}
.lp-gallery-device {
  width: 100%;
  aspect-ratio: 9 / 19.5;
  border: 2px solid var(--gray-300);
  border-radius: 24px;
  background: var(--white);
  overflow: hidden;
  position: relative;
}
.lp-gallery-device::before {
  content: '';
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 55px;
  height: 16px;
  background: var(--gray-100);
  border-radius: 10px;
  z-index: 2;
}
.lp-gallery-screen {
  position: absolute;
  inset: 0;
  padding: 30px var(--sp-xs) var(--sp-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: var(--fs-xs);
  color: var(--gray-600);
  text-align: center;
  line-height: 1.4;
}
.lp-gallery-caption {
  text-align: center;
  font-size: var(--fs-sm);
  color: var(--gray-600);
  margin-top: var(--sp-xs);
}

/* ── 07. Section 4: こんな人におすすめ ─────────────────── */
.lp-target-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-md);
}
.lp-target-card {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-md);
  padding: var(--sp-lg);
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--gray-300);
}
.lp-section--alt .lp-target-card {
  background: var(--white);
}
.lp-target-icon {
  font-size: 34px;
  flex-shrink: 0;
  line-height: 1;
}
.lp-target-body {}
.lp-target-title {
  font-size: var(--fs-body);
  font-weight: 600;
  margin-bottom: var(--sp-xs);
}
.lp-target-desc {
  font-size: var(--fs-sm);
  color: var(--gray-600);
  line-height: 1.7;
}

/* ── 08. Section 5: 料金 ──────────────────────────────── */
.lp-pricing-card {
  max-width: 480px;
  margin: 0 auto;
  text-align: center;
  padding: var(--sp-xl);
  background: var(--white);
  border-radius: var(--radius);
  border: 2px solid var(--accent);
}
.lp-pricing-label {
  font-size: var(--fs-sm);
  color: var(--gray-600);
  letter-spacing: 0.1em;
  margin-bottom: var(--sp-sm);
}
.lp-pricing-price {
  font-size: 42px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: var(--sp-sm);
}
.lp-pricing-note {
  font-size: var(--fs-sm);
  color: var(--gray-600);
  line-height: 1.8;
}

/* ── 09. Section 6: ユーザーの声 ──────────────────────── */
.lp-voices-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-md);
}
.lp-voice-card {
  padding: var(--sp-lg);
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--gray-300);
  position: relative;
}
.lp-voice-card::before {
  content: '\201C';
  font-size: 55px;
  color: var(--accent);
  opacity: 0.3;
  position: absolute;
  top: var(--sp-xs);
  left: var(--sp-md);
  line-height: 1;
}
.lp-voice-text {
  font-size: var(--fs-body);
  line-height: 1.8;
  margin-bottom: var(--sp-sm);
  padding-top: var(--sp-md);
}
.lp-voice-author {
  font-size: var(--fs-sm);
  color: var(--gray-600);
}
.lp-voice-coming {
  text-align: center;
  padding: var(--sp-xl);
  color: var(--gray-600);
  font-size: var(--fs-body);
}

/* ── 10. Section 7: FAQ ───────────────────────────────── */
.lp-faq-list {
  max-width: 720px;
  margin: 0 auto;
}
.lp-faq-item {
  border-bottom: 1px solid var(--gray-300);
}
.lp-faq-item:first-child {
  border-top: 1px solid var(--gray-300);
}
.lp-faq-item summary {
  padding: var(--sp-md) 0;
  font-size: var(--fs-body);
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--sp-sm);
}
.lp-faq-item summary::-webkit-details-marker { display: none; }
.lp-faq-item summary::after {
  content: '+';
  font-size: var(--fs-lg);
  color: var(--accent);
  flex-shrink: 0;
  transition: transform 0.2s;
}
.lp-faq-item[open] summary::after {
  content: '\2212';
}
.lp-faq-answer {
  padding: 0 0 var(--sp-md);
  font-size: var(--fs-body);
  color: var(--gray-600);
  line-height: 1.8;
}

/* ── 11. Section 8: ダウンロードCTA ───────────────────── */
.lp-cta {
  text-align: center;
  padding: var(--sp-2xl) var(--sp-md);
  background: var(--gray-900);
  color: var(--white);
  position: relative;
  overflow: hidden;
}
.lp-cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--accent) 0%, transparent 60%);
  opacity: 0.15;
}
.lp-cta-inner {
  position: relative;
  z-index: 1;
}
.lp-cta-title {
  font-size: var(--fs-h2);
  font-weight: 700;
  margin-bottom: var(--sp-sm);
}
.lp-cta-sub {
  font-size: var(--fs-body);
  color: var(--gray-300);
  margin-bottom: var(--sp-lg);
}

/* ── 12. Section 9: フッター ──────────────────────────── */
.lp-footer {
  padding: var(--sp-xl) var(--sp-md);
  background: var(--gray-900);
  color: var(--gray-600);
  font-size: var(--fs-sm);
  text-align: center;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.lp-footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
}
.lp-footer-company {
  margin-bottom: var(--sp-sm);
  color: var(--gray-300);
  font-weight: 500;
}
.lp-footer-links {
  display: flex;
  justify-content: center;
  gap: var(--sp-md);
  margin-bottom: var(--sp-md);
  flex-wrap: wrap;
}
.lp-footer-links a {
  color: var(--gray-600);
  transition: color 0.2s;
}
.lp-footer-links a:hover {
  color: var(--white);
}
.lp-footer-copy {
  color: var(--gray-600);
}

/* ── 13. Responsive ───────────────────────────────────── */

/* Tablet */
@media (min-width: 768px) {
  .lp-hero-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
  .lp-hero-text {
    text-align: left;
    flex: 1;
  }
  .lp-device {
    width: 280px;
  }
  .lp-features-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .lp-target-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .lp-voices-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .lp-gallery-item {
    flex: 0 0 220px;
  }
}

/* Desktop */
@media (min-width: 960px) {
  .lp-section {
    padding: var(--sp-3xl) var(--sp-md);
  }
  .lp-device {
    width: 300px;
  }
}
