/*
Theme Name: Flavor Reel
Theme URI: https://example.com
Author: Takuto
Description: Video portfolio theme with genre-based dynamic backgrounds. Genres: Corporate, Fighting, HIPHOP MV, 3D.
Version: 2.0.0
License: GNU General Public License v2 or later
Text Domain: flavor-reel
*/

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

:root {
  /* Corporate */
  --corp-bg: #f0f6ff;
  --corp-accent: #3b82f6;
  --corp-accent2: #93c5fd;
  --corp-text: #1e293b;
  --corp-text-sub: #64748b;
  --corp-card-bg: rgba(255,255,255,0.85);
  --corp-card-border: rgba(59,130,246,0.15);

  /* Fighting */
  --fight-bg: #0a0a0a;
  --fight-accent: #ef4444;
  --fight-accent2: #f97316;
  --fight-text: #fafafa;
  --fight-text-sub: rgba(255,255,255,0.6);
  --fight-card-bg: rgba(255,255,255,0.06);
  --fight-card-border: rgba(239,68,68,0.25);

  /* HIPHOP */
  --hip-bg: #0f0f1a;
  --hip-accent: #c084fc;
  --hip-accent2: #22d3ee;
  --hip-text: #fafafa;
  --hip-text-sub: rgba(255,255,255,0.6);
  --hip-card-bg: rgba(255,255,255,0.06);
  --hip-card-border: rgba(192,132,252,0.25);

  /* 3D */
  --3d-bg: #020a18;
  --3d-accent: #06b6d4;
  --3d-accent2: #818cf8;
  --3d-text: #fafafa;
  --3d-text-sub: rgba(255,255,255,0.6);
  --3d-card-bg: rgba(255,255,255,0.06);
  --3d-card-border: rgba(6,182,212,0.25);

  --radius: 12px;
  --transition: 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', 'Noto Sans JP', -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
  background: #0a0a0a;
  color: #fafafa;
}

img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
button { font-family: inherit; cursor: pointer; border: none; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* ============================================================
   Scene Background (full-page animated bg per genre)
   ============================================================ */
.scene-bg {
  position: fixed; inset: 0; z-index: 0;
  transition: opacity 0.8s ease, background 1s ease;
  pointer-events: none;
}
.scene-bg .particles {
  position: absolute; inset: 0; overflow: hidden;
}
.scene-bg .orb {
  position: absolute; border-radius: 50%; filter: blur(100px);
  animation: orbFloat 20s ease-in-out infinite;
}

/* Hero BG */
.scene-bg--hero {
  background: linear-gradient(160deg, #0a0a0a 0%, #111 50%, #0a0a0a 100%);
}

/* Corporate BG */
.scene-bg--corporate {
  background: linear-gradient(160deg, #e0f0ff 0%, #f0f6ff 40%, #ffffff 100%);
}
.scene-bg--corporate .orb:nth-child(1) {
  width: 400px; height: 400px; background: rgba(59,130,246,0.15);
  top: 10%; left: -5%; animation-delay: 0s;
}
.scene-bg--corporate .orb:nth-child(2) {
  width: 300px; height: 300px; background: rgba(147,197,253,0.2);
  bottom: 10%; right: -5%; animation-delay: -7s;
}
.scene-bg--corporate .orb:nth-child(3) {
  width: 250px; height: 250px; background: rgba(59,130,246,0.1);
  top: 50%; left: 40%; animation-delay: -12s;
}

/* Fighting BG */
.scene-bg--fighting {
  background: linear-gradient(160deg, #0a0a0a 0%, #1a0505 50%, #0a0a0a 100%);
}
.scene-bg--fighting .orb:nth-child(1) {
  width: 500px; height: 500px; background: rgba(239,68,68,0.15);
  top: -10%; right: -10%; animation-delay: 0s; animation-duration: 18s;
}
.scene-bg--fighting .orb:nth-child(2) {
  width: 350px; height: 350px; background: rgba(249,115,22,0.12);
  bottom: -5%; left: -5%; animation-delay: -5s;
}
.scene-bg--fighting .orb:nth-child(3) {
  width: 200px; height: 200px; background: rgba(239,68,68,0.2);
  top: 40%; left: 30%; animation-delay: -10s; animation-duration: 15s;
}
/* Ember particles */
.scene-bg--fighting .ember {
  position: absolute; width: 4px; height: 4px; border-radius: 50%;
  background: #ef4444; opacity: 0;
  animation: emberRise 3s ease-in infinite;
}

/* HIPHOP BG */
.scene-bg--hiphop {
  background: linear-gradient(160deg, #0f0f1a 0%, #1a0a2e 50%, #0f0f1a 100%);
}
.scene-bg--hiphop .orb:nth-child(1) {
  width: 450px; height: 450px; background: rgba(192,132,252,0.2);
  top: -5%; left: -10%; animation-delay: 0s;
}
.scene-bg--hiphop .orb:nth-child(2) {
  width: 400px; height: 400px; background: rgba(34,211,238,0.15);
  bottom: -10%; right: -5%; animation-delay: -6s;
}
.scene-bg--hiphop .orb:nth-child(3) {
  width: 350px; height: 350px; background: rgba(251,191,36,0.12);
  top: 30%; left: 50%; animation-delay: -11s;
}
.scene-bg--hiphop .orb:nth-child(4) {
  width: 280px; height: 280px; background: rgba(236,72,153,0.15);
  top: 60%; left: 10%; animation-delay: -3s; animation-duration: 16s;
}

/* 3D BG */
.scene-bg--threed {
  background: linear-gradient(160deg, #020a18 0%, #051530 50%, #020a18 100%);
}
.scene-bg--threed .orb:nth-child(1) {
  width: 500px; height: 500px; background: rgba(6,182,212,0.18);
  top: -10%; left: -8%; animation-delay: 0s;
}
.scene-bg--threed .orb:nth-child(2) {
  width: 400px; height: 400px; background: rgba(129,140,248,0.15);
  bottom: -5%; right: -10%; animation-delay: -5s;
}
.scene-bg--threed .orb:nth-child(3) {
  width: 300px; height: 300px; background: rgba(6,182,212,0.12);
  top: 40%; left: 50%; animation-delay: -9s; animation-duration: 16s;
}

/* Hidden by default, shown via JS */
.scene-bg { opacity: 0; }
.scene-bg.active { opacity: 1; }

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

@keyframes emberRise {
  0% { opacity: 0; transform: translateY(0) scale(1); }
  20% { opacity: 0.8; }
  100% { opacity: 0; transform: translateY(-200px) scale(0); }
}

/* ============================================================
   Navigation
   ============================================================ */
.site-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: 0;
  background: rgba(10, 10, 10, 0.7);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  transition: background 0.5s ease;
}
.site-nav .container {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.site-nav .logo {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.5rem; font-weight: 600; letter-spacing: 2px;
  transition: var(--transition);
}
.site-nav .nav-links {
  display: flex; gap: 32px; list-style: none;
  margin: 0; padding: 0;
}
.site-nav .nav-links li { list-style: none; }
.site-nav .nav-links a {
  font-size: 0.85rem; font-weight: 500; transition: var(--transition);
  opacity: 0.6; letter-spacing: 0.5px;
}
.site-nav .nav-links a:hover, .site-nav .nav-links a.active { opacity: 1; }

/* Nav color modes */
.nav-mode-light .site-nav { background: rgba(240,246,255,0.85); border-color: rgba(59,130,246,0.1); }
.nav-mode-light .logo { color: var(--corp-text); }
.nav-mode-light .nav-links a { color: var(--corp-text-sub); }
.nav-mode-light .nav-links a:hover, .nav-mode-light .nav-links a.active { color: var(--corp-text); }

.nav-mode-dark .site-nav { background: rgba(10,10,10,0.8); border-color: rgba(255,255,255,0.08); }
.nav-mode-dark .logo { color: #fafafa; }
.nav-mode-dark .nav-links a { color: rgba(255,255,255,0.5); }
.nav-mode-dark .nav-links a:hover, .nav-mode-dark .nav-links a.active { color: #fafafa; }

/* Mobile hamburger */
.nav-toggle { display: none; background: none; padding: 8px; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: currentColor; margin: 5px 0; transition: var(--transition); }

@media (max-width: 768px) {
  .nav-toggle { display: block; color: inherit; }
  .site-nav .nav-links {
    position: fixed; top: 64px; left: 0; right: 0; bottom: 0;
    flex-direction: column; align-items: center; justify-content: center;
    gap: 40px; background: rgba(10,10,10,0.95); backdrop-filter: blur(20px);
    transform: translateX(100%); transition: var(--transition);
  }
  .site-nav .nav-links.open { transform: translateX(0); }
  .site-nav .nav-links a { font-size: 1.3rem; }
}

/* ============================================================
   Hero Section
   ============================================================ */
.hero {
  position: relative; z-index: 1;
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  text-align: center; padding: 120px 24px 80px;
}
.hero-content { max-width: 800px; }
.hero-logo {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(3.5rem, 8vw, 7rem); font-weight: 300;
  letter-spacing: 12px; line-height: 1.1; margin-bottom: 24px;
  text-transform: uppercase;
  background: linear-gradient(135deg, #fff 0%, rgba(255,255,255,0.6) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.hero-tagline {
  font-size: clamp(0.9rem, 1.8vw, 1.15rem); color: rgba(255,255,255,0.5);
  font-weight: 300; line-height: 1.8; margin-bottom: 48px;
  letter-spacing: 2px;
}
.hero-genres {
  display: flex; justify-content: center; gap: 14px; flex-wrap: wrap;
}
.hero-genre-chip {
  padding: 10px 24px; border-radius: 100px; font-size: 0.8rem; font-weight: 600;
  border: 1px solid rgba(255,255,255,0.12); background: rgba(255,255,255,0.04);
  color: rgba(255,255,255,0.7); backdrop-filter: blur(8px);
  transition: var(--transition); letter-spacing: 0.5px;
}
.hero-genre-chip:hover { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.25); }
.hero-genre-chip[data-genre="corporate"] { border-color: rgba(59,130,246,0.4); color: var(--corp-accent); }
.hero-genre-chip[data-genre="fighting"] { border-color: rgba(239,68,68,0.4); color: var(--fight-accent); }
.hero-genre-chip[data-genre="hiphop"] { border-color: rgba(192,132,252,0.4); color: var(--hip-accent); }
.hero-genre-chip[data-genre="threed"] { border-color: rgba(6,182,212,0.4); color: var(--3d-accent); }

.hero .scroll-hint {
  position: absolute; bottom: 40px; left: 50%; transform: translateX(-50%);
  color: rgba(255,255,255,0.3); font-size: 0.7rem; letter-spacing: 3px;
  text-transform: uppercase;
}
.hero .scroll-hint .arrow {
  width: 18px; height: 18px; border-right: 1px solid rgba(255,255,255,0.3);
  border-bottom: 1px solid rgba(255,255,255,0.3);
  transform: rotate(45deg); margin: 12px auto 0;
  animation: scrollBounce 2s ease-in-out infinite;
}
@keyframes scrollBounce {
  0%, 100% { transform: rotate(45deg) translate(0, 0); opacity: 0.4; }
  50% { transform: rotate(45deg) translate(4px, 4px); opacity: 1; }
}

/* ============================================================
   Genre Section
   ============================================================ */
.genre-section {
  position: relative; z-index: 1;
  padding: 120px 0 80px;
  min-height: 100vh;
}

.genre-header {
  text-align: center; margin-bottom: 60px;
}
.genre-label {
  display: inline-block; padding: 6px 20px; border-radius: 100px;
  font-size: 0.7rem; font-weight: 700; letter-spacing: 3px;
  text-transform: uppercase; margin-bottom: 16px;
}
.genre-title {
  font-size: clamp(2rem, 4vw, 3rem); font-weight: 800; letter-spacing: -1px;
  margin-bottom: 12px;
}
.genre-subtitle {
  font-size: 0.95rem; max-width: 500px; margin: 0 auto; line-height: 1.8;
}

/* Corporate genre styles */
.genre-section--corporate { color: var(--corp-text); }
.genre-section--corporate .genre-label { background: rgba(59,130,246,0.1); color: var(--corp-accent); }
.genre-section--corporate .genre-subtitle { color: var(--corp-text-sub); }

/* Fighting genre styles */
.genre-section--fighting { color: var(--fight-text); }
.genre-section--fighting .genre-label { background: rgba(239,68,68,0.15); color: var(--fight-accent); }
.genre-section--fighting .genre-subtitle { color: var(--fight-text-sub); }

/* HIPHOP genre styles */
.genre-section--hiphop { color: var(--hip-text); }
.genre-section--hiphop .genre-label { background: rgba(192,132,252,0.15); color: var(--hip-accent); }
.genre-section--hiphop .genre-subtitle { color: var(--hip-text-sub); }

/* 3D genre styles */
.genre-section--threed { color: var(--3d-text); }
.genre-section--threed .genre-label { background: rgba(6,182,212,0.15); color: var(--3d-accent); }
.genre-section--threed .genre-subtitle { color: var(--3d-text-sub); }

/* ============================================================
   Work Cards Grid — kouheinakama.com style
   Large thumbnails, hover overlay title
   ============================================================ */
.works-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.work-card {
  position: relative; overflow: hidden; cursor: pointer;
  aspect-ratio: 16 / 9;
  background: rgba(0,0,0,0.3);
}
.work-card:hover { z-index: 2; }

/* Thumbnail fills entire card */
.card-thumbnail {
  position: absolute; inset: 0; overflow: hidden;
}
.card-thumbnail img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.6s ease, filter 0.6s ease;
}
.work-card:hover .card-thumbnail img {
  transform: scale(1.05);
  filter: brightness(0.5);
}

/* Play button */
.card-play {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%) scale(0.85);
  width: 64px; height: 64px; border-radius: 50%;
  background: rgba(255,255,255,0.15); backdrop-filter: blur(8px);
  border: 2px solid rgba(255,255,255,0.3);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: var(--transition); z-index: 3;
}
.card-play svg { width: 22px; height: 22px; fill: #fff; margin-left: 3px; }
.work-card:hover .card-play { opacity: 1; transform: translate(-50%, -50%) scale(1); }

/* Title overlay on hover — kouheinakama style */
.card-body {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 24px 20px 20px;
  background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 100%);
  transform: translateY(100%);
  transition: transform 0.4s ease;
  z-index: 2;
}
.work-card:hover .card-body { transform: translateY(0); }

.card-title {
  font-size: 1rem; font-weight: 700; color: #fff;
  letter-spacing: 0.5px; margin-bottom: 0;
}
.card-desc {
  font-size: 0.8rem; color: rgba(255,255,255,0.6);
  line-height: 1.5; margin-top: 4px; margin-bottom: 0;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }
.card-tag {
  padding: 3px 10px; border-radius: 100px; font-size: 0.65rem; font-weight: 500;
  background: rgba(255,255,255,0.12); color: rgba(255,255,255,0.8);
  border: 1px solid rgba(255,255,255,0.15);
}

/* Genre-specific card accent on hover */
.genre-section--corporate .work-card:hover { box-shadow: 0 0 30px rgba(59,130,246,0.15); }
.genre-section--fighting .work-card:hover { box-shadow: 0 0 30px rgba(239,68,68,0.2); }
.genre-section--hiphop .work-card:hover { box-shadow: 0 0 30px rgba(192,132,252,0.2); }
.genre-section--threed .work-card:hover { box-shadow: 0 0 30px rgba(6,182,212,0.2); }

/* Genre-specific card tag colors */
.genre-section--corporate .card-tag {
  background: rgba(59,130,246,0.15); color: var(--corp-accent2); border-color: rgba(59,130,246,0.2);
}
.genre-section--fighting .card-tag {
  background: rgba(239,68,68,0.15); color: #fca5a5; border-color: rgba(239,68,68,0.2);
}
.genre-section--hiphop .card-tag {
  background: rgba(192,132,252,0.15); color: #d8b4fe; border-color: rgba(192,132,252,0.2);
}
.genre-section--threed .card-tag {
  background: rgba(6,182,212,0.15); color: #67e8f9; border-color: rgba(6,182,212,0.2);
}

/* No-video placeholder */
.work-card--empty {
  display: flex; align-items: center; justify-content: center;
  text-align: center; opacity: 0.5; grid-column: 1 / -1; aspect-ratio: auto;
  padding: 40px; font-size: 0.9rem;
}

/* ============================================================
   Modal / Lightbox
   ============================================================ */
.modal-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0, 0, 0, 0.85); backdrop-filter: blur(12px);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: var(--transition);
  padding: 24px;
}
.modal-overlay.active { opacity: 1; pointer-events: auto; }

.modal {
  background: #141418; border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius); max-width: 900px; width: 100%;
  max-height: 90vh; overflow-y: auto;
  transform: scale(0.92) translateY(20px); transition: var(--transition);
}
.modal-overlay.active .modal { transform: scale(1) translateY(0); }

.modal-video { width: 100%; aspect-ratio: 16/9; background: #000; border-radius: var(--radius) var(--radius) 0 0; overflow: hidden; }
.modal-video iframe { width: 100%; height: 100%; border: none; }

.modal-close {
  position: absolute; top: 16px; right: 16px;
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(0,0,0,0.6); backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.15); color: #fff;
  font-size: 1.3rem; display: flex; align-items: center; justify-content: center;
  transition: var(--transition); z-index: 1;
}
.modal-close:hover { background: rgba(255,255,255,0.2); }

.modal-body { padding: 24px 28px 28px; }
.modal-genre-label { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 2px; margin-bottom: 8px; color: rgba(255,255,255,0.4); }
.modal-title { font-size: 1.3rem; font-weight: 700; color: #fafafa; margin-bottom: 10px; }
.modal-desc { font-size: 0.9rem; color: rgba(255,255,255,0.5); line-height: 1.8; margin-bottom: 16px; }
.modal-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.modal-tags span {
  padding: 5px 14px; border-radius: 100px; font-size: 0.72rem;
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.5);
}

/* ============================================================
   Contact Section
   ============================================================ */
.contact-section {
  position: relative; z-index: 1; padding: 120px 0;
}
.contact-card {
  max-width: 640px; margin: 0 auto; padding: 48px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius); backdrop-filter: blur(12px);
  text-align: center;
}
.contact-card h2 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2rem; font-weight: 400; margin-bottom: 12px; color: #fafafa;
  letter-spacing: 3px;
}
.contact-card p {
  color: rgba(255,255,255,0.45); margin-bottom: 32px; line-height: 1.8;
  font-size: 0.9rem;
}
.contact-links { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; }
.contact-link {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 28px; border-radius: 100px; font-size: 0.85rem; font-weight: 600;
  transition: var(--transition); letter-spacing: 0.5px;
}
.contact-link--email { background: linear-gradient(135deg, #3b82f6, #60a5fa); color: #fff; }
.contact-link--instagram { background: linear-gradient(135deg, #e1306c, #f77737); color: #fff; }
.contact-link--line { background: #06c755; color: #fff; }
.contact-link:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,0.3); }

/* ============================================================
   Footer
   ============================================================ */
.site-footer {
  position: relative; z-index: 1;
  text-align: center; padding: 40px 0;
  border-top: 1px solid rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.25); font-size: 0.75rem;
  letter-spacing: 0.5px;
}

/* ============================================================
   Scroll Reveal Animation
   ============================================================ */
.reveal {
  opacity: 0; transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible {
  opacity: 1; transform: translateY(0);
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 1024px) {
  .works-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .works-grid { grid-template-columns: 1fr; gap: 4px; }
  .hero-logo { letter-spacing: 6px; }
  .genre-section { padding: 80px 0 60px; }
  .contact-card { padding: 32px 20px; }
  .modal { margin: 12px; }
}
@media (max-width: 480px) {
  .hero-genres { gap: 8px; }
  .hero-genre-chip { padding: 8px 16px; font-size: 0.75rem; }
}
