/**
 * Top Page Styles
 * Cohiru Lab. Portal Page
 * Theme: Sky & Sunlight - 空と陽の光をテーマにした明るく穏やかなデザイン
 */

/* ===== Page Layout ===== */
.page-top {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: linear-gradient(180deg, var(--color-bg-primary) 0%, var(--color-bg-tertiary) 100%);
  scrollbar-gutter: stable;
}

/* ===== Hero Section ===== */
.hero {
  position: relative;
  padding: var(--space-3xl) 0;
  text-align: center;
  overflow-x: clip;
  overflow-y: visible;
}

.hero .container {
  min-width: 0;
  overflow-wrap: break-word;
  word-wrap: break-word;
}

/* Decorative background elements */
.hero::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(224, 120, 80, 0.12) 0%, transparent 70%);
  border-radius: 50%;
  animation: floatSlow 20s ease-in-out infinite;
  pointer-events: none;
}

.hero::after {
  content: "";
  position: absolute;
  bottom: -30%;
  right: -10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(90, 158, 201, 0.12) 0%, transparent 70%);
  border-radius: 50%;
  animation: floatSlow 25s ease-in-out infinite reverse;
  pointer-events: none;
}

@keyframes floatSlow {
  0%, 100% {
    transform: translate(0, 0) scale(1);
  }
  25% {
    transform: translate(30px, -20px) scale(1.05);
  }
  50% {
    transform: translate(-20px, 30px) scale(0.95);
  }
  75% {
    transform: translate(-30px, -10px) scale(1.02);
  }
}

.hero__content {
  position: relative;
  z-index: 2;
  max-width: 800px;
  margin: 0 auto;
}

.hero__title {
  font-size: clamp(2.5rem, 8vw, 4rem);
  font-weight: var(--font-weight-bold);
  margin-bottom: var(--space-sm);
  background: linear-gradient(135deg, var(--color-accent-primary) 0%, var(--color-accent-secondary) 50%, var(--color-accent-primary) 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 4s ease-in-out infinite;
  text-shadow: 0 0 40px rgba(224, 120, 80, 0.3);
  letter-spacing: 0.02em;
}

@keyframes shimmer {
  0%, 100% {
    background-position: 0% center;
  }
  50% {
    background-position: 100% center;
  }
}

.hero__subtitle {
  font-size: var(--font-size-xl);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-2xl);
  font-weight: var(--font-weight-medium);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  position: relative;
  display: inline-block;
}

.hero__subtitle::before,
.hero__subtitle::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 40px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-accent-primary), transparent);
}

.hero__subtitle::before {
  right: calc(100% + 16px);
}

.hero__subtitle::after {
  left: calc(100% + 16px);
}

/* ===== About Section ===== */
.about {
  padding: var(--space-2xl) 0;
}

.about__content {
  max-width: 740px;
  margin: 0 auto;
  text-align: center;
  background-color: var(--color-bg-secondary);
  padding: var(--space-xl);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.about__text {
  line-height: var(--line-height-loose);
  color: var(--color-text-primary);
}

.about__contact {
  margin-top: var(--space-lg);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--color-border);
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
}

.about__contact a {
  color: var(--color-accent-secondary);
}

/* ===== Navigation Section ===== */
.navigation {
  padding: var(--space-2xl) 0;
}

.navigation__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-lg);
  max-width: 900px;
  margin: 0 auto;
}

@media (max-width: 640px) {
  .navigation__grid {
    grid-template-columns: 1fr;
  }
}

/* Navigation Card Styles */
.navigation .nav-card {
  position: relative;
  overflow: hidden;
}

.navigation .nav-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    135deg,
    rgba(224, 120, 80, 0.08) 0%,
    transparent 50%
  );
  opacity: 0;
  transition: opacity var(--transition-base);
}

.navigation .nav-card:hover::before {
  opacity: 1;
}

.navigation .nav-card--secondary::before {
  background: linear-gradient(
    135deg,
    rgba(90, 158, 201, 0.08) 0%,
    transparent 50%
  );
}

/* Disabled card - no hover effect */
.navigation .nav-card--disabled::before {
  display: none;
}

/* ===== Footer Styles ===== */
.top-footer {
  margin-top: auto;
  padding: var(--space-2xl) 0;
  border-top: 1px solid var(--color-border);
  background-color: var(--color-bg-secondary);
}

.top-footer__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-lg);
}

.top-footer__social {
  display: flex;
  gap: var(--space-md);
}

.top-footer__social-link {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-md);
  background-color: var(--color-bg-tertiary);
  color: var(--color-text-primary);
  text-decoration: none;
  font-size: var(--font-size-sm);
  transition: all var(--transition-fast);
}

.top-footer__social-link:hover {
  background-color: var(--color-accent-secondary);
  color: #ffffff;
}

.top-footer__social-link svg {
  width: 18px;
  height: 18px;
}

.top-footer__copyright {
  color: var(--color-text-muted);
  font-size: var(--font-size-xs);
}

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

.hero__content {
  animation: fadeInUp 0.6s ease-out;
}

.navigation__grid .nav-card {
  animation: fadeInUp 0.6s ease-out backwards;
}

.navigation__grid .nav-card:nth-child(1) { animation-delay: 0.1s; }
.navigation__grid .nav-card:nth-child(2) { animation-delay: 0.2s; }
.navigation__grid .nav-card:nth-child(3) { animation-delay: 0.3s; }
.navigation__grid .nav-card:nth-child(4) { animation-delay: 0.4s; }

@media (prefers-reduced-motion: reduce) {
  .hero__content,
  .navigation__grid .nav-card {
    animation: none;
  }
}

/* ===== Slideshow Background ===== */
.slideshow {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  overflow: hidden;
}

.slideshow__overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    180deg,
    rgba(240, 244, 248, 0.85) 0%,
    rgba(232, 240, 247, 0.9) 50%,
    rgba(240, 244, 248, 0.95) 100%
  );
  z-index: 1;
}

.slideshow__slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 1s ease-in-out;
}

.slideshow__slide.active {
  opacity: 1;
}

.slideshow__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* ===== Social Section ===== */
.social-section {
  padding: var(--space-xl) 0;
  position: relative;
  z-index: 2;
}

.social-cards {
  display: flex;
  justify-content: center;
  gap: var(--space-lg);
  flex-wrap: wrap;
  max-width: 600px;
  margin: 0 auto;
}

.social-card {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md) var(--space-xl);
  background: var(--color-bg-secondary);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  text-decoration: none;
  transition: all 0.3s ease;
  min-width: 200px;
}

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

.social-card__icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  flex-shrink: 0;
}

.social-card__icon svg {
  width: 24px;
  height: 24px;
}

.social-card--x .social-card__icon {
  background: #000000;
  color: #ffffff;
}

.social-card--booth .social-card__icon {
  background: #fc4d50;
  color: #ffffff;
}

.social-card__info {
  display: flex;
  flex-direction: column;
}

.social-card__name {
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-bold);
  color: var(--color-text-primary);
}

.social-card__handle {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
}

/* Responsive adjustments for social cards */
@media (max-width: 640px) {
  .social-cards {
    flex-direction: column;
    align-items: center;
  }

  .social-card {
    width: 100%;
    max-width: 280px;
  }
}

/* ===== Navigation Grid Variants ===== */
.navigation__grid--single {
  grid-template-columns: 1fr;
  max-width: 600px;
}

.navigation__grid--double {
  grid-template-columns: repeat(2, 1fr);
}

@media (max-width: 640px) {
  .navigation__grid--double {
    grid-template-columns: 1fr;
  }
}

/* ===== Game Card with Logo ===== */
.nav-card--game {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: var(--space-lg);
  padding: var(--space-lg);
  text-align: left;
}

.nav-card__image {
  flex-shrink: 0;
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-card__logo {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.nav-card__info {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.nav-card--game .nav-card__title {
  font-size: var(--font-size-lg);
}

.nav-card--game .nav-card__subtitle {
  font-size: var(--font-size-sm);
}

@media (max-width: 480px) {
  .nav-card--game {
    flex-direction: column;
    text-align: center;
  }

  .nav-card__image {
    width: 60px;
    height: 60px;
  }
}

/* ===== Section Header ===== */
.section-header {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
}

.section-header__title {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-bold);
  color: var(--color-text-primary);
  white-space: nowrap;
}

.section-header__line {
  flex: 1;
  height: 1px;
  background: var(--color-border);
}

/* ===== Recent Updates Section ===== */
.recent-updates {
  padding: var(--space-2xl) 0;
}

.social-feeds {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-lg);
  max-width: 1000px;
  margin: 0 auto;
}

@media (max-width: 768px) {
  .social-feeds {
    grid-template-columns: 1fr;
  }
}

.social-feed {
  background: var(--color-bg-secondary);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.social-feed__header {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-md) var(--space-lg);
  background: var(--color-bg-tertiary);
  border-bottom: 1px solid var(--color-border);
  font-weight: var(--font-weight-medium);
  color: var(--color-text-primary);
}

.social-feed__header .icon {
  width: 20px;
  height: 20px;
}

.social-feed--x .social-feed__header .icon {
  color: #000000;
}

.social-feed--bluesky .social-feed__header .icon {
  color: #0085ff;
}

.twitter-embed {
  max-width: 100%;
  margin: 0;
}

.bluesky-embed {
  padding: var(--space-md);
  max-height: 450px;
  overflow-y: auto;
}

/* bsky-embed component styling */
.bluesky-embed bsky-embed {
  --bsky-font: var(--font-family-base);
}

/* ===== Links Grid ===== */
.links-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
  max-width: 900px;
  margin: 0 auto;
}

@media (max-width: 768px) {
  .links-grid {
    grid-template-columns: 1fr;
  }
}

/* Link Card Icon Colors */
.link-card__icon--x {
  background: #000000;
  color: #ffffff;
}

.link-card__icon--booth {
  background: #fc4d50;
  color: #ffffff;
}

.link-card__icon--bluesky {
  background: #0085ff;
  color: #ffffff;
}
