* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: Arial, sans-serif;
}

body {
  background: #F0EEE9;
  color: #0c0c0c;
  overflow-x: hidden;
}

/* NAV */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  height: 64px;
  background: #0c0c0c;
  color: #F0EEE9;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 40px;
  z-index: 10;
}

.logo a {
  font-weight: 800;
  font-size: 2rem;
  color: #F0EEE9;
  text-decoration: none;
}

nav {
  display: flex;
  gap: 40px;
}

nav a {
  color: #F0EEE9;
  text-decoration: none;
  font-size: 0.95rem;
}

nav a:hover {
  opacity: 0.7;
}

/* ================= WORKS LAYOUT ================= */

.works-page {
  padding-top: 120px;
}

.works-section {
  max-width: 1200px;
  margin: 0 auto 120px;
  padding: 0 40px;
}

.works-section h2 {
  font-size: 2rem;
  margin-bottom: 32px;
}

/* ================= TOGGLES ================= */

.toggle-title {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  display: flex;
  gap: 12px;
  margin: 24px 0;
}

.toggle-title:hover {
  opacity: 0.6;
}

.toggle-title.active .arrow {
  transform: rotate(90deg);
}


.brand-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 48px;
}

.brand-grid.hidden {
  display: none;
}

/* DEFAULT FRAME */
.brand-grid div {
  width: 100%;
  aspect-ratio: 4 / 5; /* editorial default */
  border-radius: 12px;
  background: #E6E4DF;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.brand-grid img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.frame-a4 { aspect-ratio: 210 / 297; }
.frame-square { aspect-ratio: 1 / 1; }
.frame-vertical { aspect-ratio: 9 / 16; }
.frame-horizontal { aspect-ratio: 16 / 9; }


/* CARD TYPES */
.grid-wide {
  grid-row: span 1;
}

.grid-tall {
  grid-row: span 2;
}

/* FRAME BEHAVIOR (CANVA STYLE) */
.brand-grid div {
  border-radius: 12px;
  overflow: hidden;
  background: #E6E4DF; /* intentional frame color */
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-grid img {
  width: 100%;
  height: 100%;
  object-fit: contain;     /* KEY LINE */
  object-position: center;
}

.brand-grid img {
  padding: 12px;
}

.brand-grid div:hover img {
  transform: scale(1.03);
  transition: transform 0.3s ease;
}


/* ================= PRODUCTION ================= */

.production-section {
  background: #0c0c0c;
  color: #F0EEE9;
  padding: 120px 40px;
}

.production-section h2 {
  max-width: 1200px;
  margin: 0 auto 64px;
}

/* MAIN ITEMS */
.production-item {
  max-width: 1200px;
  margin: 0 auto 80px;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 40px;
}

.production-thumb {
  border-radius: 16px;
  overflow: hidden;
  background: #1a1a1a;
}

.production-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* TEXT */
.production-info {
  font-size: 0.9rem;
  line-height: 1.5;
}

.title-row {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 16px;
}

.title-row h3 {
  font-size: 1rem;
  font-weight: 600;
}

.year {
  opacity: 0.5;
}

.watch-link {
  display: inline-block;
  margin: 16px 0;
  text-decoration: underline;
  color: #F0EEE9;
}

.watch-link:hover {
  opacity: 0.6;
}

/* EPISODES */
.episode-grid {
  max-width: 1200px;
  margin: 40px auto 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.episode-thumb {
  border-radius: 16px;
  background: #1a1a1a;
  overflow: hidden;
}

.episode-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.episode-meta {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  font-size: 0.8rem;
  opacity: 0.7;
}

/* FRAME RATIOS */
.frame-horizontal { aspect-ratio: 16 / 9; }
.frame-vertical { aspect-ratio: 9 / 16; }

/* ================= RESPONSIVE ================= */

@media (max-width: 768px) {

  .works-section {
    padding: 0 24px;
  }

  .production-grid {
    grid-template-columns: 1fr;
  }

  .video-card {
    grid-template-columns: 1fr;
  }

}

/* FOOTER */
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 24px;
  text-align: center;
  font-size: 0.8rem;
  opacity: 0.6;
}

/* ================= RESPONSIVE ================= */

@media (max-width: 1024px) {
  .works-section h2 {
    font-size: 1.75rem;
  }
}

@media (max-width: 768px) {
  .works-section {
    padding: 80px 0;
  }

  .works-section h2 {
    padding: 0 24px;
    margin-bottom: 40px;
  }

  .navbar {
    padding: 0 24px;
  }
}

.vertical-video {
  position: relative;
  width: 100%;
  padding-top: 177.78%; /* 9:16 vertical ratio */
  background: #000;
  border-radius: 12px;
  overflow: hidden;
}

.vertical-video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* ================= RESPONSIVE ================= */

@media (max-width: 1024px) {
  .vertical-video-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .vertical-video-grid {
    grid-template-columns: 1fr;
    padding: 0 24px;
  }
}

@media (max-width: 768px) {
  .brand-grid {
    grid-template-columns: 1fr 1fr;
    grid-auto-rows: 140px;
  }
}
