/* ===== CSS Variables ===== */
:root {
  color-scheme: light dark;
  --bg: #faf7f4;
  --surface: rgba(255, 255, 255, 0.88);
  --surface-strong: #ffffff;
  --surface-soft: #f3ece6;
  --text: #2f1f16;
  --subtext: #6a5244;
  --line: rgba(122, 74, 53, 0.16);
  --accent: #7a4a35;
  --accent-strong: #643927;
  --accent-soft: rgba(122, 74, 53, 0.11);
  --accent-glow: rgba(122, 74, 53, 0.18);
  --shadow-sm: 0 4px 16px rgba(81, 48, 35, 0.10);
  --shadow-md: 0 16px 48px rgba(81, 48, 35, 0.14);
  --shadow-lg: 0 32px 80px rgba(81, 48, 35, 0.18);
  --wrap: min(1180px, calc(100% - 40px));
  --radius-card: 28px;
  --radius-sm: 14px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1b1512;
    --surface: rgba(39, 30, 26, 0.92);
    --surface-strong: #261d19;
    --surface-soft: #2a1f1a;
    --text: #f7efe9;
    --subtext: #d0b8aa;
    --line: rgba(255, 240, 232, 0.10);
    --accent: #d49d7f;
    --accent-strong: #e9b69a;
    --accent-soft: rgba(212, 157, 127, 0.13);
    --accent-glow: rgba(212, 157, 127, 0.20);
    --shadow-sm: 0 4px 16px rgba(0, 0, 0, 0.24);
    --shadow-md: 0 16px 48px rgba(0, 0, 0, 0.32);
    --shadow-lg: 0 32px 80px rgba(0, 0, 0, 0.44);
  }
}

/* ===== Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Hiragino Sans", "Noto Sans JP", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
.wrap { width: var(--wrap); margin: 0 auto; }

/* ===== Navigation ===== */
.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(24px) saturate(160%);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
  gap: 20px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.08rem;
  letter-spacing: -0.01em;
}
.brand img {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  box-shadow: 0 6px 18px rgba(122, 74, 53, 0.22);
}
.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

/* ===== Buttons ===== */
.primary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
  cursor: pointer;
}
.primary-button:hover { transform: translateY(-2px); }
.ghost-button:hover { transform: translateY(-1px); }

.primary-button {
  min-height: 44px;
  padding: 0 20px;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #fff;
  box-shadow: 0 8px 24px var(--accent-glow);
}
.primary-button:hover { box-shadow: 0 14px 36px var(--accent-glow); }
.primary-button.large { min-height: 52px; padding: 0 26px; font-size: 1rem; }

.ghost-button {
  min-height: 40px;
  padding: 0 14px;
  color: var(--subtext);
}
.ghost-button:hover { background: var(--accent-soft); color: var(--text); }

.appstore-badge { display: inline-block; transition: transform 0.18s ease, opacity 0.18s ease; }
.appstore-badge img { height: 52px; width: auto; display: block; }
.appstore-badge:hover { transform: translateY(-2px); opacity: 0.88; }
.nav-badge img { height: 32px; }

/* ===== Common Labels ===== */
.eyebrow {
  margin: 0 0 10px;
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 800;
}
.section-header {
  text-align: center;
  margin-bottom: 52px;
}
.section-title {
  margin: 0;
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

/* ===== Hero Section ===== */
.hero-section {
  padding: 48px 0 0;
  overflow: hidden;
}
.hero {
  display: grid;
  grid-template-columns: 1fr 460px;
  gap: 40px;
  align-items: center;
  min-height: calc(100svh - 68px - 48px);
}
.hero-copy {
  padding-bottom: 80px;
  min-width: 0; /* グリッドセルからのはみ出しを防ぐ */
}
.hero h1 {
  margin: 0;
  font-size: clamp(2.6rem, 5vw, 5.4rem); /* min を下げて中間サイズでの溢れを防ぐ */
  line-height: 1.04;
  letter-spacing: -0.04em;
  font-weight: 800;
}
.hero-text {
  margin: 24px 0 0;
  font-size: clamp(1rem, 1.5vw, 1.12rem);
  color: var(--subtext);
  max-width: 480px;
  line-height: 1.82;
  overflow-wrap: break-word;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}
.hero-note {
  margin: 16px 0 0;
  color: var(--subtext);
  font-size: 0.85rem;
}

/* ===== Hero Phone Visual ===== */
.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: flex-end;
}

/* グロー背景 */
.hero-visual::before {
  content: '';
  position: absolute;
  width: 560px;
  height: 560px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 68%);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -42%);
  pointer-events: none;
  z-index: 0;
}

.hero-phones {
  position: relative;
  width: 100%;
  max-width: 440px;
  height: 600px;
  z-index: 1;
}

.hero-phone-front,
.hero-phone-back {
  position: absolute;
  bottom: 0;
}
.hero-phone-front {
  width: 76%;
  left: 0;
  z-index: 2;
  filter: drop-shadow(0 48px 80px rgba(81, 48, 35, 0.30));
}
.hero-phone-back {
  width: 70%;
  right: 0;
  bottom: 56px;
  z-index: 1;
  filter: drop-shadow(0 24px 52px rgba(81, 48, 35, 0.18));
  transform: rotate(4deg);
  opacity: 0.94;
}

/* ===== Gallery Section ===== */
.gallery-section {
  padding: 88px 0 76px;
  background: var(--surface-soft);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.gallery-section .section-header {
  margin-bottom: 32px;
}
.gallery-track-wrap {
  position: relative;
  overflow: hidden;
}
.gallery-track {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  padding: 16px 80px 40px;
  padding-left: max(80px, calc((100vw - 1180px) / 2 + 40px));
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.gallery-track::-webkit-scrollbar { display: none; }
.gallery-item {
  flex-shrink: 0;
  width: 220px;
  margin: 0;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  gap: 18px;
  cursor: default;
}
.gallery-item img {
  width: 100%;
  filter: drop-shadow(0 16px 40px rgba(81, 48, 35, 0.22));
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.35s ease;
}
.gallery-item:hover img {
  transform: translateY(-6px) scale(1.02);
  filter: drop-shadow(0 28px 56px rgba(81, 48, 35, 0.28));
}
.gallery-item figcaption {
  text-align: center;
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--subtext);
}
.gallery-item figcaption strong {
  display: block;
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 3px;
}


/* ===== Web Section ===== */
.web-section {
  background: linear-gradient(160deg,
    color-mix(in srgb, var(--accent) 9%, var(--bg)),
    var(--bg) 55%
  );
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 88px 0;
  overflow: hidden;
}
.web-section-inner {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 64px;
  align-items: center;
}
.web-copy h2 {
  margin: 0 0 16px;
  font-size: clamp(2.2rem, 3.2vw, 3.2rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.08;
}
.web-copy p {
  margin: 0 0 28px;
  color: var(--subtext);
  font-size: 1rem;
  line-height: 1.82;
}
.web-note {
  margin: 12px 0 0;
  color: var(--subtext);
  font-size: 0.86rem;
}
.web-visual {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-width: 0;
}
.web-screenshot {
  width: 100%;
  max-width: 720px;
  border-radius: 14px;
  box-shadow:
    0 2px 0 rgba(255,255,255,0.06) inset,
    0 24px 64px rgba(0, 0, 0, 0.36),
    0 4px 16px rgba(0, 0, 0, 0.20);
  transition: box-shadow 0.3s ease, transform 0.3s ease;
  display: block;
}
.web-screenshot:hover {
  transform: translateY(-4px);
  box-shadow:
    0 2px 0 rgba(255,255,255,0.06) inset,
    0 36px 80px rgba(0, 0, 0, 0.40),
    0 8px 24px rgba(0, 0, 0, 0.24);
}

/* ===== Pricing Section ===== */
.pricing-section {
  padding: 96px 0 88px;
}
.pricing-layout {
  max-width: 480px;
  margin: 0 auto;
}
.feature-list {
  list-style: none;
  margin: 0 0 8px;
  padding: 0;
}
.feature-list li {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 15px 2px;
  font-size: 0.97rem;
  border-bottom: 1px solid var(--line);
}
.feature-list li:first-child {
  border-top: 1px solid var(--line);
}

.pricing-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 36px;
}

/* ===== Footer ===== */
.footer {
  border-top: 1px solid var(--line);
  padding: 24px 0 32px;
  color: var(--subtext);
  font-size: 0.88rem;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.footer-author { color: inherit; }
.footer-author:hover { color: var(--text); }
.footer nav {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.footer a:hover { color: var(--text); }

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .hero {
    grid-template-columns: 1fr 400px;
    gap: 40px;
  }
  .hero-phones { max-width: 400px; height: 540px; }
  .hero-visual::before { width: 480px; height: 480px; }

  .web-section-inner {
    grid-template-columns: 320px 1fr;
    gap: 48px;
  }
}

@media (max-width: 860px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-bottom: 60px;
    gap: 40px;
  }
  .hero-copy { padding-bottom: 0; }
  .hero-text { max-width: 100%; }
  .hero-visual { justify-content: center; }

  /* 860px以下はヒーロービジュアルを非表示（ギャラリーと重複するため） */
  .hero-visual { display: none; }
  .hero-phone-back { display: none; }
  .hero-phones {
    height: auto;
    max-width: 300px;
    margin: 0 auto;
  }
  .hero-phone-front {
    position: static;
    width: 100%;
  }
  .hero-visual::before { width: 360px; height: 360px; }

  .web-section-inner {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

@media (max-width: 640px) {
  /* ナビ: 1行 (ghost ボタン非表示) */
  .nav-inner {
    flex-direction: row;
    align-items: center;
    min-height: 60px;
    gap: 12px;
  }
  /* ヒーロー h1: 「に。」だけ残るのを防ぐ */
  .hero h1 {
    font-size: 2.4rem;
    word-break: keep-all;
    overflow-wrap: break-word;
  }
  .hero h1 br { display: none; }
  .hero-copy { padding-bottom: 0; }

  /* 640px以下はさらに小さく */
  .hero-phones { max-width: 240px; }
  .hero-visual::before { width: 280px; height: 280px; }

  .gallery-track { padding: 16px 40px 40px; }
  .gallery-item { width: 180px; }


}

/* 極小画面 (320px前後) : h1を2行に収める */
@media (max-width: 380px) {
  .hero h1 { font-size: 2rem; }
  .hero-phones { max-width: 200px; }
}
