/* ========================================
   TGG Studio - Team Page (Ghibli Warm)
   ======================================== */

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --color-bg: #faf6f0;
  --color-surface: #ffffff;
  --color-surface-hover: #f5f0e8;
  --color-border: #e8dfd3;
  --color-text: #3d3429;
  --color-text-secondary: #8c7e6d;
  --color-accent: #b8860b;
  --color-accent-light: #d4a24e;
  --color-accent-warm: #c6893f;
  --color-accent-warm-light: #e0a85c;
  --font-primary: 'Inter', 'Noto Sans SC', -apple-system, BlinkMacSystemFont, sans-serif;
  --transition-base: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --container-max: 960px;
  --shadow-sm: 0 2px 8px rgba(61, 52, 41, 0.06);
  --shadow-md: 0 8px 24px rgba(61, 52, 41, 0.08);
  --shadow-lg: 0 12px 36px rgba(61, 52, 41, 0.1);
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-primary);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  overflow-x: hidden;
}

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
}

/* --- Navigation --- */
.top-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(250, 246, 240, 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--color-border);
}

.nav-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-size: 18px;
  font-weight: 700;
  color: var(--color-text);
  text-decoration: none;
  letter-spacing: -0.5px;
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.nav-logo em {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: 20px;
}

.nav-subtitle {
  font-size: 14px;
  font-weight: 400;
  color: var(--color-text-secondary);
  margin-left: 2px;
}

.lang-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 6px;
  padding: 4px 12px;
  cursor: pointer;
  font-family: var(--font-primary);
  font-size: 12px;
  transition: var(--transition-base);
}

.lang-toggle:hover {
  border-color: var(--color-accent);
}

.lang-option {
  color: var(--color-text-secondary);
  transition: var(--transition-base);
}

.lang-option.active {
  color: var(--color-accent);
  font-weight: 600;
}

.lang-divider {
  color: var(--color-border);
}

/* --- Hero Section (Compact) --- */
.hero {
  position: relative;
  padding: 76px 0 0;
  overflow: hidden;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 30% 20%, rgba(91, 140, 90, 0.06) 0%, transparent 50%),
    radial-gradient(ellipse at 70% 80%, rgba(198, 137, 63, 0.05) 0%, transparent 50%);
  pointer-events: none;
}

.hero-title-overlay {
  position: absolute;
  top: 52px;
  left: 0;
  right: 0;
  z-index: 10;
  padding: 24px 24px;
  background: linear-gradient(to bottom, rgba(250, 246, 240, 0.95) 0%, rgba(250, 246, 240, 0.8) 70%, transparent 100%);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.hero-container {
  position: relative;
  z-index: 1;
}

.hero-title {
  text-align: center;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.hero-title-main {
  font-size: clamp(20px, 4vw, 28px);
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--color-text);
  opacity: 0;
  animation: fadeInUp 0.6s ease forwards;
}

.hero-title-divider {
  font-size: clamp(20px, 4vw, 28px);
  font-weight: 300;
  color: var(--color-text-secondary);
  opacity: 0;
  animation: fadeInUp 0.6s ease 0.05s forwards;
}

.hero-title-en {
  animation-delay: 0.1s;
}

/* Team Photo — Peek / Coverflow Carousel */
.hero-photo-wrap {
  position: relative;
  max-width: 720px;
  margin: 0 auto 24px;
  opacity: 0;
  animation: fadeInUp 0.6s ease 0.15s forwards;
}

.carousel-slide {
  cursor: pointer;
}

.carousel {
  position: relative;
  overflow: hidden;
}

.carousel-track {
  display: flex;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}

.carousel-slide {
  flex: 0 0 70%;
  min-width: 0;
  position: relative;
  padding: 0 8px;
  transition: opacity 0.5s ease, transform 0.5s ease;
  opacity: 0.4;
  transform: scale(0.9);
}

.carousel-slide.active {
  opacity: 1;
  transform: scale(1);
}

.carousel-slide .hero-photo {
  border-radius: 12px;
  box-shadow: var(--shadow-md);
  transition: box-shadow 0.5s ease;
}

.carousel-slide.active .hero-photo {
  box-shadow: var(--shadow-lg);
}

.carousel-slide .year-label {
  position: absolute;
  right: 16px;
  bottom: 12px;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  letter-spacing: 0.5px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.carousel-slide.active .year-label {
  opacity: 1;
}

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 12px 0 4px;
}

.carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  background: var(--color-border);
  cursor: pointer;
  padding: 0;
  transition: background 0.3s ease, transform 0.3s ease;
}

.carousel-dot.active {
  background: var(--color-accent);
  transform: scale(1.25);
}

.hero-photo {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
  object-position: center;
  border-radius: 12px;
}

.hero-photo-fallback {
  display: none;
  aspect-ratio: 16 / 7;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--color-text-secondary);
  background: var(--color-surface);
  border: 2px dashed var(--color-border);
  border-radius: 12px;
}

.hero-photo-fallback p {
  font-size: 13px;
  font-weight: 500;
}

.no-photo .hero-photo {
  display: none;
}

.no-photo .hero-photo-fallback {
  display: flex;
}

/* Vision & Culture — artistic layout below photo */
.hero-values {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  padding: 32px 0 40px;
  max-width: 800px;
  margin: 0 auto;
  opacity: 0;
  animation: fadeInUp 0.6s ease 0.3s forwards;
}

.hero-value {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
  text-align: center;
}

.hero-value-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.hero-value-label span:first-child {
  font-family: 'Playfair Display', serif;
  font-size: 28px;
  font-weight: 700;
  font-style: italic;
  letter-spacing: 1px;
  color: var(--color-accent);
}

.hero-value-label-en {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2px;
  color: var(--color-text-secondary);
  text-transform: uppercase;
  opacity: 0.6;
}

.hero-value-text {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.hero-value-text span:first-child {
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-text);
  font-weight: 500;
  letter-spacing: 0.5px;
}

.hero-value-text-en {
  font-size: 13px;
  line-height: 1.5;
  color: var(--color-text-secondary);
  font-weight: 400;
  font-style: italic;
}

.hero-value-divider {
  display: none;
}

/* --- Team Section --- */
.team {
  padding: 8px 0 24px;
}

.team-group {
  margin-bottom: 20px;
  opacity: 0;
  transform: translateY(20px);
}

.team-group.visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.group-title {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--color-text);
}

.group-title-en {
  color: var(--color-text-secondary);
  font-weight: 400;
  margin-left: 6px;
}

.group-line {
  width: 32px;
  height: 2px;
  background: var(--color-accent);
  margin: 8px 0 16px;
  border-radius: 1px;
}

/* Members Grid */
.members-grid {
  display: grid;
  gap: 12px;
}

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

.members-grid--3 {
  grid-template-columns: repeat(3, 1fr);
}

.members-grid--4 {
  grid-template-columns: repeat(4, 1fr);
}

/* Member Card (borderless) */
.member-card {
  background: none;
  border: none;
  padding: 12px 8px;
  text-align: center;
  transition: var(--transition-base);
  cursor: default;
}

.member-card:hover {
  transform: translateY(-4px);
}

.member-card:hover .member-photo {
  box-shadow: 0 8px 24px rgba(61, 52, 41, 0.15);
}

/* Member Photo */
.member-photo {
  position: relative;
  width: 96px;
  height: 96px;
  margin: 0 auto 10px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--color-surface-hover);
  transition: var(--transition-base);
}

.member-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: relative;
  z-index: 2;
}

.photo-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-accent-warm) 100%);
  z-index: 1;
}

.photo-placeholder span {
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 1px;
}

.photo-placeholder--mascot {
  background: linear-gradient(135deg, var(--color-accent-warm) 0%, var(--color-accent-warm-light) 100%);
}

.photo-placeholder--mascot span {
  font-size: 26px;
}

.no-photo .photo-placeholder {
  z-index: 2;
}

/* Member Info */
.member-name {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 2px;
  letter-spacing: -0.2px;
  color: var(--color-text);
}

.member-role {
  font-size: 12px;
  color: var(--color-text-secondary);
  font-weight: 400;
}

/* --- Footer --- */
.footer {
  border-top: 1px solid var(--color-border);
  padding: 16px 0;
  text-align: center;
}

.footer-built {
  font-size: 13px;
  color: var(--color-text-secondary);
  margin-bottom: 4px;
}

.footer-built em {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  color: var(--color-text);
}

.footer-built .hearts {
  color: var(--color-accent-warm);
}

.footer-copy {
  font-size: 11px;
  color: var(--color-text-secondary);
}

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

/* --- Responsive --- */
@media (max-width: 768px) {
  .hero {
    padding-top: 52px;
  }

  .hero-title-overlay {
    top: 52px;
    padding: 16px 20px;
  }

  .hero-values {
    gap: 32px;
    padding: 24px 0 32px;
  }

  .hero-value {
    gap: 8px;
  }

  .hero-value-label span:first-child {
    font-size: 24px;
  }

  .hero-value-label-en {
    font-size: 10px;
  }

  .hero-photo-wrap {
    margin-bottom: 20px;
  }

  .carousel-slide {
    flex: 0 0 75%;
  }

  .hero-value-text span:first-child {
    font-size: 15px;
  }

  .hero-value-text-en {
    font-size: 12px;
  }

  .team-group {
    margin-bottom: 28px;
  }

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

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

  .member-photo {
    width: 76px;
    height: 76px;
  }

  .member-name {
    font-size: 13px;
  }

  .member-role {
    font-size: 11px;
  }
}

@media (max-width: 480px) {
  .hero-title-overlay {
    padding: 12px 16px;
  }

  .hero-values {
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    padding: 20px 0 28px;
  }

  .hero-value {
    gap: 6px;
  }

  .hero-photo-wrap {
    margin-bottom: 16px;
  }

  .carousel-slide {
    flex: 0 0 80%;
  }

  .hero-value-label span:first-child {
    font-size: 20px;
  }

  .hero-value-label-en {
    font-size: 9px;
    letter-spacing: 1.5px;
  }

  .hero-value-text span:first-child {
    font-size: 13px;
  }

  .hero-value-text-en {
    font-size: 11px;
  }

  .team {
    padding: 4px 0 12px;
  }

  .team-group {
    margin-bottom: 16px;
  }

  .member-card {
    padding: 6px 4px;
  }

  .member-photo {
    width: 64px;
    height: 64px;
    margin-bottom: 6px;
  }

  .photo-placeholder span {
    font-size: 18px;
  }

  .group-title {
    font-size: 14px;
  }

  .members-grid {
    gap: 6px;
  }

  .footer {
    padding: 12px 0;
  }

  .footer-built {
    font-size: 12px;
    margin-bottom: 2px;
  }

  .footer-copy {
    font-size: 10px;
  }
}
