* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-snap-type: y mandatory;
  scroll-behavior: smooth;
}

body {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: #333;
  background: #0a0a0a;
  overflow-x: hidden;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Scroll snap for all sections */
.hero,
.section,
.cards-section,
.depth-section,
.pin-section,
.footer {
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

/* Hero Section */
.hero {
  height: 100vh;
  background-image: url('../img/demo/demo4.jpg');
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center center;
  background-attachment: fixed;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.hero-content {
  text-align: center;
  color: white;
  z-index: 2;
  background-color: rgba(0, 0, 0, 0.8);
}

.hero h1 {
  font-size: 4rem;
  margin-bottom: 1rem;
  opacity: 0;
  transform: translateY(50px);
}

.hero p {
  font-size: 1.5rem;
  opacity: 0;
  transform: translateY(50px);
}

.floating-shapes {
  position: absolute;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.shape {
  position: absolute;
  opacity: 0.1;
  animation: float 20s infinite ease-in-out;
}

.shape:nth-child(1) {
  top: 20%;
  left: 10%;
  width: 80px;
  height: 80px;
  background: #fff;
  border-radius: 50%;
  animation-delay: 0s;
}

.shape:nth-child(2) {
  top: 60%;
  right: 20%;
  width: 60px;
  height: 60px;
  background: #fff;
  transform: rotate(45deg);
  animation-delay: 5s;
}

.shape:nth-child(3) {
  bottom: 30%;
  left: 80%;
  width: 40px;
  height: 40px;
  background: #fff;
  clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
  animation-delay: 10s;
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0px) rotate(0deg);
  }

  50% {
    transform: translateY(-20px) rotate(180deg);
  }
}

/* Sections */
.section {
  height: 100vh;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.section-1 {
  background: linear-gradient(45deg, #ff6b6b, #ee5a24);
}

.section-2 {
  background: linear-gradient(45deg, #4834d4, #686de0);
}

.section-3 {
  background: linear-gradient(45deg, #00d2d3, #54a0ff);
}

.section-4 {
  background: linear-gradient(45deg, #ff9ff3, #f368e0);
}

.section-content {
  text-align: center;
  color: white;
  max-width: 600px;
}

.section-content h2 {
  font-size: 3rem;
  margin-bottom: 2rem;
  transform: translateX(-100px);
  opacity: 0;
}

.section-content p {
  font-size: 1.2rem;
  line-height: 1.8;
  transform: translateX(100px);
  opacity: 0;
}

/* Cards Section */
.cards-section {
  height: 100vh;
  background: #1a1a1a;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cards-container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  max-width: 1440px;
  width: 100%;
  margin: 0 auto;
  align-items: center;
  justify-content: center;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .cards-container {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .cards-container {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .cards-container {
    grid-template-columns: 1fr;
  }
}

.card {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 20px;
  max-width: 500px;
  width: 500px;
  max-height: 500px;
  height: 500px;
  padding: 40px;
  text-align: center;
  color: white;
  transform: scale(0.8) rotateY(45deg);
  opacity: 0;
  transition: all 0.3s ease;
}

.card:hover {
  transform: scale(1.05) rotateY(0deg);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.card h3 {
  font-size: 1.8rem;
  margin-bottom: 1rem;
}

.card p {
  font-size: 1rem;
  line-height: 1.6;
}

.card-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

/* Depth Section (formerly Parallax Section) */
.depth-section {
  height: 100vh;
  background: #000;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.depth-content {
  text-align: center;
  color: white;
  z-index: 2;
}

.depth-content h2 {
  font-size: 4rem;
  margin-bottom: 1rem;
  transform: translateY(100px);
  opacity: 0;
}

.depth-content p {
  font-size: 1.5rem;
  transform: translateY(-100px);
  opacity: 0;
}

.depth-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 120%;
  height: 120%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 2px, transparent 2px);
  background-size: 50px 50px;
  animation: drift 30s linear infinite;
}

@keyframes drift {
  0% {
    transform: translateX(0) translateY(0);
  }

  100% {
    transform: translateX(-50px) translateY(-50px);
  }
}

/* Pin Section */

.section-logo {
  width: 100vw;
  height: 3000px;
  object-fit: cover;
}
.pin-content h2 {
  font-size: 3rem;
  margin-bottom: 2rem;
}

.pin-section {
  height: 100vh;
  background: linear-gradient(45deg, #2c3e50, #4a6741);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.pin-content {
  text-align: center;
  color: white;
  z-index: 10;
  transform: translateZ(0); /* ハードウェアアクセラレーション */
}

.rotating-text {
  font-size: 2rem;
  margin-top: 20px;
  display: inline-block;
  will-change: transform; /* アニメーション最適化 */
}

/* Pin Section内でのスクロールインジケーター（オプション） */
.pin-progress {
  position: fixed;
  top: 50%;
  right: 20px;
  width: 4px;
  height: 200px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 2px;
  z-index: 1000;
}

.pin-progress-bar {
  width: 100%;
  background: white;
  border-radius: 2px;
  height: 0%;
  transition: height 0.1s ease;
}

/* Footer */
.footer {
  height: 100vh;
  background: #000;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
}

.footer h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
  transform: translateY(50px);
  opacity: 0;
  text-align: center;
}

.footer p {
  font-size: 1.2rem;
  transform: translateY(50px);
  opacity: 0;
  text-align: center;
}

/* Responsive Design */
@media (max-width: 768px) {
  .hero h1 {
    font-size: 2.5rem;
  }

  .hero p {
    font-size: 1.2rem;
  }

  .section-content h2 {
    font-size: 2rem;
  }

  .depth-content h2 {
    font-size: 2.5rem;
  }

  .cards-container {
    grid-template-columns: 1fr;
  }
}