/* ===================================
   雑学のクロ助 — Official Website
   Design System & Styles
   =================================== */

/* ---------- Custom Properties ---------- */
:root {
  /* Edo Color Palette */
  --ai-indigo: #1B3A5C;
  --ai-deep: #0F2440;
  --ai-navy: #162D4A;
  --sumi-black: #1A1A2E;
  --washi-white: #FAF6F0;
  --washi-cream: #F5EDE0;
  --kin-gold: #C9A84C;
  --kin-gold-light: #E2C97E;
  --kin-gold-glow: rgba(201, 168, 76, 0.3);
  --beni-red: #C1272D;
  --asagi-blue: #48929B;
  --wasurenagusa: #7DB9DE;

  /* Neutrals */
  --text-primary: #2C2C2C;
  --text-secondary: #5A5A5A;
  --text-light: rgba(250, 246, 240, 0.85);
  --text-white: #FAF6F0;

  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;
  --space-xl: 4rem;
  --space-2xl: 6rem;
  --space-3xl: 8rem;

  /* Typography */
  --font-serif: 'Noto Serif JP', serif;
  --font-sans: 'Noto Sans JP', sans-serif;

  /* Borders & Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  /* Transitions */
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --transition-base: 0.3s var(--ease-out-expo);
  --transition-slow: 0.6s var(--ease-out-expo);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-sans);
  color: var(--text-primary);
  background: var(--washi-white);
  line-height: 1.8;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

a {
  text-decoration: none;
  color: inherit;
  transition: color var(--transition-base);
}

/* ---------- HEADER ---------- */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  transition: background var(--transition-slow), box-shadow var(--transition-slow);
}

.header.scrolled {
  background: rgba(15, 36, 64, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.75rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.logo-img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid var(--kin-gold);
  transition: transform var(--transition-base);
}

.logo:hover .logo-img {
  transform: rotate(10deg) scale(1.1);
}

.logo-text {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--washi-white);
  letter-spacing: 0.05em;
}

.nav {
  display: flex;
  gap: 2rem;
}

.nav-link {
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--text-light);
  position: relative;
  padding: 0.25rem 0;
  letter-spacing: 0.03em;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--kin-gold);
  transition: width var(--transition-base);
}

.nav-link:hover::after {
  width: 100%;
}

.nav-link:hover {
  color: var(--kin-gold-light);
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.hamburger span {
  width: 24px;
  height: 2px;
  background: var(--washi-white);
  border-radius: 2px;
  transition: var(--transition-base);
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

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

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ---------- HERO ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--ai-deep) 0%, var(--ai-indigo) 40%, var(--ai-navy) 100%);
  overflow: hidden;
}

.hero-bg-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 80%, rgba(201, 168, 76, 0.08) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 20%, rgba(72, 146, 155, 0.08) 0%, transparent 60%);
  pointer-events: none;
}

.hero-particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero-particle {
  position: absolute;
  width: 3px;
  height: 3px;
  background: var(--kin-gold);
  border-radius: 50%;
  opacity: 0;
  animation: particle-float 6s infinite ease-in-out;
}

@keyframes particle-float {

  0%,
  100% {
    opacity: 0;
    transform: translateY(0) scale(0.5);
  }

  20% {
    opacity: 0.6;
  }

  50% {
    opacity: 0.3;
    transform: translateY(-100px) scale(1);
  }

  80% {
    opacity: 0;
  }
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1200px;
  margin: 0 auto;
  padding: 6rem 2rem 4rem;
  display: flex;
  align-items: center;
  gap: 4rem;
}

.hero-mascot-wrapper {
  position: relative;
  flex-shrink: 0;
}

.hero-mascot {
  width: 340px;
  height: 340px;
  border-radius: 50%;
  border: 4px solid var(--kin-gold);
  box-shadow:
    0 0 40px var(--kin-gold-glow),
    0 0 80px rgba(201, 168, 76, 0.15),
    0 20px 60px rgba(0, 0, 0, 0.3);
  animation: mascot-float 4s ease-in-out infinite;
  transition: transform var(--transition-slow);
}

.hero-mascot:hover {
  transform: scale(1.05);
}

.hero-mascot-glow {
  position: absolute;
  inset: -20px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--kin-gold-glow) 0%, transparent 70%);
  animation: glow-pulse 3s ease-in-out infinite alternate;
  pointer-events: none;
}

@keyframes mascot-float {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-12px);
  }
}

@keyframes glow-pulse {
  0% {
    opacity: 0.5;
    transform: scale(0.95);
  }

  100% {
    opacity: 1;
    transform: scale(1.05);
  }
}

.hero-text {
  flex: 1;
}

.hero-title {
  margin-bottom: var(--space-md);
}

.hero-title-sub {
  display: block;
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 1rem;
  color: var(--kin-gold-light);
  letter-spacing: 0.15em;
  margin-bottom: var(--space-xs);
  opacity: 0;
  animation: fade-up 0.8s var(--ease-out-expo) 0.3s forwards;
}

.hero-title-main {
  display: block;
  font-family: var(--font-serif);
  font-weight: 900;
  font-size: clamp(2.5rem, 5vw, 4rem);
  color: var(--text-white);
  letter-spacing: 0.08em;
  line-height: 1.2;
  opacity: 0;
  animation: fade-up 0.8s var(--ease-out-expo) 0.5s forwards;
}

.hero-desc {
  font-size: 1.05rem;
  color: var(--text-light);
  line-height: 2;
  margin-bottom: var(--space-lg);
  opacity: 0;
  animation: fade-up 0.8s var(--ease-out-expo) 0.7s forwards;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  opacity: 0;
  animation: fade-up 0.8s var(--ease-out-expo) 0.9s forwards;
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(24px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Scroll Indicator */
.hero-scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-light);
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  opacity: 0.6;
  animation: fade-in-delay 1s 1.5s both;
}

@keyframes fade-in-delay {
  from {
    opacity: 0;
  }

  to {
    opacity: 0.6;
  }
}

.scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--kin-gold), transparent);
  animation: scroll-bounce 2s ease-in-out infinite;
}

@keyframes scroll-bounce {

  0%,
  100% {
    transform: scaleY(1);
    opacity: 1;
  }

  50% {
    transform: scaleY(0.5);
    opacity: 0.3;
  }
}

/* ---------- BUTTONS ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 2rem;
  border-radius: var(--radius-full);
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.05em;
  cursor: pointer;
  border: none;
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.15), transparent);
  opacity: 0;
  transition: opacity var(--transition-base);
}

.btn:hover::before {
  opacity: 1;
}

.btn-primary {
  background: linear-gradient(135deg, var(--kin-gold), #B8943E);
  color: var(--sumi-black);
  box-shadow: 0 4px 20px var(--kin-gold-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px var(--kin-gold-glow);
}

.btn-secondary {
  background: transparent;
  color: var(--washi-white);
  border: 2px solid rgba(250, 246, 240, 0.3);
}

.btn-secondary:hover {
  border-color: var(--kin-gold);
  color: var(--kin-gold-light);
  transform: translateY(-2px);
}

.btn-youtube {
  background: #FF0000;
  color: #fff;
  padding: 1rem 2.5rem;
  font-size: 1.05rem;
  box-shadow: 0 4px 20px rgba(255, 0, 0, 0.3);
}

.btn-youtube:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(255, 0, 0, 0.4);
}

.youtube-icon {
  flex-shrink: 0;
}

.btn-community {
  background: linear-gradient(135deg, var(--ai-indigo), var(--asagi-blue));
  color: var(--washi-white);
  padding: 1rem 2.5rem;
  font-size: 1.05rem;
  box-shadow: 0 4px 20px rgba(72, 146, 155, 0.3);
}

.btn-community:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(72, 146, 155, 0.4);
}

/* ---------- SECTIONS ---------- */
.section {
  position: relative;
}

.section-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: var(--space-3xl) 2rem;
}

.section-header {
  text-align: center;
  margin-bottom: var(--space-xl);
}

.section-label {
  display: inline-block;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--kin-gold);
  margin-bottom: var(--space-sm);
}

.section-title {
  font-family: var(--font-serif);
  font-weight: 900;
  font-size: clamp(2rem, 4vw, 3rem);
  color: var(--sumi-black);
  letter-spacing: 0.05em;
  margin-bottom: var(--space-sm);
}

.section-subtitle {
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.8;
}

/* ---------- YOUTUBE SECTION ---------- */
.youtube-section {
  background: var(--washi-white);
}

.youtube-section .section-inner {
  padding: var(--space-2xl) 2rem var(--space-xl);
  min-height: 100vh;
  box-sizing: border-box;
}

.youtube-section .section-header {
  margin-bottom: var(--space-md);
}

.youtube-video {
  margin-bottom: var(--space-xl);
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.youtube-video-wrapper {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(201, 168, 76, 0.25);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.4);
}

.youtube-video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* Video Grid */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-bottom: var(--space-xl);
}

.video-card {
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: all var(--transition-base);
  cursor: pointer;
}

.video-embed {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
}

.video-embed iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.video-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.1);
}

.video-thumbnail {
  height: 160px;
  background: linear-gradient(135deg, rgba(27, 58, 92, 0.6), rgba(15, 36, 64, 0.8));
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.video-thumbnail::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(201, 168, 76, 0.08) 0%, transparent 70%);
}

.play-icon {
  font-size: 2.5rem;
  color: var(--kin-gold);
  z-index: 2;
  text-shadow: 0 2px 10px rgba(201, 168, 76, 0.4);
  transition: transform var(--transition-base);
}

.video-card:hover .play-icon {
  transform: scale(1.2);
}

.video-info {
  padding: 1.25rem;
}

.video-title {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--ai-indigo);
  margin-bottom: 0.4rem;
  line-height: 1.5;
}

.video-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

.video-card:nth-child(2) {
  transition-delay: 0.1s;
}

.video-card:nth-child(3) {
  transition-delay: 0.2s;
}

.youtube-cta {
  text-align: center;
}

/* ---------- COMMUNITY SECTION ---------- */
.community-section {
  position: relative;
  overflow: hidden;
  min-height: 100vh;
  display: flex;
  align-items: center;
}

.community-section .section-inner {
  padding: var(--space-xl) 2rem;
  width: 100%;
}

.community-section .section-header {
  margin-bottom: var(--space-md);
}

.community-bg {
  position: absolute;
  inset: 0;
}

.community-bg-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.35;
}

.community-bg-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,
      rgba(15, 36, 64, 0.75) 0%,
      rgba(15, 36, 64, 0.65) 40%,
      rgba(27, 58, 92, 0.6) 100%);
}

.community-title {
  color: var(--washi-white) !important;
}

.community-subtitle {
  color: var(--text-light) !important;
}

.community-content {
  position: relative;
  z-index: 2;
}

.community-features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-bottom: var(--space-lg);
}

.community-feature {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1.5rem;
  background: rgba(250, 246, 240, 0.06);
  border: 1px solid rgba(201, 168, 76, 0.15);
  border-radius: var(--radius-md);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: all var(--transition-base);
}

.community-feature:hover {
  background: rgba(250, 246, 240, 0.1);
  border-color: rgba(201, 168, 76, 0.35);
  transform: translateY(-4px);
}

.feature-number {
  font-family: var(--font-serif);
  font-weight: 900;
  font-size: 1.75rem;
  color: var(--kin-gold);
  line-height: 1;
  flex-shrink: 0;
  opacity: 0.6;
}

.feature-body h3 {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--washi-white);
  margin-bottom: 0.25rem;
}

.feature-body p {
  font-size: 0.9rem;
  color: var(--text-light);
  line-height: 1.7;
}

.community-cta {
  text-align: center;
}

.community-note {
  font-size: 0.85rem;
  color: var(--text-light);
  margin-top: 0.5rem;
  opacity: 0.7;
}

/* ---------- FOOTER ---------- */
.footer {
  background: var(--sumi-black);
  padding: var(--space-xl) 2rem;
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-md);
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.footer-logo {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid rgba(201, 168, 76, 0.4);
}

.footer-name {
  font-family: var(--font-serif);
  font-weight: 700;
  color: var(--washi-white);
  font-size: 1.1rem;
  letter-spacing: 0.05em;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
}

.footer-link {
  color: rgba(250, 246, 240, 0.5);
  transition: all var(--transition-base);
  display: flex;
  align-items: center;
}

.footer-link:hover {
  color: var(--kin-gold);
  transform: translateY(-2px);
}

.footer-copy {
  font-size: 0.8rem;
  color: rgba(250, 246, 240, 0.3);
  letter-spacing: 0.05em;
}

/* ---------- REVEAL ANIMATION ---------- */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s var(--ease-out-expo), transform 0.8s var(--ease-out-expo);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 {
  transition-delay: 0.1s;
}

.reveal-delay-2 {
  transition-delay: 0.25s;
}

.reveal-delay-3 {
  transition-delay: 0.4s;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 900px) {
  .hero-content {
    flex-direction: column;
    text-align: center;
    padding-top: 7rem;
  }

  .hero-mascot {
    width: 240px;
    height: 240px;
  }

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

  .hero-desc br {
    display: none;
  }

}

@media (max-width: 640px) {
  .nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 260px;
    height: 100vh;
    background: rgba(15, 36, 64, 0.98);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2.5rem;
    transition: right var(--transition-slow);
    z-index: 999;
  }

  .nav.open {
    right: 0;
  }

  .nav-link {
    font-size: 1.15rem;
  }

  .hamburger {
    display: flex;
    z-index: 1001;
  }

  .hero-mascot {
    width: 200px;
    height: 200px;
  }

  .section-inner {
    padding: var(--space-2xl) 1.25rem;
  }

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

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

  .community-section {
    min-height: auto;
  }

  .btn {
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
  }
}