/* ============================================
   Sleeptech-Microbiome - Dreamscape Aurora Design
   Theme: 夜空とオーロラ、睡眠と腸内細菌の融合
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800&family=Noto+Sans+JP:wght@400;500;600;700&display=swap');

:root {
  /* Color Palette - Dreamscape Aurora */
  --bg-deep: #0a0e1a;
  --bg-card: #111827;
  --bg-card-hover: #1a2234;
  --surface: #1e293b;
  
  /* Aurora Gradient Colors */
  --aurora-blue: #38bdf8;
  --aurora-purple: #a855f7;
  --aurora-cyan: #22d3d1;
  --aurora-pink: #ec4899;
  
  /* Text Colors */
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  
  /* Accent */
  --accent: #38bdf8;
  --accent-glow: rgba(56, 189, 248, 0.3);
  
  /* Gradients */
  --gradient-aurora: linear-gradient(135deg, #38bdf8 0%, #a855f7 50%, #22d3d1 100%);
  --gradient-header: linear-gradient(180deg, rgba(10, 14, 26, 0.98) 0%, rgba(10, 14, 26, 0.95) 100%);
  --gradient-hero-overlay: linear-gradient(180deg, rgba(10, 14, 26, 0.3) 0%, rgba(10, 14, 26, 0.7) 100%);
  
  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2rem;
  --space-xl: 3rem;
  --space-2xl: 4rem;
  
  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  
  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 30px var(--accent-glow);
  
  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s ease;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Noto Sans JP', 'Outfit', sans-serif;
  font-size: 16px;
  line-height: 1.8;
  color: var(--text-primary);
  background: var(--bg-deep);
  min-height: 100vh;
  overflow-x: hidden;
}

/* Aurora Background Animation */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 100vh;
  background: 
    radial-gradient(ellipse 80% 50% at 20% 20%, rgba(56, 189, 248, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse 60% 40% at 80% 30%, rgba(168, 85, 247, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse 70% 50% at 50% 80%, rgba(34, 211, 209, 0.05) 0%, transparent 50%);
  pointer-events: none;
  z-index: -1;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: var(--transition-fast);
}

a:hover {
  color: var(--aurora-cyan);
}

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

/* ============================================
   Typography
   ============================================ */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Outfit', 'Noto Sans JP', sans-serif;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text-primary);
}

h1 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.5rem); }

p {
  color: var(--text-secondary);
  margin-bottom: var(--space-sm);
}

/* ============================================
   Container
   ============================================ */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-md);
}

/* ============================================
   Header & Navigation
   ============================================ */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--gradient-header);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: var(--transition-normal);
}

.header.scrolled {
  background: rgba(10, 14, 26, 0.98);
  box-shadow: var(--shadow-md);
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-sm) var(--space-md);
  max-width: 1400px;
  margin: 0 auto;
}

.logo {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  font-family: 'Outfit', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  text-decoration: none;
}

.logo-icon {
  width: 36px;
  height: 36px;
  background: var(--gradient-aurora);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: var(--space-xs);
  align-items: center;
}

.nav-item a {
  display: block;
  padding: var(--space-xs) var(--space-sm);
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  transition: var(--transition-fast);
}

.nav-item a:hover,
.nav-item a.active {
  color: var(--text-primary);
  background: rgba(56, 189, 248, 0.1);
}

.nav-item a.active {
  color: var(--accent);
}

/* Mobile Menu Toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-xs);
  z-index: 1001;
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: var(--transition-fast);
}

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

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

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

/* ============================================
   Hero Section
   ============================================ */
.hero {
  position: relative;
  min-height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin-top: 60px;
}

.hero-background {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-background img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-background::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gradient-hero-overlay);
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: var(--space-2xl) var(--space-md);
  max-width: 900px;
}

.hero h1 {
  font-family: 'Outfit', 'Noto Sans JP', sans-serif;
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  color: #ffffff;
  margin-bottom: var(--space-md);
  text-shadow: 
    2px 2px 0 #000,
    -2px 2px 0 #000,
    2px -2px 0 #000,
    -2px -2px 0 #000,
    0 4px 20px rgba(0, 0, 0, 0.8);
  line-height: 1.2;
}

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: var(--space-lg);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-xs);
  margin-bottom: var(--space-lg);
}

.hero-tag {
  padding: var(--space-xs) var(--space-sm);
  background: rgba(56, 189, 248, 0.2);
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 20px;
  font-size: 0.85rem;
  color: var(--aurora-cyan);
  backdrop-filter: blur(10px);
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-sm) var(--space-lg);
  background: var(--gradient-aurora);
  color: #000;
  font-weight: 600;
  border-radius: 30px;
  transition: var(--transition-normal);
  box-shadow: var(--shadow-glow);
}

.hero-cta:hover {
  transform: translateY(-3px);
  box-shadow: 0 0 40px var(--accent-glow);
  color: #000;
}

/* ============================================
   Stats Section
   ============================================ */
.stats-section {
  padding: var(--space-2xl) 0;
  background: var(--bg-card);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-lg);
}

.stat-item {
  text-align: center;
  padding: var(--space-lg);
}

.stat-number {
  font-family: 'Outfit', sans-serif;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  background: var(--gradient-aurora);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: var(--space-xs);
}

.stat-label {
  font-size: 0.95rem;
  color: var(--text-secondary);
}

/* ============================================
   Section Titles
   ============================================ */
.section-title {
  text-align: center;
  margin-bottom: var(--space-2xl);
}

.section-title h2 {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  margin-bottom: var(--space-sm);
  position: relative;
  display: inline-block;
}

.section-title h2::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: var(--gradient-aurora);
  border-radius: 2px;
}

.section-title p {
  max-width: 600px;
  margin: var(--space-md) auto 0;
}

/* ============================================
   Feature Cards
   ============================================ */
.features-section {
  padding: var(--space-2xl) 0;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: var(--space-lg);
}

.feature-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-aurora);
  opacity: 0;
  transition: var(--transition-normal);
}

.feature-card:hover {
  transform: translateY(-5px);
  border-color: rgba(56, 189, 248, 0.2);
  box-shadow: var(--shadow-lg);
}

.feature-card:hover::before {
  opacity: 1;
}

.feature-icon {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.2) 0%, rgba(168, 85, 247, 0.2) 100%);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  margin-bottom: var(--space-md);
}

.feature-card h3 {
  font-size: 1.25rem;
  margin-bottom: var(--space-sm);
}

.feature-card p {
  font-size: 0.95rem;
  line-height: 1.7;
}

.feature-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: var(--space-md);
  color: var(--accent);
  font-weight: 500;
  font-size: 0.9rem;
}

.feature-link:hover {
  gap: 10px;
}

/* ============================================
   News Section
   ============================================ */
.news-section {
  padding: var(--space-2xl) 0;
  background: var(--bg-card);
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-lg);
}

.news-card {
  background: var(--surface);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: var(--transition-normal);
}

.news-card:hover {
  transform: translateY(-3px);
  border-color: rgba(56, 189, 248, 0.2);
}

.news-card-image {
  aspect-ratio: 16/9;
  overflow: hidden;
}

.news-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition-slow);
}

.news-card:hover .news-card-image img {
  transform: scale(1.05);
}

.news-card-content {
  padding: var(--space-md);
}

.news-card-date {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: var(--space-xs);
}

.news-card h3 {
  font-size: 1.1rem;
  margin-bottom: var(--space-xs);
  line-height: 1.5;
}

.news-card h3 a {
  color: var(--text-primary);
}

.news-card h3 a:hover {
  color: var(--accent);
}

/* ============================================
   Topics Grid
   ============================================ */
.topics-section {
  padding: var(--space-2xl) 0;
}

.topics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-md);
}

.topic-card {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md);
  background: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: var(--transition-normal);
}

.topic-card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(56, 189, 248, 0.2);
}

.topic-number {
  font-family: 'Outfit', sans-serif;
  font-size: 2rem;
  font-weight: 800;
  background: var(--gradient-aurora);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  min-width: 50px;
}

.topic-content h3 {
  font-size: 1rem;
  margin-bottom: 4px;
}

.topic-content h3 a {
  color: var(--text-primary);
}

.topic-content h3 a:hover {
  color: var(--accent);
}

.topic-content p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0;
}

/* ============================================
   Content Sections (for sub-pages)
   ============================================ */
.content-section {
  padding: var(--space-2xl) 0;
}

.content-wrapper {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: var(--space-xl);
}

.main-content {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.main-content h2 {
  font-size: 1.5rem;
  margin: var(--space-xl) 0 var(--space-md);
  padding-bottom: var(--space-sm);
  border-bottom: 2px solid rgba(56, 189, 248, 0.3);
}

.main-content h2:first-child {
  margin-top: 0;
}

.main-content h3 {
  font-size: 1.25rem;
  margin: var(--space-lg) 0 var(--space-sm);
  color: var(--aurora-cyan);
}

.main-content p {
  margin-bottom: var(--space-md);
}

.main-content ul, .main-content ol {
  margin: var(--space-md) 0;
  padding-left: var(--space-lg);
}

.main-content li {
  margin-bottom: var(--space-xs);
  color: var(--text-secondary);
}

.main-content strong {
  color: var(--text-primary);
}

/* Sidebar */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.sidebar-widget {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.sidebar-widget h3 {
  font-size: 1rem;
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-sm);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--accent);
}

.sidebar-widget ul {
  list-style: none;
}

.sidebar-widget li {
  margin-bottom: var(--space-xs);
}

.sidebar-widget a {
  display: block;
  padding: var(--space-xs) 0;
  color: var(--text-secondary);
  font-size: 0.9rem;
  transition: var(--transition-fast);
}

.sidebar-widget a:hover {
  color: var(--accent);
  padding-left: var(--space-xs);
}

/* ============================================
   Footer
   ============================================ */
.footer {
  background: var(--bg-card);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding: var(--space-2xl) 0 var(--space-lg);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-xl);
  margin-bottom: var(--space-xl);
}

.footer-section h4 {
  font-size: 1rem;
  margin-bottom: var(--space-md);
  color: var(--text-primary);
}

.footer-section ul {
  list-style: none;
}

.footer-section li {
  margin-bottom: var(--space-xs);
}

.footer-section a {
  color: var(--text-muted);
  font-size: 0.9rem;
  transition: var(--transition-fast);
}

.footer-section a:hover {
  color: var(--accent);
}

.footer-bottom {
  text-align: center;
  padding-top: var(--space-lg);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-bottom p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0;
}

/* ============================================
   Breadcrumb
   ============================================ */
.breadcrumb {
  padding: var(--space-md) 0;
  margin-top: 60px;
}

.breadcrumb ul {
  display: flex;
  flex-wrap: wrap;
  list-style: none;
  gap: var(--space-xs);
  font-size: 0.85rem;
}

.breadcrumb li::after {
  content: '/';
  margin-left: var(--space-xs);
  color: var(--text-muted);
}

.breadcrumb li:last-child::after {
  display: none;
}

.breadcrumb a {
  color: var(--text-muted);
}

.breadcrumb a:hover {
  color: var(--accent);
}

/* ============================================
   Tables
   ============================================ */
table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--space-lg) 0;
  background: var(--surface);
  border-radius: var(--radius-md);
  overflow: hidden;
}

th, td {
  padding: var(--space-sm) var(--space-md);
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

th {
  background: rgba(56, 189, 248, 0.1);
  font-weight: 600;
  color: var(--accent);
}

tr:hover {
  background: rgba(56, 189, 248, 0.05);
}

/* ============================================
   Buttons
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  padding: var(--space-sm) var(--space-lg);
  border-radius: 30px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: var(--transition-normal);
  border: none;
  text-decoration: none;
}

.btn-primary {
  background: var(--gradient-aurora);
  color: #000;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
  color: #000;
}

.btn-secondary {
  background: transparent;
  border: 2px solid var(--accent);
  color: var(--accent);
}

.btn-secondary:hover {
  background: var(--accent);
  color: #000;
}

/* ============================================
   Animations
   ============================================ */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 1024px) {
  .content-wrapper {
    grid-template-columns: 1fr;
  }
  
  .sidebar {
    flex-direction: row;
    flex-wrap: wrap;
  }
  
  .sidebar-widget {
    flex: 1;
    min-width: 250px;
  }
}

@media (max-width: 768px) {
  :root {
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
  }
  
  .nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: var(--bg-card);
    flex-direction: column;
    align-items: flex-start;
    padding: 80px var(--space-lg) var(--space-lg);
    gap: 0;
    transition: var(--transition-normal);
    border-left: 1px solid rgba(255, 255, 255, 0.1);
  }
  
  .nav-menu.active {
    right: 0;
  }
  
  .nav-item {
    width: 100%;
  }
  
  .nav-item a {
    padding: var(--space-sm);
    width: 100%;
    border-radius: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  }
  
  .nav-toggle {
    display: flex;
  }
  
  .hero {
    min-height: 70vh;
  }
  
  .hero h1 {
    font-size: clamp(1.5rem, 6vw, 2rem);
  }
  
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .features-grid {
    grid-template-columns: 1fr;
  }
  
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .main-content {
    padding: var(--space-md);
  }
}

@media (max-width: 480px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
  }
  
  .hero-tags {
    flex-direction: column;
    align-items: center;
  }
  
  .topic-card {
    flex-direction: column;
    text-align: center;
  }
}

/* ============================================
   Utility Classes
   ============================================ */
.text-center { text-align: center; }
.text-gradient {
  background: var(--gradient-aurora);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.hidden { display: none; }

/* Print Styles */
@media print {
  .header, .footer, .nav-toggle, .sidebar {
    display: none;
  }
  
  body {
    background: white;
    color: black;
  }
  
  .main-content {
    box-shadow: none;
    border: none;
  }
}
