/* ============================================
   Custom Properties & Reset
   ============================================ */
:root {
  --color-yellow: #FFD23F;
  --color-orange: #FF8C42;
  --color-sky: #4ECDC4;
  --color-pink: #FF6B9D;
  --color-cream: #FFF8E7;
  --color-white: #FFFFFF;
  --color-dark: #2D2D2D;
  --color-gray: #666666;
  --bg-hero: var(--color-yellow);
  --bg-about: var(--color-white);
  --bg-apps: var(--color-cream);
  --bg-links: var(--color-sky);
  --bg-footer: var(--color-dark);
  --font-heading: 'Fredoka', 'Zen Maru Gothic', sans-serif;
  --font-body: 'Zen Maru Gothic', sans-serif;
  --max-width: 1100px;
  --section-padding: 80px 24px;
  --card-radius: 16px;
  --nav-height: 48px;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--nav-height); }
body { font-family: var(--font-body); color: var(--color-dark); line-height: 1.7; overflow-x: hidden; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; height: auto; display: block; }

/* ============================================
   Section Common
   ============================================ */
.section { padding: var(--section-padding); }
.section__inner { max-width: var(--max-width); margin: 0 auto; }
.section__heading {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  text-align: center;
  margin-bottom: 48px;
  position: relative;
}
.section__heading::after {
  content: '';
  display: block;
  width: 60px;
  height: 4px;
  background: var(--color-orange);
  border-radius: 2px;
  margin: 12px auto 0;
}

/* ============================================
   Navigation
   ============================================ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--nav-height);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  background: transparent;
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

.nav--scrolled {
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  backdrop-filter: blur(8px);
}

.nav__logo {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--color-dark);
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav__link {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-dark);
  padding: 4px 8px;
  border-radius: 8px;
  transition: background 0.2s ease, color 0.2s ease;
}

.nav__link:hover {
  background: rgba(0, 0, 0, 0.06);
}

.nav__link--active {
  color: var(--color-orange);
}

.nav__lang {
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--color-white);
  background: var(--color-orange);
  border: none;
  border-radius: 6px;
  padding: 4px 10px;
  cursor: pointer;
  transition: opacity 0.2s;
}

.nav__lang:hover {
  opacity: 0.8;
}

@media (max-width: 768px) {
  .nav { padding: 0 12px; }
  .nav__logo { font-size: 1rem; }
  .nav__links { gap: 10px; }
  .nav__link { font-size: 0.8rem; padding: 3px 6px; }
  .nav__lang { font-size: 0.75rem; padding: 3px 8px; }
}

/* ============================================
   Hero Section
   ============================================ */
.section--hero {
  background: var(--bg-hero);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.section--hero::before {
  content: '';
  position: absolute;
  top: -50px;
  right: -50px;
  width: 200px;
  height: 200px;
  background: var(--color-orange);
  border-radius: 50%;
  opacity: 0.3;
}
.section--hero::after {
  content: '';
  position: absolute;
  bottom: -30px;
  left: -30px;
  width: 150px;
  height: 150px;
  background: var(--color-sky);
  border-radius: 50%;
  opacity: 0.3;
}
.hero__content { z-index: 1; }
.hero__title {
  font-family: var(--font-heading);
  font-size: clamp(3rem, 10vw, 6rem);
  font-weight: 700;
  color: var(--color-dark);
  letter-spacing: 0.02em;
  line-height: 1.1;
}
.hero__subtitle {
  font-size: clamp(1rem, 3vw, 1.5rem);
  color: var(--color-gray);
  margin-top: 16px;
  font-weight: 400;
}
.hero__scroll-hint { position: absolute; bottom: 32px; z-index: 1; }
.hero__arrow {
  display: inline-block;
  font-size: 2rem;
  color: var(--color-dark);
  animation: bounce 2s infinite;
}
@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-12px); }
  60% { transform: translateY(-6px); }
}

/* ============================================
   About Section
   ============================================ */
.section--about { background: var(--bg-about); position: relative; }
.section--about::before {
  content: '';
  position: absolute;
  top: -40px;
  left: 0;
  width: 100%;
  height: 40px;
  background: var(--bg-about);
  clip-path: ellipse(55% 100% at 50% 100%);
}
.about__content { display: flex; align-items: center; gap: 48px; }
.about__icon-img {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  border: 4px solid var(--color-orange);
  flex-shrink: 0;
  object-fit: cover;
}
.about__icon-placeholder {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: var(--color-cream);
  border: 4px solid var(--color-orange);
  flex-shrink: 0;
}
.about__catchcopy {
  font-family: var(--font-heading);
  font-size: clamp(1.2rem, 3vw, 1.8rem);
  font-weight: 700;
  color: var(--color-orange);
  margin-bottom: 16px;
}
.about__description { font-size: 1rem; line-height: 1.9; margin-bottom: 20px; }
.about__tech { display: flex; gap: 12px; }
.tech-badge {
  display: inline-block;
  padding: 6px 16px;
  background: var(--color-sky);
  color: var(--color-white);
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 700;
}
@media (max-width: 768px) {
  .about__content { flex-direction: column; text-align: center; }
  .about__tech { justify-content: center; }
  .links__grid { gap: 24px; }
}

/* ============================================
   Apps Section
   ============================================ */
.section--apps { background: var(--bg-apps); }
.apps__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; }
.app-card {
  background: var(--color-white);
  border-radius: var(--card-radius);
  padding: 24px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.app-card:hover { transform: translateY(-8px); box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12); }
.app-card__icon-img {
  width: 80px;
  height: 80px;
  border-radius: 20px;
  object-fit: cover;
}
.app-card__icon-placeholder {
  width: 80px;
  height: 80px;
  border-radius: 20px;
  background: var(--color-cream);
  border: 3px solid var(--color-yellow);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-orange);
}
.app-card__body { margin-top: 16px; }
.app-card__name { font-family: var(--font-heading); font-size: 1.3rem; font-weight: 700; margin-bottom: 8px; }
.app-card__badge { display: inline-block; padding: 3px 12px; border-radius: 12px; font-size: 0.75rem; font-weight: 700; }
.app-card__badge--released { background: var(--color-sky); color: var(--color-white); }
.app-card__badge--testing { background: var(--color-yellow); color: var(--color-dark); }
.app-card__badge--dev { background: var(--color-pink); color: var(--color-white); }
.app-card__desc { font-size: 0.9rem; color: var(--color-gray); margin-top: 8px; margin-bottom: 16px; }
.app-card__links { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; align-items: center; }
.app-card__link {
  display: inline-block;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 700;
  transition: opacity 0.2s;
}
.app-card__link:hover { opacity: 0.8; }
.app-card__link--play { background: none; padding: 0; }
.app-card__play-badge { height: 40px; width: auto; }
.app-card__link--youtube { background: #FF0000; color: var(--color-white); }
.app-card__link--note { background: #41C9B4; color: var(--color-white); }

/* ============================================
   Links & Footer
   ============================================ */
.section--links { background: var(--bg-links); }
.section--links .section__heading { color: var(--color-white); }
.section--links .section__heading::after { background: var(--color-white); }
.links__grid { display: flex; justify-content: center; gap: 48px; flex-wrap: wrap; }
.link-item { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.link-item:hover { animation: popBounce 0.5s ease; }
@keyframes popBounce {
  0% { transform: scale(1); }
  30% { transform: scale(1.2); }
  50% { transform: scale(0.95); }
  70% { transform: scale(1.05); }
  100% { transform: scale(1); }
}
.link-item__icon { fill: var(--color-white); width: 48px; height: 48px; }
.link-item__label { font-family: var(--font-heading); font-size: 1.1rem; font-weight: 700; color: var(--color-white); }
.footer { background: var(--bg-footer); padding: 32px 24px; text-align: center; }
.footer__copy { color: rgba(255, 255, 255, 0.6); font-size: 0.85rem; }

/* ============================================
   Scroll Animation (CSS part)
   ============================================ */
.fade-in-target { opacity: 0; transform: translateY(24px); transition: opacity 0.6s ease, transform 0.6s ease; }
.fade-in-visible { opacity: 1; transform: translateY(0); }
.app-card.fade-in-target:nth-child(2) { transition-delay: 0.1s; }
.app-card.fade-in-target:nth-child(3) { transition-delay: 0.2s; }
.app-card.fade-in-target:nth-child(4) { transition-delay: 0.3s; }
.link-item.fade-in-target:nth-child(2) { transition-delay: 0.1s; }
.link-item.fade-in-target:nth-child(3) { transition-delay: 0.2s; }

/* ============================================
   Character Decorations
   ============================================ */
.hero__deco { position: absolute; z-index: 0; animation: float 4s ease-in-out infinite; }
.hero__deco--jellyfish { top: 15%; right: 10%; }
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}
.footer__deco { margin-bottom: 16px; }

/* ============================================
   Footer Counter
   ============================================ */
.footer__counter {
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.footer__counter-label {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.7rem;
  font-family: var(--font-heading);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.footer__counter-img {
  height: 36px;
  display: inline-block;
}

@media (max-width: 768px) {
  .hero__deco--jellyfish svg { width: 50px; height: 62px; }
}
