/* ============================================================
   GLOBAL STYLES — Animation Studio Portfolio
   Aesthetic: Cinematic dark luxury with editorial typography
   Fonts: LINE Seed JP (all text, all weights)
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=LINE+Seed+JP:wght@400;700;800&display=swap');

/* ── CSS Variables ─────────────────────────────────────── */
:root {
  --black:      #080808;
  --dark:       #0f0f0f;
  --dark-mid:   #161616;
  --mid:        #242424;
  --border:     #2a2a2a;
  --muted:      #555;
  --light-muted:#888;
  --white:      #f0ede8;
  --cream:      #e8e0d4;
  --accent:     #c8a96e;
  --accent-dim: #8a6e3e;
  --font:         'LINE Seed JP', sans-serif;
  --nav-height: 72px;
  --max-w:      1440px;
  --gutter:     clamp(1.5rem, 5vw, 5rem);
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ── Reset ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body { background: var(--black); color: var(--white); font-family: var(--font); overflow-x: hidden; }
img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; background: none; border: none; font: inherit; color: inherit; }
ul, ol { list-style: none; }

/* ── Typography ────────────────────────────────────────── */
.display-xl { font-family: var(--font); font-size: clamp(4rem,10vw,10rem); font-weight: 800; line-height: 0.95; letter-spacing: -0.02em; }
.display-lg { font-family: var(--font); font-size: clamp(2.5rem,6vw,6rem); font-weight: 800; line-height: 1; }
.display-md { font-family: var(--font); font-size: clamp(2rem,4vw,4rem); font-weight: 800; line-height: 1.05; }
.heading    { font-family: var(--font); font-size: clamp(1.25rem,2vw,1.75rem); font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; }
.label      { font-family: var(--font); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.2em; color: var(--accent); }
.body-copy  { font-size: clamp(0.9rem,1.2vw,1.1rem); line-height: 1.8; color: var(--cream); opacity: 0.85; }

/* ── Layout ────────────────────────────────────────────── */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 var(--gutter); }
.section   { padding: clamp(4rem,10vh,8rem) 0; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 2rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4,1fr); gap: 1.5rem; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.divider { width: 100%; height: 1px; background: var(--border); margin: clamp(3rem,6vh,5rem) 0; }

/* ── Navigation ────────────────────────────────────────── */
#main-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  height: var(--nav-height); display: flex; align-items: center;
  padding: 0 clamp(1rem, 3vw, 2.5rem);
  transition: background 0.4s, backdrop-filter 0.4s;
}
#main-nav.scrolled {
  background: rgba(8,8,8,0.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}
.nav-logo { font-family: var(--font); font-size: 1.5rem; font-weight: 600; letter-spacing: 0.05em; }
.nav-logo span { color: var(--accent); }
.nav-links { display: flex; align-items: center; gap: 2.5rem; margin-left: auto; }
.nav-links a { font-family: var(--font); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.15em; color: var(--light-muted); transition: color 0.2s; position: relative; }
.nav-links a::after { content: ''; position: absolute; bottom: -4px; left: 0; width: 0; height: 1px; background: var(--accent); transition: width 0.3s var(--ease-out-expo); }
.nav-links a:hover, .nav-links a.active { color: var(--white); }
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }
.nav-cta { margin-left: 2rem; padding: 0; border: none; background: transparent; color: var(--light-muted) !important; transition: color 0.2s !important; display: flex; align-items: center; justify-content: center; }
.nav-cta:hover { color: var(--white) !important; }
.nav-cta::after { display: none !important; }
.nav-cta-icon svg { width: 2rem; height: 2rem; display: block; }
.nav-cta-icon .icon-default { display: flex; }
.nav-cta-icon .icon-hover { display: none; }
.nav-cta-icon:hover .icon-default,
.nav-cta-icon:active .icon-default { display: none; }
.nav-cta-icon:hover .icon-hover,
.nav-cta-icon:active .icon-hover { display: flex; }
.nav-hamburger { display: none; flex-direction: column; gap: 5px; padding: 4px; margin-left: auto; }
.nav-hamburger span { display: block; width: 24px; height: 1.5px; background: var(--white); transition: transform 0.3s, opacity 0.3s; }

/* ── Hero Video Background ──────────────────────────────── */
.hero-video-section {
  position: relative; width: 100%; height: 100vh; min-height: 600px;
  overflow: hidden; display: flex; align-items: center; justify-content: center;
}
.hero-video-bg { position: absolute; inset: 0; z-index: 0; }
.hero-video-bg video { width: 100%; height: 100%; object-fit: cover; }
.hero-video-bg .fallback-img { display: none; }
.hero-overlay {
  position: absolute; inset: 0; z-index: 1;
  background: rgba(8,8,8,0.45);
}
.hero-content {
  position: relative; z-index: 2;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center;
}
.hero-logo {
  width: clamp(110px, 19.3vw, 276px);
  height: auto;
  display: block;
  overflow: visible;
  animation: hero-logo-in 1.2s var(--ease-out-expo) both;
}
@keyframes hero-logo-in {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
.hero-reel-btn { display: inline-flex; align-items: center; gap: 1rem; margin-top: 2.5rem; font-family: var(--font); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.15em; transition: gap 0.3s var(--ease-out-expo); }
.hero-reel-btn:hover { gap: 1.5rem; }
.reel-play-icon { width: 52px; height: 52px; border-radius: 50%; border: 1px solid rgba(255,255,255,0.4); display: flex; align-items: center; justify-content: center; transition: border-color 0.3s, background 0.3s; }
.reel-play-icon::before { content: ''; width: 0; height: 0; border-style: solid; border-width: 7px 0 7px 14px; border-color: transparent transparent transparent var(--white); margin-left: 3px; }
.hero-reel-btn:hover .reel-play-icon { border-color: var(--accent); background: rgba(200,169,110,0.1); }

/* ── Video Modal (fullscreen reel player) ───────────────── */
.video-modal-overlay { position: fixed; inset: 0; z-index: 9000; background: rgba(0,0,0,0.95); display: flex; align-items: center; justify-content: center; opacity: 0; pointer-events: none; transition: opacity 0.4s; }
.video-modal-overlay.active { opacity: 1; pointer-events: all; }
.video-modal-inner { position: relative; width: 90vw; max-width: 1200px; aspect-ratio: 16/9; }
.video-modal-inner video, .video-modal-inner iframe { width: 100%; height: 100%; }
.video-modal-close { position: absolute; top: -3rem; right: 0; font-family: var(--font); font-size: 0.7rem; letter-spacing: 0.15em; text-transform: uppercase; color: var(--light-muted); display: flex; align-items: center; gap: 0.5rem; transition: color 0.2s; }
.video-modal-close:hover { color: var(--white); }

/* ── Contact Sidebar ─────────────────────────────────────── */
.contact-backdrop {
  position: fixed; inset: 0; z-index: 8000;
  background: rgba(0,0,0,0.4);
  backdrop-filter: blur(4px);
  opacity: 0; pointer-events: none;
  transition: opacity 0.4s var(--ease-out-expo);
}
.contact-backdrop.open { opacity: 1; pointer-events: all; }
.contact-sidebar {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 8001;
  width: min(480px, 92vw);
  background: rgba(255,255,255,0.10);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-left: 1px solid rgba(255,255,255,0.12);
  transform: translateX(100%);
  transition: transform 0.5s var(--ease-out-expo);
  overflow-y: auto;
}
.contact-sidebar.open { transform: translateX(0); }
.contact-sidebar-inner { padding: 5rem 2.5rem 3rem; }
.contact-sidebar-close {
  position: absolute; top: 1.5rem; right: 1.75rem;
  font-size: 1.1rem; color: var(--light-muted);
  transition: color 0.2s;
}
.contact-sidebar-close:hover { color: var(--white); }
.contact-form { display: flex; flex-direction: column; gap: 1.5rem; }
.contact-field { display: flex; flex-direction: column; gap: 0.5rem; }
.contact-label { font-family: var(--font); font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.15em; color: var(--light-muted); }
.contact-input {
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 4px;
  padding: 0.75rem 1rem;
  font-family: var(--font); font-size: 0.9rem;
  color: var(--white);
  transition: border-color 0.2s;
  width: 100%;
}
.contact-input::placeholder { color: var(--muted); }
.contact-input:focus { outline: none; border-color: rgba(255,255,255,0.4); }
.contact-textarea { min-height: 140px; resize: vertical; }

/* ── Inline Video Player (portfolio detail) ─────────────── */
.video-player-wrap { position: relative; width: 100%; aspect-ratio: 16/9; background: var(--dark); overflow: hidden; }
.video-player-wrap video { width: 100%; height: 100%; object-fit: cover; }
.video-play-overlay { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,0.35); transition: opacity 0.3s; cursor: pointer; }
.video-play-overlay.hidden { opacity: 0; pointer-events: none; }
.video-play-btn-large { width: 80px; height: 80px; border-radius: 50%; border: 2px solid rgba(255,255,255,0.7); display: flex; align-items: center; justify-content: center; transition: transform 0.3s var(--ease-out-expo), border-color 0.3s; }
.video-play-btn-large:hover { transform: scale(1.1); border-color: var(--accent); }
.video-play-btn-large::before { content: ''; width: 0; height: 0; border-style: solid; border-width: 12px 0 12px 22px; border-color: transparent transparent transparent #fff; margin-left: 5px; }

/* ── Project Cards ──────────────────────────────────────── */
.project-card { position: relative; overflow: hidden; aspect-ratio: 4/3; cursor: pointer; background: var(--dark-mid); }
.project-card-media { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--ease-out-expo); }
.project-card:hover .project-card-media { transform: scale(1.05); }
.project-card-overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(8,8,8,0.9) 0%, transparent 60%); transition: background 0.4s; }
.project-card:hover .project-card-overlay { background: linear-gradient(to top, rgba(8,8,8,0.95) 0%, rgba(8,8,8,0.2) 60%); }
.project-card-info { position: absolute; bottom: 0; left: 0; right: 0; padding: 1.5rem; transform: translateY(8px); transition: transform 0.4s var(--ease-out-expo); }
.project-card:hover .project-card-info { transform: translateY(0); }
.project-card-category { font-family: var(--font); font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.2em; color: var(--accent); margin-bottom: 0.4rem; }
.project-card-title { font-family: var(--font); font-size: clamp(1.25rem,2vw,1.75rem); font-weight: 300; line-height: 1.1; }
.project-card-arrow { position: absolute; top: 1.5rem; right: 1.5rem; width: 36px; height: 36px; border: 1px solid rgba(255,255,255,0.2); display: flex; align-items: center; justify-content: center; opacity: 0; transform: translate(4px,-4px); transition: opacity 0.3s, transform 0.3s var(--ease-out-expo); font-size: 0.9rem; }
.project-card:hover .project-card-arrow { opacity: 1; transform: translate(0,0); }

/* ── Buttons ────────────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; gap: 0.75rem; padding: 0.9rem 2rem; font-family: var(--font); font-size: 0.5rem; text-transform: uppercase; letter-spacing: 0.15em; transition: background 0.25s, color 0.25s, border-color 0.25s; white-space: nowrap; }
.btn-primary { background: transparent; color: var(--light-muted); border: 1px solid var(--light-muted); border-radius: 8px; }
.btn-primary:hover { background: var(--white); border-color: var(--white); color: var(--dark-mid); }
.btn-outline { background: transparent; color: var(--light-muted); border: 1px solid var(--light-muted); border-radius: 8px; }
.btn-outline:hover { background: var(--white); border-color: var(--white); color: var(--dark-mid); }
.btn-arrow::after { content: '→'; transition: transform 0.3s var(--ease-out-expo); }
.btn-arrow:hover::after { transform: translateX(4px); }

/* ── Filter Tabs ────────────────────────────────────────── */
.filter-tabs { display: flex; gap: 0.25rem; flex-wrap: wrap; margin-bottom: 3rem; }
.filter-tab { padding: 0.5rem 1.25rem; font-family: var(--font); font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.15em; color: var(--light-muted); border: 1px solid var(--border); transition: background 0.2s, color 0.2s, border-color 0.2s; cursor: pointer; background: none; }
.filter-tab:hover, .filter-tab.active { background: var(--accent); color: var(--black); border-color: var(--accent); }

/* ── Partners Marquee ───────────────────────────────────── */
.marquee-wrap { overflow: hidden; padding: 2rem 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.marquee-track { display: flex; gap: 4rem; animation: marquee 30s linear infinite; width: max-content; }
.marquee-track:hover { animation-play-state: paused; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.partner-logo { height: 32px; width: auto; opacity: 0.4; filter: brightness(0) invert(1); transition: opacity 0.3s; flex-shrink: 0; }
.partner-logo:hover { opacity: 1; }

/* ── News Cards ─────────────────────────────────────────── */
.news-card { display: grid; grid-template-columns: 280px 1fr; gap: 2rem; padding: 2rem 0; border-bottom: 1px solid var(--border); transition: opacity 0.3s; }
.news-card:hover { opacity: 0.8; }
.news-card-img { aspect-ratio: 16/9; object-fit: cover; width: 100%; background: var(--dark-mid); }
.news-card-date { font-family: var(--font); font-size: 0.68rem; color: var(--muted); letter-spacing: 0.1em; margin-bottom: 0.75rem; }
.news-card-title { font-family: var(--font); font-size: clamp(1.1rem,1.5vw,1.5rem); font-weight: 300; line-height: 1.2; margin-bottom: 0.75rem; }

/* ── Team Cards ─────────────────────────────────────────── */
.team-card { text-align: center; }
.team-card-img { aspect-ratio: 3/4; object-fit: cover; width: 100%; margin-bottom: 1.25rem; background: var(--dark-mid); filter: grayscale(30%); transition: filter 0.4s; }
.team-card:hover .team-card-img { filter: grayscale(0%); }
.team-card-name { font-family: var(--font); font-size: 1.3rem; font-weight: 400; margin-bottom: 0.25rem; }
.team-card-title { font-family: var(--font); font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.15em; color: var(--accent); margin-bottom: 0.75rem; }

/* ── Contact Form ───────────────────────────────────────── */
.form-group { margin-bottom: 1.5rem; }
.form-label { display: block; font-family: var(--font); font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.15em; color: var(--light-muted); margin-bottom: 0.6rem; }
.form-input, .form-textarea, .form-select { width: 100%; background: var(--dark-mid); border: 1px solid var(--border); color: var(--white); padding: 0.85rem 1rem; font-size: 0.95rem; transition: border-color 0.2s; outline: none; appearance: none; }
.form-input:focus, .form-textarea:focus, .form-select:focus { border-color: var(--accent); }
.form-textarea { min-height: 160px; resize: vertical; }

/* ── Footer ─────────────────────────────────────────────── */
#main-footer { background: var(--dark); border-top: 1px solid var(--border); padding: clamp(3rem,6vh,5rem) 0 2rem; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 3rem; margin-bottom: 4rem; }
.footer-logo { font-family: var(--font); font-size: 2rem; font-weight: 600; margin-bottom: 1rem; }
.footer-logo span { color: var(--accent); }
.footer-desc { font-size: 0.88rem; color: var(--light-muted); line-height: 1.7; max-width: 280px; }
.footer-heading { font-family: var(--font); font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.2em; color: var(--accent); margin-bottom: 1.25rem; }
.footer-links { display: flex; flex-direction: column; gap: 0.6rem; }
.footer-links a { font-size: 0.88rem; color: var(--light-muted); transition: color 0.2s; }
.footer-links a:hover { color: var(--white); }
.footer-bottom { display: flex; align-items: center; justify-content: space-between; padding-top: 2rem; border-top: 1px solid var(--border); gap: 1rem; }
.footer-copy { font-family: var(--font); font-size: 0.65rem; color: var(--muted); letter-spacing: 0.1em; }
.social-links { display: flex; gap: 1rem; }
.social-link { width: 36px; height: 36px; border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; font-size: 0.8rem; color: var(--muted); transition: border-color 0.2s, color 0.2s; }
.social-link:hover { border-color: var(--accent); color: var(--accent); }

/* ── Page Header ────────────────────────────────────────── */
.page-header { padding-top: calc(var(--nav-height) + clamp(3rem,8vh,6rem)); padding-bottom: clamp(3rem,6vh,5rem); border-bottom: 1px solid var(--border); }

/* ── Scroll Reveal ──────────────────────────────────────── */
.reveal { opacity: 0; transform: translateY(32px); 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.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }

/* ── Custom Cursor ──────────────────────────────────────── */
.cursor { position: fixed; width: 8px; height: 8px; background: rgba(240,237,232,0.75); border-radius: 50%; pointer-events: none; z-index: 9999; transform: translate(-50%,-50%); mix-blend-mode: difference; }
.cursor-follower { position: fixed; width: 36px; height: 36px; border: 1px solid var(--light-muted); border-radius: 50%; pointer-events: none; z-index: 9998; transform: translate(-50%,-50%); transition: left 0.12s var(--ease-out-expo), top 0.12s var(--ease-out-expo); }

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2,1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
  .news-card { grid-template-columns: 200px 1fr; }
}
@media (max-width: 768px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: 1fr 1fr; }
  .nav-links { display: none; }
  .nav-links.open { display: flex; flex-direction: column; position: fixed; inset: 0; background: var(--black); align-items: center; justify-content: center; gap: 2rem; z-index: 999; }
  .nav-hamburger { display: flex; }
  .news-card { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .cursor, .cursor-follower { display: none; }
}
