/* --- Base colors (keep your existing colors if you already have them) --- */
:root{
  --bg:#0b0f1a;
  --card:#141a2a;
  --text:#e8ecff;
  --accent:#4da3ff;
}

*{ box-sizing:border-box; }
body{
  margin:0;
  font-family: system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
}

.wrap{
  width:min(1100px, 92%);
  margin:auto;
}

.hero{
  padding:80px 0;
  text-align:center;
  background: radial-gradient(circle at top, #1c2b55, #0b0f1a);
}
.hero.small{ padding:44px 0; }

h1{
  font-size:48px;
  margin:0;
}

.sub{
  font-size: 48px;   /* 跟 h1 一樣大 */
  color:#aab3d6;
  margin:10px 0 20px;
  font-weight: 500;
  opacity: 0.9;
}

.btn{
  background:var(--accent);
  color:#08101f;
  padding:12px 18px;
  text-decoration:none;
  border-radius:10px;
  font-weight:bold;
}

.section{
  padding:50px 0;
}

h2{
  margin-bottom:20px;
}

.video{
  position:relative;
  padding-bottom:56.25%;
  height:0;
}

.video iframe{
  position:absolute;
  width:100%;
  height:100%;
  left:0;
  top:0;
}

.grid{
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap:20px;
}

.card{
  background:var(--card);
  border-radius:14px;
  overflow:hidden;
  padding-bottom:10px;
  border: 1px solid rgba(255,255,255,.08);
}

.card img{
  width:100%;
  display:block;
}

.card h3{
  margin:10px;
}

.card p{
  margin:0 10px 10px;
  color:#aab3d6;
}

.contact{
  text-align:center;
}

.foot{
  text-align:center;
  padding:30px 0;
  color:#888;
}

/* --- NEW: top navigation --- */
.topnav{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding: 12px 0 28px;
}

.brand{
  font-weight:800;
  letter-spacing: .2px;
  text-decoration:none;
  color: var(--text);
}

.links{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
  justify-content:center;
}

.links a{
  text-decoration:none;
  color:#aab3d6;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(0,0,0,.12);
}

.links a:hover{
  color: var(--text);
  border-color: rgba(255,255,255,.16);
}

.links a.active{
  color:#08101f;
  background: var(--accent);
  border-color: transparent;
  font-weight: 700;
}

.hint{
  margin-top: 16px;
  color:#aab3d6;
}

code{
  background: rgba(255,255,255,.08);
  padding: 2px 6px;
  border-radius: 8px;
}

/* --- Thumbnails + play button (for modal) --- */
.thumb{
  position: relative;
  aspect-ratio: 16 / 9;
  width: 100%;
  overflow: hidden;
  border-radius: 14px 14px 0 0;
}

.thumb img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.open-video{
  display: block;
  position: relative;
}

.play{
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 64px;
  height: 64px;
  border-radius: 999px;
  background: rgba(0,0,0,.55);
  border: 1px solid rgba(255,255,255,.25);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  backdrop-filter: blur(6px);
}

/* --- Modal --- */
.modal{ position: fixed; inset: 0; display: none; z-index: 9999; }
.modal.show{ display: block; }
.modal-backdrop{ position: absolute; inset: 0; background: rgba(0,0,0,.75); }
.modal-panel{
  position: relative;
  width: min(1100px, 92%);
  margin: 6vh auto 0;
  background: #0b0f1a;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,.6);
}
.modal-close{
  position: absolute;
  right: 10px;
  top: 10px;
  z-index: 2;
  background: rgba(0,0,0,.5);
  color: #fff;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 10px;
  padding: 8px 10px;
  cursor: pointer;
}
.modal-video{
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
}
.modal-video iframe{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
/* --- Cinematic full-width hero (ADD THIS) --- */
.hero.hero-cinematic{
  position: relative;
  padding: 0;
  min-height: 72vh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  text-align: center;
}

.hero-bg{
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.03);
}

.hero-overlay{
  position: absolute;
  inset: 0;
  background:
    radial-gradient(900px 420px at 30% 20%, rgba(77,163,255,.18), rgba(0,0,0,0) 55%),
    linear-gradient(to bottom, rgba(0,0,0,.15) 0%, rgba(0,0,0,.55) 55%, rgba(0,0,0,.85) 100%);
}

.hero-content{
  position: relative;
  padding: 60px 0 140px; /* 底下留空間給右下角選單 */
  z-index: 2;
}

.hero.hero-cinematic h1,
.hero.hero-cinematic .sub{
  color: #fff;
  text-shadow: 0 8px 24px rgba(0,0,0,.55);
}

/* Bottom-right menu */
.hero-menu{
  position: absolute;
  right: 36px;
  bottom: 36px;
  display: flex;
  gap: 12px;
  z-index: 3;
}

.hero-menu a{
  color: #fff;
  text-decoration: none;
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(0,0,0,.35);
  border: 1px solid rgba(255,255,255,.2);
  backdrop-filter: blur(6px);
  font-weight: 600;
}

.hero-menu a:hover{ background: rgba(0,0,0,.55); }

.hero-menu a.active{
  background: var(--accent);
  color: #08101f;
  border-color: transparent;
}

@media (max-width: 700px){
  .hero-menu{
    right: 16px;
    bottom: 16px;
    flex-wrap: wrap;
    justify-content: flex-end;
  }
  .hero-content{ padding-bottom: 180px; }
}
/* --- Rendering page hero image (like homepage) --- */
body.rendering-page .hero{
  background: url("images/render-hero.jpg") center/cover no-repeat;
  position: relative;
  color: #fff;
}

body.rendering-page .hero::after{
  content:"";
  position:absolute;
  inset:0;
  background: rgba(0,0,0,.45);
}

body.rendering-page .hero .wrap{
  position: relative;
  z-index: 1;
}
/* --- Slider (3 works) --- */
.slider{
  position: relative;
  margin-top: 18px;
}

.slider-track{
  display: flex;
  gap: 20px;
  overflow: hidden;
  scroll-behavior: smooth;
}

.slide{
  flex: 0 0 100%;
}

.slider-btn{
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(0,0,0,.35);
  color: #fff;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  z-index: 5;
  backdrop-filter: blur(6px);
}

.slider-btn:hover{ background: rgba(0,0,0,.55); }

.slider-btn.prev{ left: -10px; }
.slider-btn.next{ right: -10px; }

@media (max-width: 700px){
  .slider-btn.prev{ left: 6px; }
  .slider-btn.next{ right: 6px; }
}
/* --- Horizontal works row (wheel scroll) --- */
.work-row{ position: relative; margin-top: 18px; }

.row-track{
  display: flex;
  gap: 20px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  padding: 4px 2px 10px;
  scrollbar-width: thin;
}

.row-track::-webkit-scrollbar{ height: 10px; }
.row-track::-webkit-scrollbar-thumb{
  background: rgba(255,255,255,.18);
  border-radius: 999px;
}

.work-card{
  flex: 0 0 min(520px, 92vw); /* 一次顯示一張偏大卡片，很像reel選片 */
}

.row-btn{
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(0,0,0,.35);
  color: #fff;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  z-index: 5;
  backdrop-filter: blur(6px);
}

.row-btn:hover{ background: rgba(0,0,0,.55); }
.row-btn.prev{ left: -10px; }
.row-btn.next{ right: -10px; }

@media (max-width: 700px){
  .row-btn.prev{ left: 6px; }
  .row-btn.next{ right: 6px; }
}

body.storyboard-page .hero{
  background: url("images/storyboard-cover-night.jpg") center/cover no-repeat;
  position: relative;
  color: #fff;
}

body.storyboard-page .hero::after{
  content:"";
  position:absolute;
  inset:0;
  background: rgba(0,0,0,.45);
}

body.storyboard-page .hero .wrap{
  position: relative;
  z-index: 1;
}

/* ✅ Force horizontal swipe */
.row-track{
  overflow-x: auto !important;
  overflow-y: hidden !important;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x;
  scroll-snap-type: x mandatory;
}

.work-card{
  scroll-snap-align: start;
}
.rigging-page .sub{
  font-size: 20px;
  opacity: 0.8;
  letter-spacing: 1px;
}

.rigging-page .brand{
  color: #4da3ff;
  text-decoration: none;
}

.rigging-page .brand:hover{
  color: #7dbaff;
}

.brand{
  color: #4da3ff;
}
.rigging-page .active-pick{
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.storyboard-page .sub{
  font-size: 20px;
  opacity: 0.8;
  letter-spacing: 1px;
}
/* Storyboard: keep the Rigging-style menu fixed at viewport bottom-right */
/* Subnav under hero: looks like Rigging pills + sticks under banner */
.subnav{
  position: sticky;
  top: 0;
  z-index: 9999;

  background: rgba(10,12,18,.75);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.subnav .subnav-inner{
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 0;
}

/* make all items look like Rigging hero-menu pills */
.subnav a{
  color:#fff;
  text-decoration:none;
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(0,0,0,.35);
  border: 1px solid rgba(255,255,255,.2);
  backdrop-filter: blur(6px);
  font-weight: 600;
}

.subnav a:hover{ background: rgba(0,0,0,.55); }

.subnav a.active{
  background: var(--accent);
  color: #08101f;
  border-color: transparent;
}

/* layout for right-side links */
.subnav .links{
  display:flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

@media (max-width: 700px){
  .subnav .subnav-inner{
    flex-wrap: wrap;
    justify-content: center;
  }
  .subnav .links{ justify-content: center; }
}
/* Back to Animation = blue */
.subnav .brand{
  color: #4da3ff;
}

/* hover 更亮一點 */
.subnav .brand:hover{
  color: #79bdff;
}
.rendering-page .sub{
  font-size: 20px;
  opacity: 0.8;
  letter-spacing: 1px;
}
/* about page layout */
.about-grid{
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 24px;
  align-items: start;
}

/* 手機版 */
@media (max-width: 768px){
  .about-grid{
    grid-template-columns: 1fr;
  }
}
/* center top menu */
.subnav .subnav-inner{
  justify-content: center;
}

.subnav .links{
  justify-content: center;
}

.about-grid img{
  width: 100%;
  border-radius: 12px;
}

.about-grid .card{
  padding: 18px;
}

.meta{
  color: #aab3d6;
}

.about-page .sub{
  font-size: 20px;
  opacity: 0.8;
  letter-spacing: 1px;
}