/* ================================
   CSS Variables
   ================================ */
:root {
  --color-primary: #FF6F00;
  --color-primary-dark: #E56200;
  --color-primary-light: #FF8F33;
  --color-success: #1E8E3E;
  --color-warning: #B95000;
  --color-info: #0057B7;
  --color-surface: #F7F5F2;
  --color-surface-alt: #FFFFFF;
  --color-text: #1A1A1A;
  --color-text-secondary: #666666;
  --color-text-muted: #999999;
  --color-border: #E0E0E0;

  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Hiragino Sans", "Noto Sans JP", sans-serif;

  --spacing-xs: 4px;
  --spacing-sm: 8px;
  --spacing-md: 16px;
  --spacing-lg: 24px;
  --spacing-xl: 32px;
  --spacing-2xl: 48px;
  --spacing-3xl: 64px;
  --spacing-4xl: 96px;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);

  --header-height: 64px;
  --max-width: 1200px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height);
}

body {
  font-family: var(--font-family);
  font-size: 16px;
  line-height: 1.7;
  color: var(--color-text);
  background-color: var(--color-surface);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

input,
textarea {
  font-family: inherit;
  font-size: inherit;
}

/* ================================
   Header
   ================================ */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--color-border);
  z-index: 1000;
}

.header-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--spacing-lg);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
}

.logo-img {
  height: 36px;
  width: auto;
}

.nav-list {
  display: flex;
  gap: var(--spacing-xl);
}

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

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

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: var(--spacing-sm);
}

.hamburger-line {
  width: 24px;
  height: 2px;
  background-color: var(--color-text);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.hamburger.active .hamburger-line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger.active .hamburger-line:nth-child(2) {
  opacity: 0;
}

.hamburger.active .hamburger-line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ================================
   Hero Section
   ================================ */
.hero {
  padding-top: calc(var(--header-height) + var(--spacing-3xl));
  padding-bottom: var(--spacing-3xl);
  background: linear-gradient(180deg, var(--color-surface-alt) 0%, var(--color-surface) 100%);
}

.hero-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--spacing-lg);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-3xl);
  align-items: center;
}

.hero-title {
  font-size: clamp(28px, 5vw, 48px);
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: var(--spacing-lg);
  color: var(--color-text);
}

.hero-subtitle {
  font-size: clamp(14px, 2vw, 18px);
  color: var(--color-text-secondary);
  margin-bottom: var(--spacing-xl);
  line-height: 1.8;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-md);
}

.store-badge {
  display: inline-block;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.store-badge:hover {
  transform: translateY(-2px);
  opacity: 0.9;
}

.store-badge-img {
  height: 48px;
  width: auto;
}

.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-mockup {
  max-width: 300px;
  width: 100%;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
}

/* ================================
   Gallery Section (Marquee)
   ================================ */
.gallery {
  padding: var(--spacing-3xl) 0;
  background-color: var(--color-surface);
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  scroll-behavior: auto;
}

.gallery::-webkit-scrollbar {
  display: none;
}

.gallery-track {
  display: flex;
  gap: var(--spacing-lg);
  width: max-content;
  touch-action: pan-x;
  cursor: grab;
}

.gallery-slide {
  flex-shrink: 0;
  cursor: pointer;
}

.gallery-slide img {
  height: 400px;
  width: auto;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  transition: transform 0.2s ease;
}

.gallery-slide:hover img {
  transform: scale(1.02);
}

/* ================================
   Lightbox Modal
   ================================ */
.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.9);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.lightbox.active {
  opacity: 1;
  visibility: visible;
}

.lightbox-content {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
}

.lightbox-image {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: var(--radius-md);
}

.lightbox-close {
  position: absolute;
  top: -40px;
  right: 0;
  width: 36px;
  height: 36px;
  background: none;
  border: none;
  cursor: pointer;
  color: #FFFFFF;
  font-size: 32px;
  line-height: 1;
  opacity: 0.8;
  transition: opacity 0.2s ease;
}

.lightbox-close:hover {
  opacity: 1;
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  background-color: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  color: #FFFFFF;
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.8;
  transition: opacity 0.2s ease, background-color 0.2s ease;
}

.lightbox-nav:hover {
  opacity: 1;
  background-color: rgba(255, 255, 255, 0.2);
}

.lightbox-prev {
  left: var(--spacing-lg);
}

.lightbox-next {
  right: var(--spacing-lg);
}

/* ================================
   Section Common Styles
   ================================ */
.section-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--spacing-lg);
}

.section-title {
  font-size: clamp(24px, 4vw, 36px);
  font-weight: 700;
  text-align: center;
  margin-bottom: var(--spacing-3xl);
  color: var(--color-text);
}

/* ================================
   Use Cases Section
   ================================ */
.usecases {
  padding: var(--spacing-4xl) 0;
  background-color: var(--color-surface-alt);
}

.usecase-list {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-3xl);
}

.usecase-item {
  display: flex;
  gap: var(--spacing-2xl);
  align-items: center;
  justify-content: center;
  max-width: 900px;
  margin: 0 auto;
}

.usecase-item--reverse {
  flex-direction: row-reverse;
}

.usecase-image {
  flex-shrink: 0;
}

.usecase-image img {
  width: 360px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.usecase-content {
  flex: 1;
  max-width: 480px;
}

.usecase-title {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: var(--spacing-md);
  color: var(--color-primary);
}

.usecase-problem {
  font-size: 16px;
  color: var(--color-text-secondary);
  margin-bottom: var(--spacing-sm);
  padding: var(--spacing-md);
  background-color: var(--color-surface);
  border-radius: var(--radius-md);
  border-left: 4px solid var(--color-text-muted);
}

.usecase-solution {
  font-size: 16px;
  color: var(--color-text);
  line-height: 1.8;
}

/* ================================
   Features Section
   ================================ */
.features {
  padding: var(--spacing-4xl) 0;
  background-color: var(--color-surface);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--spacing-lg);
}

.feature-card {
  background-color: var(--color-surface-alt);
  padding: var(--spacing-xl);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.feature-icon {
  width: 48px;
  height: 48px;
  margin-bottom: var(--spacing-md);
  color: var(--color-primary);
}

.feature-icon svg {
  width: 100%;
  height: 100%;
}

.feature-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: var(--spacing-sm);
  color: var(--color-text);
}

.feature-text {
  font-size: 14px;
  color: var(--color-text-secondary);
  line-height: 1.7;
}

/* ================================
   CTA Section
   ================================ */
.cta-section {
  padding: var(--spacing-4xl) 0;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  text-align: center;
}

.cta-title {
  font-size: clamp(24px, 4vw, 36px);
  font-weight: 700;
  color: #FFFFFF;
  margin-bottom: var(--spacing-md);
}

.cta-subtitle {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: var(--spacing-xl);
}

.cta-section .hero-cta {
  justify-content: center;
}

/* ================================
   Contact Section
   ================================ */
.contact {
  padding: var(--spacing-4xl) 0;
  background-color: var(--color-surface-alt);
}

.contact-description {
  text-align: center;
  color: var(--color-text-secondary);
  margin-bottom: var(--spacing-2xl);
  margin-top: calc(-1 * var(--spacing-xl));
}

.contact-form {
  max-width: 600px;
  margin: 0 auto;
}

.form-group {
  margin-bottom: var(--spacing-lg);
}

.form-label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: var(--spacing-sm);
  color: var(--color-text);
}

.required {
  color: var(--color-primary);
}

.form-input,
.form-textarea {
  width: 100%;
  padding: var(--spacing-md);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background-color: var(--color-surface-alt);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(255, 111, 0, 0.1);
}

.form-textarea {
  resize: vertical;
  min-height: 120px;
}

.form-submit {
  width: 100%;
  padding: var(--spacing-md) var(--spacing-xl);
  font-size: 16px;
  font-weight: 600;
  color: #FFFFFF;
  background-color: var(--color-primary);
  border-radius: var(--radius-md);
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.form-submit:hover {
  background-color: var(--color-primary-dark);
}

.form-submit:active {
  transform: scale(0.98);
}

.form-success {
  max-width: 600px;
  margin: 0 auto;
  padding: var(--spacing-xl);
  background-color: rgba(30, 142, 62, 0.1);
  border-radius: var(--radius-md);
  text-align: center;
  color: var(--color-success);
}

/* ================================
   Media Section
   ================================ */
.media-section {
  padding: var(--spacing-2xl) 0;
  background-color: var(--color-surface);
  text-align: center;
}

.media-section .section-title {
  font-size: 20px;
  margin-bottom: var(--spacing-md);
}

.media-text {
  font-size: 14px;
  color: var(--color-text-secondary);
}

/* ================================
   Footer
   ================================ */
.footer {
  padding: var(--spacing-xl) 0;
  background-color: var(--color-text);
  color: rgba(255, 255, 255, 0.7);
}

.footer-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--spacing-lg);
  text-align: center;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: var(--spacing-xl);
  margin-bottom: var(--spacing-md);
  flex-wrap: wrap;
}

.footer-links a {
  font-size: 14px;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: #FFFFFF;
}

.footer-copyright {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
}

/* ================================
   Responsive - Tablet
   ================================ */
@media (max-width: 1024px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .gallery-slide img {
    height: 320px;
  }
}

/* ================================
   Responsive - Mobile
   ================================ */
@media (max-width: 768px) {
  :root {
    --header-height: 56px;
  }

  .hamburger {
    display: flex;
  }

  .nav {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    height: calc(100vh - var(--header-height));
    width: 100%;
    background-color: #FFFFFF;
    padding: var(--spacing-xl);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    z-index: 999;
    overflow-y: auto;
  }

  .nav.active {
    transform: translateX(0);
  }

  .nav-list {
    flex-direction: column;
    gap: var(--spacing-lg);
  }

  .nav-link {
    font-size: 18px;
    display: block;
    padding: var(--spacing-md) 0;
  }

  .hero {
    padding-top: calc(var(--header-height) + var(--spacing-xl));
    padding-bottom: var(--spacing-2xl);
  }

  .hero-container {
    grid-template-columns: 1fr;
    gap: var(--spacing-xl);
    text-align: center;
  }

  .hero-content {
    order: 1;
  }

  .hero-visual {
    order: 0;
  }

  .hero-cta {
    justify-content: center;
  }

  .hero-mockup {
    max-width: 220px;
  }

  .store-badge-img {
    height: 40px;
  }

  .gallery-slide img {
    height: 336px; /* モバイルは約1.2倍大きく表示 */
  }

  /* スマホのみマルチ画像スクロールを少し速く */
  .gallery-track {
    animation: marquee 32s linear infinite;
  }

  .usecase-item,
  .usecase-item--reverse {
    flex-direction: column;
  }

  .usecase-image img {
    width: 280px;
  }

  .usecase-content {
    text-align: center;
    max-width: 100%;
  }

  .usecase-problem {
    text-align: left;
  }

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

  .feature-card {
    padding: var(--spacing-lg);
  }

  .footer-links {
    flex-direction: column;
    gap: var(--spacing-md);
  }
}

/* ================================
   Reduced Motion
   ================================ */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .gallery-track {
    animation: none;
  }

  .feature-card,
  .store-badge {
    transition: none;
  }
}
